Skip to content

Pin Sphinx to a sphinx-bluebrain-theme compatible version and bump actions#3

Merged
danifr merged 14 commits intomasterfrom
bump_actions
Apr 17, 2026
Merged

Pin Sphinx to a sphinx-bluebrain-theme compatible version and bump actions#3
danifr merged 14 commits intomasterfrom
bump_actions

Conversation

@danifr
Copy link
Copy Markdown
Contributor

@danifr danifr commented Apr 15, 2026

No description provided.

danifr added 2 commits April 16, 2026 11:20
Set mechanisms_directory on NrnSimulator/LFPySimulator so that
neuron.load_mechanisms() is called automatically in forked
subprocesses spawned by SweepProtocol.run(isolate=True).

- Use mechanisms_directory instead of nrn_load_dll in test_l5pc.py,
  test_stochkv.py, and the l5pc/stochkv/lfpy evaluators
- Relax hardcoded voltage tolerance in test_NrnRampPulse_instantiate
- Add tests for simulator mechanisms_directory handling
CI uses neuron-nightly which drifts slightly between builds.
The AP_height assertion was pinned to 1e-5 tolerance but the nightly shifted by 0.0135 mV.
Relaxed to ±0.05 mV to accommodate nightly drift while still catching real regressions.
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
bluepyopt/ephys/models.py 87.50% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danifr
Copy link
Copy Markdown
Contributor Author

danifr commented Apr 16, 2026

@AurelienJaquier @darshanmandge It took me quite some tries with AmazonQ but I got all the test passing now

Please double and triple check my changes in case the LLM change something it should not.

Summary of all I did:

Main fix:

  • Functional tests were failing with ValueError: argument not a density mechanism name because pebble-spawned subprocesses couldn't find compiled MOD mechanisms. The root cause: nrn_load_dll in the parent process doesn't propagate to forked children, and NEURON's auto-discovery couldn't find the mechanism library from the test working directory.

  • Set mechanisms_directory on all NrnSimulator/LFPySimulator instances so that neuron.load_mechanisms() is called automatically in subprocesses.

Hardcoded value tolerances changes (this one is important !!!)

  • test_stimuli.py: Relaxed test_NrnRampPulse_instantiate voltage tolerance to decimal=4
  • test_lfpy.py: Relaxed AP_height tolerance to ±0.05 mV to accommodate neuron-nightly drift

Dependency updates

  • Arbor 0.9-dev → 0.10-dev: Updated Jinja2 templates and 15 .acc reference files
  • LFPy API: Replaced allsec() iterator with SectionList in models.py and dummycells.py
  • Regenerated l5pc ACC reference data for NEURON 9.x axon replacement morphology

CI changes

  • GitHub Actions: Bumped actions/checkout@v6, actions/setup-python@v6, codecov-action@v6, action-gh-release@v3, gh-action-pypi-publish@release/v1
  • Dropped Python 3.9: Removed from tox.ini, test.yml, pyproject.toml (this one is important !!!)
  • macOS runner: macos-13 → macos-14 (arm64)
  • Makefile: Added arm64/ and aarch64/ cleanup to make clean
  • Sphinx: Pinned <9 for sphinx-bluebrain-theme compatibility

Add new tests

  • test_simulators_mechdir.py: 8 tests verifying mechanisms_directory handling on simulators and evaluators

Comment thread .github/workflows/test.yml Outdated
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add python 3.13 and 3.14 to see if those pass the tests please?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arbor lacks cp3.14 wheels. Latest 0.11.0 goes up to cp313: https://pypi.org/project/arbor/#files. We can skip arbor-dependent tests on 3.14 by making the arbor extra optional in tox. What do you think @AurelienJaquier ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thanks for the suggestions, I addressed this comment in 44c3d5a tests are still passing, so 🎉



@pytest.mark.unit
def test_nrnsimulator_default_no_regression():
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a lot of overlap with test_nrnsimulator_defaults_preserved, no?
Maybe you could merge the two functions together?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well spotted! addressed in b319ea7 thanks a lot for the feedback

Comment thread bluepyopt/ephys/templates/acc/decor_acc_template.jinja2
danifr added 3 commits April 17, 2026 13:21
Arbor lacks cp3.14 wheels. Latest 0.11.0 goes up to cp313: https://pypi.org/project/arbor/0.11.0/#files
So we skip arbor-dependent tests on 3.14 by making the arbor extra optional in tox.
Copy link
Copy Markdown
Collaborator

@AurelienJaquier AurelienJaquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thanks @danifr !

Copy link
Copy Markdown
Collaborator

@darshanmandge darshanmandge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @danifr !

@danifr danifr merged commit 58cf61c into master Apr 17, 2026
7 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.

3 participants