Closed tovrstra closed 5 months ago
This pull request introduces stricter testing measures by ensuring that the oldest supported versions of dependencies are installed when testing with Python 3.9. Additionally, it adds the -W error
option to pytest to treat warnings as errors, ensuring that no warnings are ignored during testing.
Files | Changes |
---|---|
.github/workflows/pytest.yaml |
Enhanced the CI workflow to install the oldest supported versions of dependencies for Python 3.9 and added stricter warning handling in pytest. |
Here's the code health analysis summary for commits c7a7469..3c2f49f
. View details on DeepSource ↗.
Analyzer | Status | Summary | Link |
---|---|---|---|
Shell | ✅ Success | View Check ↗ | |
Python | ✅ Success | View Check ↗ |
💡 If you’re a repository administrator, you can configure the quality gates from the settings.
I think it wouldn't be that hard to bump 2.x compatibility past 3.9. The main blocker is getting the newer versions of the dependencies.
On Mon, 10 Jun 2024 at 10:48, Paul W. Ayers @.***> wrote:
@.**** commented on this pull request.
Is there any way to support earlier versions of Python?
We have a major annoyance right now because HORTON 2.3 supports only up to Python 3.9 https://github.com/theochem/horton/blob/764dd2fa958aee0dcee30b19ed0520d65d83b45a/conda/conda_build_config.yaml#L3. This makes it impossible to use "new HORTON" features in the same environment as HORTON 2.x, and there is stil a lot of old workflows that use facets of HORTON 2.x that haven't been migrated yet.
So I guess the two questions are, and I guess @tovrstra https://github.com/tovrstra and @matt-chan https://github.com/matt-chan are the people to answer them:
- Is it better to keep HORTON 3.x things compatible down to Python 3.9
- Is it better to upgrade HORTON 2.x to support Python past 3.9
One of these two things needs to be done, IMHO.
— Reply to this email directly, view it on GitHub https://github.com/theochem/iodata/pull/331#pullrequestreview-2108422470, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH74NLACIQQZ3PKMLLSWKTZGXRGVAVCNFSM6AAAAABI7Z32EKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCMBYGQZDENBXGA . You are receiving this because you were mentioned.Message ID: @.***>
-- Matt
mp 2.x compatibility past 3.9. The main blocker is getting the newer versions of the dependencies.
Can you take the lead on making this update to HORTON 2.3 then (preferably sooner rather than later)? I'll then approve this as the point will be moot by the time it's relevant.
Sounds good. Thanks for reviewing and checking all this.
IOData works for Python 3.9 now and we can easily keep it that way while it is officially supported, i.e. until October 2025. (See https://devguide.python.org/versions/)
The reason I did not consider supporting 3.8 is that it goes end of life soon, i.e. October 2024.
Note that Python 3.9 is also the oldest version that supports type hinting with built-in types (PEP 585) without __future__
imports, which is nice to have. It makes the source code easier to write and read.
-W error
is added to pytest, so that it fails in case of a warning.This is part of the changes listed in #313. The first bullet was brought up in #325.
I will YOLO-merge this on Friday, June 14 unless reviewed earlier.
Summary by Sourcery
This pull request enhances the CI workflow by ensuring that the oldest supported versions of dependencies are installed when testing with Python 3.9. Additionally, it configures pytest to treat warnings as errors, improving the strictness of the tests.
-W error
option in pytest to treat warnings as errors.