Skip to main content

Modelon-impact-client

Client library for easy scripting against Modelon Impact

Installation

For installation instructions and requirements, please refer to the documentation.

Develop

Devcontainer

If you are developing with VS Code you can use the devcontainer which gives gives you a ready to use environment for development. Just click the "Reopen in Container" button after opening the project in VS Code.

Tips and tricks

It is possible to run the 'make' commands listed bellow using the devcontainer. It will detect being in a container and bypass Docker parts of the commands.

You can open a project with the dev-container directly without having to open and then re-load. Standing in the project directory you can run:

devcontainer open .

Note that this requires the devcontainer-cli.

You can add your own extensions to devcontainers. These extensions will be added for all devcontainers. First open your 'settings' as JSON. Then, to add for example the "GitLens" extension, put the following at the bottom of the settings:

    ...
    "remote.containers.defaultExtensions": ["eamodio.gitlens"]
}

VS Code also have a 'Install Local Extensions in 'Remote' command, but it must be repeated for each devcontainer and everytime a devcontainer is re-built.

Creating a shell

Modelon-impact-client is developed using a Docker container for all build tools. You can get a shell into said container by running:

make shell

Manage dependencies

Dependencies are managed by poetry. Add dependencies by running poetry add <package> or poetry add <package> --dev inside the shell

Running tests

Tests are executed by running make test. You can also run make test-watch to get a watcher that continuously re-runs the tests.

Running lint

make lint

Build

Building modelon-impact-client is done by running

make wheel

Test

The tests for modelon-impact-client could be run by executing

make test

VCR test

Vcrpy(https://vcrpy.readthedocs.io/en/latest/) is used to mock the http requests and responses for some of the tests. VCR.py records all HTTP interactions that take place in a flat file called a 'cassette'. These files could are stored in the impact-client-python/tests/fixtures/vcr_cassettes folder. When an API response/request body is updated on MI, these files need to be regenerated. To regenerate these file, follow the following steps:

  1. Start Modelon impact cloud - https://impact.modelon.cloud.
  2. Generate an MI api key and JH token and store them in secrets folder. See Readme for more information.
  3. Delete the cassette file you wish to regenerate from impact-client-python/tests/fixtures/vcr_cassettes folder.
  4. The file could now be regenrated by executing
make regenerate-cassette

Release

The modelon-impact-client build process is a fully automated using Semantic-release.

Automation is enabled for:

  • Bumping version
  • Generate changelog

This is done based on git commit semantics as described here: https://semantic-release.gitbook.io/semantic-release/

To make a new release simply run:

make publish

This command will detect what branch you are on and your git history and make a appropriate release.

Current configuration can be found in .releaserc and specifies that commits to branch master should be released and commits to branch beta should be released as a pre-release.

This workflow make sure that no administrative time needs to be put into managing the release workflow.

Metadata

Release files for modelon-impact-client 4.14.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for modelon-impact-client 4.14.1
File Size Uploaded Provenance Actions
modelon_impact_client-4.14.1.tar.gz 77.3 kB Without provenance Details for modelon_impact_client-4.14.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for modelon-impact-client 4.14.1
File Interpreter ABI Platform Actions
modelon_impact_client-4.14.1-py3-none-any.whl Python 3 none any Details for modelon_impact_client-4.14.1-py3-none-any.whl

Total release size: 197.2 kB

Release files / modelon_impact_client-4.14.1.tar.gz

Download URL modelon_impact_client-4.14.1.tar.gz
Size 77.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3c68b0891f413847170c2f511214dcf0b02725e1ca7d24951636a98ca3df22bf
BLAKE2b-256 checksum
How to use checksums
a46475b0e5ce16c7b3ad580e20c535220c4c00157bd02daf1e0742b7df031c28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.9.25 Linux/5.15.0-185-generic

Release files / modelon_impact_client-4.14.1-py3-none-any.whl

Download URL modelon_impact_client-4.14.1-py3-none-any.whl
Size 119.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c375057a46a2bd1c223ffe932bc268f47b0d8e0dd2b506ee795a0772084f2609
BLAKE2b-256 checksum
How to use checksums
4e6667ebbce9a56543b08a495edd108221e1f157d9974c05b00aed71678bd71d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.9.25 Linux/5.15.0-185-generic

Security for modelon-impact-client 4.14.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.14.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page