Skip to content

Commit

Permalink
remove explicit installation from pythesint in the Docker image
Browse files Browse the repository at this point in the history
use pyproject.toml dependencies with minimum version instead
+ use `pip install -e` before running tests to install the dependencies
  • Loading branch information
aperrin66 committed Oct 8, 2024
1 parent b179308 commit 725eba8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
BASE_IMAGE: "${{ vars.DOCKER_ORG }}/geospaas:2.5.2-python${{ matrix.python_version }}"
IMAGE_NAME: "${{ vars.DOCKER_ORG }}/geospaas_harvesting"
METANORM_VERSION: '4.5.2'
PYTHESINT_VERSION: '1.7.0'
GEOSPAAS_DB_HOST: 'db'
GEOSPAAS_DB_USER: 'test'
GEOSPAAS_DB_PASSWORD: "${{ secrets.GEOSPAAS_DB_PASSWORD }}"
Expand Down Expand Up @@ -57,7 +56,6 @@ jobs:
build-args: |
BASE_IMAGE=${{ env.BASE_IMAGE }}
METANORM_VERSION=${{ env.METANORM_VERSION }}
PYTHESINT_VERSION=${{ env.PYTHESINT_VERSION }}
push: false
load: true
tags: 'harvesting_tests'
Expand Down Expand Up @@ -85,7 +83,7 @@ jobs:
-e "GEOSPAAS_DB_USER=${GEOSPAAS_DB_USER}"
-e "GEOSPAAS_DB_PASSWORD=${GEOSPAAS_DB_PASSWORD}"
'harvesting_tests'
bash -c "coverage run ./runtests.py && coverage combine"
bash -c "pip install -e /src && coverage run ./runtests.py && coverage combine"
- name: 'Stop testing database'
run: docker stop "${{ env.GEOSPAAS_DB_HOST }}"
Expand All @@ -109,7 +107,6 @@ jobs:
build-args: |
BASE_IMAGE=${{ env.BASE_IMAGE }}
METANORM_VERSION=${{ env.METANORM_VERSION }}
PYTHESINT_VERSION=${{ env.PYTHESINT_VERSION }}
push: ${{ github.event_name == 'release' }}
tags: |
${{ env.IMAGE_NAME }}:${{ github.ref_name }}-python${{ matrix.python_version }}
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ RUN pip install --upgrade --no-cache-dir \
'requests_oauthlib==1.3.*' \
'tblib'

ARG PYTHESINT_VERSION=''
RUN bash -c "[ -n '$PYTHESINT_VERSION' ] && pip install --upgrade 'pythesint==$PYTHESINT_VERSION' || true"

FROM base

COPY . /tmp/setup
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies = [
"netCDF4",
"numpy",
"oauthlib",
"pythesint",
"pythesint>=1.7.0",
"python-dateutil",
"PyYAML",
"requests_oauthlib",
Expand Down

0 comments on commit 725eba8

Please sign in to comment.