From 15721537f8f65e557a525b3115157c50e0808916 Mon Sep 17 00:00:00 2001 From: Chris Burr Date: Wed, 28 Aug 2024 15:22:15 +0200 Subject: [PATCH] Simplify environment.yml --- .github/workflows/main.yml | 20 ++++++-------- environment.yml | 56 ++------------------------------------ 2 files changed, 11 insertions(+), 65 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 40c82ce6..99124126 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,27 +40,23 @@ jobs: with: # TODO: Use a conda environment file used for the diracx/base container image environment-name: test-env - create-args: >- - python=3.11 - m2crypto - python-gfal2 - mypy - pip + environment-file: environment.yml init-shell: bash post-cleanup: 'all' - name: Set up environment run: | pip install pytest-github-actions-annotate-failures pip install git+https://github.com/DIRACGrid/DIRAC.git@integration - pip install ${{ matrix.dependencies }} ${{ matrix.package }}[types] - - name: Run mypy - run: | - mypy ${{ matrix.package }}/src + pip install ${{ matrix.dependencies }} - name: Run pytest run: | cd ${{ matrix.package }} pip install .[testing] pytest --cov-report=xml:coverage.xml --junitxml=report.xml + - name: Run mypy + run: | + pip install mypy ${{ matrix.package }}[types] + mypy ${{ matrix.package }}/src - name: Upload coverage report uses: codecov/codecov-action@v4.5.0 @@ -78,7 +74,7 @@ jobs: run: | pip install pytest-github-actions-annotate-failures pip install git+https://github.com/DIRACGrid/DIRAC.git@integration - pip install ./diracx-core/ ./diracx-api/ ./diracx-cli/ ./diracx-client/ ./diracx-routers/ ./diracx-db/ ./diracx-testing/ + pip install ./diracx-core/[testing] ./diracx-api/[testing] ./diracx-cli/[testing] ./diracx-client/[testing] ./diracx-routers/[testing] ./diracx-db/[testing] ./diracx-testing/ - name: Start demo run: | git clone https://github.com/DIRACGrid/diracx-charts.git ../diracx-charts @@ -147,7 +143,7 @@ jobs: run: | micromamba install -c conda-forge nodejs pre-commit pip install git+https://github.com/DIRACGrid/DIRAC.git@integration - pip install ./diracx-core/ ./diracx-api/ ./diracx-cli/ -e ./diracx-client/ ./diracx-routers/ ./diracx-db/ ./diracx-testing/ + pip install ./diracx-core/ ./diracx-api/ ./diracx-cli/ -e ./diracx-client/[testing] ./diracx-routers/[testing] ./diracx-db/ ./diracx-testing/ npm install -g autorest - name: Run autorest run: | diff --git a/environment.yml b/environment.yml index 4b8eb937..995ba7fe 100644 --- a/environment.yml +++ b/environment.yml @@ -1,60 +1,10 @@ name: diracx-dev channels: - - diracgrid - conda-forge - nodefaults dependencies: - - authlib - - aiohttp - - aiomysql - - aiosqlite - - azure-core - - cachetools - ######## - # Building the docker image on some system may fail - # as long as this bug is still present - # https://github.com/DaanDeMeyer/reproc/pull/103 - # or that this is merged - # https://github.com/conda-forge/reproc-feedstock/pull/10 - # If it does, we need to comment out `dirac-grid` here - # and install it via pip - - dirac-grid - - m2crypto >=0.38.0 - - python-gfal2 - - importlib_resources - ####### - - email-validator - - fastapi - - git - - gitpython - - httpx - - isodate - - mypy - - opensearch-py - - pydantic >=2.4 - - pyjwt - - pytest - - pytest-asyncio - - pytest-cov - - pytest-httpx - python - - python-dotenv - - python-jose - - python-multipart - - pyyaml - - requests - - rich - - sqlalchemy - # Exclude version from 0.12.4 because of https://github.com/DIRACGrid/diracx/issues/280 - - typer <0.12.4 - - types-cachetools - - types-PyYAML - - types-requests - - uvicorn - - moto - - aiobotocore - - botocore - pip - - pip: - - types-aiobotocore[essential] - - boto3-stubs[essential] + - m2crypto + - python-gfal2 + - mypy