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

Deduplicate testing dependencies by dropping [testing-integration] #4283

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Mar 16, 2024

Summary of changes

In #4257 (comment), @abravalheri mentioned that:

[...] I think we just remove the testing-integration and use testing everywhere...

Although it might add a bit of overhead for the integration tests, it will simplify and streamline the setup... This way we reduce the divergence with skeleton. The additional overhead in the integration tests should not be too much, and the integration tests just run before the releases anyway.

This PR is doing just that.

Accepting this closes #4282 , which was my original idea.

Pull Request Checklist

@Avasam Avasam force-pushed the deduplicate-testing-dependencies-by-dropping-testing-integration branch from 548da66 to ff4b87c Compare March 16, 2024 16:27
Copy link
Contributor

@abravalheri abravalheri left a comment

Choose a reason for hiding this comment

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

Thank you very much, @Avasam .

I think this is the simplest approach...
The next 2 weeks I don't know if I will have the time to contribute here, but my plan is to download the PR and run the integration tests manually to see if everything works as expected (I think the CI do not run them on PR).

tox.ini Outdated Show resolved Hide resolved
@abravalheri
Copy link
Contributor

@Avasam, when running the tests I was having an error1:

setuptools/config/_validate_pyproject/formats.py:180: error: Cannot find implementation or library stub for module named "trove_classifiers"  [import-not-found]
setuptools/config/_validate_pyproject/formats.py:180: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 3 source files)

As a workaround, I added d98a9d9.
Does it make sense?
Do you know why

| ^setuptools/config/_validate_pyproject/ # Auto-generated
does not work?

Footnotes

  1. pipx run --python python3.11 tox -e integration

@Avasam
Copy link
Contributor Author

Avasam commented Mar 20, 2024

@abravalheri I remember having trove_classifier be picked up as an import previously, but I don't remember if/how I fixed it. Or if I just fixed it locally by installing trove_classifier then the CI did something different that didn't need it explicitly installed.

Either way, the difference that I notice now is that integration tests will also run checkdocks, cov, mypy, ruff and perf whereas previously it didn't.

@abravalheri abravalheri force-pushed the deduplicate-testing-dependencies-by-dropping-testing-integration branch from d98a9d9 to 3ca45b7 Compare April 16, 2024 10:29
@abravalheri
Copy link
Contributor

abravalheri commented Apr 16, 2024

@Avasam 6c118be is a way of disabling those tests. Does it make sense for you, or should I revert that commit?

I believe that mypy, ruff, checkdocs already run on other tests so there is no need for repeating it... The cov plugin is more complicated. There is a discussion in #3643, but the TL;DR of my problem is that pytest-cov is not reporting the real coverage of those tests, because we use nested subprocess (and therefore enabling the flag would bring a false sense of completeness). I haven't found a good way around of it.

@abravalheri abravalheri force-pushed the deduplicate-testing-dependencies-by-dropping-testing-integration branch from ded2634 to 6c118be Compare April 16, 2024 11:14
@Avasam
Copy link
Contributor Author

Avasam commented Apr 16, 2024

Hmm, in a way, I wonder if we're just moving the duplication from one file to another.

Duplicating the declaration of dependencies/tests not to be repeated, where before we were duplicating shared dependencies.

Whilst leaving the door open to forgetting to disable a test. Not that I see new tooling being added too often, so it'd probably be caught eventually.


Other than that, it does bring setup cfg closer to the skeleton and dedupes dependencies in that file.

@abravalheri
Copy link
Contributor

Yeah, that is true... well, it is an optimisation thing, we can drop it at some point. I think that if the cov problem with integration tests is ever solved, it would be a nice moment to drop it.

@abravalheri abravalheri merged commit 2d25aa2 into pypa:main Apr 16, 2024
17 of 19 checks passed
@Avasam Avasam deleted the deduplicate-testing-dependencies-by-dropping-testing-integration branch April 16, 2024 14:10
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