Document (or close) five known validation gaps in DfsuBuilder and DfsuFile
- Dominant language
- Python
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Five TODOs mark gaps that are already handled conservatively — they raise clearly or skip a check rather than producing wrong output. Collecting them so the limits are visible without reading the source; none is a silent bug.
**`DfsuBuilder.SetZUnit`, `mikecore/DfsuBuilder.py:201`** — `# TODO: Fix!` above:
```python
if (zUnit != eumUnit.eumUmeter
and zUnit != eumUnit.eumUfeet
and zUnit != eumUnit.eumUUnitUndefined):
raise Exception("Currently only meter and feet unit is supported")
```
Any other Z unit is rejected outright. Whether more units should be accepted, and what "Fix!" meant, is unrecorded.
**`mikecore/DfsuFile.py:224`** — `# TODO Validate data`. Data written to a dfsu is not checked for length or type against the item it belongs to; a mismatch surfaces further down rather than at the call.
**`mikecore/DfsuBuilder.py:310-311`** — in the layered-file validation:
```python
# TODO: Need to check that node coordinates are also on top of each other?
# TODO: Need to check that the 2D elements are defined counter-clockwise
```
`Validate` checks that layered elements sit on top of each other by connectivity and that layer counts match the sigma-layer count, but does not check coordinates or element orientation. A file violating either passes validation.
**`mikecore/DfsuBuilder.py:341`** — `# TODO do we need to check frequency or directions?`; spectral file types get no validation beyond the type dispatch itself.
Each is one of: accept as designed and document it, or promote to its own issue with a case that goes wrong. The value here is that the answer is written down somewhere other than a code comment.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the five TODO locations in mikecore/DfsuBuilder.py and mikecore/DfsuFile.py, including the layered-file Validate logic and spectral dispatch. For each gap, determine from the surrounding behavior whether it is an intentional limitation or needs a separate issue with a failing case; done means the decision and rationale are recorded, or follow-up issues are opened.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100