• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openbraininstitute / neurodamus / 23431330571
91%

Build:
DEFAULT BRANCH: main
Ran 23 Mar 2026 10:00AM UTC
Jobs 4
Files 49
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Mar 2026 09:52AM UTC coverage: 91.088% (-0.003%) from 91.091%
23431330571

push

github

web-flow
fix stale section counts and small rework of `modification_manager.py` (#499)

## Context
Fix: #496 #497 #498
Given what I changed it made sense to solve all these issues in 1 pr. 

## Scope

Introduce `_SECTION_TYPES` as the single source of truth for section
name ↔ section list mappings, replacing the duplicated definitions
across `metype.py` and `modification_manager.py`.

### metype.py

- Replaced `_section_layout` (list of tuples with lambdas) with
`_SECTION_TYPES` (list of `(section_name, section_list)` tuples)
- Refactored `get_section_counts` to iterate `_SECTION_TYPES` directly,
with all section lists treated as optional via `getattr` and the axon
special-cased to use `nSecAxonalOrig`
- Refactored `get_section_id` and `get_sec` to use `_SECTION_TYPES`
instead of `_section_layout`
- Added documentation explaining the stale hoc accessor problem and the
axon numbering gap

### modification_manager.py

- Removed `BaseSectionModification` class; inlined section type
validation directly into `SectionListModification` and
`SectionModification`
- Replaced local `SECTION_TYPES` definitions with lookups derived from
`BaseCell._SECTION_TYPES`
- Extended allowed section types from 4 to all 7 (added `ais`, `node`,
`myelin`)
- Renamed all modification classes for clarity:
  - `TTX` → `TTXModification`
  - `ConfigureAllSections` → `ConfigureAllSectionsModification`
  - `SectionList` → `SectionListModification`
  - `Section` → `SectionModification`
  - `CompartmentSet` → `CompartmentSetModification`

### coreneuron_configuration.py

- `register_mapping` is using `BaseCell.SECTION_TYPES` now. More DRY

### tests/unit/test_metype.py

- Renamed `test_get_cell_section_counts` →
`test_section_counts_vs_stale_hoc_accessor` with docstring explaining
the stale accessor scenario
- Replaced magic index `[3]` with a lookup via `_SECTION_TYPES` so the
test won't break if layout order changes
- Fixed mock attributes to match what the section list accessors
actually read ... (continued)

33 of 36 new or added lines in 3 files covered. (91.67%)

7737 of 8494 relevant lines covered (91.09%)

2.3 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
86.43
-0.05% neurodamus/metype.py
Subprojects
ID Flag name Job ID Ran Files Coverage
1 unit 23431330571.1 23 Mar 2026 10:00AM UTC 49
88.69
GitHub Action Run
2 unit-mpi 23431330571.2 23 Mar 2026 10:00AM UTC 49
61.78
GitHub Action Run
3 baseline 23431330571.3 23 Mar 2026 10:00AM UTC 49
25.83
GitHub Action Run
4 unit-ngv-mpi 23431330571.4 23 Mar 2026 10:00AM UTC 49
54.09
GitHub Action Run
Source Files on build 23431330571
  • Tree
  • List 49
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23431330571
  • a4cbbaf0 on github
  • Prev Build on main (#23301769596)
  • Next Build on main (#23432208441)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc