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

Merged
merged 8 commits into from
Jan 9, 2025

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

**/build.sh @rapidsai/cuml-cmake-codeowners
CMakeLists.txt @rapidsai/cuml-cmake-codeowners
*.cmake @rapidsai/cuml-cmake-codeowners
**/cmake/ @rapidsai/cuml-cmake-codeowners
Copy link
Member Author

Choose a reason for hiding this comment

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

updated these rules based on an offline conversation with @vyasr and @dantegd

pyproject.toml-only changes just need packaging-codeowners (handled by the pyproject.toml rule a few lines down).

This change also adds `cuml-cmake-codeowners:

  • when any .cmake file is touched
  • when any CMakeLists.txt file is touched (regardless of depth in the filesystem)

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good to me.

@betatim
Copy link
Member

betatim commented Jan 9, 2025

Not sure how to persuade the telemetry job to succeed. Just restarting it doesn't help. From the error message it sounds like it doesn't like being run a lot of time after other jobs it depends on? At least that is my explanation for why the artefact it is trying to download doesn't exist.

I'd merge this as it is without trying to figure that one out. Assuming the optional jobs are truly optional (they fail because of #6209 so not something related to this PR)

@dantegd
Copy link
Member

dantegd commented Jan 9, 2025

/merge

@rapids-bot rapids-bot bot merged commit 31a609d into rapidsai:branch-25.02 Jan 9, 2025
62 of 65 checks passed
@jameslamb jameslamb deleted the pytest-config branch January 9, 2025 15:10
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
5 participants