Skip to content

Commit 9ef6e81

Browse files
committed
Merge remote-tracking branch 'upstream/main' into pr/1620
2 parents b4c2d15 + c905e41 commit 9ef6e81

39 files changed

Lines changed: 274 additions & 253 deletions

.github/workflows/deploy-docs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish Docs
2+
3+
on: ["push", "pull_request"]
4+
5+
jobs:
6+
run:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
11+
- name: Setup Micromamba
12+
uses: mamba-org/provision-with-micromamba@v14
13+
with:
14+
environment-file: false
15+
16+
- name: Create environment
17+
shell: bash -l {0}
18+
run: |
19+
micromamba create --name TEST python=3 --file requirements.txt --file requirements-dev.txt --channel conda-forge
20+
micromamba activate TEST
21+
pip install -e . --no-deps --force-reinstall
22+
23+
- name: Build documentation
24+
shell: bash -l {0}
25+
run: |
26+
set -e
27+
micromamba activate TEST
28+
cp examples/Quickstart.ipynb docs/quickstart.ipynb
29+
pushd docs
30+
make clean html linkcheck
31+
popd
32+
33+
- name: GitHub Pages action
34+
if: ${{ github.event_name == 'release' }}
35+
uses: peaceiris/actions-gh-pages@v3
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: docs/_build/html/
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,45 @@
11
name: Publish to PyPI
22

3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
10-
release:
11-
types:
12-
- published
3+
on: ["push", "pull_request"]
4+
5+
defaults:
6+
run:
7+
shell: bash
138

149
jobs:
1510
packages:
1611
runs-on: ubuntu-latest
1712
steps:
18-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1914

2015
- name: Set up Python
21-
uses: actions/setup-python@v2
16+
uses: actions/setup-python@v4
2217
with:
2318
python-version: 3.x
2419

2520
- name: Get tags
2621
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
27-
shell: bash
22+
2823

2924
- name: Install build tools
3025
run: |
3126
python -m pip install --upgrade pip wheel build twine
3227
33-
shell: bash
34-
3528
- name: Build binary wheel and sdist
3629
run: python -m build --sdist --wheel . --outdir dist
3730

3831
- name: CheckFiles
3932
run: |
4033
ls dist
41-
shell: bash
4234
4335
- name: Test wheels
4436
run: |
4537
cd dist && python -m pip install folium*.whl
4638
python -m twine check *
47-
shell: bash
4839
4940
- name: Publish a Python distribution to PyPI
50-
if: ${{ github.event_name == 'create' && github.event.ref_type == 'tag' }}
51-
uses: pypa/gh-action-pypi-publish@master
41+
if: ${{ github.event_name == 'release' }}
42+
uses: pypa/gh-action-pypi-publish@v1.5.1
5243
with:
5344
user: __token__
5445
password: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/release.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/test_code.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,33 @@
11
name: Code Tests
22

3-
on:
4-
pull_request:
5-
push:
6-
branches: [main]
3+
on: [push, pull_request]
74

85
jobs:
96
run:
107
runs-on: ${{ matrix.os }}
118
strategy:
129
matrix:
1310
os: [ubuntu-latest, windows-latest]
14-
python-version: ["3.7", "3.10"]
11+
python-version: ["3.7", "3.11"]
1512
fail-fast: false
1613

1714
steps:
18-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1916

20-
- name: Setup Conda
21-
uses: s-weigand/setup-conda@v1
17+
- name: Setup Micromamba
18+
uses: mamba-org/provision-with-micromamba@v14
2219
with:
23-
activate-conda: false
24-
update-conda: true
25-
conda-channels: conda-forge
20+
environment-file: false
2621

2722
- name: Python ${{ matrix.python-version }}
2823
shell: bash -l {0}
2924
run: |
30-
conda create --yes --name TEST python=${{ matrix.python-version }} pip --file requirements.txt --file requirements-dev.txt --strict-channel-priority
31-
source activate TEST
32-
pip install -e . --no-deps --force-reinstall
25+
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
26+
micromamba activate TEST
27+
python -m pip install -e . --no-deps --force-reinstall
3328
3429
- name: Tests
3530
shell: bash -l {0}
3631
run: |
37-
source activate TEST
38-
pytest -vv --ignore=tests/selenium
32+
micromamba activate TEST
33+
python -m pytest -vv --ignore=tests/selenium
Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
11
name: Notebook Code Tests
22

3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
3+
on: [push, pull_request]
104

115
jobs:
126
run:
137
runs-on: ubuntu-latest
148

159
steps:
16-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1711

18-
- name: Setup Conda
19-
uses: s-weigand/setup-conda@v1
12+
- name: Setup Micromamba
13+
uses: mamba-org/provision-with-micromamba@v14
2014
with:
21-
activate-conda: false
22-
conda-channels: conda-forge
15+
environment-file: false
2316

2417
- name: Create env
2518
shell: bash -l {0}
2619
run: |
27-
conda create --yes --name TEST python=3 pip --file requirements.txt --file requirements-dev.txt --channel conda-forge --strict-channel-priority
28-
source activate TEST
29-
pip install -e . --no-deps --force-reinstall
20+
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
21+
micromamba activate TEST
22+
python -m pip install -e . --no-deps --force-reinstall
3023
3124
- name: Notebook tests
3225
shell: bash -l {0}
3326
run: |
34-
source activate TEST
35-
pytest --nbval-lax examples
27+
micromamba activate TEST
28+
python -m pytest --nbval-lax examples
Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,30 @@
11
name: Code Tests with Latest branca
22

3-
on:
4-
pull_request:
5-
push:
6-
branches: [main]
3+
on: [push, pull_request]
74

85
jobs:
96
run:
107
runs-on: ubuntu-latest
118

129
steps:
13-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1411

15-
- name: Setup Conda
16-
uses: s-weigand/setup-conda@v1
12+
- name: Setup Micromamba
13+
uses: mamba-org/provision-with-micromamba@v14
1714
with:
18-
activate-conda: false
19-
update-conda: true
20-
conda-channels: conda-forge
15+
environment-file: false
2116

2217
- name: Python 3.x
2318
shell: bash -l {0}
2419
run: |
25-
conda create --yes --name TEST python=3 pip --file requirements.txt --file requirements-dev.txt
26-
source activate TEST
27-
pip install -e . --no-deps --force-reinstall
20+
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
21+
micromamba activate TEST
22+
python -m pip install -e . --no-deps --force-reinstall
2823
2924
- name: Tests with latest branca
3025
shell: bash -l {0}
3126
run: |
32-
source activate TEST
33-
conda remove branca --yes
34-
pip install git+https://github.com/python-visualization/branca.git
35-
pytest -vv --ignore=tests/selenium
27+
micromamba activate TEST
28+
micromamba remove branca --yes
29+
python -m pip install git+https://github.com/python-visualization/branca.git
30+
python -m pytest -vv --ignore=tests/selenium
Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
11
name: Selenium Tests
22

3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
3+
on: [push, pull_request]
104

115
jobs:
126
run:
137
runs-on: ubuntu-latest
148

159
steps:
16-
- uses: actions/checkout@v2
17-
- name: Conda setup
18-
uses: s-weigand/setup-conda@v1
10+
- uses: actions/checkout@v3
11+
12+
- name: Setup Micromamba
13+
uses: mamba-org/provision-with-micromamba@v14
1914
with:
20-
update-conda: true
15+
environment-file: false
2116

22-
- name: Conda environment creation
17+
- name: Create env
2318
shell: bash -l {0}
2419
run: |
25-
conda create --yes --name TEST python=3 pip --file requirements.txt --file requirements-dev.txt --channel conda-forge --strict-channel-priority
26-
source activate TEST
27-
pip install -e . --no-deps --force-reinstall
20+
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
21+
micromamba activate TEST
22+
python -m pip install -e . --no-deps --force-reinstall
2823
2924
- name: Selenium tests
3025
shell: bash -l {0}
3126
run: |
32-
source activate TEST
33-
pytest tests/selenium -vv
27+
micromamba activate TEST
28+
python -m pytest tests/selenium -vv
Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
11
name: Notebook Style Tests
22

3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
3+
on: [push, pull_request]
104

115
jobs:
126
run:
137
runs-on: ubuntu-latest
148

159
steps:
16-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1711

18-
- name: Setup Conda
19-
uses: s-weigand/setup-conda@v1
12+
- name: Setup Micromamba
13+
uses: mamba-org/provision-with-micromamba@v14
2014
with:
21-
activate-conda: false
22-
conda-channels: conda-forge
15+
environment-file: false
2316

2417
- name: Create env
2518
shell: bash -l {0}
2619
run: |
27-
conda create --yes --name TEST python=3 pip --file requirements.txt --file requirements-dev.txt --channel conda-forge --strict-channel-priority
28-
source activate TEST
29-
pip install -e . --no-deps --force-reinstall
20+
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
21+
micromamba activate TEST
22+
python -m pip install -e . --no-deps --force-reinstall
3023
3124
- name: Notebook coding standards tests
3225
shell: bash -l {0}
3326
run: |
34-
source activate TEST
35-
flake8-nb examples --ignore=W391,E226,E402,W504,I100,I201,I202,E703 --max-line-length=120 --show-source --count
27+
micromamba activate TEST
28+
for fname in examples/*.ipynb; do echo $fname $(flake8-nb $fname --ignore=W391,E226,E402,W504,I100,I201,I202,E703 --max-line-length=120 --show-source --count); done

0 commit comments

Comments
 (0)