Skip to content

Commit d5ec798

Browse files
committed
Pint Python to <3.13 in example environment
micromamba xcube install is currently broken: all current xcube packages are (directly or transitively) Python 3.13 incompatible, but older ones aren't marked as such, so without a pin micromamba installs Python 3.13 and incompatible xcube 1.7.1.
1 parent 980954b commit d5ec798

File tree

2 files changed

+101
-1
lines changed

2 files changed

+101
-1
lines changed

examples/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ name: xce-example-1
22
channels:
33
- conda-forge
44
dependencies:
5-
- python >=3.10
5+
- python >=3.10,<3.13
66
- xcube >=1.7.1
77
- matplotlib-base

examples/staging.ipynb

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "a7055ada-b79a-467f-bbc8-48b744367324",
6+
"metadata": {
7+
"editable": true,
8+
"slideshow": {
9+
"slide_type": ""
10+
},
11+
"tags": []
12+
},
13+
"source": [
14+
"Parameters cell"
15+
]
16+
},
17+
{
18+
"cell_type": "code",
19+
"execution_count": 5,
20+
"id": "fbb2fa57-fb9c-4b67-86c4-6fc02cfe9e12",
21+
"metadata": {
22+
"editable": true,
23+
"slideshow": {
24+
"slide_type": ""
25+
},
26+
"tags": [
27+
"parameters"
28+
]
29+
},
30+
"outputs": [],
31+
"source": [
32+
"import xcube.core.new\n",
33+
"\n",
34+
"periods = 10\n",
35+
"cube1 = xcube.core.new.new_cube(\n",
36+
" variables={\"v\": lambda x, y, t: (x + y + t) % 10},\n",
37+
" time_periods=periods\n",
38+
")\n",
39+
"cube2 = xcube.core.new.new_cube(\n",
40+
" variables={\"v\": lambda x, y, t: (x - y + t) % 10},\n",
41+
" time_periods=periods\n",
42+
")\n",
43+
"\n",
44+
"del xcube"
45+
]
46+
},
47+
{
48+
"cell_type": "code",
49+
"execution_count": 7,
50+
"id": "df9686d6-395b-4bfd-bd10-c7e03df5cf38",
51+
"metadata": {
52+
"editable": true,
53+
"slideshow": {
54+
"slide_type": ""
55+
},
56+
"tags": []
57+
},
58+
"outputs": [],
59+
"source": [
60+
"cube1.attrs[\"title\"] = \"Cube 1\"\n",
61+
"cube2.attrs[\"title\"] = \"Cube 2\""
62+
]
63+
},
64+
{
65+
"cell_type": "code",
66+
"execution_count": null,
67+
"id": "5fb0b2d6-364a-4875-aa80-37e9f4e76abf",
68+
"metadata": {
69+
"editable": true,
70+
"slideshow": {
71+
"slide_type": ""
72+
},
73+
"tags": []
74+
},
75+
"outputs": [],
76+
"source": []
77+
}
78+
],
79+
"metadata": {
80+
"kernelspec": {
81+
"display_name": "Python 3 (ipykernel)",
82+
"language": "python",
83+
"name": "python3"
84+
},
85+
"language_info": {
86+
"codemirror_mode": {
87+
"name": "ipython",
88+
"version": 3
89+
},
90+
"file_extension": ".py",
91+
"mimetype": "text/x-python",
92+
"name": "python",
93+
"nbconvert_exporter": "python",
94+
"pygments_lexer": "ipython3",
95+
"version": "3.12.8"
96+
}
97+
},
98+
"nbformat": 4,
99+
"nbformat_minor": 5
100+
}

0 commit comments

Comments
 (0)