{"id":26892072,"url":"https://github.com/dnv-opensource/ospx","last_synced_at":"2025-03-31T22:49:02.030Z","repository":{"id":39686446,"uuid":"428230336","full_name":"dnv-opensource/ospx","owner":"dnv-opensource","description":"Python package supporting the creation of OSP (co-)simulation cases using functional mockup units (FMUs) and a dictionary based configuration.","archived":false,"fork":false,"pushed_at":"2024-05-02T05:35:27.000Z","size":17027,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-02T21:27:28.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-15T11:08:34.000Z","updated_at":"2024-05-04T06:28:27.846Z","dependencies_parsed_at":"2024-01-20T08:27:35.851Z","dependency_job_id":"504a4432-3f4a-419c-a89f-68a404852b8b","html_url":"https://github.com/dnv-opensource/ospx","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Fospx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Fospx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Fospx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Fospx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnv-opensource","download_url":"https://codeload.github.com/dnv-opensource/ospx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246552881,"owners_count":20795838,"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","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:49:01.530Z","updated_at":"2025-03-31T22:49:02.021Z","avatar_url":"https://github.com/dnv-opensource.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pypi](https://img.shields.io/pypi/v/ospx.svg?color=blue)](https://pypi.python.org/pypi/ospx)\r\n[![versions](https://img.shields.io/pypi/pyversions/ospx.svg?color=blue)](https://pypi.python.org/pypi/ospx)\r\n[![license](https://img.shields.io/pypi/l/ospx.svg)](https://github.com/dnv-opensource/ospx/blob/main/LICENSE)\r\n![ci](https://img.shields.io/github/actions/workflow/status/dnv-opensource/ospx/.github%2Fworkflows%2Fnightly_build.yml?label=ci)\r\n[![docs](https://img.shields.io/github/actions/workflow/status/dnv-opensource/ospx/.github%2Fworkflows%2Fpush_to_release.yml?label=docs)][ospx_docs]\r\n\r\n# ospx\r\nospx is an extension package to [farn][farn_docs], adding support to build [OSP][osp_docs] (co-)simulation cases using functional mockup units (FMUs).\r\n\r\nospx supports\r\n* building of case-specific [OSP][osp_docs] (co-)simulation configuration files\r\n* watching the progress of cosim, and saving final simulation results as a pandas dataframe.\r\n\r\n## Installation\r\n\r\n```sh\r\npip install ospx\r\n```\r\nospx requires the following (sub-)package:\r\n* [dictIO][dictIO_docs]: foundation package, enabling ospx to handle configuration files in dictIO dict file format.\r\n\r\nHowever, dictIO gets installed automatically with ospx.\r\n\r\n## Usage Example\r\n\r\nospx provides both an API for use inside Python as well as a CLI for shell execution of core functions.\r\n\r\nReading a caseDict file and building the case-specific OSP (co-)simulation configuration files:\r\n```py\r\nfrom ospx import OspCaseBuilder\r\n\r\nOspCaseBuilder.build('caseDict')\r\n```\r\n\r\nThe above task can also be invoked from the command line, using the 'ospCaseBuilder' command line script installed with ospx:\r\n```sh\r\nospCaseBuilder caseDict\r\n```\r\n\r\n_For more examples and usage, please refer to [ospx's documentation][ospx_docs]._\r\n\r\n## File Format\r\nA caseDict is a file in dictIO dict file format used with farn.\r\n\r\n_For a documentation of the caseDict file format, see [File Format](fileFormat.rst) in [ospx's documentation][ospx_docs] on GitHub Pages._\r\n\r\n_For a detailed documentation of the dictIO dict file format used by farn, see [dictIO's documentation][dictIO_docs] on GitHub Pages._\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. Clone the repository\r\nClone the ospx repository into your local development directory:\r\n```sh\r\ngit clone https://github.com/dnv-opensource/ospx path/to/your/dev/ospx\r\n```\r\nChange into the project directory after cloning:\r\n```sh\r\ncd ospx\r\n```\r\n\r\n### 4. 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### 5. (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### 6. 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### 7. Test that the installation works\r\nTo test that the installation works, run pytest in the project root folder:\r\n```sh\r\nuv run pytest\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/ospx](https://github.com/dnv-opensource/ospx)\r\n\r\n## Contributing\r\n\r\n1. Fork it (\u003chttps://github.com/dnv-opensource/ospx/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\nFor your contribution, please make sure you follow the [STYLEGUIDE](STYLEGUIDE.md) before creating the Pull Request.\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\r\n[osp_docs]: https://open-simulation-platform.github.io/\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnv-opensource%2Fospx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnv-opensource%2Fospx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnv-opensource%2Fospx/lists"}