-
Notifications
You must be signed in to change notification settings - Fork 52
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
MNT: Update build system and CI invocations #792
Conversation
9def2da
to
5301b33
Compare
5301b33
to
b16a340
Compare
c2767f4
to
b872c0c
Compare
@mgxd Would you mind having a look through? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for modernizing 😄
try: | ||
import importlib_resources | ||
except ImportError: | ||
import importlib.resources as importlib_resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: shouldn't the backport be the fallback?
try: | |
import importlib_resources | |
except ImportError: | |
import importlib.resources as importlib_resources | |
try: | |
import importlib.resources as importlib_resources | |
except ImportError: | |
import importlib_resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
importlib.resources
is present I think in all supported versions, so this would prevent us from using the backported features.
An alternative is to import the specific required functions:
try:
from importlib.resources import files, as_file
except ImportError:
from importlib_resources import files, as_file
But they're a little cryptic without the module name. We could do import files as ...
but then we'd need to come up with a name.
try: | ||
import importlib_resources | ||
except ImportError: | ||
import importlib.resources as importlib_resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
try: | |
import importlib_resources | |
except ImportError: | |
import importlib.resources as importlib_resources | |
try: | |
import importlib.resources as importlib_resources | |
except ImportError: | |
import importlib_resources |
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## master #792 +/- ##
==========================================
+ Coverage 63.37% 72.96% +9.59%
==========================================
Files 49 76 +27
Lines 5966 7547 +1581
Branches 1170 872 -298
==========================================
+ Hits 3781 5507 +1726
- Misses 2003 2004 +1
+ Partials 182 36 -146
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 45 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Switch to
hatchling
+hatch-vcs
. Move configuration topyproject.toml
where supported, away fromsetup.cfg
in any case. Also generally usepipx
instead of installing one-off tools in the base environment.