Skip to main content

GHGA Data Steward Kit - A utils package for GHGA data stewards.

Project description

tests Coverage Status

GHGA Data Steward Kit

Utilities for data stewards interacting with GHGA infrastructure.

Installation:

This package can be installed using pip:

pip install ghga-datasteward-kit

Usage:

An overview of all commands is provided using:

ghga-datasteward-kit --help

The following paragraphs provide additional help for using the different commands:

files (batch-)upload

This command facilitates encrypting files using Crypt4GH and uploading the encrypted content to a (remote) S3-compatible object storage. This process consists of multiple steps:

  1. Generate a unique file id
  2. Create unencrypted file checksum
  3. Encrypt file
  4. Extract file secret and remove Crypt4GH envelope
  5. Upload encrypted file content
  6. Download encrypted file content, decrypt and verify checksum
  7. Write file/upload information to output file

The user needs to provide a config yaml containing information as described here.

An overview of important information about each the upload is written to a file called <alias>.json in the output directory.

It contains the following information:

  1. The file alias
  2. A unique identifier for the file
  3. The local file path
  4. A SHA256 checksum over the unencrypted content
  5. MD5 checksums over all encrypted file parts
  6. SHA256 checksums over all encrypted file parts
  7. The file encryption/decryption secret

Attention: Keep this output file in a safe, private location. If this file is lost, the uploaded file content becomes inaccessible.

metadata

The metadata label groups metadata related commands.

Some of them require a configuration file as described here.

load

The load command makes files and metadata available to user in the running system.

It needs a configuration parameters as described here.

generate-catalog-accessions

A command for generating accessions for the metadata catalog. Accessions will be stored in a text file.

Development

For setting up the development environment, we rely on the devcontainer feature of vscode in combination with Docker Compose.

To use it, you have to have Docker Compose as well as vscode with its "Remote - Containers" extension (ms-vscode-remote.remote-containers) installed. Then open this repository in vscode and run the command Remote-Containers: Reopen in Container from the vscode "Command Palette".

This will give you a full-fledged, pre-configured development environment including:

  • infrastructural dependencies (databases, etc.)
  • all relevant vscode extensions pre-installed
  • pre-configured linting and auto-formating
  • a pre-configured debugger
  • automatic license-header insertion

If you prefer not to use vscode, you could get a similar setup (without the editor specific features) by running the following commands:

# Execute in the repo's root dir:
cd ./.devcontainer

# build and run the environment with docker-compose
docker-compose up

# attach to the main container:
# (you can open multiple shell sessions like this)
docker exec -it devcontainer_app_1 /bin/bash

License

This repository is free to use and modify according to the Apache 2.0 License.

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

ghga_datasteward_kit-1.0.0.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

ghga_datasteward_kit-1.0.0-py3-none-any.whl (43.5 kB view details)

Uploaded Python 3

File details

Details for the file ghga_datasteward_kit-1.0.0.tar.gz.

File metadata

  • Download URL: ghga_datasteward_kit-1.0.0.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for ghga_datasteward_kit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0aed66cfecc37fe48e0a2c8df27b3fd4fae0b9524ca7f01d72df63cfc26d094b
MD5 4ee9935e1e575f794883c0a52544c678
BLAKE2b-256 56336393ecdf19cde5dc40d1945167bed2ef62ca8e3acfeda043d4dd44b688f1

See more details on using hashes here.

File details

Details for the file ghga_datasteward_kit-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ghga_datasteward_kit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bbc7b3b5deaac6fa6b0d832292cebd2cdb7136013b636aa40ed877db063b93d
MD5 481f8841c306e819947853c4fb10038a
BLAKE2b-256 f18e30bb70fc168937d33590313cbc97925f9c43deaaf10d522dd534ac0af910

See more details on using hashes here.

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