Skip to main content

Python data classes and JSON schemata for maritime traffic scenarios.

Project description

maritime-schema

Python package containing data classes and corresponding JSON schemata for common types used in generating traffic scenarios and testing of autonomy

maritime-schema supports

  • ..

Installation

pip install .

Usage Example

API:

from maritime_schema import ...

CLI:

maritime-schema ...

For more examples and usage, please refer to maritime-schema's documentation.

Development Setup

  1. Install Python 3.9 or higher, i.e. Python 3.10 or Python 3.11

  2. Update pip and setuptools:

    python -m pip install --upgrade pip setuptools
    
  3. git clone the maritime-schema repository into your local development directory:

    git clone https://github.com/dnv-opensource/maritime-schema path/to/your/dev/maritime-schema
    
  4. In the maritime-schema root folder:

    Create a Python virtual environment:

    python -m venv .venv
    

    Activate the virtual environment:

    ..on Windows:

    > .venv\Scripts\activate.bat
    

    ..on Linux:

    source .venv/bin/activate
    

    Update pip and setuptools:

    (.venv) $ python -m pip install --upgrade pip setuptools
    

    Install maritime-schema's dependencies:

    (.venv) $ pip install -r requirements-dev.txt
    

    This should return without errors.

  5. Setup your development environment to locate Python source codes:

    For example, Visual Studio Code on Windows assumes the Python environment is specified in a .env file.
    If you are developing and running the Python code from VSCode, make sure to create a .env file in the maritime-schema root folder with below content.
    Set the path for PROJ_DIR to where your maritime-schema folder is on your system.
    Note: .env is part of .gitignore, such that you do not commit your .env file to the repository.

    PROJ_DIR=<path-to-maritime-schema-root-dir>
    PYTHONPATH=${PROJ_DIR}/src
    
  6. Test that the installation works (in the maritime-schema root folder):

    (.venv) $ pytest .
    

Meta

Copyright (c) 2024 DNV open source

Author One - @LinkedIn - author.one@dnv.com

Author Two - @LinkedIn - author.two@dnv.com

Claas Rostock - @LinkedIn - claas.rostock@dnv.com

Distributed under the MIT license. See LICENSE for more information.

https://github.com/dnv-opensource/maritime-schema

Contributing

  1. Fork it (https://github.com/AuthorOne/maritime-schema/fork)
  2. Create your branch (git checkout -b my-branch-name)
  3. Commit your changes (git commit -am 'place a descriptive commit message here')
  4. Push to the branch (git push origin my-branch-name)
  5. Create a new Pull Request in GitHub

For your contribution, please make sure you follow the STYLEGUIDE before creating the Pull Request.

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

maritime-schema-0.0.3b2.tar.gz (12.0 kB view details)

Uploaded Source

File details

Details for the file maritime-schema-0.0.3b2.tar.gz.

File metadata

  • Download URL: maritime-schema-0.0.3b2.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for maritime-schema-0.0.3b2.tar.gz
Algorithm Hash digest
SHA256 babfa87de9fa1f3402068e39a20273e20b62a807c49846f3405b3cf8db4436e5
MD5 ff0fbabb17e02b02996e00a42542ce0c
BLAKE2b-256 016998ddf07623684c3fb888f39525c28211e880f9f41c5ac41b6052f94675d8

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