Skip to main content

Library for creating and interacting with OpenDORS datasets.

Project description

opendors

Library for creating and interacting with the OpenDORS dataset.

Installation

Install directly from PyPI: pip install opendors.

Install from source (requires Poetry):

# Clone git repository & change into clone directory
git clone git@gitlab.dlr.de:drus_st/opendorslib.git
cd opendorslib

# Install with poetry
poetry install

If you want to use the repository workflow rule, you also need to install Ruby with the github-linguist and licensee gems.

This repository contains a definition for a conda environment that you can use to install these extra dependencies: conda-environment.yml. To install the dependencies, do:

mamba env create -n opendors --file conda-environment.yml
mamba activate opendors
gem install github-linguist
gem install licensee

Keep the environment activated to use the repository rule.

Usage

opendors provides both an API for creating an OpenDORS dataset, and a CLI tool to interact with an OpenDORS dataset.

usage: opendors [-h] [-c] [-v] {schema,filter,stats,merge} ...

Utilities to work with OpenDORS datasets.

positional arguments:
  {schema,filter,stats,merge}
                        Available commands
    schema              Exports the JSON schema for the opendors model to 'schema.json'.
    filter              Filters a given dataset by programming language and/or before/after dates.
    stats               Gather statistics on a given OpenDORS dataset.
    merge               Merge OpenDORS datasets into a single file.

options:
  -h, --help            show this help message and exit
  -c, --compressed      Export as unindented JSON
  -v, --verbose         Print tracebacks on error

Build Python package

Run poetry build.

To publish to PyPI, run poetry publish. You need to have a PyPI API token configured to do this.

Run tests

Tests can be run locally as follows:

poetry run pytest tests/

Test coverage

Coverage (with branch coverage) can be displayed as follows:

poetry run python -m pytest tests --cov=opendors --cov-branch --cov-report=html --cov-report=term

Static code analysis

Run prospector to analyse the code.

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

opendors-0.1.dev18.tar.gz (55.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opendors-0.1.dev18-py3-none-any.whl (63.6 kB view details)

Uploaded Python 3

File details

Details for the file opendors-0.1.dev18.tar.gz.

File metadata

  • Download URL: opendors-0.1.dev18.tar.gz
  • Upload date:
  • Size: 55.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for opendors-0.1.dev18.tar.gz
Algorithm Hash digest
SHA256 5708fd346bab06d1a47a5d174bfe5e00796a3c373d136b8964e3085307292b2b
MD5 b1c2d1a73d9be1899299c12caf8597b0
BLAKE2b-256 07ab319ea6792158d1f8f4dd631e2fdcff3f6d806a8947865a50135bb4151b56

See more details on using hashes here.

File details

Details for the file opendors-0.1.dev18-py3-none-any.whl.

File metadata

  • Download URL: opendors-0.1.dev18-py3-none-any.whl
  • Upload date:
  • Size: 63.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for opendors-0.1.dev18-py3-none-any.whl
Algorithm Hash digest
SHA256 b06cdc789a97f402dd59d9fdc02f3899a01780f6a815c856f710ec9c13d67a45
MD5 f9d45a4e506e8aaaf80de81d0e2fd9e6
BLAKE2b-256 b4d261a8dcb08fffa64bd8bd4c8644f63ac0b1434e463a69d6efecc2fa2e4f32

See more details on using hashes here.

Supported by

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