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

Move qml.device to qml.devices #6030

Merged
merged 11 commits into from
Jul 24, 2024
Merged

Conversation

Shiro-Raven
Copy link
Contributor

@Shiro-Raven Shiro-Raven commented Jul 23, 2024

Context:
The root __init__ file is bloated with device instantiation code through the qml.device function and its helper functions. It is also contaminating the namespace with unrelated third-part packages imports needed for its functionality. The code doesn't need to live in this file since we have a dedicated qml.devices module now.

Description of the Change:
The relevant code is moved to the __init__ of the qml.devices module and reference in the root __init__ file and the docs are adapted. The imports are also pushed inside the relevant functions to avoid contaminating the namespace.

Benefits:
More localized functional scopes.

Possible Drawbacks:
None

[sc-65678]

@Shiro-Raven Shiro-Raven requested a review from albi3ro July 23, 2024 18:26
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.65%. Comparing base (be355e0) to head (98ba139).
Report is 295 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6030      +/-   ##
==========================================
- Coverage   99.65%   99.65%   -0.01%     
==========================================
  Files         427      428       +1     
  Lines       41150    40865     -285     
==========================================
- Hits        41010    40724     -286     
- Misses        140      141       +1     

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

@Shiro-Raven Shiro-Raven requested a review from albi3ro July 23, 2024 21:44
Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

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

:)

@Shiro-Raven Shiro-Raven enabled auto-merge (squash) July 24, 2024 15:40
Copy link
Contributor

@lillian542 lillian542 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@Shiro-Raven Shiro-Raven merged commit a456fce into master Jul 24, 2024
40 checks passed
@Shiro-Raven Shiro-Raven deleted the ad/move-devs-to-devices-module branch July 24, 2024 18:45
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.

3 participants