sim-explorer


Namesim-explorer JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryExperimentation tools on top of OSP simulation models.
upload_time2024-12-18 08:19:09
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2024 [DNV](https://www.dnv.com) [open source](https://github.com/dnv-opensource) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords fmi osp model simulation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============
The package includes tools for experimentation on simulation models.
In the current version experimentation on top of OSP models is implemented.
The package introduces a json5-based file format for experiment specification.
Based on this specification

* a system model link is stored
* active variables are defined and alias names can be given
* the simulation base case variable settings are defined
* a hierarchy of sub-cases can be defined with their dedicated variable settings
* the common results to be retrieved from simulation runs is defined

Other features are

* alias variables can address multiple components of the same type, ensuring efficient experimentation.
* alias variables can vectors, even in FMI2 models. It is possible to set/get slices of such vectors
* variable settings can be time-based, enabling the definition of scenarios
* variable retrievals (results) can be time-based (in general and per case), enabling efficient model verification

The package does not support systematic variable sweep with respect to sets of variables.
Such sweeps should be performed with separate tools.
The package might be compared with navigating through a huge house, where the cases represent the various rooms,
while searching for object in a given room is left to separate tools.

The package is designed as support tool for Assurance of Simulation Models, see `DNV-RP-0513 <https://standards.dnv.com/explorer/document/6A4F5922251B496B9216572C23730D33/2>`_.

The package is currently under development. More instructions and documentation will be added.

Installation
------------

``pip install sim-explorer``


Development Setup
-----------------

1. Install uv
^^^^^^^^^^^^^
This project uses `uv` as package manager.

If 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:

..on Windows:

``powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"``

..on MacOS and Linux:

``curl -LsSf https://astral.sh/uv/install.sh | sh``

(see `docs.astral.sh/uv <https://docs.astral.sh/uv/getting-started/installation//>`_ for all / alternative installation methods.)

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

``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``:

``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``:

``winget install --id Python.Python``

or you can download and install Python from the `python.org <https://www.python.org/downloads//>`_ website.

3. Clone the repository
^^^^^^^^^^^^^^^^^^^^^^^
Clone the sim-explorer repository into your local development directory:

``git clone https://github.com/dnv-opensource/sim-explorer path/to/your/dev/sim-explorer``

4. Install dependencies
^^^^^^^^^^^^^^^^^^^^^^^
Run ``uv sync`` to create a virtual environment and install all project dependencies into it:

``uv sync``

5. (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:

``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:

``.venv\Scripts\activate.bat``

..on Linux:

``source .venv/bin/activate``

6. 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:

``uv run pre-commit install``

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

7. Test that the installation works
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To test that the installation works, run pytest in the project root folder:

``uv run pytest``


Meta
----
Copyright (c) 2024 `DNV <https://www.dnv.com/>`_ AS. All rights reserved.

Siegfried Eisinger - siegfried.eisinger@dnv.com

Distributed under the MIT license. See `LICENSE <LICENSE.md/>`_ for more information.

`https://github.com/dnv-opensource/sim-explorer <https://github.com/dnv-opensource/sim-explorer/>`_

Contribute
----------
Anybody in the OSP community is welcome to contribute to this code, to make it better,
and especially including other features from model assurance,
as we firmly believe that trust in our models is needed
if we want to base critical decisions on the support from these models.


To contribute, follow these steps:

1. Fork it `<https://github.com/dnv-opensource/sim-explorer/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

For your contribution, please make sure you follow the `STYLEGUIDE <STYLEGUIDE.md/>`_ before creating the Pull Request.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sim-explorer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "FMI, OSP, model, simulation",
    "author": null,
    "author_email": "Siegfried Eisinger <Siegfried.Eisinger@dnv.com>",
    "download_url": "https://files.pythonhosted.org/packages/80/a4/3a00324dd60d0d9ed18bef2ea7ba8a5bca633f218250744c189e31a5c42b/sim_explorer-0.2.0.tar.gz",
    "platform": null,
    "description": "Introduction\n============\nThe package includes tools for experimentation on simulation models.\nIn the current version experimentation on top of OSP models is implemented.\nThe package introduces a json5-based file format for experiment specification.\nBased on this specification\n\n* a system model link is stored\n* active variables are defined and alias names can be given\n* the simulation base case variable settings are defined\n* a hierarchy of sub-cases can be defined with their dedicated variable settings\n* the common results to be retrieved from simulation runs is defined\n\nOther features are\n\n* alias variables can address multiple components of the same type, ensuring efficient experimentation.\n* alias variables can vectors, even in FMI2 models. It is possible to set/get slices of such vectors\n* variable settings can be time-based, enabling the definition of scenarios\n* variable retrievals (results) can be time-based (in general and per case), enabling efficient model verification\n\nThe package does not support systematic variable sweep with respect to sets of variables.\nSuch sweeps should be performed with separate tools.\nThe package might be compared with navigating through a huge house, where the cases represent the various rooms,\nwhile searching for object in a given room is left to separate tools.\n\nThe package is designed as support tool for Assurance of Simulation Models, see `DNV-RP-0513 <https://standards.dnv.com/explorer/document/6A4F5922251B496B9216572C23730D33/2>`_.\n\nThe package is currently under development. More instructions and documentation will be added.\n\nInstallation\n------------\n\n``pip install sim-explorer``\n\n\nDevelopment Setup\n-----------------\n\n1. Install uv\n^^^^^^^^^^^^^\nThis project uses `uv` as package manager.\n\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:\n\n..on Windows:\n\n``powershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"``\n\n..on MacOS and Linux:\n\n``curl -LsSf https://astral.sh/uv/install.sh | sh``\n\n(see `docs.astral.sh/uv <https://docs.astral.sh/uv/getting-started/installation//>`_ for all / alternative installation methods.)\n\nOnce installed, you can update `uv` to its latest version, anytime, by running:\n\n``uv self update``\n\n2. Install Python\n^^^^^^^^^^^^^^^^^\nThis project requires Python 3.10 or later.\n\nIf you don't already have a compatible version installed on your machine, the probably most comfortable way to install Python is through ``uv``:\n\n``uv python install``\n\nThis will install the latest stable version of Python into the uv Python directory, i.e. as a uv-managed version of Python.\n\nAlternatively, and if you want a standalone version of Python on your machine, you can install Python either via ``winget``:\n\n``winget install --id Python.Python``\n\nor you can download and install Python from the `python.org <https://www.python.org/downloads//>`_ website.\n\n3. Clone the repository\n^^^^^^^^^^^^^^^^^^^^^^^\nClone the sim-explorer repository into your local development directory:\n\n``git clone https://github.com/dnv-opensource/sim-explorer path/to/your/dev/sim-explorer``\n\n4. Install dependencies\n^^^^^^^^^^^^^^^^^^^^^^^\nRun ``uv sync`` to create a virtual environment and install all project dependencies into it:\n\n``uv sync``\n\n5. (Optional) Activate the virtual environment\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nWhen using ``uv``, there is in almost all cases no longer a need to manually activate the virtual environment.\n\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:\n\n``uv run <command>``\n\nHowever, you still *can* manually activate the virtual environment if needed.\nWhen developing in an IDE, for instance, this can in some cases be necessary depending on your IDE settings.\nTo manually activate the virtual environment, run one of the \"known\" legacy commands:\n\n..on Windows:\n\n``.venv\\Scripts\\activate.bat``\n\n..on Linux:\n\n``source .venv/bin/activate``\n\n6. Install pre-commit hooks\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\nThe ``.pre-commit-config.yaml`` file in the project root directory contains a configuration for pre-commit hooks.\nTo install the pre-commit hooks defined therein in your local git repository, run:\n\n``uv run pre-commit install``\n\nAll pre-commit hooks configured in ``.pre-commit-config.yam`` will now run each time you commit changes.\n\n7. Test that the installation works\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nTo test that the installation works, run pytest in the project root folder:\n\n``uv run pytest``\n\n\nMeta\n----\nCopyright (c) 2024 `DNV <https://www.dnv.com/>`_ AS. All rights reserved.\n\nSiegfried Eisinger - siegfried.eisinger@dnv.com\n\nDistributed under the MIT license. See `LICENSE <LICENSE.md/>`_ for more information.\n\n`https://github.com/dnv-opensource/sim-explorer <https://github.com/dnv-opensource/sim-explorer/>`_\n\nContribute\n----------\nAnybody in the OSP community is welcome to contribute to this code, to make it better,\nand especially including other features from model assurance,\nas we firmly believe that trust in our models is needed\nif we want to base critical decisions on the support from these models.\n\n\nTo contribute, follow these steps:\n\n1. Fork it `<https://github.com/dnv-opensource/sim-explorer/fork/>`_\n2. Create an issue in your GitHub repo\n3. Create your branch based on the issue number and type (``git checkout -b issue-name``)\n4. Evaluate and stage the changes you want to commit (``git add -i``)\n5. Commit your changes (``git commit -am 'place a descriptive commit message here'``)\n6. Push to the branch (``git push origin issue-name``)\n7. Create a new Pull Request in GitHub\n\nFor your contribution, please make sure you follow the `STYLEGUIDE <STYLEGUIDE.md/>`_ before creating the Pull Request.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 [DNV](https://www.dnv.com) [open source](https://github.com/dnv-opensource)  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Experimentation tools on top of OSP simulation models.",
    "version": "0.2.0",
    "project_urls": {
        "Changelog": "https://github.com/dnv-innersource/sim-explorer/blob/main/CHANGELOG.md",
        "Documentation": "https://dnv-innersource.github.io/sim-explorer/README.html",
        "Homepage": "https://github.com/dnv-innersource/sim-explorer",
        "Issues": "https://github.com/dnv-innersource/sim-explorer/issues",
        "Repository": "https://github.com/dnv-innersource/sim-explorer.git"
    },
    "split_keywords": [
        "fmi",
        " osp",
        " model",
        " simulation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22a4e13234f2d873ae76a2e95a29f57a35692942e699b935267ead63d28331c3",
                "md5": "e762f3297ac434f0c0e46f33ae761d57",
                "sha256": "55c06524402f26a068b5da2d69b2121184722d07c4c80ee60581cddeb276890d"
            },
            "downloads": -1,
            "filename": "sim_explorer-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e762f3297ac434f0c0e46f33ae761d57",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 51864,
            "upload_time": "2024-12-18T08:19:06",
            "upload_time_iso_8601": "2024-12-18T08:19:06.559254Z",
            "url": "https://files.pythonhosted.org/packages/22/a4/e13234f2d873ae76a2e95a29f57a35692942e699b935267ead63d28331c3/sim_explorer-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "80a43a00324dd60d0d9ed18bef2ea7ba8a5bca633f218250744c189e31a5c42b",
                "md5": "473eece09d4687d9ff6c165ee3924f54",
                "sha256": "da91a1ca298d518a69bd8154630f9d9d3d856012eacc30157b2da63ac8eac838"
            },
            "downloads": -1,
            "filename": "sim_explorer-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "473eece09d4687d9ff6c165ee3924f54",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 2184012,
            "upload_time": "2024-12-18T08:19:09",
            "upload_time_iso_8601": "2024-12-18T08:19:09.753381Z",
            "url": "https://files.pythonhosted.org/packages/80/a4/3a00324dd60d0d9ed18bef2ea7ba8a5bca633f218250744c189e31a5c42b/sim_explorer-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-18 08:19:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dnv-innersource",
    "github_project": "sim-explorer",
    "github_not_found": true,
    "lcname": "sim-explorer"
}
        
Elapsed time: 0.95775s