Provide an ontology via Terminology Service's API link.
Project description
termlink
Provide an ontology via Terminology Service's API link.
Termlink is a command line client and library for uploading ontologies to LifeOmic's Precision Health Cloud. It's goal is to make uploading standardized ontologies easier and to provide utilities for uploading custom ontologies. It provides a simple command line interface for uploading standard ontologies via the Precision Health Cloud API and a Python SDK for building integrations with custom ontologies.
Quickstart
Download the following tools:
Pull the latest version of Termlink from Docker Hub:
$ docker pull lifeomic/termlink
Create an environment variables file containing your LifeOmic account, user and API key.
$ cat lifeomic.env
LO_ACCOUNT=<your account>
LO_USER=<your username>
LO_ACCESS_KEY=<your access key>
Note: The best way to manage API keys is using the LifeOmic CLI. You can also create an API key using the Precision Health Cloud.
Run it.
$ docker run --env-file lifeomic.env -e LO_PROJECT=<your project> lifeomic/termlink python -m termlink --help
Note: You can obtain your project identifier using the LifeOmic CLI.
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Prerequisites
The following tools are required to run Termlink:
Installing
The following steps will guide you through installing the project locally.
Clone the git
repository onto your local machine.
$ git clone git@github.com:lifeomic/termlink.git && cd ./termlink
Using Python 3, create a virtualenv
and then activate it.
$ python3 -m venv venv && source venv/bin/activate
Note: Your Python binary may be under a different name.
Check that your local version of Python is at least version 3.7 by running python --version
.
Once you have verified your version of Python is correct, run the following to download all dependencies.
$ pip install -r requirements.txt requirements-dev.txt
You now have everything you need to start developing on Termlink.
Testing
This project uses the Python nose
framework.
Unit Testing
The simple way to run unit tests is using yarn
:
$ yarn test
To speed up development, you can run the tests against your local Python build using the Makefile
.
$ make test
Deployment
The project is deployed in two locations.
The PyPI release contains the project as a Python package.
The Docker Hub release contains pre-built runtime environment for executing the project via the CLI.
Publish a new version using the command following command:
yarn deploy
The deployment will prompt you multiple inputs.
First, you will be promoted to enter a new version, triggered by the yarn version
command. Please use SemVer versioning for incrementing versions. To learn more about why SemVer is used, see the section on Versioning below.
Second, you will be promoted for PyPI credentials. To gain write access to the PyPI package, contact one of the maintainers listed on the project page here.
Third, docker push
will run which requires that you have previously logged in using docker login
. To gain access to the Docker Hub project, contact one of the owners listed on the project page here.
Built With
- Docker: "Build, Ship, and Run Any App, Anywhere."
- Python 3: "Python is a programming language that lets you work quickly and integrate systems more effectively."
- Requests: "Requests is an elegant and simple HTTP library for Python, built for human beings."
Contributing
[TODO]
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
The following guidelines are provided on the SemVer website:
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
Authors
- Taylor Steinberg - Initial work - tdstein
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT - see the LICENSE file for details.
Acknowledgments
[TODO]
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
File details
Details for the file termlink-0.2.0.tar.gz
.
File metadata
- Download URL: termlink-0.2.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 359ade5a8812abfcfaf5b97951a4f65e11168f2ee9d0f299a6c4a9990c12c78c |
|
MD5 | ef86ab9b01b4bfb3785d8782781569f8 |
|
BLAKE2b-256 | 445846373c3aefcc555650ebefbd5e997366d39699b98de742ee39a163cb4e71 |
File details
Details for the file termlink-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: termlink-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e5be1f065f161257d0e10a1b0770119af0e9c439a397089d68e4dab02896ea6 |
|
MD5 | be8f20dbba50e6dd3c1de97835f2c21a |
|
BLAKE2b-256 | fe4473b0d8fe7ce1a72751c93c01c74b9157d71b88f4716fc79f336bb460489a |