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

Defer/fix some minor import issues #1959

Merged
merged 2 commits into from
Nov 8, 2024
Merged

Defer/fix some minor import issues #1959

merged 2 commits into from
Nov 8, 2024

Conversation

mattwthompson
Copy link
Member

I'm hunting down some issues with slow import times. Some are likely due to OpenMM sneaking in where it doesn't need to be (might be fixed upstream openforcefield/openff-units#97 (comment)) but I found a few other minor improvements when digging.

@@ -31,7 +31,6 @@

import numpy as np
from numpy.typing import NDArray
from openff.units import ensure_quantity
Copy link
Member Author

Choose a reason for hiding this comment

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

This method is in openff.units.openmm, which means importing it results in an import openmm call whenever anything in this module is imported. Obviously it's going to be in memory for many use cases, but it's unnecessary to import it here

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.72%. Comparing base (cb6bcc4) to head (c0939be).
Report is 6 commits behind head on main.

Additional details and impacted files

@mattwthompson mattwthompson marked this pull request as ready for review November 6, 2024 17:21
@j-wags j-wags merged commit 53f129e into main Nov 8, 2024
18 checks passed
@j-wags j-wags deleted the import-cleanp branch November 8, 2024 02:28
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