Skip to content

Commit 21e0089

Browse files
Fix CI (#1254)
* ci: update micromamba action to use @main and new configuration * ci: update Python version to 3.11 * ci: use create-args for Python version instead of environment file * ci: install build from pip instead of conda * ci: update actions/upload-artifact from v2 to v4 * ci: exclude examples from ruff checks and ignore F403 for notebooks * ci: add sphinx.configuration to pyproject.toml * ci: fix sphinx.configuration to only include source directory * ci: configure ruff via command line options in workflow * ci: add Sphinx configuration to .readthedocs.yaml * ci: fix docs build environment dependencies * ci: remove invalid --extend-include argument from ruff command * ci: exclude ui-tests directory from ruff checks * refactor: replace geopandas.read_file with geodatasets.read_file in notebooks * fix: update build environment to include jupyter_sphinx * fix: update geopandas import in geodata.rst * chore: remove docs building from CI as it's handled by readthedocs * Bump galata version * try using geopandas to read file instead in rst * fix syntax error in notebooks * fix syntax error in more notebooks * shall load * Esri.DeLorme no longer available * don't fail on warning? * Manually update snapshots --------- Co-authored-by: Maarten A. Breddels <[email protected]>
1 parent 7f7343d commit 21e0089

18 files changed

+58
-28
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
os: [ubuntu-latest, macos-latest]
23-
python-version: [3.8]
23+
python-version: [3.11]
2424

2525
steps:
2626
- uses: actions/checkout@v2
2727

2828
- name: Setup conda
29-
uses: mamba-org/setup-micromamba@v1
29+
uses: mamba-org/setup-micromamba@main
3030
with:
3131
environment-file: environment-dev.yml
32-
condarc: |
33-
dependencies:
34-
- python==${{ matrix.python-version }}
32+
init-shell: bash
33+
cache-environment: true
34+
create-args: python=${{ matrix.python-version }}
3535

3636
- name: Install ipyleaflet
3737
run: pip install python/jupyter_leaflet python/ipyleaflet --no-deps
@@ -45,7 +45,7 @@ jobs:
4545
test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-leaflet/package.json
4646
4747
- name: Python Linters
48-
run: ruff check --output-format=github .
48+
run: ruff check --output-format=github --exclude "examples,ui-tests" --ignore "E501,E731,F403" .
4949

5050
- name: JS Linters
5151
run: |

.github/workflows/ui-tests.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,33 @@ jobs:
3737
run: npx playwright test
3838
working-directory: ui-tests
3939

40+
- name: Upload test results
41+
if: always()
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: test-results
45+
path: test-results
46+
retention-days: 5
47+
48+
- name: Upload screenshots
49+
if: always()
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: screenshots
53+
path: screenshots
54+
retention-days: 5
55+
4056
- name: Upload Playwright Test assets
4157
if: always()
42-
uses: actions/upload-artifact@v2
58+
uses: actions/upload-artifact@v4
4359
with:
4460
name: ipyleaflet-test-assets
4561
path: |
4662
ui-tests/test-results
4763
4864
- name: Upload Playwright Test report
4965
if: always()
50-
uses: actions/upload-artifact@v2
66+
uses: actions/upload-artifact@v4
5167
with:
5268
name: ipyleaflet-test-report
5369
path: |

.readthedocs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ build:
77

88
conda:
99
environment: docs/build-environment.yml
10+
11+
sphinx:
12+
configuration: docs/conf.py
13+
fail_on_warning: false

docs/build-environment.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ channels:
44
- conda-forge
55

66
dependencies:
7+
- pip
78
- yarn~=3.0
89
- jupyterlab~=4.0
910
- jupyter-packaging~=0.12
1011
- jupyter-sphinx
11-
- build
1212
- scipy
1313
- netcdf4
1414
- geopandas
@@ -18,6 +18,8 @@ dependencies:
1818
- pydata-sphinx-theme
1919
- jupyterlite-sphinx
2020
- jupyterlite-xeus-python >=0.9.2,<0.10
21+
- geodatasets
2122
- pip:
23+
- build
2224
- ../python/jupyter_leaflet
2325
- ../python/ipyleaflet

docs/layers/geodata.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ Examples
1212

1313
from ipyleaflet import Map, GeoData, basemaps, LayersControl
1414
import geopandas
15+
import geodatasets
1516
import json
1617

17-
countries = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
18+
countries = geopandas.read_file(geodatasets.get_path('naturalearth_land'))
1819

1920
m = Map(center=(52.3,8.0), zoom = 3, basemap= basemaps.Esri.WorldTopoMap)
2021

docs/map_and_basemaps/basemaps.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ These basemaps are coming from the `xyzservices <https://xyzservices.readthedocs
4646
Map(basemap=basemaps.Esri.WorldStreetMap, center=center, zoom=zoom)
4747

4848

49-
.. jupyter-execute::
50-
51-
Map(basemap=basemaps.Esri.DeLorme, center=center, zoom=zoom)
52-
53-
5449
.. jupyter-execute::
5550

5651
Map(basemap=basemaps.Esri.WorldTopoMap, center=center, zoom=zoom)

environment-dev.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ channels:
33
- conda-forge
44
dependencies:
55
- pip
6-
- build
76
- wheel
87
- jupyterlab~=4.0
98
- jupyter-packaging~=0.12
@@ -14,3 +13,5 @@ dependencies:
1413
- pandas
1514
- yarn~=3.0
1615
- ruff
16+
- pip:
17+
- build

examples/CanvasRenderer.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"source": [
1010
"from ipyleaflet import Map, GeoData\n",
1111
"import geopandas\n",
12+
"import geodatasets\n",
1213
"import numpy as np\n",
1314
"import shapely"
1415
]

examples/GPX.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"outputs": [],
1717
"source": [
1818
"from ipyleaflet import Map, GeoData\n",
19-
"import geopandas as gpd\n",
19+
"import geopandas\n",
20+
"import geodatasets as gpd\n",
2021
"import fiona"
2122
]
2223
},

examples/GeoData.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"source": [
1616
"import ipyleaflet as ipy\n",
1717
"import geopandas\n",
18+
"import geodatasets\n",
1819
"import json"
1920
]
2021
},
@@ -33,9 +34,9 @@
3334
"metadata": {},
3435
"outputs": [],
3536
"source": [
36-
"countries = geopandas.read_file(geopandas.datasets.get_path(\"naturalearth_lowres\"))\n",
37-
"cities = geopandas.read_file(geopandas.datasets.get_path(\"naturalearth_cities\"))\n",
38-
"rivers = geopandas.read_file(\n",
37+
"countries = geodatasets.read_file(geopandas.datasets.get_path(\"naturalearth_lowres\"))\n",
38+
"cities = geodatasets.read_file(geopandas.datasets.get_path(\"naturalearth_cities\"))\n",
39+
"rivers = geodatasets.read_file(\n",
3940
" \"https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/ne_10m_rivers_lake_centerlines.zip\"\n",
4041
")"
4142
]

0 commit comments

Comments
 (0)