Skip to content

Commit

Permalink
Unset PROJ_DATA everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
rhugonnet committed Dec 9, 2022
1 parent d704923 commit cac921f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,12 @@ jobs:
- name: Install project
run: pip install -e . --no-dependencies

# This steps allows making PROJ work correctly on Windows
- name: Set PROJ environment variable
run: |
conda env config vars unset PROJ_DATA -n xdem-dev
echo $PROJ_DATA

# This steps allows us to check the "import xdem" with the base environment provided to users, before adding
# development-specific dependencies by differencing the env and dev-env yml files
- name: Check import works with base environment
run: |
echo $PROJ_DATA
# We unset the PROJ_DATA environment variable to make PROJ work on Windows
unset PROJ_DATA
python -c "import xdem"
Expand All @@ -87,7 +82,8 @@ jobs:
- name: Update environment with development packages if cache does not exist
if: steps.cache.outputs.cache-hit != 'true'
run: |
# We unset the PROJ_LIB environment variable to make PROJ work on Windows
# We unset the PROJ_DATA environment variable to make PROJ work on Windows
unset PROJ_DATA
pkgs_conda_dev=`python -c "import xdem.misc; xdem.misc.diff_environment_yml('environment.yml', 'dev-environment.yml', 'conda')"`
pkgs_pip_dev=`python -c "import xdem.misc; xdem.misc.diff_environment_yml('environment.yml', 'dev-environment.yml', 'pip')"`
mamba install $pkgs_conda_dev --freeze-installed
Expand All @@ -106,7 +102,10 @@ jobs:
run: pip install pytest-cov coveralls coveragepy-lcov

- name: Test with pytest
run: pytest -ra --cov=xdem/
run: |
# We unset the PROJ_DATA environment variable to make PROJ work on Windows
unset PROJ_DATA
pytest -ra --cov=xdem/
# We can skip the conversion step once this PR of pytest is merged: https://github.com/pytest-dev/pytest-cov/pull/536
# and replace pytest argument by --cov-report=lcov
Expand Down

0 comments on commit cac921f

Please sign in to comment.