-
Notifications
You must be signed in to change notification settings - Fork 128
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
Fix failing tests after CMIP6 climate patterns merge #3670
Comments
I have been looking into this issue and have discovered the following:
diff --git a/setup.cfg b/setup.cfg
index c738c5d71..e28f8079a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,6 @@
[tool:pytest]
addopts =
+ --import-mode=importlib
--doctest-modules
--ignore=doc/sphinx/source/conf.py
--cov=esmvaltool This causes different import errors, e.g.:
which will need updating. I would be happy to do this, but I would like some input from the @ESMValGroup/technical-lead-development-team whether you would prefer absolute or relative imports. For example:
I like absolute imports, as it's really clear what is being imported, but the relative imports make it easy to relocate subpackages without needing to edit import statements in modules within the subpackage. What are your preferences? 🤔 |
Pep8 recommends absolute imports, so those should be preferred: https://peps.python.org/pep-0008/#imports Maybe you could use some of the changes from #3646 |
Great!
Yes, I see about 15-20 import changes within the |
Yes, that would be great! |
I noticed that the tests are failing since the CMIP6 climate patterns PR (#2785) was merged:
All the checks were passing on the PR. Is it possible to update the PR checks to catch issues like this?
I will open a PR now with a fix 😊
The text was updated successfully, but these errors were encountered: