Skip to content

Fix tutorials for fresh installs: add nest-asyncio, pandas 3 date parsing - #29

Merged
JortGroen merged 3 commits into
mainfrom
dev
Nov 6, 2026
Merged

JortGroen merged 3 commits into
mainfrom
dev

Conversation

@JortGroen

Copy link
Copy Markdown
Contributor

Brings #28 from dev to main.

Why

A fresh setup of main (conda env from environment.yml: Python 3.11, illuminator 3.1b1 from PyPI) currently fails all 4 tutorial notebooks with ModuleNotFoundError: No module named 'nest_asyncio'. The notebooks import it, but environment.yml never listed it; it used to arrive through ipykernel, and newer ipykernel depends on nest_asyncio2 instead. Checked locally today: 4 failed on main.

What (3 files, +5/−4)

  • environment.yml: add nest-asyncio.
  • tutorials/power_balance/functions_T1.py, tutorials/physical_congestion/functions_T3.py: parse the output date index per value and use resample('h'), so the helpers work with both pandas 1.5 and pandas 3 (needed for the upcoming Illuminator release).

dev CI (Test Examples) passes with illuminator 3.1b1 from PyPI.

JortGroen and others added 3 commits November 6, 2026 11:43
Parse the Collector output index with index.map(pd.Timestamp) so the
first bare-date row ("2012-06-01") doesn't fix the inferred format for
later rows with times, and use the 'h' resample alias ('H' was removed
in pandas 3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ipykernel 7 now depends on nest-asyncio2 instead of nest_asyncio, so
the notebooks' `import nest_asyncio` fails in a fresh environment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Make tutorial helpers work with pandas 1.5 and pandas 3
@JortGroen
JortGroen merged commit ebde1aa into main Nov 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant