Skip to main content

A Command Line Interface to orchestrate the integration of heterogenous data and the deployment of services consuming the integrated data. See https://d2s.semanticscience.org

Project description

Build Version

A Command Line Interface to help orchestrate the integration of heterogenous data sources under a common RDF Knowledge Graph using Python, RML mappings, Bash, and GitHub Actions workflows (YAML).

We also provide guidelines and help to deploy of user-facing services over the integrated data using Docker (SPARQL, BioThings APIs, GraphQL-LD, OpenAPI, Web UI).

Installation

Complete documentation about the d2s-cli on the d2s documentation website 📖

Requirements:

Install from pypi

pip install d2s

Use pip, pip3 or pipx depending on your system preferences.

You can also install it from the master branch, if you want the latest updates:

pip install git+https://github.com/MaastrichtU-IDS/d2s-cli.git@master

See those instructions to install d2s on Windows using the Chocolatey package manager and pipx.

Install d2s for development

Install d2s as executable in local for development.

d2s will be updated directly on change in the code.

pip install -e .

Try it

Display the default help command

d2s

Create a d2s project in the given folder

d2s init project-folder-name

All d2s commands are designed to be run from the project folder, move to it

cd project-folder-name/

Project settings stored if .d2sconfig file.

Update d2s installation

pip install --upgrade d2s 

Uninstall

pip uninstall d2s

Enable autocompletion

Enable commandline autocompletion in the terminal

Recommended, it makes d2s much more user-friendly

  • ZSH: add the import autocomplete line to the ~/.zshrc file.
echo 'eval "$(_D2S_COMPLETE=source_zsh d2s)"' >> ~/.zshrc

Set your terminal to use ZSH by default:

chsh -s /bin/zsh

A oh-my-zsh theme can be easily chosen for a personalized experience. See the zsh-theme-biradate to easily install a simple theme and configure your terminal in a few minutes.

  • Bash: add the import autocomplete line to the ~/.bashrc file.
echo 'eval "$(_D2S_COMPLETE=source d2s)"' >> ~/.bashrc

To be tested.

Build and publish

Publish using Docker

To publish a new version on pypi:

  • upgrade the version in setup.py (e.g. from 0.2.1 to 0.2.2)
  • use the following script to build and publish automatically using Docker:
./publish_pip.sh

A test will be run using Docker before publishing to make sure d2s init works.

Build locally

Building and publishing can be done locally:

# Build packages in dist/ folder
python3 setup.py sdist bdist_wheel
# Publish packages previously built in the dist/ folder
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*

Additional instructions to install twine locally (not needed)

pip install twine

If you experience issues with Bash or ZSH because d2s is not defined when installing for dev. Then add pip install --editable develop/d2s-cli to .zshrc

You might need to install Python3.6 for dev (dev with python3.6 should work though)

sudo apt-get install python3.6 python3.6-venv python3.6-dev
# Set python3 to use 3.6
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo update-alternatives --config python3
vim /usr/bin/gnome-terminal

#!/usr/bin/python3.6

If you face issue uploading the package on pypi:

twine check dist/d2s-*-py3-none-any.whl

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

d2s-0.3.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

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

d2s-0.3.0-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file d2s-0.3.0.tar.gz.

File metadata

  • Download URL: d2s-0.3.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

File hashes

Hashes for d2s-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c2f6f14c9df0bb176616e65ae1586798d3c48c78bd4f135c1bb97cc306c022f5
MD5 1fc5d81a3a566c3a64ca9a36ebe7a105
BLAKE2b-256 995fdf2d31ab4c43019a4dbfdf629e3f1addb492bc10e2b9770b541f19642108

See more details on using hashes here.

File details

Details for the file d2s-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: d2s-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

File hashes

Hashes for d2s-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f5fd68b3d409970f142e703e28f07c03c6065c5254aaa81264a9def739bada6
MD5 e5ba7ce242506e758a13b75607127fd7
BLAKE2b-256 5cd100c81294e4390b2cd3cb8ebc2d7b7d8c2d3c816a76d4163e71ce1a55ca50

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