ISISNeutronMuon / ISISNeutronMuon/MDANSE
[BUG] `unit_cell` mismatch in `Configuration`
- Dominant language
- Python
- Stars
- 29
- Forks
- 8
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 9
Description
**Description of the error**
`MDANSE.MolecularDynamics.Configuration` : `Configuration` contains a special check in `__setitem__` for `name=="unit_cell"`, however, on subclasses such as `_PeriodicConfiguration` this is instead an `@property` attribute. Meaning that there can be two instances of `unit_cell` (one in `_variables` one as `_unit_cell`) which do not align.
Neither seems to require/coerce to an `MDANSE.MolecularDynamics.UnitCell.UnitCell` class.
**Describe the expected result**
Only once instance/method of characterising the unit cell.
**Describe the actual result**
Multiple, one probably unused means.
**Suggested fix**
Delete unused (probably `__setitem__`, needs checking) variant and unify.
**Additional details**
N/A
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading Configuration.__setitem__ and the _PeriodicConfiguration.unit_cell property, then inspect how UnitCell.UnitCell is used. Determine which representation is authoritative and whether either path performs type coercion. Done means one consistent unit_cell representation remains and the duplicate state cannot diverge.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100