Skip to main content

Bioplatforms Australia: CKAN ingest and sync

Usage

Primary usage information is contained in the comments at the top of the ingest/ingest.sh script, which is the gateway to synchronising the archive.

Generating CKAN schemas

bpa-ingest can generate ckanext-scheming schemas.

Usage:

$ bpa-ingest -p /tmp/ingest/ makeschema

Tracking metadata

Two types of tracking metadata are stored within this repository.

Google Drive metadata

The source of truth is "BPA Projects Data Transfer Summary", shared with BPA in Google Drive. This is maintained by the various project managers.

To update, use "File", "Download as", "CSV" within Google Sheets and replace the CSV sheets in track-metadata/google-drive

BPAM metadata

The source of truth is the BPA Metadata app.

To update, export each of the tracking datasets as CSV using the export button, then replace the files in track-metadata/bpam

AWS Lambda

We are gradually adding AWS Lambda functions to this project.

Each Lambda Function will have a handler() function which acts as an entrypoint. These are being collected in bpaingest/handlers/

Lambda functions should load their configuration from S3, from a bucket and key configured via environment variables. This configuration should be configured using AWS KMS. The Lambda function can be granted privileges to decrypt the configuration once it has been read from S3.

To store encrypted data at a key, this pattern works

$ aws kms encrypt --key-id <key> --plaintext fileb://config.json --output text --query CiphertextBlob | base64 --decode > config.enc
$ aws s3 cp config.enc s3://bucket/key

Local development:

For the development environment, you will need to have your local dev environment for bpa-ckan (consider dockercompose-bpa-ckan to do this).

Before you start, ensure you have installed Python 3.7

Bpa-ingest, atm, is just a python virtualenv (on command line),so to initialise a dev working environment:

cd bpa-ingest
git checkout next_release
git pull origin next_release
python3 -m venv ~/.virtual/bpa-ingest
. ~/.virtual/bpa-ingest/bin/activate
pip install -r requirements.txt
python setup.py install
python setup.py develop

Then (ensuring that you are still in python virtual env) source the environment variables (including API key), before running the ingest:

# if not already in virtual env:
. ~/.virtual/bpa-ingest/bin/activate

# source the environment variables
. /path/to/your/bpa.env

# dump the target state of the data portal to a JSON file for one data type
bpa-ingest -p /tmp/dump-metadata/ dumpstate test.json --dump-re 'omg-genomics-ddrad'

Look in /tmp/dump-metadata/ and you will see the working set of metadata sources used by the tool. Remember to delete the contents of /tmp (or subdirectory you are dumping too), when re-running command:

rm -Rf ./tmp/

Metadata

Release files for bpaingest 6.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bpaingest 6.4.2
File Size Uploaded Provenance Actions
bpaingest-6.4.2.tar.gz 121.0 kB Without provenance Details for bpaingest-6.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bpaingest 6.4.2
File Interpreter ABI Platform Actions
bpaingest-6.4.2-py3-none-any.whl Python 3 none any Details for bpaingest-6.4.2-py3-none-any.whl

Total release size: 268.7 kB

Release files / bpaingest-6.4.2.tar.gz

Download URL bpaingest-6.4.2.tar.gz
Size 121.0 kB
Tags Source
SHA-256 checksum
How to use checksums
04bc1d7d2e994808e3b5bd0c3f00cdc5ce81ec14a2d39dbbbb0a4c76b4d62ee4
BLAKE2b-256 checksum
How to use checksums
79855a8553f7f7eff7347ff1ffe03a3c7e80e50a0bc91231e93110852daaa529
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.2 Darwin/19.4.0

Release files / bpaingest-6.4.2-py3-none-any.whl

Download URL bpaingest-6.4.2-py3-none-any.whl
Size 147.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
548cdcc887c69399570781fd1d8b9a8179349f5a4a56ba84e27c7f9128da1092
BLAKE2b-256 checksum
How to use checksums
4cd651b6b21741dbf7399a8341ab8501cbd687500d7276c217ce2f471713411f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.2 Darwin/19.4.0

Security for bpaingest 6.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

6.4.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page