farn-demo

demo cases to get started with farn

https://github.com/dnv-opensource/farn-demo

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.1%) to scientific vocabulary
Last synced: 8 months ago · JSON representation ·

Repository

demo cases to get started with farn

Basic Info
  • Host: GitHub
  • Owner: dnv-opensource
  • License: mit
  • Language: C++
  • Default Branch: main
  • Size: 3.34 MB
Statistics
  • Stars: 1
  • Watchers: 7
  • Forks: 0
  • Open Issues: 1
  • Releases: 8
Created about 4 years ago · Last pushed 9 months ago
Metadata Files
Readme License Citation

README.md

farn-demo

Demo cases to get started with farn.

Development Setup

1. Install uv

This project uses uv as package manager. If you haven't already, install uv, preferably using it's "Standalone installer" method:
..on Windows: sh powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ..on MacOS and Linux: sh curl -LsSf https://astral.sh/uv/install.sh | sh (see docs.astral.sh/uv for all / alternative installation methods.)

Once installed, you can update uv to its latest version, anytime, by running: sh uv self update

2. Install Python

This project requires Python 3.10 or later.
If you don't already have a compatible version installed on your machine, the probably most comfortable way to install Python is through uv: sh uv python install This will install the latest stable version of Python into the uv Python directory, i.e. as a uv-managed version of Python.

Alternatively, and if you want a standalone version of Python on your machine, you can install Python either via winget: sh winget install --id Python.Python or you can download and install Python from the python.org website.

3. Install Graphviz system library

  • Download from https://www.graphviz.org/download/
  • Run the .exe file
  • Choose 'Add Graphviz to the system PATH for current user'

Make sure Graphviz is properly added to your system PATH variables. The following entry needs to exist in the USER PATH environment variable - add or adjust it if necessary:

sh %ProgramFiles%\Graphviz\bin

4. Install OSP cosim

  • Download the latest cosim release (cosim-v0.x.0-win64.zip) from GitHub
  • https://github.com/open-simulation-platform/cosim-cli/releases

Unzip the archive and copy its content into a suitable folder of your choice, e.g. sh C:\path\of\your\choice\osp\cosim\

Add the bin path to USER PATH environment variable: sh C:\path\of\your\choice\osp\cosim\bin

5. Clone the repository

Clone the farn-demo repository into your local development directory: sh git clone https://github.com/dnv-opensource/farn-demo path/to/your/dev/farn-demo Change into the project directory after cloning: sh cd farn-demo

6. Install dependencies

Run uv sync to create a virtual environment and install all project dependencies into it: sh uv sync

Note: Using --no-dev will omit installing development dependencies.

Note: uv will create a new virtual environment called .venv in the project root directory when running uv sync the first time. Optionally, you can create your own virtual environment using e.g. uv venv, before running uv sync.

7. (Optional) Activate the virtual environment

When using uv, there is in almost all cases no longer a need to manually activate the virtual environment.
uv will find the .venv virtual environment in the working directory or any parent directory, and activate it on the fly whenever you run a command via uv inside your project folder structure: sh uv run <command>

However, you still can manually activate the virtual environment if needed. When developing in an IDE, for instance, this can in some cases be necessary depending on your IDE settings. To manually activate the virtual environment, run one of the "known" legacy commands:
..on Windows: sh .venv\Scripts\activate.bat ..on Linux: sh source .venv/bin/activate

8. Install pre-commit hooks

The .pre-commit-config.yaml file in the project root directory contains a configuration for pre-commit hooks. To install the pre-commit hooks defined therein in your local git repository, run: sh uv run pre-commit install

All pre-commit hooks configured in .pre-commit-config.yaml will now run each time you commit changes.

pre-commit can also manually be invoked, at anytime, using: sh uv run pre-commit run --all-files

To skip the pre-commit validation on commits (e.g. when intentionally committing broken code), run: sh uv run git commit -m <MSG> --no-verify

To update the hooks configured in .pre-commit-config.yaml to their newest versions, run: sh uv run pre-commit autoupdate

Meta

Copyright (c) 2024 DNV SE. All rights reserved.

Frank Lumpitzsch - @LinkedIn - frank.lumpitzsch@dnv.com

Claas Rostock - @LinkedIn - claas.rostock@dnv.com

Seunghyeon Yoo - @LinkedIn - seunghyeon.yoo@dnv.com

Distributed under the MIT license. See LICENSE for more information.

https://github.com/dnv-opensource/farn-demo

Contributing

  1. Fork it (https://github.com/dnv-opensource/farn-demo/fork)
  2. Create an issue in your GitHub repo
  3. Create your branch based on the issue number and type (git checkout -b issue-name)
  4. Evaluate and stage the changes you want to commit (git add -i)
  5. Commit your changes (git commit -am 'place a descriptive commit message here')
  6. Push to the branch (git push origin issue-name)
  7. Create a new Pull Request in GitHub

farn Documentation on GitHub

For more examples and usage, please refer to farn's documentation.

Owner

  • Name: DNV open source
  • Login: dnv-opensource
  • Kind: organization
  • Location: Norway

Open source from DNV

Citation (CITATION.cff)

title: farn-demo
version: 0.4.1
abstract: >-
  Demo cases to get started with farn.
type: software
authors:
  - name: DNV SE
    address: 'Brooktorkai 18'
    post-code: '20457'
    city: Hamburg
    country: DE
    website: 'https://www.dnv.com/'
  - given-names: Frank
    family-names: Lumpitzsch
    affiliation: DNV
    email: frank.lumpitzsch@dnv.com
    website: 'https://www.linkedin.com/in/frank-lumpitzsch-23013196/'
  - given-names: Claas
    family-names: Rostock
    affiliation: DNV
    email: claas.rostock@dnv.com
    website: 'https://www.linkedin.com/in/claasrostock/?locale=en_US'
  - given-names: Seunghyeon
    family-names: Yoo
    affiliation: DNV
    email: seunghyeon.yoo@dnv.com
    website: 'https://www.linkedin.com/in/seunghyeon-yoo-3625173b/'
keywords:
  - farn
  - OSP
  - fmi
license: MIT
license-url: 'https://dnv-opensource.github.io/farn/LICENSE.html'
url: 'https://dnv-opensource.github.io/farn/README.html'
repository-code: 'https://github.com/dnv-opensource/farn'
message: 'Please cite this software using these metadata.'
cff-version: 1.2.0

GitHub Events

Total
  • Release event: 3
  • Delete event: 5
  • Push event: 7
  • Pull request event: 9
  • Create event: 6
Last Year
  • Release event: 3
  • Delete event: 5
  • Push event: 7
  • Pull request event: 9
  • Create event: 6

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 109
  • Total Committers: 4
  • Avg Commits per committer: 27.25
  • Development Distribution Score (DDS): 0.431
Past Year
  • Commits: 33
  • Committers: 1
  • Avg Commits per committer: 33.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Claas c****k@d****m 62
Claas c****k@d****m 45
fralum f****h@d****m 1
Frank Lumpitzsch f****h@d****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 2
  • Total pull requests: 15
  • Average time to close issues: 15 minutes
  • Average time to close pull requests: about 1 hour
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 8
  • Average time to close issues: N/A
  • Average time to close pull requests: 17 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ClaasRostock (1)
Pull Request Authors
  • ClaasRostock (23)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • black >=23.3
  • farn >=0.3.2
  • flake8 >=6.0
  • isort >=5.10.1
  • pep8-naming >=0.13
pyproject.toml pypi
requirements-dev.txt pypi
  • black ==23.11 development
  • pyright ==1.1.336 development
  • ruff ==0.1.6 development
  • sourcery ==1.14 development