-
Notifications
You must be signed in to change notification settings - Fork 0
Pin Sphinx to a sphinx-bluebrain-theme compatible version and bump actions #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c1594d6
Bump github action versions
danifr 62c34cf
Pin Sphinx to a sphinx-bluebrain-theme compatible version
danifr 4190d34
Update Arbor ACC format version string from 0.9-dev to 0.10-dev
danifr 0347aef
Pass SectionList instead of allsec() iterator to LFPy.Cell
danifr faf909f
Regenerate l5pc ACC reference data for NEURON v9 axon replacement mor…
danifr f8d599b
Drop Python 3.9 support
danifr c68713d
Map MacOS version to 14
danifr 7177523
Handle new nrnivmodl output path for libnrnmech.so (no longer under .…
danifr 1231ebe
fix: handle arm64/aarch64 nrnivmodl output paths and clean them in ma…
danifr 8d84671
Fix NEURON mechanism loading in pebble subprocesses
danifr 88a28c8
Relax AP_height tolerance in test_lfpy
danifr 44c3d5a
Add python 3.13 and 3.14 coverage in test
danifr 2663e54
Update remaining test templates to Arbor 0.10-dev
danifr b319ea7
Merge overlapping NrnSimulator default test functions
danifr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| """Tests for NrnSimulator and LFPySimulator mechanisms_directory. | ||
|
|
||
| Verifies that simulators correctly store mechanisms_directory and that | ||
| evaluators set it, ensuring pebble subprocesses can reload mechanisms. | ||
|
|
||
| **Validates: Requirements 1.1, 1.2, 2.1, 2.2, 3.1, 3.2, 3.5, 3.6** | ||
| """ | ||
|
|
||
| import os | ||
| import sys | ||
|
|
||
| import pytest | ||
|
|
||
| import bluepyopt.ephys as ephys | ||
|
|
||
|
|
||
| # ------------------------------------------------------------------- | ||
| # Bug condition tests: mechanisms_directory handling | ||
| # ------------------------------------------------------------------- | ||
|
|
||
| @pytest.mark.unit | ||
| def test_nrnsimulator_mechanisms_directory_set(): | ||
| """NrnSimulator(mechanisms_directory=path) stores the attribute.""" | ||
| for path in ["/tmp/mechs", "/some/other/path", "relative/path"]: | ||
| sim = ephys.simulators.NrnSimulator( | ||
| mechanisms_directory=path) | ||
| assert sim.mechanisms_directory == path | ||
|
|
||
|
|
||
| @pytest.mark.unit | ||
| def test_lfpysimulator_mechanisms_directory_set(): | ||
| """LFPySimulator(mechanisms_directory=path) stores the attribute.""" | ||
| for path in ["/tmp/mechs", "/some/other/path"]: | ||
| sim = ephys.simulators.LFPySimulator( | ||
| mechanisms_directory=path) | ||
| assert sim.mechanisms_directory == path | ||
|
|
||
|
|
||
| @pytest.mark.unit | ||
| def test_l5pc_evaluator_has_mechanisms_directory(): | ||
| """l5pc_evaluator.create() sets mechanisms_directory on sim.""" | ||
| l5pc_path = os.path.abspath( | ||
| os.path.join( | ||
| os.path.dirname(__file__), | ||
| "../../../examples/l5pc")) | ||
| sys.path.insert(0, l5pc_path) | ||
|
|
||
| import l5pc_evaluator # noqa: E402 | ||
|
|
||
| evaluator = l5pc_evaluator.create() | ||
| assert evaluator.sim.mechanisms_directory is not None | ||
|
|
||
|
|
||
| @pytest.mark.unit | ||
| def test_l5pc_lfpy_evaluator_has_mechanisms_directory(): | ||
| """l5pc_lfpy_evaluator.create() sets mechanisms_directory.""" | ||
| lfpy_path = os.path.abspath( | ||
| os.path.join( | ||
| os.path.dirname(__file__), | ||
| "../../../examples/l5pc_lfpy")) | ||
| sys.path.insert(0, lfpy_path) | ||
|
|
||
| import l5pc_lfpy_evaluator # noqa: E402 | ||
|
|
||
| feature_file = os.path.join( | ||
| lfpy_path, "extra_features.json") | ||
| evaluator = l5pc_lfpy_evaluator.create( | ||
| feature_file=feature_file) | ||
| assert evaluator.sim.mechanisms_directory is not None | ||
|
|
||
|
|
||
| # ------------------------------------------------------------------- | ||
| # Preservation tests: NrnSimulator core behavior unchanged | ||
| # ------------------------------------------------------------------- | ||
|
|
||
| @pytest.mark.unit | ||
| def test_nrnsimulator_defaults_preserved(): | ||
| """NrnSimulator() defaults are all correct, and custom args are stored.""" | ||
| sim = ephys.simulators.NrnSimulator() | ||
| assert sim.cvode_active is True | ||
| assert isinstance(sim.dt, float) | ||
| assert sim.dt > 0 | ||
| assert sim.mechanisms_directory is None | ||
| assert sim.cvode_minstep_value is None | ||
| assert sim.random123_globalindex is None | ||
|
|
||
|
|
||
| @pytest.mark.unit | ||
| def test_nrnsimulator_attributes_preserved(): | ||
| """NrnSimulator preserves dt, cvode_active, mechanisms_directory.""" | ||
| test_cases = [ | ||
| (0.025, False, "/tmp/mechs"), | ||
| (0.001, True, None), | ||
| (0.1, False, "/another/path"), | ||
| ] | ||
| for dt_val, cv_val, md_val in test_cases: | ||
| sim = ephys.simulators.NrnSimulator( | ||
| dt=dt_val, | ||
| cvode_active=cv_val, | ||
| mechanisms_directory=md_val) | ||
| assert sim.dt == dt_val | ||
| assert sim.cvode_active == cv_val | ||
| assert sim.mechanisms_directory == md_val |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
bluepyopt/tests/test_ephys/testdata/acc/CCell/CCell_label_dict.acc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
bluepyopt/tests/test_ephys/testdata/acc/CCell/simple_axon_replacement.acc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| (arbor-component | ||
| (meta-data | ||
| (version "0.9-dev")) | ||
| (version "0.10-dev")) | ||
| (morphology | ||
| (branch 0 -1 | ||
| (segment 0 | ||
|
|
||
2 changes: 1 addition & 1 deletion
2
bluepyopt/tests/test_ephys/testdata/acc/expsyn/simple_cell_decor.acc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
bluepyopt/tests/test_ephys/testdata/acc/expsyn/simple_cell_label_dict.acc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
bluepyopt/tests/test_ephys/testdata/acc/l5pc/C060114A7_axon_replacement.acc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,21 @@ | ||
| (arbor-component | ||
| (meta-data | ||
| (version "0.9-dev")) | ||
| (version "0.10-dev")) | ||
| (morphology | ||
| (branch 0 -1 | ||
| (segment 0 | ||
| (point 263.248016 5.356219 -3.380000 0.690000) | ||
| (point 262.996735 -9.641676 -3.380000 0.690000) | ||
| (point 263.685455 31.465240 -3.380000 0.690000) | ||
| (point 263.936737 46.463135 -3.380000 0.690000) | ||
| 2) | ||
| (segment 1 | ||
| (point 262.996735 -9.641676 -3.380000 0.690000) | ||
| (point 262.745453 -24.639572 -3.380000 0.690000) | ||
| (point 263.936737 46.463135 -3.380000 0.690000) | ||
| (point 264.188019 61.461033 -3.380000 0.690000) | ||
| 2) | ||
| (segment 2 | ||
| (point 262.745453 -24.639572 -3.380000 0.460000) | ||
| (point 262.494171 -39.637466 -3.380000 0.460000) | ||
| (point 264.188019 61.461033 -3.380000 0.460000) | ||
| (point 264.439301 76.458931 -3.380000 0.460000) | ||
| 2) | ||
| (segment 3 | ||
| (point 262.494171 -39.637466 -3.380000 0.460000) | ||
| (point 262.242889 -54.635365 -3.380000 0.460000) | ||
| (point 264.439301 76.458931 -3.380000 0.460000) | ||
| (point 264.690582 91.456825 -3.380000 0.460000) | ||
| 2)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
bluepyopt/tests/test_ephys/testdata/acc/l5pc/l5pc_label_dict.acc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
bluepyopt/tests/test_ephys/testdata/acc/l5pc_py37/l5pc_decor.acc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
bluepyopt/tests/test_ephys/testdata/acc/simplecell/simple_axon_replacement.acc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| (arbor-component | ||
| (meta-data | ||
| (version "0.9-dev")) | ||
| (version "0.10-dev")) | ||
| (morphology | ||
| (branch 0 -1 | ||
| (segment 0 | ||
|
|
||
2 changes: 1 addition & 1 deletion
2
bluepyopt/tests/test_ephys/testdata/acc/simplecell/simple_cell_decor.acc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| (arbor-component | ||
| (meta-data (version "0.9-dev")) | ||
| (meta-data (version "0.10-dev")) | ||
| (decor | ||
| (paint (region "soma") (membrane-capacitance 0.01 (scalar 1.0))) | ||
| (paint (region "soma") (density (mechanism "default::hh" ("gnabar" 0.10299326453483033) ("gkbar" 0.027124836082684685)))))) |
2 changes: 1 addition & 1 deletion
2
bluepyopt/tests/test_ephys/testdata/acc/simplecell/simple_cell_label_dict.acc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.