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

Update Copier Template to 2.2.0 #737

Merged
merged 4 commits into from
Aug 14, 2024
Merged

Update Copier Template to 2.2.0 #737

merged 4 commits into from
Aug 14, 2024

Conversation

callumforrester
Copy link
Contributor

Fixes #736

Instructions to reviewer on how to test:

  1. Confirm tests pass
  2. Try accessing a member with a _ in the src directory

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}

@callumforrester callumforrester changed the title 736 update copier Update Copier Template to 2.2.0 Aug 9, 2024
@@ -16,7 +16,7 @@ def test_group_uid(group: str):


def test_type_checking_ignores_inject():
def example_function(x: Movable = inject("foo")) -> MsgGenerator:
def example_function(x: Movable = inject("foo")) -> MsgGenerator: # noqa: B008
Copy link
Contributor Author

Choose a reason for hiding this comment

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

B008 is going to create some awkwardness for us, possibly even after #483 and associated work has been complete. I suggest raising another issue for dealing with it, unless that discussion has happened already.

"I", # isort - https://docs.astral.sh/ruff/rules/#isort-i
"W", # pycodestyle warnings - https://beta.ruff.rs/docs/rules/#warning-w
"UP", # pyupgrade - https://docs.astral.sh/ruff/rules/#pyupgrade-up
"I001", # isort
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure why isort was left there by the previous template upgrade, I assume it is now fully replaced by ruff. Happy to put it back if I'm wrong though.

Copy link

codecov bot commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.43%. Comparing base (3c8a934) to head (261d0f0).

Files Patch % Lines
src/dodal/devices/areadetector/adutils.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #737   +/-   ##
=======================================
  Coverage   94.43%   94.43%           
=======================================
  Files         112      112           
  Lines        4531     4531           
=======================================
  Hits         4279     4279           
  Misses        252      252           

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

@@ -31,7 +31,7 @@ def trigger(self):

def _acq_done(*args, **kwargs):
# TODO sort out if anything useful in here
self._status._finished()
self._status._finished() # noqa: SLF001
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is causing a coverage warning because it is untested, however it also appears to be dead code. along with the entire areadetector package. The only place it is used in the adsim module, which doesn't see much use and it can use the ophyd-async detector these. It may be easier to just delete this package.

Copy link
Contributor

Choose a reason for hiding this comment

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

Am I right this will get removed in #404?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not will, but could, yes!

Copy link
Contributor

Choose a reason for hiding this comment

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

It has now been removed as part of #405, I didn't realise how much dead code was in that dir

Copy link
Contributor

@DominicOram DominicOram left a comment

Choose a reason for hiding this comment

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

Great, thank you!

@callumforrester
Copy link
Contributor Author

@DominicOram thanks for rebasing, are you happy to merge with the lower coverage or do you want to wait for #404?

@DominicOram DominicOram merged commit ac220bb into main Aug 14, 2024
17 of 18 checks passed
@DominicOram DominicOram deleted the 736_update_copier branch August 14, 2024 10:39
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.

Update copier template to include SLF001
3 participants