FE-232 fix dev env for manifest dot py #338
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FE-232
Problem:
The first step in the HCA ingest process requires the creation and deployment of a manifest of the data to be ingested. This is accomplished via a python script - manifest.py - which has a number of dependencies. To expedite the setup of a dev env for this script and any HCA ingest work, I had created a Docker Compose dev env. The latest version of the image had a known poetry issue whereby not using a virtualenv (as is suggested for Poetry in Docker) ran into an instance of Poetry removing a previously installed library (cffi) which was a dependency of several other required libraries and dependencies used by manifest.py. As such, attempting to run manifest.py in the Docker Compose dev env failed - and the work around of setting up a local dev takes 10-12 hours - which is prohibitive, to say the least.
Solution:
Added cffi to the pyproject.toml, so that it is required and cannot be removed.
To Test:
FE-232-fix-dev-env-for-manifest-dot-py
docker compose run -w /hca-ingest app bash
the docker compose command, as this will pull the latest image from Artifact Registry.
gcloud auth login
gcloud config set project PROJECT_ID
gcloud auth application-default login
orchestration/
:poetry install
to set up a local python virtual environment and install needed dependencies./ops/helmfiles/dagster/forward_ports.sh dev &
orchestration/
run 'poetry run python3 hca_manage/manifest.py load -e dev -c dcp99_manifest.csv -r dcp99`The script should complete without error.
More context in the Ops Playbook and the top level README and Ops README in this project.
Checklist