Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FE-232 fix dev env for manifest dot py #338

Merged
merged 6 commits into from
Jun 20, 2024

Conversation

bahill
Copy link
Contributor

@bahill bahill commented Jun 19, 2024

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:

  • clone this repository and check out the branch for this PR FE-232-fix-dev-env-for-manifest-dot-py
  • from the root of the project invoke the Docker Compose dev env docker compose run -w /hca-ingest app bash
    • Note that if you are not already logged in to gcloud, you will need to do so before running
      the docker compose command, as this will pull the latest image from Artifact Registry.
  • Authenticate with gcloud using your Broad credentials gcloud auth login
  • Then set up your billing project gcloud config set project PROJECT_ID
  • Then set up your default login for applications gcloud auth application-default login
  • From orchestration/:
    • Run poetry install to set up a local python virtual environment and install needed dependencies
  • From the root of the project, run the port forwarding script in the background ./ops/helmfiles/dagster/forward_ports.sh dev &
  • Download the manifest file attached to this PR and put it in the orchestration directory for this project.
  • From 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

  • Documentation has been updated as needed.

@bahill bahill marked this pull request as ready for review June 19, 2024 16:06
@bahill bahill merged commit a3f3572 into main Jun 20, 2024
1 check passed
@bahill bahill deleted the FE-232-fix-dev-env-for-manifest-dot-py branch June 20, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants