Skip to main content

Google Sheets to LinkML generator for the CRDC-H model

Project description

sheet2linkml

PyPI version

A python package for converting the CRDC-H data model, which is currently stored in a Google Sheet. The command line utility built into the package can be used to generate a LinkML representation of the CRDC-H data model.

Installation Requirements and Pre-requisites

  • Python 3.9 or higher
  • pyenv
    • If you do not have a version of Python greater than 3.9, it is recommended to use pyenv to be able to easily use and switch between multiple Python versions.
    • If you’re experiencing issues with pyenv on macOS, you can consider using miniconda.
  • poetry

If you are using a Windows machine, typical bash programs will not work on cmd in the same way as they work in the Linux/MacOS terminals. To circumvent this, it is recommended that you use one of the following Bash on Windows strategies

so you can easily execute the command line utilities that are described later in these docs.

Installing

Create and activate a Python 3.9+ virtual environment within which you can install the package:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install sheet2linkml

Command Line Client Usage

Identify the Google Sheet that you want to convert to LinkML. Note that sheet2linkml is not currently a general-purpose Google Sheet to LinkML converter. It will only work with Google Sheets that have been written in a particular, currently undefined format.

Contact your CCDH colleagues to obtain the correct sheet ID and assert it either in a .env file or in the shell, like this:

export CDM_GOOGLE_SHEET_ID=WbM2Jr869ofmdcSmhX_1E0aLWvnK2-gr47Mo_tzuQKWy

A google_api_credentials.json file is also required in the root of this repo. Documentation is forthcoming.

And the user is responsible for defining

  • ~/path/to/crdch_model.yaml
  • ~/path/to/logging.ini
    • ./logging.ini may be adaquate for many users

Then perform the conversion:

sheet2linkml --output ~/path/to/crdch_model.yaml --logging-config ~/path/to/logging.ini

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

sheet2linkml-1.1.1.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

sheet2linkml-1.1.1-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file sheet2linkml-1.1.1.tar.gz.

File metadata

  • Download URL: sheet2linkml-1.1.1.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.7 Darwin/20.6.0

File hashes

Hashes for sheet2linkml-1.1.1.tar.gz
Algorithm Hash digest
SHA256 a60de9e289601423380d28a2298922fa7834f58c4a3093f08b42b1187594f03d
MD5 5199e94bb0f1ec0ccd89a05d4825b9b2
BLAKE2b-256 b57e69b2ec491312bdeaf2733f48cca35ab50741832b9ef2edfaf55a168e5f1b

See more details on using hashes here.

Provenance

File details

Details for the file sheet2linkml-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: sheet2linkml-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 31.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.7 Darwin/20.6.0

File hashes

Hashes for sheet2linkml-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 de95bc56604e17cc1fe89ba9d127961ad2a078b721d288f3289c9ef7fe281361
MD5 173f986359e06c5f101a01670c36d833
BLAKE2b-256 c69a3ed1e8f523237cd626e7134860834d9919c4b5c915643f39effb5123e978

See more details on using hashes here.

Provenance

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