diff --git a/.github/environment.yml b/.github/environment.yml new file mode 100644 index 0000000..3dbb817 --- /dev/null +++ b/.github/environment.yml @@ -0,0 +1,28 @@ +name: cities-cif +channels: + - conda-forge +dependencies: + - python=3.10 + - earthengine-api=0.1.411 + - geocube=0.4.2 + - geopandas=0.14.4 + - rioxarray=0.15.0 + - odc-stac=0.3.8 + - pystac-client=0.7.5 + - pytest=7.4.3 + - xarray-spatial=0.3.7 + - xee=0.0.15 + - utm=0.7.0 + - osmnx=1.9.0 + - dask[complete]=2023.11.0 + - matplotlib=3.8.2 + - jupyterlab=4.0.10 + - s3fs=2024.5.0 + - geemap=0.32.0 + - pip=23.3.1 + - boto3=1.34.124 + - scikit-learn=1.5.1 + - scikit-image=0.24.0 + - exactextract=0.2.0 + - pip: + - overturemaps==0.6.0 \ No newline at end of file diff --git a/.github/requirements.txt b/.github/requirements.txt deleted file mode 100644 index f5069a9..0000000 --- a/.github/requirements.txt +++ /dev/null @@ -1,21 +0,0 @@ -earthengine-api==0.1.408 -geocube==0.4.2 -geopandas==0.14.1 -rioxarray==0.15.0 -odc-stac==0.3.8 -pystac-client==0.7.5 -pytest==7.4.3 -xarray-spatial==0.3.7 -xee==0.0.15 -utm==0.7.0 -osmnx==1.9.3 -dask[complete]==2023.11.0 -matplotlib==3.8.2 -s3fs==2024.5.0 -geemap==0.32.0 -pip==23.3.1 -boto3==1.34.124 -scikit-learn==1.5.1 -scikit-image==0.24.0 -overturemaps==0.6.0 -exactextract==0.2.0.dev252 diff --git a/.github/workflows/dev_ci_cd.yml b/.github/workflows/dev_ci_cd_conda.yml similarity index 63% rename from .github/workflows/dev_ci_cd.yml rename to .github/workflows/dev_ci_cd_conda.yml index 6701372..45cb64d 100644 --- a/.github/workflows/dev_ci_cd.yml +++ b/.github/workflows/dev_ci_cd_conda.yml @@ -1,4 +1,4 @@ -name: Dev CIF API CI/CD +name: Dev CIF API CI/CD Conda on: pull_request: @@ -9,29 +9,31 @@ permissions: jobs: build: runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} strategy: max-parallel: 4 matrix: python-version: ["3.10"] - steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - uses: conda-incubator/setup-miniconda@v2 with: + activate-environment: cities-cif + environment-file: .github/environment.yml python-version: ${{ matrix.python-version }} + auto-update-conda: true - name: Install Linux dependencies run: | sudo apt update sudo apt install -y gdal-bin libgdal-dev - - name: Install Packages + - name: Install other packages run: | - python -m pip install --upgrade pip - pip install -r .github/requirements.txt - pip install GDAL==`gdal-config --version` + conda install pytest --yes - name: Run Tests env: GOOGLE_APPLICATION_USER: ${{ secrets.GOOGLE_APPLICATION_USER }} - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | - pytest tests + pytest tests \ No newline at end of file diff --git a/environment.yml b/environment.yml index a064834..0d00195 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ channels: - conda-forge dependencies: - python=3.10 - - earthengine-api=0.1.379 + - earthengine-api=0.1.411 - geocube=0.4.2 - geopandas=0.14.4 - rioxarray=0.15.0 @@ -22,7 +22,7 @@ dependencies: - pip=23.3.1 - boto3=1.34.124 - scikit-learn=1.5.1 - - scikit-image==0.24.0 - - exactextract=0.2.0.dev252 + - scikit-image=0.24.0 + - exactextract=0.2.0 - pip: - overturemaps==0.6.0 diff --git a/setup.py b/setup.py index 7d9242c..2c6cceb 100644 --- a/setup.py +++ b/setup.py @@ -28,9 +28,9 @@ "s3fs", "dask>=2023.11.0", "boto3", - "exactextract<=0.2.0.dev252", "overturemaps", "scikit-learn>=1.5.1", - "scikit-image>=0.24.0" + "scikit-image>=0.24.0", + "exactextract>=0.2.0" ], )