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

consolidate pytest config in pyproject.toml #6201

Open
wants to merge 5 commits into
base: branch-25.02
Choose a base branch
from

Conversation

jameslamb
Copy link
Member

fixes #6194

Wheel tests in this project are emitting tons of warnings like this:

test_random_forest.py:1247
/__w/cuml/cuml/python/cuml/cuml/tests/test_random_forest.py:1247: PytestUnknownMarkWarning: Unknown pytest.mark.memleak - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.memleak

I think that's because the introduction of a pytest.ini file in #6078 resulted in all of the pytest options from pyproject.toml being ignored.

From https://docs.pytest.org/en/stable/reference/customize.html#pytest-ini

pytest.ini files take precedence over other files, even when empty.

I think "take precedence" there means that if pytest finds a pytest.ini, it stops searching for other configuration files.

@jameslamb jameslamb added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Dec 31, 2024
Copy link

copy-pr-bot bot commented Dec 31, 2024

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions bot added the Cython / Python Cython or Python issue label Dec 31, 2024
@jameslamb
Copy link
Member Author

/ok to test

@jameslamb jameslamb changed the title WIP: consolidate pytest config in pyproject.toml consolidate pytest config in pyproject.toml Dec 31, 2024
@jameslamb jameslamb marked this pull request as ready for review December 31, 2024 22:06
@jameslamb jameslamb requested review from a team as code owners December 31, 2024 22:06
Copy link
Member

@betatim betatim left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to figure this out and then fix it straight away.

Looks good to me.


Annoying that we can't add a pytest.ini with a warning for people from the future to not use it :-/

@jameslamb
Copy link
Member Author

Annoying that we can't add a pytest.ini with a warning for people from the future to not use it :-/

@betatim we could add pytest.ini to .gitignore with a comment! Want me to do that?

@betatim
Copy link
Member

betatim commented Jan 6, 2025

Good idea!

@github-actions github-actions bot removed the CMake label Jan 6, 2025
@jameslamb
Copy link
Member Author

Thanks for considering it! @betatim I just pushed that change, will you take a look and let me know what you think?

I intentionally am leaving python/cuml/cuml/benchmark/automated/pytest.ini because I don't know exactly how it's used in this repo.

.gitignore Show resolved Hide resolved
@betatim
Copy link
Member

betatim commented Jan 6, 2025

I intentionally am leaving python/cuml/cuml/benchmark/automated/pytest.ini because I don't know exactly how it's used in this repo.

I also don't know exactly what it does/when it is used. But the robots (aka CI) seem happy with it in place so I'd also leave it alone for now.

@jameslamb
Copy link
Member Author

This is blocked by the error reported in #6206, which will hopefully be fixed by #6207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI logs contain a lot of warnings about unknown mark
3 participants