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

openbraininstitute / libsonata / 15489935130
93%

Build:
DEFAULT BRANCH: master
Ran 06 Jun 2025 11:58AM UTC
Jobs 1
Files 19
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

06 Jun 2025 11:55AM UTC coverage: 92.59% (-0.3%) from 92.903%
15489935130

push

github

web-flow
CompartmentSets (#4)

CompartmentSets

- [x] add CompartmentSets https://github.com/openbraininstitute/sonata-extension/pull/5

## API

### CompartmentLocation
- [x] init(name: str)  
- [x] init(gid: int64, section_idx: int64, offset: float)  
- [x] gid (property) -> int64  
- [x] section_idx (property) -> int64  
- [x] offset (property) -> float  
- [x] toJSON() -> str  
- [x] __iter__() -> tuple(gid, section_idx, offset)  
- [x] __eq__(other: CompartmentLocation) -> bool  
- [x] __ne__(other: CompartmentLocation) -> bool  
- [x] __copy__() -> CompartmentLocation  
- [x] __deepcopy__(memo: dict) -> CompartmentLocation  
- [x] __repr__() -> str  
- [x] __str__() -> str  

### CompartmentSet
- [x] init(name: str)  
- [x] population (property) -> int  
- [x] size(selection=Selection()) -> int  
- [x] gids() -> List[int]  
- [x] filter(selection=Selection()) -> CompartmentSet  
- [x] filtered_iter(selection=Selection()) -> Iterator[Compartment]  
- [x] __len__() -> int  
- [x] __getitem__(index: int) -> Compartment  
- [x] __iter__() -> Iterator[Compartment]  
- [x] __eq__(other: CompartmentSet) -> bool  
- [x] __ne__(other: CompartmentSet) -> bool  
- [x] toJSON() -> str  
- [x] __repr__() -> str  
- [x] __str__() -> str  

### CompartmentSets
- [x] init  
- [x] fromFile(path: str) -> CompartmentSets  
- [x] at(key: str) -> CompartmentSet  
- [x] __contains__(key: str) -> bool  
- [x] names() -> List[str]  
- [x] values() -> List[CompartmentSet]  
- [x] items() -> List[Tuple[str, CompartmentSet]]  
- [x] toJSON() -> str  
- [x] __eq__(other: CompartmentSets) -> bool  
- [x] __ne__(other: CompartmentSets) -> bool  
- [x] __len__() -> int  
- [x] __getitem__(key: str) -> CompartmentSet  
- [x] __repr__() -> str  
- [x] __str__() -> str  

## Additional changes
- [x] add contains and its python api. Example `3 in Selection([0, 1, 2, 3]) == True`
- [x] ctests
- [ ] ~~python tests~~ I cannot find python tests for Selection at all. I will not add a full test ... (continued)

293 of 324 new or added lines in 4 files covered. (90.43%)

2324 of 2510 relevant lines covered (92.59%)

39.37 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
92.91
-0.15% src/config.cpp
4
86.11
-7.22% src/utils.h
25
91.23
src/compartment_sets.cpp
Jobs
ID Job ID Ran Files Coverage
1 15489935130.1 06 Jun 2025 11:58AM UTC 19
92.59
GitHub Action Run
Source Files on build 15489935130
  • Tree
  • List 19
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • da870aa9 on github
  • Prev Build on master (#15385836984)
  • Next Build on master (#15733191980)
  • Delete
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

© 2025 Coveralls, Inc