Add validation constraints to FitConfig Card 2 integer fields
@along4 is already working on this.
Since Feb 19, 2026.
Assessment
This issue has not been assessed yet.
Description
Summary
FitConfig defines six optional integer fields that map to SAMMY Card Set 2 parameters, but none have validation constraints:
iptdop: Optional[int] = Field(default=None, description="Grid enhancement for Doppler broadening")
iptwid: Optional[int] = Field(default=None, description="Grid enhancement for resonance tails")
ixxchn: Optional[int] = Field(default=None, description="Special channel skip or ENDF ZA")
ndigit: Optional[int] = Field(default=None, description="Digits for compact covariance output")
idropp: Optional[int] = Field(default=None, description="Percent threshold for zeroing covariances")
matnum: Optional[int] = Field(default=None, description="ENDF material number")
Currently any integer value is accepted. Invalid values are only caught when SAMMY runs, which gives poor error messages and wastes compute time.
Suggested Approach
- Cross-reference the SAMMY manual for each field's valid range and semantics
- Add appropriate Pydantic constraints (e.g.,
ge=0,le=100,Literalfor enumerated values) - Add unit tests verifying that out-of-range values are rejected at config construction time
Location
src/pleiades/sammy/fitting/config.py, lines 31-40
Context
Identified during review of PR #220. Not a blocker — None defaults mean SAMMY's own defaults are used, and SAMMY will reject truly invalid values at runtime. But early validation would improve the user experience.
Related
- PR #220 (Fix/213 integration of fitconfig)
- SAMMY manual Card Set 2 specification
- Dominant language
- Python
- Stars
- 7
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lanl/PLEIADES
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
-
Clarify precedence of nuclear data cache dir across config layersMay be free again @along4 claimed this 260 days ago, and no pull request is open. Open
-
PleiadesConfig.save() loses workspace token portabilityMay be free again @along4 claimed this 260 days ago, and no pull request is open. Open
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
SpikeInterface/spikeinterface#4924 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
aws-samples/sample-per-model-bedrock#782 ·
Maintainers usually reply within 1 day
-
bug javascript
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
No-op PreToolUse:Bash hook (bash_hook.py) still registered synchronously; adds latency and can time out at 10 sPossibly taken @alexgr-agent claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
alexgreensh/token-optimizer#313 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100