Skip to content

Commit dcd1faa

Browse files
committed
attempt to fix both issues
1 parent 764cdd9 commit dcd1faa

4 files changed

Lines changed: 136 additions & 17 deletions

File tree

.github/workflows/docs.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ jobs:
4545
pip install -r requirements/base.txt
4646
# Install optional dependencies for full module imports
4747
pip install -r requirements/streamlit.txt || true
48-
# Try to install kivy requirements (optional, may fail if system deps missing)
49-
# KIVY_NO_ARGS=1 will skip kivy imports in docs generation anyway
50-
pip install -r requirements/kivy.txt || echo "Kivy installation failed, continuing without it"
48+
# Skip kivy installation - it requires X server and system libraries not available in CI
49+
# Kivy imports will be handled gracefully by docs_export.py
5150
# Verify critical dependencies are installed
5251
python -c "import geopy; print(f'geopy version: {geopy.__version__}')"
5352

devtools/docs_export.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ def _load_target_modules() -> List[ModuleSpec]:
3636
# Import in dependency order: models -> utils -> z_visual -> services -> workspace -> others
3737
# This ensures dependencies are available when needed
3838
# Note: services depends on z_visual, so z_visual must come before services
39-
dependency_order = ["models", "utils", "z_visual", "services", "workspace", "ui_kivy", "ui_streamlit"]
39+
# Skip ui_kivy in CI environments where X server is not available
40+
# It will be handled gracefully by the import error handling below
41+
dependency_order = ["models", "utils", "z_visual", "services", "workspace", "ui_streamlit", "ui_kivy"]
4042

4143
# Helper to create a stub module
4244
def _create_stub_module(module_name):
@@ -76,8 +78,9 @@ def __getattr__(self, attr):
7678
mod = importlib.import_module(f"module.{name}")
7779
# Immediately set up alias so 'from X import ...' works in other modules
7880
sys.modules[name] = mod
79-
except Exception as e1:
81+
except (ImportError, ModuleNotFoundError, OSError) as e1:
8082
# Store the first error - this is more likely to have the real dependency issue
83+
# OSError catches kivy initialization failures (X server, libmtdev, etc.)
8184
first_error = e1
8285
error = first_error # Set error in case both imports fail
8386

requirements/streamlit.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Include base dependencies
2+
-r base.in
3+
14
# exporting PNG from Plotly
25
kaleido>=0.2.1
36
streamlit>=1.47.0

requirements/streamlit.txt

Lines changed: 126 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,114 +6,228 @@
66
#
77
altair==5.5.0
88
# via streamlit
9+
annotated-types==0.7.0
10+
# via pydantic
911
attrs==25.4.0
1012
# via
13+
# cattrs
1114
# jsonschema
1215
# referencing
16+
# requests-cache
1317
blinker==1.9.0
1418
# via streamlit
19+
build==1.3.0
20+
# via pip-tools
1521
cachetools==6.2.1
1622
# via streamlit
23+
cattrs==25.3.0
24+
# via requests-cache
1725
certifi==2025.10.5
18-
# via requests
26+
# via
27+
# requests
28+
# skyfield
29+
cffi==2.0.0
30+
# via timezonefinder
1931
charset-normalizer==3.4.4
2032
# via requests
2133
choreographer==1.2.0
2234
# via kaleido
2335
click==8.3.0
24-
# via streamlit
36+
# via
37+
# pip-tools
38+
# streamlit
39+
contourpy==1.3.3
40+
# via matplotlib
41+
cycler==0.12.1
42+
# via matplotlib
43+
flatbuffers==25.9.23
44+
# via timezonefinder
45+
fonttools==4.60.1
46+
# via matplotlib
47+
geographiclib==2.1
48+
# via geopy
49+
geopy==2.4.1
50+
# via -r requirements/base.in
2551
gitdb==4.0.12
2652
# via gitpython
2753
gitpython==3.1.45
2854
# via streamlit
55+
h3==4.3.1
56+
# via timezonefinder
2957
idna==3.11
30-
# via requests
58+
# via
59+
# requests
60+
# url-normalize
3161
iniconfig==2.3.0
3262
# via pytest
3363
jinja2==3.1.6
3464
# via
3565
# altair
3666
# pydeck
67+
jplephem==2.23
68+
# via skyfield
3769
jsonschema==4.25.1
3870
# via altair
3971
jsonschema-specifications==2025.9.1
4072
# via jsonschema
4173
kaleido==1.1.0
42-
# via -r requirements/streamlit.in
74+
# via
75+
# -r requirements/base.in
76+
# -r requirements/streamlit.in
77+
kerykeion==5.1.12
78+
# via -r requirements/base.in
79+
kiwisolver==1.4.9
80+
# via matplotlib
4381
logistro==2.0.0
4482
# via
4583
# choreographer
4684
# kaleido
4785
markupsafe==3.0.3
4886
# via jinja2
87+
matplotlib==3.10.7
88+
# via -r requirements/base.in
4989
narwhals==2.10.0
50-
# via altair
90+
# via
91+
# altair
92+
# plotly
5193
numpy==2.3.4
5294
# via
95+
# contourpy
96+
# jplephem
97+
# matplotlib
5398
# pandas
5499
# pydeck
100+
# skyfield
55101
# streamlit
102+
# timezonefinder
56103
orjson==3.11.4
57104
# via kaleido
58105
packaging==25.0
59106
# via
60107
# altair
108+
# build
61109
# kaleido
110+
# matplotlib
111+
# plotly
62112
# pytest
63113
# streamlit
64114
pandas==2.3.3
65-
# via streamlit
115+
# via
116+
# -r requirements/base.in
117+
# streamlit
66118
pillow==12.0.0
67-
# via streamlit
119+
# via
120+
# matplotlib
121+
# streamlit
122+
pip-tools==7.5.2
123+
# via -r requirements/base.in
124+
platformdirs==4.5.0
125+
# via requests-cache
126+
plotly==6.5.0
127+
# via -r requirements/base.in
68128
pluggy==1.6.0
69129
# via pytest
70130
protobuf==6.33.0
71131
# via streamlit
72132
pyarrow==21.0.0
73133
# via streamlit
134+
pycparser==2.23
135+
# via cffi
136+
pydantic==2.12.4
137+
# via kerykeion
138+
pydantic-core==2.41.5
139+
# via pydantic
74140
pydeck==0.9.1
75141
# via streamlit
76142
pygments==2.19.2
77143
# via pytest
144+
pyparsing==3.2.5
145+
# via matplotlib
146+
pyproject-hooks==1.2.0
147+
# via
148+
# build
149+
# pip-tools
150+
pyswisseph==2.10.3.2
151+
# via kerykeion
78152
pytest==8.4.2
79153
# via pytest-timeout
80154
pytest-timeout==2.4.0
81155
# via kaleido
82156
python-dateutil==2.9.0.post0
83-
# via pandas
157+
# via
158+
# matplotlib
159+
# pandas
84160
pytz==2025.2
85-
# via pandas
161+
# via
162+
# kerykeion
163+
# pandas
164+
pyyaml==6.0.3
165+
# via -r requirements/base.in
86166
referencing==0.37.0
87167
# via
88168
# jsonschema
89169
# jsonschema-specifications
90170
requests==2.32.5
91-
# via streamlit
171+
# via
172+
# kerykeion
173+
# requests-cache
174+
# streamlit
175+
requests-cache==1.2.1
176+
# via kerykeion
92177
rpds-py==0.28.0
93178
# via
94179
# jsonschema
95180
# referencing
181+
scour==0.38.2
182+
# via kerykeion
183+
sgp4==2.25
184+
# via skyfield
185+
simple-ascii-tables==1.0.1
186+
# via kerykeion
96187
simplejson==3.20.2
97188
# via choreographer
98189
six==1.17.0
99-
# via python-dateutil
190+
# via
191+
# python-dateutil
192+
# scour
193+
skyfield==1.53
194+
# via -r requirements/base.in
100195
smmap==5.0.2
101196
# via gitdb
102197
streamlit==1.51.0
103198
# via -r requirements/streamlit.in
104199
tenacity==9.1.2
105200
# via streamlit
201+
timezonefinder==8.1.0
202+
# via -r requirements/base.in
106203
toml==0.10.2
107204
# via streamlit
108205
tornado==6.5.2
109206
# via streamlit
110207
typing-extensions==4.15.0
111208
# via
112209
# altair
210+
# cattrs
211+
# kerykeion
212+
# pydantic
213+
# pydantic-core
113214
# streamlit
215+
# typing-inspection
216+
typing-inspection==0.4.2
217+
# via pydantic
114218
tzdata==2025.2
115219
# via pandas
220+
url-normalize==2.2.1
221+
# via requests-cache
116222
urllib3==2.5.0
117-
# via requests
223+
# via
224+
# requests
225+
# requests-cache
118226
watchdog==6.0.0
119227
# via streamlit
228+
wheel==0.45.1
229+
# via pip-tools
230+
231+
# The following packages are considered to be unsafe in a requirements file:
232+
# pip
233+
# setuptools

0 commit comments

Comments
 (0)