Skip to content

Adds basic unit conversions for attenuator in general_maths folder#2043

Merged
Matt-Carre merged 23 commits into
mainfrom
2038_basic_conversions
May 14, 2026
Merged

Adds basic unit conversions for attenuator in general_maths folder#2043
Matt-Carre merged 23 commits into
mainfrom
2038_basic_conversions

Conversation

@Matt-Carre
Copy link
Copy Markdown
Contributor

Closes #2038

Begins to work on translating over the calculations behind the attenuator to be available in Dodal. Separates conversions and boundary checks into two different files. Also translates over unit tests.

@Matt-Carre Matt-Carre requested a review from a team as a code owner May 1, 2026 13:11
@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.13%. Comparing base (c3e106f) to head (1383712).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2043   +/-   ##
=======================================
  Coverage   99.13%   99.13%           
=======================================
  Files         333      335    +2     
  Lines       13021    13062   +41     
=======================================
+ Hits        12908    12949   +41     
  Misses        113      113           

☔ View full report in Codecov by Sentry.
📢 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.

Comment thread src/dodal/common/general_maths/arithmetic_conversions.py Outdated
Comment thread src/dodal/common/general_maths/arithmetic_conversions.py Outdated
Comment thread src/dodal/common/general_maths/check_bounds.py Outdated
CoePaul
CoePaul previously requested changes May 1, 2026
Comment thread src/dodal/common/general_maths/check_bounds.py Outdated
Comment thread src/dodal/common/general_maths/arithmetic_conversions.py Outdated
Comment thread src/dodal/common/general_maths/arithmetic_conversions.py
@oliwenmandiamond
Copy link
Copy Markdown
Contributor

The standard for dodal for tests is "mirror the file structure of the src folder with the corresponding code files. Use the test_*.py naming convention for test files."

Can you please update your tests accordingly?

https://diamondlightsource.github.io/dodal/main/how-to/write-tests.html

@noemifrisina noemifrisina dismissed CoePaul’s stale review May 14, 2026 11:47

comments addressed

@Matt-Carre Matt-Carre merged commit e7ae19f into main May 14, 2026
11 checks passed
@Matt-Carre Matt-Carre deleted the 2038_basic_conversions branch May 14, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add basic conversions ( used by- / useful for- attenuation ) to arithmetic module

5 participants