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

Rewrite SC10 shutter enable as toggle #370

Merged
merged 3 commits into from
Sep 21, 2022

Conversation

trappitsch
Copy link
Contributor

As discussed in #368, this PR rewrites the sc.enable routine for the Thorlabs SC10 shutter as a toggle. The toggle is implemented such that any setting of the property first queries the current status and then acts accordingly, i.e., toggle the status if necessary.
Tests are implemented for all cases. Existing get / set property test was split out into a get and set test. The latter now tests for cases, such that all cases are covered.

@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Merging #370 (6864dde) into main (71913ab) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #370   +/-   ##
=======================================
  Coverage   99.01%   99.01%           
=======================================
  Files          87       87           
  Lines        8840     8849    +9     
=======================================
+ Hits         8753     8762    +9     
  Misses         87       87           
Flag Coverage Δ
unittests 99.01% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/instruments/thorlabs/sc10.py 100.00% <100.00%> (ø)

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

Copy link
Contributor

@scasagrande scasagrande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small comment but then looks good

src/instruments/thorlabs/sc10.py Outdated Show resolved Hide resolved
@trappitsch
Copy link
Contributor Author

Oops, also my main branch was pretty badly outdated... should be fixed now. Sorry for that

@scasagrande scasagrande merged commit 4ec761d into instrumentkit:main Sep 21, 2022
@trappitsch trappitsch deleted the bf_sc10 branch September 21, 2022 13:54
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.

2 participants