DSP-TOOLS - The DaSCH Service Platform Tools Repository
dsp-tools is a python package containing a command line tool for data model (ontology) creation, a library allowing creation of single resources and mass upload using the bulk import of data into the Knora framework.
The package consists of:
dsplibPython modules for accessing Knora using the API (ontology creation, data import/export etc.)dsp-toolsA command line program to perfrom several operations on a DSP server:- create an ontology out of a simple JSON description
- dump an existing ontology from a DSP server to a JSON file
- Bulk-upload of data from a XML data file
Go to Full Documentation
Install
Please note that dsp-tools require Python 3.9 for working properly!
To install the latest published version from PyPI, run:
$ pip3 install dsp-tools
To upgrade to the latest published version, run:
$ pip3 install --upgrade dsp-tools
Local Development Environment
- Python3
- Bazel
Please consult the https://docs.dasch.swiss/developers documentation on how to install these prerequisites.
Makefile for repository management tasks
The project contains a Makefile defining management tasks. Please use
make help to see what is available.
To install from source, i.e., this repository, run:
$ make install
Testing
$ make test
Publishing
Publishing is automated with github actions and should not be done manually.
Ensure to have only one Pull Request per feature, and follow the conventions for commit messages and PR title.
If this is done correctly, when merging a PR into main, the release-please action will create or update a release-PR.
This PR will follow semantic versioning and update the change log.
Once all desired features are merged, the release can be executed by merging the release-PR into main.
This will trigger actions that create a release on Github, on PyPI and the docs.
Publishing to PyPi
Generate distribution package. Make sure you have the latest versions of setuptools and wheel installed.
Remove the distand buil-directories: rm -rf bild dist
$ make upgrade-dist-tools
$ make dist
You can install the package locally from the dist:
$ python3 -m pip install ./dist/some_name.whl
Upload package with twine,
first create ~/.pypirc in your home folder:
[distutils]
index-servers=pypi
[pypi]
repository = https://upload.pypi.org/legacy/
username =your_username_on_pypi
then upload:
$ make upload
For local development:
$ python3 setup.py --editable .
Requirements
To install the requirements:
$ pip3 install -r requirements.txt
To generate a "requirements" file (usually requirements.txt), that you commit with your project, do:
$ pip3 freeze > requirements.txt
Running tests with Bazel
Run all tests:
$ bazel test //...
Run single test:
$ bazel test //test:test_user
Release files for dsp-tools 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dsp-tools-1.1.1.tar.gz | 86.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dsp_tools-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 192.5 kB
Release files / dsp-tools-1.1.1.tar.gz
| Download URL | dsp-tools-1.1.1.tar.gz |
|---|---|
| Size | 86.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf204cf2d0dc0dd95145a8841874c4b982e5ae2ed8d5b927da20ed8e24e338b7
|
|
BLAKE2b-256 checksum How to use checksums |
670f6242f6209ac305bd3b1abd86c0f6fd322fde8343a3e980e0c7bc1f812052
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Release files / dsp_tools-1.1.1-py3-none-any.whl
| Download URL | dsp_tools-1.1.1-py3-none-any.whl |
|---|---|
| Size | 105.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47f377f2613a4ab45e192c41ed03fe67d9cb01e7449d3ccb3097ef2dd5155a3d
|
|
BLAKE2b-256 checksum How to use checksums |
98dfb10ecb8e3f4c2099a605d72e604039934a3f735c676b4505f2eff32de23d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|