Skip to content

Commit cd0b3c5

Browse files
authored
Upgrade to Python 3.13 and update some packages (#669)
* spacy upgrade * test python 3.14 * use solution from astral-sh/uv#11466 * upgrade uv * add requirements * downgrade becuse space * try altair upgrade * upgrade altair * upgrade altair * spacy
1 parent 8cfd74d commit cd0b3c5

File tree

5 files changed

+915
-664
lines changed

5 files changed

+915
-664
lines changed

.github/workflows/colab.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ jobs:
2222
run: |
2323
sudo ./build/requirements.sh
2424
- name: Install the latest version of uv and set the python version to 3.13t
25-
uses: astral-sh/setup-uv@v6
25+
uses: astral-sh/setup-uv@v7
2626
with:
27-
python-version: "3.12"
28-
enable-cache: true
29-
cache-dependency-glob: "uv.lock"
27+
version: "latest"
28+
29+
- name: Restore environment
30+
run: uv sync
31+
3032
- uses: quarto-dev/quarto-actions/setup@v2
3133
- run: |
3234
quarto --version

.github/workflows/prod.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
- update
7+
- spacy
88

99
jobs:
1010
pages:
@@ -27,10 +27,9 @@ jobs:
2727
sudo ./build/requirements.sh
2828
2929
- name: Install the latest version of uv
30-
uses: astral-sh/setup-uv@v6
30+
uses: astral-sh/setup-uv@v7
3131
with:
3232
version: "latest"
33-
python-version: 3.12
3433

3534
- name: Restore environment
3635
run: uv sync
@@ -94,7 +93,6 @@ jobs:
9493
uses: astral-sh/setup-uv@v6
9594
with:
9695
version: "latest"
97-
python-version: 3.12
9896

9997
- name: Restore environment
10098
run: uv sync
@@ -140,7 +138,6 @@ jobs:
140138
uses: astral-sh/setup-uv@v6
141139
with:
142140
version: "latest"
143-
python-version: 3.12
144141

145142
- name: Restore environment
146143
run: uv sync

build/requirements.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ apt-get update && \
66
apt-get install -y git && \
77
apt-get install build-essential -y && \
88
apt-get install libmagic-dev -y && \
9+
apt-get install libgdal-dev -y && \
910
DEBIAN_FRONTEND=noninteractive apt install -y imagemagick && \
1011
rm -rf /var/lib/apt/lists/*

pyproject.toml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ name = "python-datascientist"
33
version = "0.1.0"
44
description = "Source code for Lino Galiana's Python for data science course"
55
readme = "README.md"
6-
requires-python = ">=3.12,<3.13"
6+
requires-python = ">=3.13,<3.14"
77
dependencies = [
8-
"altair==5.4.1",
8+
"altair>=6.0.0",
99
"black==24.8.0",
1010
"cartiflette",
1111
"contextily==1.6.2",
1212
"duckdb>=0.10.1",
1313
"folium>=0.19.6",
14+
"gdal!=3.11.1",
1415
"geoplot==0.5.1",
1516
"graphviz==0.20.3",
1617
"great-tables>=0.12.0",
@@ -29,7 +30,7 @@ dependencies = [
2930
"plotly>=6.1.2",
3031
"plotnine>=0.15",
3132
"polars==1.8.2",
32-
"pyarrow==17.0.0",
33+
"pyarrow>=17.0.0",
3334
"pynsee==0.1.8",
3435
"python-dotenv==1.0.1",
3536
"python-frontmatter>=1.1.0",
@@ -38,15 +39,31 @@ dependencies = [
3839
"scikit-image==0.24.0",
3940
"scipy>=1.13.0",
4041
"selenium<4.39.0",
41-
"spacy==3.8.4",
42+
"spacy>=3.8.4",
4243
"webdriver-manager==4.0.2",
4344
"wordcloud==1.9.3",
4445
]
4546

4647
[tool.uv.sources]
4748
cartiflette = { git = "https://github.com/inseefrlab/cartiflette" }
49+
gdal = [
50+
{ index = "gdal-wheels", marker = "sys_platform == 'linux'" },
51+
{ index = "geospatial_wheels", marker = "sys_platform == 'win32'" },
52+
]
53+
54+
[[tool.uv.index]]
55+
name = "geospatial_wheels"
56+
url = "https://nathanjmcdougall.github.io/geospatial-wheels-index/"
57+
explicit = true
58+
59+
[[tool.uv.index]]
60+
name = "gdal-wheels"
61+
url = "https://gitlab.com/api/v4/projects/61637378/packages/pypi/simple"
62+
explicit = true
4863

4964
[dependency-groups]
5065
dev = [
5166
"nb-clean>=4.0.1",
5267
]
68+
69+

0 commit comments

Comments
 (0)