Skip to main content

The native implementation of the SimPhoNy CUDS objects

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osp-core-3.7.0.tar.gz (118.0 kB view details)

Uploaded Source

Built Distribution

osp_core-3.7.0-py3-none-any.whl (146.8 kB view details)

Uploaded Python 3

File details

Details for the file osp-core-3.7.0.tar.gz.

File metadata

  • Download URL: osp-core-3.7.0.tar.gz
  • Upload date:
  • Size: 118.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for osp-core-3.7.0.tar.gz
Algorithm Hash digest
SHA256 dd74210e31ffaad2bd65c52574633baa4e1d087f2b3d9592a67861c708cf79b6
MD5 04aa7fd5d6d9884599eb5d78f4930eeb
BLAKE2b-256 fae12c8da8a180c1122fd405b6abf3e7df281d424e238f34413a5f6622f0eb55

See more details on using hashes here.

File details

Details for the file osp_core-3.7.0-py3-none-any.whl.

File metadata

  • Download URL: osp_core-3.7.0-py3-none-any.whl
  • Upload date:
  • Size: 146.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for osp_core-3.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ae801ce3afa22b9eb9b14cdd64ac2917aed056d9d77a7d324e9384c8baa26b8
MD5 cfe358609e4fb28efc6c1cbfa53cc163
BLAKE2b-256 86bce87600fac4543c3b5a2af78bf6abb0edff4e818ea81483d5028d0921818d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page