Common tools for all the repos at Dayhoff Labs
Project description
dayhoff-tools
A set of small, sharp tools for everyone at Dayhoff.
Hosting and Auth
This repo uses Poetry to build and publish a package to GCP Artifact Registry, at https://us-central1-python.pkg.dev/enzyme-discovery/pypirate/. This depends on a Poetry plugin that's now in the standard chassis setup (keyrings.google-artifactregistry-auth), and also on the active service account having read access to Artifact Registry. That much is set up for the standard dev container service account, but may not be available to other intended users.
CLI commands
Unlike all the repos that use dayhoff-tools, here you have to install the package explicitly before using the CLI:
poetry install
Publish a new version
- Update version number in
pyproject.toml - Run
dh wheel - In other repos, run
poetry update dayhoff-tools
If you want to overwrite an existing wheel, you'll have to manually delete it from the dist folder and also the Artifact Registry repo.
Install in other repos
Installing this library is tricky because we need GCS authentication and also a couple of plugins to install this with either Pip or Poetry. These have been incorporated into chassis, but it's worth noting here what the various parts are. All this info came from this Medium post.
- Get a Service Account with read access to Artifact Registry (such as
github-actions, which I made for this purpose). - Export the SA key file, copy it to your repo, and make it available through this envvar:
export GOOGLE_APPLICATION_CREDENTIALS=github_actions_key.json
... with Pip
pip install keyringpip install keyrings.google-artifactregistry-authpip install --upgrade dayhoff-tools --index-url https://us-central1-python.pkg.dev/enzyme-discovery/pypirate/simple/
... with Poetry
-
Add this plugin:
poetry self add keyrings.google-artifactregistry-auth -
Add these sections to
pyproject.toml. Note that dayhoff-tools is in a separate grouppypiratethat installs separately from the others.[tool.poetry.group.pypirate.dependencies] dayhoff-tools = {version = "*", source = "pypirate"} [[tool.poetry.source]] name = "pypirate" url = "https://us-central1-python.pkg.dev/enzyme-discovery/pypirate/simple/" priority = "supplemental"
-
When building a dev container, or in other circumstances when you can't easily authenticate as above, run
poetry install --without pypirate. -
Otherwise, just
poetry install. -
To ensure you have the latest version, run
poetry update dayhoff-tools.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dayhoff_tools-1.0.0.tar.gz.
File metadata
- Download URL: dayhoff_tools-1.0.0.tar.gz
- Upload date:
- Size: 79.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.10.15 Linux/5.10.0-34-cloud-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
782af04f0f27481ba959109cc69551e9e438a44eaf64dd29b106fe84f1462ec7
|
|
| MD5 |
0602702b8025e08eb0231bef75ef5dab
|
|
| BLAKE2b-256 |
2af7f0c230e10749484f9ef0a9357e2babaf9d9e556afb5d7f0471691c9147a6
|
File details
Details for the file dayhoff_tools-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dayhoff_tools-1.0.0-py3-none-any.whl
- Upload date:
- Size: 91.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.10.15 Linux/5.10.0-34-cloud-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
355cfc4eaa14a1ba6cf3cd344e98e612df5f5d3c69b8ee462b6f8c3a1f640f5c
|
|
| MD5 |
259cff849825c8111b0db87f28105dfd
|
|
| BLAKE2b-256 |
4edf8fc4f4818d0ccc995f72e14950eddd2c453a7a4480f0b5af3d1224392ac3
|