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 60.00000% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.86%. Comparing base (25167f2) to head (e5f2b04).

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% 15 Missing ⚠️
...ssion/spec_from_config/transmission_system_spec.py 0.00% 8 Missing ⚠️
...sion/spec_from_config/system_aspect_base_parser.py 66.66% 3 Missing ⚠️
...c_from_config/material_absorption_spectrum_spec.py 97.36% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2173      +/-   ##
==========================================
- Coverage   99.19%   98.86%   -0.33%     
==========================================
  Files         361      368       +7     
  Lines       14339    14459     +120     
==========================================
+ Hits        14223    14295      +72     
- Misses        116      164      +48     

☔ 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.

* 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