From 2f3017ec144220d245c8c631e98ebacca27bffb5 Mon Sep 17 00:00:00 2001 From: Kenn Cartier Date: Thu, 12 Sep 2024 10:45:51 -0700 Subject: [PATCH] tweaking workflows --- .github/environment.yml | 28 ++++++++++ .github/workflows/dev_ci_cd_conda.yml | 2 +- .github/workflows/dev_ci_cd_pip.yml | 74 +++++++++++++-------------- 3 files changed, 66 insertions(+), 38 deletions(-) create mode 100644 .github/environment.yml diff --git a/.github/environment.yml b/.github/environment.yml new file mode 100644 index 0000000..a064834 --- /dev/null +++ b/.github/environment.yml @@ -0,0 +1,28 @@ +name: cities-cif +channels: + - conda-forge +dependencies: + - python=3.10 + - earthengine-api=0.1.379 + - 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.dev252 + - pip: + - overturemaps==0.6.0 diff --git a/.github/workflows/dev_ci_cd_conda.yml b/.github/workflows/dev_ci_cd_conda.yml index b417bc7..e3ed63b 100644 --- a/.github/workflows/dev_ci_cd_conda.yml +++ b/.github/workflows/dev_ci_cd_conda.yml @@ -27,7 +27,7 @@ jobs: - name: Install Packages run: | conda update -n base conda - conda install --yes --file .github/requirements.txt + conda install --yes --file .github/environment.yml conda install gdal conda upgrade numpy - name: Run Tests diff --git a/.github/workflows/dev_ci_cd_pip.yml b/.github/workflows/dev_ci_cd_pip.yml index 9ff3fef..add6674 100644 --- a/.github/workflows/dev_ci_cd_pip.yml +++ b/.github/workflows/dev_ci_cd_pip.yml @@ -1,37 +1,37 @@ -name: Dev CIF API CI/CD PIP - -on: - pull_request: - workflow_dispatch: - -permissions: - contents: read -jobs: - build: - runs-on: ubuntu-latest - 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 - with: - python-version: ${{ matrix.python-version }} - - name: Install Linux dependencies - run: | - sudo apt update - sudo apt install -y gdal-bin libgdal-dev - - name: Install Packages - run: | - python -m pip install --upgrade pip - pip install -r .github/requirements.txt - pip install GDAL==`gdal-config --version` - - name: Run Tests - env: - GOOGLE_APPLICATION_USER: ${{ secrets.GOOGLE_APPLICATION_USER }} - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - run: | - pytest tests +#name: Dev CIF API CI/CD PIP +# +#on: +# pull_request: +# workflow_dispatch: +# +#permissions: +# contents: read +#jobs: +# build: +# runs-on: ubuntu-latest +# 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 +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install Linux dependencies +# run: | +# sudo apt update +# sudo apt install -y gdal-bin libgdal-dev +# - name: Install Packages +# run: | +# python -m pip install --upgrade pip +# pip install -r .github/requirements.txt +# pip install GDAL==`gdal-config --version` +# - name: Run Tests +# env: +# GOOGLE_APPLICATION_USER: ${{ secrets.GOOGLE_APPLICATION_USER }} +# GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} +# run: | +# pytest tests