Skip to content

Issue2172 - #2173

Draft
CoePaul wants to merge 2 commits into
mainfrom
issue2172
Draft

Issue2172#2173
CoePaul wants to merge 2 commits into
mainfrom
issue2172

Conversation

@CoePaul

@CoePaul CoePaul commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Contributes to #2172

Instructions to reviewer on how to test:

  1. Check BaseModel classes against JSON in file mentioned from i19 config in Pydantic BaseModels to capture I19 transmission system JSON specifications #2172 description
  2. Check tests cover reasonable expectations for JSON validation
  3. Ensure CI passes the tests and that the python matches house style ( etc )

Checks for reviewer

  • Would the PR title make sense to a scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
  • Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

@CoePaul
CoePaul requested a review from a team as a code owner August 13, 2026 15:10
@CoePaul CoePaul added the i19-2 label Aug 13, 2026
@CoePaul CoePaul self-assigned this Aug 13, 2026
@CoePaul
CoePaul marked this pull request as draft August 13, 2026 15:11
@CoePaul CoePaul added i19-1 python Pull requests that update Python code labels Aug 13, 2026
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.79070% with 64 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.78%. Comparing base (7da7e4e) to head (13c130e).

Files with missing lines Patch % Lines
...ransmission/spec_from_config/lateral_motor_spec.py 0.00% 21 Missing ⚠️
...s/i19/transmission/spec_from_config/wedges_spec.py 0.00% 14 Missing ⚠️
...ssion/spec_from_config/transmission_system_spec.py 0.00% 13 Missing ⚠️
...s/i19/transmission/spec_from_config/wheels_spec.py 0.00% 10 Missing ⚠️
...sion/spec_from_config/system_aspect_base_parser.py 66.66% 3 Missing ⚠️
...ansmission/spec_from_config/usage_priority_spec.py 92.30% 2 Missing ⚠️
...c_from_config/material_absorption_spectrum_spec.py 97.36% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2173      +/-   ##
==========================================
- Coverage   99.20%   98.78%   -0.43%     
==========================================
  Files         367      377      +10     
  Lines       14587    14759     +172     
==========================================
+ Hits        14471    14579     +108     
- Misses        116      180      +64     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CoePaul
CoePaul force-pushed the issue2172 branch 2 times, most recently from fac49b5 to e5f2b04 Compare August 14, 2026 23:05
* Start with adding JSON validation for system specification
  JSON dict-like structure expectations

* Pydantic BaseModel classes map sub-structures ( sub-dicts ) within
  the system description structure here adding
   JSON validation for energy_interval
   [ the range of x-ray energies (in keV ) over which an absorption curve is valid ]
   JSON validation for absorption fit curve parameters
   [ the scaling constant, roll-off vs energy and an optional residuals polynomial ]
* Use pydantic BaseModel classes to capture blobs from Transmission System
  specification config JSON files for I19 beamlines EH-1 / EH-2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i19-1 i19-2 python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant