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

A Command Line Interface to orchestrate the integration of heterogenous data sources under a common RDF Knowledge Graph using CWL workflows, and the deployment of user-facing services over the integrated data using Docker (SPARQL, GraphQL-LD, OpenAPI, Web UI).

Installation

More detailed instruction on the d2s documentation website.

Install with pip

pip install d2s cwlref-runner

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

Requirements:

Enable autocompletion

Enable commandline autocompletion in the terminal

Highly 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.

Upgrade pip package

pip install --upgrade d2s 

Try it

Display the default help command

d2s

Create a d2s project in the current directory

d2s init

Development setup

# Add new package
pip install package && pip freeze > requirements.txt

Install for dev

Install d2s as cli in local for dev. d2s will be updated directly on change.

pip install --editable .

Recommended script to build and publish automatically using Docker:

./publish_pip.sh

Or do it locally

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

You might need to install twine

pipx 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.1.14.tar.gz (7.8 kB view hashes)

Uploaded Source

Built Distribution

d2s-0.1.14-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

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