diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a06554..2cd369d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,13 +12,10 @@ test_arosics: stage: test coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' script: - - source /opt/conda/bin/activate ci_env + - source activate ci_env # update py_tools_ds and geoarray - - pip install -U py_tools_ds -q - - pip install -U geoarray -q - - - pip install scipy # TODO remove as soon as CI runner is rebuilt + - mamba update py-tools-ds geoarray # run tests - make pytest @@ -44,7 +41,7 @@ test_arosics: test_styles: stage: test script: - - source /opt/conda/bin/activate ci_env + - source activate ci_env - make lint artifacts: paths: @@ -57,7 +54,7 @@ test_styles: test_urls: stage: test script: - - source /opt/conda/bin/activate ci_env + - source activate ci_env - pip install -U urlchecker - make urlcheck when: always @@ -66,7 +63,7 @@ test_urls: test_arosics_install: stage: test script: - - source /opt/conda/bin/activate + - source activate - mamba update -n base mamba conda # create arosics environment from environment_arosics.yml @@ -82,6 +79,9 @@ test_arosics_install: # test importability - python -c "import arosics; print(arosics)" - python -c "from arosics import COREG, COREG_LOCAL" + + # check if dependencies are properly installed + - pip check || exit only: - main @@ -128,7 +128,7 @@ deploy_pypi: dependencies: - test_arosics script: - - source /opt/conda/bin/activate ci_env + - source activate ci_env - pip install -U twine - python setup.py sdist - twine upload dist/* # requires creds as environment variables diff --git a/HISTORY.rst b/HISTORY.rst index 945a590..37c4a00 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,7 @@ History * Removed dill from requirements. * !37: Fixed issue #82 (IndexError: cannot do a non-empty take from an empty axes) which happened in case COREG_LOCAL could not find a single tie point. +* !38: Updated CI (now faster) and environment file (now uses conda where ever possible). 1.9.0 (2023-05-04) diff --git a/tests/CI_docker/context/arosics_ci.docker b/tests/CI_docker/context/arosics_ci.docker index 659ad7d..c0f72db 100644 --- a/tests/CI_docker/context/arosics_ci.docker +++ b/tests/CI_docker/context/arosics_ci.docker @@ -1,4 +1,4 @@ -FROM ci_base_ubuntu:0.1 +FROM ci_base_ubuntu:0.2 # use bash shell instead of sh shell for all docker commands SHELL ["/bin/bash", "-c"] @@ -7,10 +7,9 @@ SHELL ["/bin/bash", "-c"] COPY *.yml /root/ # update base environment -RUN mamba update --all -y && \ +RUN mamba update -y -n base mamba conda && \ conda clean -afy # create ci_env environment RUN mamba env create -n ci_env -f /root/environment_arosics.yml && \ - conda clean -afy && \ - conda list + conda clean -afy diff --git a/tests/CI_docker/context/environment_arosics.yml b/tests/CI_docker/context/environment_arosics.yml index a0e66e9..4861700 100644 --- a/tests/CI_docker/context/environment_arosics.yml +++ b/tests/CI_docker/context/environment_arosics.yml @@ -8,14 +8,17 @@ dependencies: - pip - cartopy - cmocean + - folium>=0.6.0,!=0.12.0 - gdal - geoarray>=0.15.0 + - geojson - geopandas - holoviews - ipython # needed to test interactive plotting - matplotlib - nbformat # optional dependency of plotly, needed to test interactive plotting - numpy + - packaging - pandas - plotly - pyfftw # pyfftw>=0.13.0 is currently not used due to https://github.com/pyFFTW/pyFFTW/issues/294 @@ -24,23 +27,20 @@ dependencies: - py-tools-ds>=0.18.0 - scikit-image>=0.16.0 - scikit-learn + - scipy - shapely - - pip: - - folium>=0.6.0,!=0.12.0 - - geojson - - packaging - - scipy + # doc/lint/test requirements + - flake8 + - pycodestyle + - pydocstyle + - pylint + - pytest + - pytest-cov + - sphinx-argparse + - sphinx-autodoc-typehints + - sphinx_rtd_theme + - urlchecker - # doc requirements - - flake8 - - pycodestyle - - pydocstyle - - pylint - - pytest - - pytest-cov + - pip: - pytest-reporter-html1 - - sphinx-argparse - - sphinx-autodoc-typehints - - sphinx_rtd_theme - - urlchecker