Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions #532

Merged
merged 19 commits into from
Sep 5, 2023
84 changes: 61 additions & 23 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,84 @@
name: docs-build

on:
pull_request:
branches:
- master

jobs:
deploy:
docs-build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

defaults:
run:
shell: bash -el {0}

env:
PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }}
USE_FOLIUM: ${{ secrets.USE_FOLIUM }}
USE_MKDOCS: ${{ secrets.USE_MKDOCS }}
HEREMAPS_API_KEY: ${{ secrets.HEREMAPS_API_KEY }}
DP_TOKEN: ${{ secrets.DP_TOKEN }}
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}

steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: conda-incubator/setup-miniconda@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v4
auto-activate-base: true
python-version: ${{ matrix.python-version }}
channels: conda-forge,defaults
channel-priority: true
miniconda-version: latest

- name: Cache dependencies
uses: actions/cache@v3
with:
python-version: "3.10"
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Testing conda
run: |
conda info
conda list

- name: Install GDAL
run: |
python -m pip install --upgrade pip
pip install --find-links=https://girder.github.io/large_image_wheels --no-cache GDAL pyproj
conda install -c conda-forge mamba --yes
mamba install -c conda-forge gdal pyproj --yes

- name: Test GDAL installation
run: |
python -c "from osgeo import gdal"
gdalinfo --version

- name: Install dependencies
run: |
pip install --no-cache-dir Cython PyYAML==6.0.1
pip install -r requirements.txt -r requirements_dev.txt
pip install .

- name: Discover typos with codespell
run: codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,*.pdf" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs"
run: codespell --skip=".*,.git/*,*.csv,*.geojson,*.json,*.js,*.html,*cff,*.pdf" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs"

- name: PKG-TEST
run: python -m unittest discover tests/

- name: Install mkdocs
run: |
python -m unittest discover tests/
env:
PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }}
- run: pip install -r requirements_docs.txt
- run: mkdocs build
env:
USE_FOLIUM: ${{ secrets.USE_FOLIUM }}
USE_MKDOCS: ${{ secrets.USE_MKDOCS }}
HEREMAPS_API_KEY: ${{ secrets.HEREMAPS_API_KEY }}
DP_TOKEN: ${{ secrets.DP_TOKEN }}
PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }}
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
pip install -r requirements_docs.txt
mkdocs build

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
Expand All @@ -58,4 +92,8 @@ jobs:
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 10

- name: Cleanup
if: always()
run: |
echo "Cleaning up resources."
76 changes: 53 additions & 23 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,72 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

defaults:
run:
shell: bash -el {0}

env:
PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }}
USE_FOLIUM: ${{ secrets.USE_FOLIUM }}
USE_MKDOCS: ${{ secrets.USE_MKDOCS }}
HEREMAPS_API_KEY: ${{ secrets.HEREMAPS_API_KEY }}
DP_TOKEN: ${{ secrets.DP_TOKEN }}
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}

steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: conda-incubator/setup-miniconda@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v4
auto-activate-base: true
python-version: ${{ matrix.python-version }}
channels: conda-forge,defaults
channel-priority: true
miniconda-version: latest

- name: Cache dependencies
uses: actions/cache@v3
with:
python-version: "3.10"
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Testing conda
run: |
conda info
conda list

- name: Install GDAL
run: |
python -m pip install --upgrade pip
pip install --find-links=https://girder.github.io/large_image_wheels --no-cache GDAL pyproj
conda install -c conda-forge mamba --yes
mamba install -c conda-forge gdal pyproj --yes

- name: Test GDAL installation
run: |
python -c "from osgeo import gdal"
gdalinfo --version

- name: Install dependencies
run: |
pip install --no-cache-dir Cython
pip install --no-cache-dir Cython PyYAML==6.0.1
pip install -r requirements.txt -r requirements_dev.txt
pip install .

- name: Discover typos with codespell
run: codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,*.pdf" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs"
# - name: PKG-TEST
# run: |
# python -m unittest discover tests/
# env:
# PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }}
- run: pip install -r requirements_docs.txt
run: codespell --skip=".*,.git/*,*.csv,*.geojson,*.json,*.js,*.html,*cff,*.pdf" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs"

- name: PKG-TEST
run: python -m unittest discover tests/

- name: Install mkdocs
run: pip install -r requirements_docs.txt
- run: mkdocs gh-deploy --force
env:
USE_FOLIUM: ${{ secrets.USE_FOLIUM }}
USE_MKDOCS: ${{ secrets.USE_MKDOCS }}
HEREMAPS_API_KEY: ${{ secrets.HEREMAPS_API_KEY }}
DP_TOKEN: ${{ secrets.DP_TOKEN }}
PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }}
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
18 changes: 4 additions & 14 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.py }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir Cython
pip install codespell -r requirements.txt
pip install .
# - name: Discover typos with codespell
# run: codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs"
# - name: PKG-TEST
# run: |
# python -m unittest discover tests/
# env:
# HEREMAPS_API_KEY: ${{ secrets.HEREMAPS_API_KEY }}
# PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }}
- name: Install package
run: pip install .
- name: Test import
run: python -c "import leafmap; print('leafmap import successful')"
45 changes: 0 additions & 45 deletions .github/workflows/py38.yml

This file was deleted.

60 changes: 45 additions & 15 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,62 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

defaults:
run:
shell: bash -el {0}

env:
PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }}
USE_FOLIUM: ${{ secrets.USE_FOLIUM }}
USE_MKDOCS: ${{ secrets.USE_MKDOCS }}
HEREMAPS_API_KEY: ${{ secrets.HEREMAPS_API_KEY }}
DP_TOKEN: ${{ secrets.DP_TOKEN }}
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4

- name: Setup Python
uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
python-version: ${{ matrix.python-version }}
channels: conda-forge,defaults
channel-priority: true
miniconda-version: latest

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Testing conda
run: |
conda info
conda list

- name: Install GDAL
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir Cython
pip install --find-links=https://girder.github.io/large_image_wheels --no-cache GDAL
conda install -c conda-forge mamba --yes
mamba install -c conda-forge gdal pyproj --yes

- name: Test GDAL installation
run: |
python -c "from osgeo import gdal"
gdalinfo --version

- name: Install dependencies
run: |
pip install -r requirements.txt -r requirements_dev.txt
pip install .
# - name: Discover typos with codespell
# run: codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,*.pdf" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs"
- name: PKG-TEST
run: |
python -m unittest discover tests/
env:
HEREMAPS_API_KEY: ${{ secrets.HEREMAPS_API_KEY }}
PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}

- name: Test import
run: python -c "import leafmap; print('leafmap import successful')"
Loading