Library for creating and interacting with OpenDORS datasets.
Project description
opendors
Library for creating and interacting with the OpenDORS dataset.
Installation
# 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 >= 3.4.1
github-linguistgem >= 9.0.0licenseegem >= 9.18.0
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:
conda create -n opendors --file conda-environment.yml
conda 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.
Build conda package
The conda package is configured in conda/recipe/local/meta.yaml,
and reuses information from pyproject.toml.
To build package locally, run
# Update to next dev version to keep build metadata intact
poetry version 0.1.dev<n>
conda create -n condabuild conda-build git
conda activate condabuild
conda build conda/recipe/local <optional: --output-folder [FOLDER]>
# e.g.:
# conda build conda/recipe/local --output-folder /home/stephan/src/opendors/conda-pkgs
You can then install the package in a new environment and use it:
conda create -n my-env --use-local opendors
Run tests
Tests can be run locally as follows:
poetry run python -m 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opendors-0.1.dev10.tar.gz.
File metadata
- Download URL: opendors-0.1.dev10.tar.gz
- Upload date:
- Size: 52.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45a3447e50277bcc40da836be36d66f1d4b265901cb6f7281d3704792c096c33
|
|
| MD5 |
d363df104769eac4fffa4a0516eb8625
|
|
| BLAKE2b-256 |
9e767ed0d03a175ce8e8f9f2c1a4fedf9be7a9899cf32a06d92b8576176bcd20
|
File details
Details for the file opendors-0.1.dev10-py3-none-any.whl.
File metadata
- Download URL: opendors-0.1.dev10-py3-none-any.whl
- Upload date:
- Size: 60.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e464cf5efc8ccaaa4600b8b545057596c3a7f127bab1be781247ce0eaf3e7b5
|
|
| MD5 |
7ecff4407d47ad690d92b67f39c89597
|
|
| BLAKE2b-256 |
418614cc293db1e2b04e1cc2fb37f7880e8f8604756131152cda28af39637d1c
|