Skip to content

fix ci #1248

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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

fix ci #1248

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
1f2502e
ci: update micromamba action to use @main and new configuration
maartenbreddels Apr 29, 2025
6ff5e22
ci: update Python version to 3.11
maartenbreddels Apr 29, 2025
4dad96d
ci: use create-args for Python version instead of environment file
maartenbreddels Apr 29, 2025
f679867
ci: install build from pip instead of conda
maartenbreddels Apr 29, 2025
52e8817
ci: update actions/upload-artifact from v2 to v4
maartenbreddels Apr 29, 2025
f04f72e
ci: exclude examples from ruff checks and ignore F403 for notebooks
maartenbreddels Apr 29, 2025
ea604ff
ci: add sphinx.configuration to pyproject.toml
maartenbreddels Apr 29, 2025
34b6bc0
ci: fix sphinx.configuration to only include source directory
maartenbreddels Apr 29, 2025
0228853
ci: configure ruff via command line options in workflow
maartenbreddels Apr 29, 2025
54fbc30
ci: add Sphinx configuration to .readthedocs.yaml
maartenbreddels Apr 29, 2025
1c31472
ci: fix docs build environment dependencies
maartenbreddels Apr 29, 2025
b18f696
ci: remove invalid --extend-include argument from ruff command
maartenbreddels Apr 29, 2025
9204519
ci: exclude ui-tests directory from ruff checks
maartenbreddels Apr 29, 2025
6f5a390
refactor: replace geopandas.read_file with geodatasets.read_file in n…
maartenbreddels Apr 29, 2025
d5e9c71
fix: update build environment to include jupyter_sphinx
maartenbreddels Apr 29, 2025
13a086e
fix: update geopandas import in geodata.rst
maartenbreddels Apr 29, 2025
2667e2f
chore: remove docs building from CI as it's handled by readthedocs
maartenbreddels Apr 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.8]
python-version: [3.11]

steps:
- uses: actions/checkout@v2

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

- name: Install ipyleaflet
run: pip install python/jupyter_leaflet python/ipyleaflet --no-deps
Expand All @@ -45,7 +45,7 @@ jobs:
test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-leaflet/package.json

- name: Python Linters
run: ruff check --output-format=github .
run: ruff check --output-format=github --exclude "examples,ui-tests" --ignore "E501,E731,F403" .

- name: JS Linters
run: |
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,33 @@ jobs:
run: npx playwright test
working-directory: ui-tests

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: test-results
retention-days: 5

- name: Upload screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: screenshots
path: screenshots
retention-days: 5

- name: Upload Playwright Test assets
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ipyleaflet-test-assets
path: |
ui-tests/test-results

- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ipyleaflet-test-report
path: |
Expand Down
4 changes: 4 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ build:

conda:
environment: docs/build-environment.yml

sphinx:
configuration: docs/conf.py
fail_on_warning: true
4 changes: 3 additions & 1 deletion docs/build-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ channels:
- conda-forge

dependencies:
- pip
- yarn~=3.0
- jupyterlab~=4.0
- jupyter-packaging~=0.12
- jupyter-sphinx
- build
- scipy
- netcdf4
- geopandas
Expand All @@ -18,6 +18,8 @@ dependencies:
- pydata-sphinx-theme
- jupyterlite-sphinx
- jupyterlite-xeus-python >=0.9.2,<0.10
- geodatasets
- pip:
- build
- ../python/jupyter_leaflet
- ../python/ipyleaflet
3 changes: 2 additions & 1 deletion docs/layers/geodata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ Examples

from ipyleaflet import Map, GeoData, basemaps, LayersControl
import geopandas
import geodatasets
import json

countries = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
countries = geodatasets.read_file(geodatasets.get_path('naturalearth_lowres'))

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

Expand Down
3 changes: 2 additions & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ channels:
- conda-forge
dependencies:
- pip
- build
- wheel
- jupyterlab~=4.0
- jupyter-packaging~=0.12
Expand All @@ -14,3 +13,5 @@ dependencies:
- pandas
- yarn~=3.0
- ruff
- pip:
- build
3 changes: 2 additions & 1 deletion examples/CanvasRenderer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"outputs": [],
"source": [
"from ipyleaflet import Map, GeoData\n",
"import geopandas\n",
"import geopandas
import geodatasets\n",
"import numpy as np\n",
"import shapely"
]
Expand Down
3 changes: 2 additions & 1 deletion examples/GPX.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"outputs": [],
"source": [
"from ipyleaflet import Map, GeoData\n",
"import geopandas as gpd\n",
"import geopandas
import geodatasets as gpd\n",
"import fiona"
]
},
Expand Down
7 changes: 4 additions & 3 deletions examples/GeoData.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"source": [
"import ipyleaflet as ipy\n",
"import geopandas\n",
"import geodatasets\n",
"import json"
]
},
Expand All @@ -33,9 +34,9 @@
"metadata": {},
"outputs": [],
"source": [
"countries = geopandas.read_file(geopandas.datasets.get_path(\"naturalearth_lowres\"))\n",
"cities = geopandas.read_file(geopandas.datasets.get_path(\"naturalearth_cities\"))\n",
"rivers = geopandas.read_file(\n",
"countries = geodatasets.read_file(geopandas.datasets.get_path(\"naturalearth_lowres\"))\n",
"cities = geodatasets.read_file(geopandas.datasets.get_path(\"naturalearth_cities\"))\n",
"rivers = geodatasets.read_file(\n",
" \"https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/ne_10m_rivers_lake_centerlines.zip\"\n",
")"
]
Expand Down
7 changes: 4 additions & 3 deletions examples/GeoData_on_hover.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
"outputs": [],
"source": [
"from ipyleaflet import Map, GeoData, basemaps, LayersControl\n",
"import geopandas\n",
"import geopandas
import geodatasets\n",
"import json\n",
"\n",
"countries = geopandas.read_file(geopandas.datasets.get_path(\"naturalearth_lowres\"))\n",
"rivers = geopandas.read_file(\n",
"countries = geodatasets.read_file(geodatasets.get_path(\"naturalearth_lowres\"))\n",
"rivers = geodatasets.read_file(\n",
" \"https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/ne_10m_rivers_lake_centerlines.zip\"\n",
")\n",
"\n",
Expand Down
3 changes: 2 additions & 1 deletion examples/KML.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"outputs": [],
"source": [
"from ipyleaflet import Map, GeoData\n",
"import geopandas as gpd"
"import geopandas
import geodatasets as gpd"
]
},
{
Expand Down
5 changes: 3 additions & 2 deletions examples/MarkerCluster-GeoJson.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"outputs": [],
"source": [
"from ipyleaflet import Map, Marker, MarkerCluster, GeoJSON, GeoData\n",
"import geopandas"
"import geopandas
import geodatasets"
]
},
{
Expand All @@ -16,7 +17,7 @@
"metadata": {},
"outputs": [],
"source": [
"cities = geopandas.read_file(\"zip://./geopandas_cities.zip\")"
"cities = geodatasets.read_file(\"zip://./geopandas_cities.zip\")"
]
},
{
Expand Down
5 changes: 3 additions & 2 deletions examples/MarkerCluster.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"outputs": [],
"source": [
"from ipyleaflet import Map, Marker, MarkerCluster\n",
"import geopandas\n",
"import geopandas
import geodatasets\n",
"\n",
"\n",
"cities = geopandas.read_file(\"zip://./geopandas_cities.zip\")\n",
"cities = geodatasets.read_file(\"zip://./geopandas_cities.zip\")\n",
"\n",
"m = Map(center=(42.5, -41.6), zoom=2)\n",
"m.add(\n",
Expand Down
6 changes: 5 additions & 1 deletion python/ipyleaflet/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ exclude = [
[tool.hatch.build.targets.wheel]
packages = ["ipyleaflet"]

[tool.sphinx.configuration]
source-dir = "docs"

[tool.ruff]
extend-include = ["*.ipynb"]
exclude = ["examples"]

[tool.ruff.lint]
select = [
# pycodestyle
"E",
]
ignore = ["E501", "E731"]
ignore = ["E501", "E731", "F403"]
Loading