Skip to main content

PMSF Python support for OpenSCENARIO 2.x

Project description

PMSF py-osc2 Framework

Build and Publish to PyPI PyPI Latest Release Package Status License Downloads

What is it?

PMSF py-osc2 is a Python package for working with ASAM OpenSCENARIO DSL 2.x scenario files.

Note that this package is currently provided as a community service. It is based on the current public review draft of version 2.1.0 of the language, which is non-final, and might include updates based on current developments. It is offered without any support and should be considered draft alpha quality.

Specifically both the public review draft standard, this rendering of the grammar in ANTLR4, and any intermediate fixes might contain errors.

Nor is the rendering of the grammar in ANTLR4 intended for purposes other than the goals of this package.

If you are interested in OpenSCENARIO DSL development, please feel free to contact us directly.

Main features

  • ANTLR4-based parser and lexer for parsing ASAM OpenSCENARIO DSL 2.x files.
  • Simple syntax checking driver osc2parser for parsing and checking ASAM OpenSCENARIO DSL 2.x files.

Where to get it

The source code is currently hosted on GitHub at: https://github.com/PMSFIT/py-osc2

Binary installers for the latest released version are available at the Python Package Index (PyPI).

# or PyPI
pip install py-osc2

Dependencies

When rebuilding the parser from its grammar:

Rebuilding the parser

To rebuild the parser, you need setuptools-antlr in addition to the normal dependencies above:

pip install setuptools-antlr

To rebuild the package with a rebuilt parser, execute:

python setup.py antlr build

or for installing:

python setup.py antlr install

or alternatively to install in development mode:

python setup.py antlr develop

License

(C) 2021-2024 PMSF IT Consulting Pierre R. Mai

MPL 2.0

Documentation

After installation of the package, an executable script, called osc2parser, is available to parse and check ASAM OpenSCENARIO DSL 2.x files:

osc2parser examples/demo.osc

This script can optionally also output a tree-view of the parsed file contents:

osc2parser -t examples/demo.osc

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

py-osc2-0.1.0.tar.gz (72.2 kB view details)

Uploaded Source

Built Distribution

py_osc2-0.1.0-py3-none-any.whl (69.3 kB view details)

Uploaded Python 3

File details

Details for the file py-osc2-0.1.0.tar.gz.

File metadata

  • Download URL: py-osc2-0.1.0.tar.gz
  • Upload date:
  • Size: 72.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for py-osc2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0c1bcd67fda6ff94b272144bb1170893434cee93b686a3cd2da14953a4ec5347
MD5 7ea9c9c8f30f975ac2aac44e3921b4f9
BLAKE2b-256 7bcef00c6c70de376aa3ec34e92bb36d84f51c6ec96bb019811496312ad9be69

See more details on using hashes here.

File details

Details for the file py_osc2-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: py_osc2-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 69.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for py_osc2-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 429040ea0c7d8c4217ba12142ea7ec9002732be46d4e9a63d120f868c27fed79
MD5 6c640f04ebbe671793e34a44d18732d6
BLAKE2b-256 fe89a9939270fbbf9034e350e947fdde6dbf8a1954b9917dd0c55fb555e1fb1d

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