{"id":26892013,"url":"https://github.com/dnv-opensource/farn-demo","last_synced_at":"2025-07-22T14:04:48.971Z","repository":{"id":104910187,"uuid":"454420563","full_name":"dnv-opensource/farn-demo","owner":"dnv-opensource","description":"demo cases to get started with farn","archived":false,"fork":false,"pushed_at":"2025-03-14T16:54:08.000Z","size":3457,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-13T15:59:05.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnv-opensource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-02-01T14:32:34.000Z","updated_at":"2025-03-14T16:54:10.000Z","dependencies_parsed_at":"2023-11-30T16:27:15.116Z","dependency_job_id":"8ce95805-97f0-4e82-85a8-de2365aa8039","html_url":"https://github.com/dnv-opensource/farn-demo","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/dnv-opensource/farn-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Ffarn-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Ffarn-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Ffarn-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Ffarn-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnv-opensource","download_url":"https://codeload.github.com/dnv-opensource/farn-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Ffarn-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266507366,"owners_count":23940055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-31T22:48:53.714Z","updated_at":"2025-07-22T14:04:48.919Z","avatar_url":"https://github.com/dnv-opensource.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# farn-demo\r\nDemo cases to get started with [farn][farn_docs].\r\n\r\n\r\n## Development Setup\r\n\r\n### 1. Install uv\r\nThis project uses `uv` as package manager.\r\nIf you haven't already, install [uv](https://docs.astral.sh/uv), preferably using it's [\"Standalone installer\"](https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_2) method: \u003cbr\u003e\r\n..on Windows:\r\n```sh\r\npowershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\r\n```\r\n..on MacOS and Linux:\r\n```sh\r\ncurl -LsSf https://astral.sh/uv/install.sh | sh\r\n```\r\n(see [docs.astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/) for all / alternative installation methods.)\r\n\r\nOnce installed, you can update `uv` to its latest version, anytime, by running:\r\n```sh\r\nuv self update\r\n```\r\n\r\n### 2. Install Python\r\nThis project requires Python 3.10 or later. \u003cbr\u003e\r\nIf you don't already have a compatible version installed on your machine, the probably most comfortable way to install Python is through `uv`:\r\n```sh\r\nuv python install\r\n```\r\nThis will install the latest stable version of Python into the uv Python directory, i.e. as a uv-managed version of Python.\r\n\r\nAlternatively, and if you want a standalone version of Python on your machine, you can install Python either via `winget`:\r\n```sh\r\nwinget install --id Python.Python\r\n```\r\nor you can download and install Python from the [python.org](https://www.python.org/downloads/) website.\r\n\r\n### 3. Install Graphviz system library\r\n\r\n* Download from https://www.graphviz.org/download/\r\n* Run the .exe file\r\n* Choose 'Add Graphviz to the system PATH for current user'\r\n\r\nMake sure Graphviz is properly added to your system PATH variables.\r\nThe following entry needs to exist in the USER PATH environment variable - add or adjust it if necessary:\r\n\r\n```sh\r\n%ProgramFiles%\\Graphviz\\bin\r\n```\r\n\r\n\r\n### 4. Install OSP cosim\r\n\r\n* Download the latest cosim release (cosim-v0.x.0-win64.zip) from GitHub\r\n* https://github.com/open-simulation-platform/cosim-cli/releases\r\n\r\nUnzip the archive and copy its content into a suitable folder of your choice, e.g.\r\n```sh\r\nC:\\path\\of\\your\\choice\\osp\\cosim\\\r\n```\r\n\r\nAdd the bin path to USER PATH environment variable:\r\n```sh\r\nC:\\path\\of\\your\\choice\\osp\\cosim\\bin\r\n```\r\n\r\n\r\n### 5. Clone the repository\r\nClone the farn-demo repository into your local development directory:\r\n```sh\r\ngit clone https://github.com/dnv-opensource/farn-demo path/to/your/dev/farn-demo\r\n```\r\nChange into the project directory after cloning:\r\n```sh\r\ncd farn-demo\r\n```\r\n\r\n### 6. Install dependencies\r\nRun `uv sync` to create a virtual environment and install all project dependencies into it:\r\n```sh\r\nuv sync\r\n```\r\n\u003e **Note**: Using `--no-dev` will omit installing development dependencies.\r\n\r\n\u003e **Note**: `uv` will create a new virtual environment called `.venv` in the project root directory when running\r\n\u003e `uv sync` the first time. Optionally, you can create your own virtual environment using e.g. `uv venv`, before running\r\n\u003e `uv sync`.\r\n\r\n### 7. (Optional) Activate the virtual environment\r\nWhen using `uv`, there is in almost all cases no longer a need to manually activate the virtual environment. \u003cbr\u003e\r\n`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:\r\n```sh\r\nuv run \u003ccommand\u003e\r\n```\r\n\r\nHowever, you still _can_ manually activate the virtual environment if needed.\r\nWhen developing in an IDE, for instance, this can in some cases be necessary depending on your IDE settings.\r\nTo manually activate the virtual environment, run one of the \"known\" legacy commands: \u003cbr\u003e\r\n..on Windows:\r\n```sh\r\n.venv\\Scripts\\activate.bat\r\n```\r\n..on Linux:\r\n```sh\r\nsource .venv/bin/activate\r\n```\r\n\r\n### 8. Install pre-commit hooks\r\nThe `.pre-commit-config.yaml` file in the project root directory contains a configuration for pre-commit hooks.\r\nTo install the pre-commit hooks defined therein in your local git repository, run:\r\n```sh\r\nuv run pre-commit install\r\n```\r\n\r\nAll pre-commit hooks configured in `.pre-commit-config.yaml` will now run each time you commit changes.\r\n\r\npre-commit can also manually be invoked, at anytime, using:\r\n```sh\r\nuv run pre-commit run --all-files\r\n```\r\n\r\nTo skip the pre-commit validation on commits (e.g. when intentionally committing broken code), run:\r\n```sh\r\nuv run git commit -m \u003cMSG\u003e --no-verify\r\n```\r\n\r\nTo update the hooks configured in `.pre-commit-config.yaml` to their newest versions, run:\r\n```sh\r\nuv run pre-commit autoupdate\r\n```\r\n\r\n## Meta\r\n\r\nCopyright (c) 2024 [DNV](https://www.dnv.com) SE. All rights reserved.\r\n\r\nFrank Lumpitzsch - [@LinkedIn](https://www.linkedin.com/in/frank-lumpitzsch-23013196/) - frank.lumpitzsch@dnv.com\r\n\r\nClaas Rostock - [@LinkedIn](https://www.linkedin.com/in/claasrostock/?locale=en_US) - claas.rostock@dnv.com\r\n\r\nSeunghyeon Yoo - [@LinkedIn](https://www.linkedin.com/in/seunghyeon-yoo-3625173b/) - seunghyeon.yoo@dnv.com\r\n\r\nDistributed under the MIT license. See [LICENSE](LICENSE.md) for more information.\r\n\r\n[https://github.com/dnv-opensource/farn-demo](https://github.com/dnv-opensource/farn-demo)\r\n\r\n## Contributing\r\n\r\n1. Fork it (\u003chttps://github.com/dnv-opensource/farn-demo/fork\u003e)\r\n2. Create an issue in your GitHub repo\r\n3. Create your branch based on the issue number and type (`git checkout -b issue-name`)\r\n4. Evaluate and stage the changes you want to commit (`git add -i`)\r\n5. Commit your changes (`git commit -am 'place a descriptive commit message here'`)\r\n6. Push to the branch (`git push origin issue-name`)\r\n7. Create a new Pull Request in GitHub\r\n\r\n\r\n## farn Documentation on GitHub\r\n\r\nFor more examples and usage, please refer to farn's [documentation][farn_docs].\r\n\r\n\r\n\r\n\u003c!-- Markdown link \u0026 img dfn's --\u003e\r\n[dictIO_docs]: https://dnv-opensource.github.io/dictIO/README.html\r\n[ospx_docs]: https://dnv-opensource.github.io/ospx/README.html\r\n[farn_docs]: https://dnv-opensource.github.io/farn/README.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnv-opensource%2Ffarn-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnv-opensource%2Ffarn-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnv-opensource%2Ffarn-demo/lists"}