Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow creating all devices when device instantiation(s) raise an exception #62

Closed

Conversation

DiamondJoseph
Copy link
Contributor

@DiamondJoseph DiamondJoseph commented May 18, 2023

Closes #58 but as an optional behaviour. Changes the behaviour of make_all_devices to not fail at the first exception, but to collect all exceptions from devices that failed to instantiate and raise an ExceptionBundle with them all (unless there is only 1 device, with no dependencies that fails to instantiate, then the raise is just delayed until all other devices are tried)

Requires #61 (to allow importing an Exception that is thrown by the device instantiation)

@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Merging #62 (e6021fa) into main (7122c0b) will increase coverage by 0.22%.
The diff coverage is 100.00%.

❗ Current head e6021fa differs from pull request most recent head 7fc6513. Consider uploading reports for the commit 7fc6513 to get more accurate results

@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
+ Coverage   84.93%   85.16%   +0.22%     
==========================================
  Files          52       52              
  Lines        1660     1685      +25     
==========================================
+ Hits         1410     1435      +25     
  Misses        250      250              
Impacted Files Coverage Δ
src/dodal/utils.py 98.96% <100.00%> (+0.30%) ⬆️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@DominicOram
Copy link
Contributor

@DiamondJoseph what is the state of this? Anything we can help with to get it merged?

@DiamondJoseph
Copy link
Contributor Author

Going to close and resurrect when required

@callumforrester
Copy link
Contributor

From discussion: Should make this behaviour configurable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle exceptions in make_all_devices
3 participants