Question on PEP-508 for requirements.txt

289 views
Skip to first unread message

Kevin Deggelman

unread,
Apr 28, 2021, 5:19:43 PM4/28/21
to cloud-composer-discuss
Hi all,

I'm trying to install a specific commit of a Python package because the commit hasn't made it into a PyPI release yet.

I see  in the docs that "Requirements must follow the format specified in PEP-508" and then when I view PEP-508 I see an example to accomplish my goal:

If I add a similar line to my requirements.txt and use:
gcloud composer environments update ENVIRONMENT-NAME \\
--update-pypi-packages-from-file requirements.txt \\
--location LOCATION
I get the following error:
(gcloud.composer.environments.update) INVALID_ARGUMENT: Found 1 problem:
        1) Error validating key dbt-bigquery @ git+git://github.com/fishtown-analytics/dbt@fefaf7b4be4917a58a9b1a4ff3b22d0f2915fb95#subdirectory=plugins/bigquery. PyPi dependency name is not formatted properly. It must be lowercase and follow the format of 'identifier' specified in PEP-508.

Maybe I'm missing something, but seeing as how I'm following an example from PEP-508, it seems like the validation here is more strict than PEP-508.

Is there another way to specify a git commit that will work with Composer?

Thanks!
Kevin
Reply all
Reply to author
Forward
0 new messages