-
-
Notifications
You must be signed in to change notification settings - Fork 34
Drop EOL Python, simplify PyPy situation, improve testing #74
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ef83f2f
stop distinguishing CPython & PyPy for language-level >=3.9
h-vetinari c47c7e0
remove EOL python versions
h-vetinari bc41e0d
add a .gitignore to ignore artefacts from local testing
h-vetinari 2bfba0f
improve skips for PyPy
h-vetinari 84ed4e5
improve skipping for incompatible system/machine combinations
h-vetinari 2e25b69
improve testing for cases where where we expect a pin (but don't have…
h-vetinari c096b82
reflect existence of win-arm64 as a platform
h-vetinari ec378cd
add metadata for compatibility with ppc
h-vetinari b611396
turn get_package_dependencies() into fixture
h-vetinari d3473d8
split installation test out from where we use py310 syntax
h-vetinari e718d93
don't skip tests for invalid combinations; ensure they too have at mo…
h-vetinari 0457715
refine loongarch pin to apply only for py>=3.8
h-vetinari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| __pycache__/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import configparser | ||
| from pathlib import Path | ||
| from typing import List | ||
|
|
||
| import pytest | ||
| from packaging.requirements import Requirement | ||
|
|
||
| SETUP_CFG_FILE = Path(__file__).parent.parent / "setup.cfg" | ||
|
|
||
|
|
||
| @pytest.fixture(scope="session") | ||
| def cfg_requirements() -> List[Requirement]: | ||
| """A fixture for getting the requirements of from setup.cfg.""" | ||
| parser = configparser.ConfigParser() | ||
| parser.read(SETUP_CFG_FILE) | ||
|
|
||
| return [ | ||
| Requirement(line) | ||
| for line in parser.get("options", "install_requires").splitlines() | ||
| if line | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| """Test that version that gets installed (where we can run CI) | ||
| matches the expectation defined in setup.cfg""" | ||
|
|
||
|
|
||
| def test_valid_numpy_is_installed(cfg_requirements): | ||
| filtered_requirements = [] | ||
| for req in cfg_requirements: | ||
| if req.marker.evaluate(): | ||
| filtered_requirements.append(req) | ||
|
|
||
| assert (len(filtered_requirements) == 1), "Expected exactly one pin." | ||
|
|
||
| item, = filtered_requirements[0].specifier | ||
|
|
||
| import numpy | ||
| assert item.version == numpy.__version__ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.