Skip to content

coreneuron: test reports (mostly compartment and summation) - #337

Merged
cattabiani merged 106 commits into
mainfrom
katta/compartment_sets_neurodamus
Sep 4, 2025
Merged

coreneuron: test reports (mostly compartment and summation)#337
cattabiani merged 106 commits into
mainfrom
katta/compartment_sets_neurodamus

Conversation

@cattabiani

@cattabiani cattabiani commented Jul 7, 2025

Copy link
Copy Markdown
Collaborator

Context

This should finally take care of the compartment sets for coreneuron

Fix: #345 #322

testing for:

neuronsimulator/nrn#3507
neuronsimulator/nrn#3542

Scope

  • rework report handling (mostly in node and target_manager this time. i.e. removal of _report_setup)
  • new CoreReportConfig to finally handle in a proper way report.conf
  • remove write_sim_config, update_report_conf, write_report_conf and similar functions in CoreConfig. Use CoreSimulationConfig and CoreReportConfig instead
  • move cell-permute in another issue/pr. EDIT done: investigate cell-permute #367
  • scaling moved to report_parameters.py
  • CumulativeError moved in pyutils
  • ReportParams now has its own file alleviating the burden of the node.py file. _report_build_params (previously in node.py) is also inside the new file.
  • target_type is no more. We do not need encoding/decoding. We just write sections and compartments in the report.conf
  • streamlined enable_reports. It is still a complex function but it should be easier to read and with less edge cases
  • use the decorator @cache_errors to just fill a CumulativeError instead of raising an error and raise it at the end
  • merge_dicts (in tests/utils.py) allows for overrides and suppression of sections from the child dict with the special keywords: override_field and delete_field

report.conf changes

  • type_name has been split into sections and compartments. No need to encode everything in an enum to decode later. This simplifies code and makes the report.conf. The code is slightly slower 0(1) in a part of the code that was not performance-critical
  • scaling added at the end of the report line (after buffer size)
  • add 2 additional binary lines in case of a compartment set report to pass the exact positions of the compartment sets. They are necessary if and only if the report type is compartment_set. Having them when it is not or not having them when it is is an error.

Testing

  • add integration-e2e tests in test_reports.py

Testing

  • test various bug fixes in coreneuron
  • add lfp test. Check that it fails with neuron
  • fix integration-e2e
  • fix scientific
  • fix unit

@cattabiani cattabiani self-assigned this Jul 7, 2025
@cattabiani
cattabiani changed the base branch from main to katta/compartment_sets July 7, 2025 09:42
@cattabiani
cattabiani requested a review from WeinaJi August 27, 2025 13:36
Comment thread neurodamus/core/coreneuron_simulation_config.py Outdated
Comment thread neurodamus/target_manager.py Outdated
Comment thread neurodamus/node.py
Comment thread neurodamus/core/coreneuron_report_config.py
Comment thread neurodamus/node.py
Comment thread neurodamus/report.py
Comment thread neurodamus/report_parameters.py Outdated
Comment thread neurodamus/report_parameters.py
Comment thread neurodamus/target_manager.py Outdated
Comment thread neurodamus/target_manager.py
@cattabiani
cattabiani requested a review from WeinaJi August 29, 2025 10:27

@WeinaJi WeinaJi left a comment

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.

2nd round 😄

Comment thread neurodamus/core/coreneuron_report_config.py
Comment thread neurodamus/node.py
Comment thread neurodamus/node.py
Comment thread neurodamus/node.py
Comment thread neurodamus/node.py Outdated
Comment thread neurodamus/report_parameters.py
Comment thread neurodamus/target_manager.py Outdated
Comment thread neurodamus/core/coreneuron_report_config.py Outdated
Comment thread neurodamus/target_manager.py

@WeinaJi WeinaJi left a comment

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.

I've reviewed the tests. They look good. Just a nitpick regarding error msgs checks.

Comment thread tests/utils.py Outdated
Comment thread neurodamus/node.py
Comment thread tests/integration-e2e/test_reports.py Outdated
Comment thread tests/integration-e2e/test_reports.py Outdated
Comment thread tests/utils.py Outdated
@cattabiani
cattabiani requested a review from WeinaJi September 4, 2025 12:05
WeinaJi
WeinaJi previously approved these changes Sep 4, 2025

@WeinaJi WeinaJi left a comment

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.

LGTM. Thanks!

@cattabiani
cattabiani merged commit 948ce67 into main Sep 4, 2025
19 checks passed
@cattabiani
cattabiani deleted the katta/compartment_sets_neurodamus branch September 4, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nrn/corenrn test tests of parts of neuron or coreneuron that are not tested in the neuron CI pipelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test coreneuron reports

3 participants