Skip to main content

Documentation Status

OSP core

Native implementation of the core cuds object and the class generation by the SimPhoNy team at Fraunhofer IWM. Builds up on the previous version, simphony-common (SimPhoNy, EU FP7 Project (Nr. 604005) www.simphony-project.eu).

Requirements

  • PyYaml (on Windows, use https://stackoverflow.com/a/33673823) for parsing yaml files
  • numpy for vector attributes of cuds
  • websockets for the transport layer
  • requests for sending CUDS to a server
  • tox to run unittests
  • unittest2 to run unittests
  • pympler for the performance test
  • responses for unittesting requests

Installation

OSP-core is available on PyPI, so it can be installed using pip

pip install osp-core

For more detailed instructions, see https://simphony.readthedocs.io/en/latest/installation.html.

Visualization of ontologies

We provide the tool ontology2dot to visualize your ontologies. You can visualize installed namespaces together with non-installed yaml files (requires Graphviz https://graphviz.gitlab.io/):

ontology2dot <installed-namespace-1> ... <installed-namespace-n> <path/to/ontology-1.yml> ... <path/to/ontology-m.yml>

# Alternative
python -m osp.core.tools.ontology2dot <installed-namespace-1> ... <installed-namespace-n> <path/to/ontology-1.yml> ... <path/to/ontology-m.yml>

You can use parameter -g to group the namespaces. Use -o to change the filename of the resulting png file.

Testing

Testing is done using tox (pip install tox):

# run tests automatically in different environments
tox

# run tests in your current environment (you must manually install unittest2, responses for that)
python -m unittest -v

Documentation

Our documentation is located at https://simphony.readthedocs.io.

If you want to build the documentation locally, refer to our documentation repostitory.

Examples

Further examples can be found in the /examples folder. There the usage of wrappers is explained.

Troubleshooting

If installation fails, try to install the dependencies one by one before installing osp-core. The dependencies are listed at the top of this readme file.

On Windows, unittests can fail when you use a virtual environment. For testing the transport layer, we start a transport layer server using pythons subprocess package. It can happen, that the started subprocess does not pick up the correct virtual environment, causing the server to crash and the corresponding tests to fail. From our experience, this will not happen if you use the virtual environements of conda.

Directory structure

  • osp/core -- The source code
    • tools -- various tools to work with osp-core.
    • ontology -- the parser and generation of the entities and classes.
      • yml -- The supplied ontology files
    • session -- Different abstract classes for wrappers.
  • examples -- examples of usage.
  • tests -- unittesting of the code

Acknowledgements

The OSP-core Python package originates from the European Project SimPhoNy (Project Nr. 604005). We would like to acknowledge and thank our project partners, especially Enthought, Inc, Centre Internacional de Mètodes Numèrics a l'Enginyeria (CIMNE) and the University of Jyväskylä, for their important contributions to some of the core concepts of OSP-core, which were originally demonstrated under the project https://github.com/simphony/simphony-common.

Metadata

Release files for osp-core 3.9.0

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

Source distribution (sdist)

Source distribution for osp-core 3.9.0
File Size Uploaded Provenance Actions
osp-core-3.9.0.tar.gz 123.7 kB Without provenance Details for osp-core-3.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for osp-core 3.9.0
File Interpreter ABI Platform Actions
osp_core-3.9.0-py3-none-any.whl Python 3 none any Details for osp_core-3.9.0-py3-none-any.whl

Total release size: 277.4 kB

Release files / osp-core-3.9.0.tar.gz

Download URL osp-core-3.9.0.tar.gz
Size 123.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3fce5c50e95b1cad22a1fb4091294b07ae8b0050030b3ffff9ca94af2cdcdb1b
BLAKE2b-256 checksum
How to use checksums
70259dd44f264ef1eb5fad52dc0144e82e7846302fb27b419c35cbbbeb48da4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release files / osp_core-3.9.0-py3-none-any.whl

Download URL osp_core-3.9.0-py3-none-any.whl
Size 153.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89f7fb3adc74fde9e05808d449af4a0cf069e60d4b950412d8e7313be2e9fb03
BLAKE2b-256 checksum
How to use checksums
0be8de723d25b09043ce645e3902bc1aadc22a08d79525b008765056ba3ea213
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Security for osp-core 3.9.0

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.

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