populationgenomics / metamist

Sample level metadata system
MIT License
1 stars 1 forks source link

Unpin requests #803

Closed nevoodoo closed 4 months ago

nevoodoo commented 4 months ago

With the release of https://github.com/docker/docker-py/pull/3257 we no longer need to have our requests package pinned in the deps, so just unpinning it here and also upgrading docker and testcontainers while we're at it.

Also add a script to compile requirements with Docker to avoid Apple Silicon (M1) architecture differences.

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.30%. Comparing base (ab809cd) to head (1ac6958). Report is 2 commits behind head on dev.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #803 +/- ## ======================================= Coverage 77.30% 77.30% ======================================= Files 157 157 Lines 13010 13010 ======================================= Hits 10057 10057 Misses 2953 2953 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

illusional commented 4 months ago

Hey @nevoodoo, I suspect it's related to this: https://github.com/sqlalchemy/sqlalchemy/issues/7714 Rerunning pip-compile on my machine adds back in those changes:

Diff of requirements in here ```diff diff --git a/requirements.txt b/requirements.txt index 89b6895b..d0a37c3f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ aiosignal==1.3.1 # via aiohttp annotated-types==0.7.0 # via pydantic -anyio==4.3.0 +anyio==4.4.0 # via # httpx # starlette @@ -27,12 +27,12 @@ azure-storage-blob==12.20.0 # via cloudpathlib backoff==2.2.1 # via -r requirements.in -boto3==1.34.111 +boto3==1.34.114 # via # -r requirements.in # cloudpathlib # cpg-utils -botocore==1.34.111 +botocore==1.34.114 # via # -r requirements.in # boto3 @@ -62,7 +62,9 @@ cryptography==42.0.7 # -r requirements.in # azure-storage-blob databases[mysql]==0.9.0 - # via -r requirements.in + # via + # -r requirements.in + # databases deprecated==1.2.14 # via cpg-utils dnspython==2.6.1 @@ -72,6 +74,7 @@ email-validator==2.1.1 fastapi[all]==0.110.2 # via # -r requirements.in + # fastapi # strawberry-graphql frozendict==2.4.4 # via cpg-utils @@ -81,6 +84,7 @@ frozenlist==1.4.1 # aiosignal google-api-core[grpc]==2.19.0 # via + # google-api-core # google-cloud-appengine-logging # google-cloud-bigquery # google-cloud-core @@ -132,6 +136,8 @@ googleapis-common-protos[grpc]==1.63.0 # grpcio-status graphql-core==3.2.3 # via strawberry-graphql +greenlet==3.0.3 + # via sqlalchemy grpc-google-iam-v1==0.12.7 # via # google-cloud-logging @@ -215,12 +221,12 @@ pyasn1-modules==0.4.0 # via google-auth pycparser==2.22 # via cffi -pydantic==2.7.1 +pydantic==2.7.2 # via # fastapi # pydantic-extra-types # pydantic-settings -pydantic-core==2.18.2 +pydantic-core==2.18.3 # via pydantic pydantic-extra-types==2.7.0 # via fastapi @@ -275,12 +281,14 @@ sqlalchemy==2.0.30 starlette==0.37.2 # via fastapi strawberry-graphql[fastapi]==0.229.0 - # via -r requirements.in + # via + # -r requirements.in + # strawberry-graphql tabulate==0.9.0 # via cpg-utils toml==0.10.2 # via cpg-utils -typing-extensions==4.11.0 +typing-extensions==4.12.0 # via # azure-core # azure-storage-blob @@ -301,7 +309,7 @@ uvicorn[standard]==0.29.0 # fastapi uvloop==0.19.0 # via uvicorn -watchfiles==0.21.0 +watchfiles==0.22.0 # via uvicorn websockets==12.0 # via uvicorn ```

Maybe run it in a docker container, running something like this (could even add it as a script to this repo) updates those requirements files in place:

#!/bin/bash

# To avoid pip-compile deciding requirements on your specific machine,
# we use a docker container to compile the requirements, which should match
# the architecture of the dev environment.

docker run --platform linux/amd64 -v $(pwd):/opt/metamist python:3.11 /bin/bash -c '
    cd /opt/metamist;
    pip install pip-tools;
    pip-compile requirements.in > requirements.txt;
    pip-compile --output-file=requirements-dev.txt requirements-dev.in requirements.in
'