diff --git a/.github/workflows/build_docs.yaml b/.github/workflows/build_docs.yaml index 06c4780b..666775a1 100644 --- a/.github/workflows/build_docs.yaml +++ b/.github/workflows/build_docs.yaml @@ -21,20 +21,24 @@ jobs: persist-credentials: false - name: Setup Conda - uses: conda-incubator/setup-miniconda@v3 + uses: mamba-org/setup-micromamba@v1 with: - activate-environment: docs - python-version: '3.10' - channels: conda-forge - channel-priority: strict + init-shell: bash + environment-name: docs + create-args: >- + ${{ matrix.python-implementation }}=${{ matrix.python-version }} + rasterio + xarray + scipy + pyproj + pandoc - name: Install and Build shell: bash run: | - conda install rasterio xarray scipy pyproj pandoc - python -m pip install -e .[all] - python -m pip install -r requirements/doc.txt - sphinx-build -b html docs/ docs/_build/ + micromamba run -n docs python -m pip install -e .[all] + micromamba run -n docs python -m pip install -r requirements/doc.txt + micromamba run -n docs sphinx-build -b html docs/ docs/_build/ - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9b7c9738..a5ff7a08 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -105,52 +105,55 @@ jobs: - uses: actions/checkout@v4 - name: Setup Conda - uses: conda-incubator/setup-miniconda@v3 + uses: mamba-org/setup-micromamba@v1 with: - activate-environment: test - python-version: ${{ matrix.python-version }} - channels: conda-forge - channel-priority: strict + init-shell: bash + environment-name: test + create-args: >- + python=${{ matrix.python-version }} + rasterio=${{ matrix.rasterio-version }} + xarray=${{ matrix.xarray-version }} + pyproj + netcdf4 + dask + pandoc - name: Install Env shell: bash run: | - export INSTALL_DEPS='rasterio=${{ matrix.rasterio-version }} xarray=${{ matrix.xarray-version }} pyproj netcdf4 dask pandoc' - [ "${{ matrix.run-with-scipy }}" = "YES" ] && export INSTALL_DEPS="${INSTALL_DEPS} scipy" - conda install $INSTALL_DEPS - source activate test - python -m pip install -e .[all] - python -m pip install -r requirements/dev.txt + [ "${{ matrix.run-with-scipy }}" = "YES" ] && micromamba install -n test scipy" + micromamba run -n test python -m pip install -e .[all] + micromamba run -n test python -m pip install -r requirements/dev.txt - name: Check and Log Environment shell: bash run: | - python -V - python -c "import rioxarray; rioxarray.show_versions();" - conda info + micromamba run -n test python -V + micromamba run -n test python -c "import rioxarray; rioxarray.show_versions();" + micromamba info - name: pylint if: matrix.python-version == '3.10' shell: bash run: | - pylint rioxarray/ + micromamba run -n test pylint rioxarray/ - name: mypy shell: bash if: matrix.python-version == '3.10' run: | - mypy rioxarray/ + micromamba run -n test mypy rioxarray/ - name: Test shell: bash run: | - pytest --cov-report term-missing --cov=rioxarray --cov-report xml + micromamba run -n test pytest --cov-report term-missing --cov=rioxarray --cov-report xml - name: Test Build docs shell: bash if: contains(matrix.os, 'ubuntu') run: | - sphinx-build -b html docs/ docs/_build/ + micromamba run -n test sphinx-build -b html docs/ docs/_build/ - uses: codecov/codecov-action@v4 @@ -163,24 +166,27 @@ jobs: - uses: actions/checkout@v4 - name: Setup Conda - uses: conda-incubator/setup-miniconda@v3 + uses: mamba-org/setup-micromamba@v1 with: - activate-environment: test - python-version: '3.10' - channels: conda-forge - channel-priority: strict + init-shell: bash + environment-name: test + create-args: >- + python='3.10' + proj + libgdal + cython + netcdf4 - name: Install Env shell: bash run: | - conda install proj libgdal cython netcdf4 - python -m pip install \ + micromamba run -n test python -m pip install \ --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ --no-deps --pre --upgrade \ numpy \ pandas \ scipy; - python -m pip install --upgrade \ + micromamba run -n test python -m pip install --upgrade \ git+https://github.com/dask/dask.git@main \ git+https://github.com/dask/distributed.git@main \ git+https://github.com/mapbox/rasterio.git@main \ @@ -192,11 +198,11 @@ jobs: - name: Check and Log Environment shell: bash run: | - python -V - python -c "import rioxarray; rioxarray.show_versions();" - conda info + micromamba run -n test python -V + micromamba run -n test python -c "import rioxarray; rioxarray.show_versions();" + micromamba info - name: Test shell: bash run: | - pytest --cov-report term-missing --cov=rioxarray --cov-report xml + micromamba run -n test pytest --cov-report term-missing --cov=rioxarray --cov-report xml