Skip to content

Commit 756d548

Browse files
committed
Merge remote-tracking branch 'upstream/main' into update-docs-versioning
2 parents c592753 + 9a69958 commit 756d548

File tree

7 files changed

+19
-8
lines changed

7 files changed

+19
-8
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,29 @@ permissions:
1717
jobs:
1818
run:
1919
runs-on: ubuntu-latest
20+
defaults:
21+
run:
22+
shell: bash -l {0}
2023

2124
steps:
2225
- uses: actions/checkout@v4
2326
with:
2427
fetch-depth: 0
25-
ref: main
2628

2729
- name: Setup Micromamba env
2830
uses: mamba-org/setup-micromamba@v2
2931
with:
3032
environment-name: TEST
33+
init-shell: bash
3134
create-args: >-
3235
python=3
3336
--file requirements.txt
3437
--file requirements-dev.txt
3538
3639
- name: Install folium from source
37-
shell: bash -l {0}
3840
run: python -m pip install -e . --no-deps --force-reinstall
3941

4042
- name: Build documentation
41-
shell: bash -l {0}
4243
run: |
4344
set -e
4445
pushd docs

.github/workflows/test_code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, windows-latest]
15-
python-version: ["3.8", "3.12"]
15+
python-version: ["3.9", "3.12"]
1616
experimental: [false]
1717
include:
1818
- python-version: "3.12"

.github/workflows/test_selenium.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [ "3.8", "3.12" ]
14+
python-version: [ "3.9", "3.12" ]
1515
fail-fast: false
1616

1717
steps:

folium/plugins/draw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class Draw(JSCSSMixin, MacroElement):
103103
{{ this._parent.get_name() }}.on('draw:created', function(e) {
104104
drawnItems_{{ this.get_name() }}.addLayer(e.layer);
105105
});
106-
106+
107107
{% if this.export %}
108108
document.getElementById('export').onclick = function(e) {
109109
var data = drawnItems_{{ this.get_name() }}.toGeoJSON();

requirements-dev.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ altair>=5.0.0
22
cartopy
33
check-manifest
44
descartes
5+
fiona
56
flake8
67
flake8-builtins
78
flake8-comprehensions
@@ -10,7 +11,7 @@ flake8-mutable
1011
flake8-nb>=0.2.5
1112
geodatasets
1213
geographiclib
13-
geopandas
14+
geopandas>=1
1415
gpxpy
1516
ipykernel
1617
jenkspy

tests/selenium/test_heat_map_selenium.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ def test_heat_map_with_weights(driver):
1515
This test will fail in non-headless mode because window size will be different.
1616
1717
"""
18-
m = folium.Map((0.5, 0.5), zoom_start=8, tiles=None)
18+
figure_width, figure_height = 800, 600
19+
m = folium.Map(
20+
(0.5, 0.5),
21+
zoom_start=8,
22+
tiles=None,
23+
width=figure_width,
24+
height=figure_height,
25+
)
1926
HeatMap(
2027
# make four dots with different weights: 1, 1, 1.5 and 2.
2128
data=[
@@ -40,6 +47,8 @@ def test_heat_map_with_weights(driver):
4047
)
4148
screenshot_bytes = base64.b64decode(canvas_base64)
4249
screenshot = Image.open(io.BytesIO(screenshot_bytes))
50+
# window size is not reliable, so crop to a smaller fixed size
51+
screenshot = screenshot.crop((0, 0, figure_width, figure_height))
4352
path = os.path.dirname(__file__)
4453
with open(os.path.join(path, "test_heat_map_selenium_screenshot.png"), "rb") as f:
4554
screenshot_expected = Image.open(f)
-29.3 KB
Loading

0 commit comments

Comments
 (0)