Skip to content

MAINT: Remove numpydoc version upper bound - #32897

Closed
prakritim01 wants to merge 8 commits into
scikit-learn:mainfrom
prakritim01:update-numpydoc-ci
Closed

prakritim01 wants to merge 8 commits into
scikit-learn:mainfrom
prakritim01:update-numpydoc-ci

Conversation

@prakritim01

@prakritim01 prakritim01 commented Dec 13, 2025 •

Copy link
Copy Markdown
Contributor

"This PR removes the <1.9.0 constraint for numpydoc in build_tools/update_environments_and_lock_files.py to allow CI to use newer versions. Note: I was unable to run the lockfile update script locally due to missing Conda environment tools. I am happy to let a maintainer (or the bot) update the lockfiles if needed."
Fixed in numpy/numpydoc#622, which is included in the latest release: https://github.com/numpy/numpydoc/releases/tag/v1.10.0

@github-actions github-actions Bot added the CI:Linter failure The linter CI is failing on this PR label Dec 13, 2025

@lucyleeow lucyleeow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR. Looks good except the lint failure.

I would recommend you read our contributing guide before making PRs: https://scikit-learn.org/dev/developers/contributing.html#id1

It would be useful for the reviewer if you included the following information:

Fixed in numpy/numpydoc#622, which is included in the latest release: https://github.com/numpy/numpydoc/releases/tag/v1.10.0

"pytest-cov": "<=6.3.0",
}


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lint is probably failing due to this line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review! I have updated the PR description with the link to the numpydoc fix as requested.

It looks like the pre-commit.ci bot pushed a fix for the linting issues, so the checks should be passing now. Let me know if anything else is needed!

@github-actions github-actions Bot removed the CI:Linter failure The linter CI is failing on this PR label Dec 15, 2025
@prakritim01

Copy link
Copy Markdown
Contributor Author

Thanks @lucyleeow! I have updated the PR description with the link you requested. I also ran ruff format locally and force-pushed the fix, so the linting issues should be resolved now.

@lucyleeow lucyleeow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM thanks.

@lucyleeow lucyleeow added the Waiting for Second Reviewer First reviewer is done, need a second one! label Dec 15, 2025

@virchan virchan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks, @prakritim01.

@lucyleeow, could we merge this?

@lucyleeow

Copy link
Copy Markdown
Member

Just realised that we should probably update the conda lock files and make sure CI passes. I think the lock files are updated automatically regularly but probably better to do it in this PR.

I can do it later or you can @virchan if you wish.

@virchan

virchan commented Dec 25, 2025

Copy link
Copy Markdown
Member

I'm not very familiar with the process for updating the conda lock files yet, so it would be great if you could handle that part, @lucyleeow. I'm very happy to review the changes and help make sure everything looks good once it's up.

@lucyleeow lucyleeow removed the Waiting for Second Reviewer First reviewer is done, need a second one! label Dec 25, 2025
@prakritim01

Copy link
Copy Markdown
Contributor Author

Conflicts resolved and all CI checks are passing now! Thanks for the guidance @lucyleeow @virchan

@lucyleeow

lucyleeow commented Dec 27, 2025 •

Copy link
Copy Markdown
Member

@prakritim01 to clarify, how did you generate the lock files?

Edit: Note numpydoc is only used in doc environment, so we do not need to update all lock files. Maybe revert your changes and I can push the lock file updates?

@github-actions github-actions Bot added the CI:Linter failure The linter CI is failing on this PR label Dec 27, 2025
@github-actions github-actions Bot removed the CI:Linter failure The linter CI is failing on this PR label Dec 27, 2025
@prakritim01

Copy link
Copy Markdown
Contributor Author

@prakritim01 to clarify, how did you generate the lock files?

Edit: Note numpydoc is only used in doc environment, so we do not need to update all lock files. Maybe revert your changes and I can push the lock file updates?

I used the build_tools/update_environments_and_lock_files.py script locally on Windows, which is why it updated all the lock files instead of just the documentation ones. Sorry about the noise!

I have reverted my lock file changes as requested and pulled your updates. I also fixed a small ruff formatting issue. All checks are passing now!

@lesteve lesteve left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to wait until #32902 is resolved.

At the moment for some unknown reason, the memory increases in the doc build and gets killed before it can complete, see #32902 (comment) for more details.

Also general reminder when you update doc build lock-files you need to make sure to push a commit with [doc build] to run the full doc build 😉.

@prakritim01

Copy link
Copy Markdown
Contributor Author

We need to wait until #32902 is resolved.

At the moment for some unknown reason, the memory increases in the doc build and gets killed before it can complete, see #32902 (comment) for more details.

Also general reminder when you update doc build lock-files you need to make sure to push a commit with [doc build] to run the full doc build 😉.

Thanks for the heads-up! I will wait until #32902 is resolved.

Once that is fixed, let me know if you need me to push an empty commit with [doc build] to trigger the full build, or if we should handle it differently then.

@lesteve

lesteve commented Dec 30, 2025 •

Copy link
Copy Markdown
Member

@prakritim01 you can push an empty commit with [doc build] in the commit message now. This would allow to double-check that the memory usage problem is still there.

@lesteve

lesteve commented Dec 30, 2025

Copy link
Copy Markdown
Member

Also numpydoc is used in some of our tests (e.g. the ones checking that the docstring and the parameters match or something like this). You would need to update some other build lock-files as well, look for docstring_test_dependencies in build_tools/update_environments_and_lock_files.py.

@prakritim01

Copy link
Copy Markdown
Contributor Author

Also numpydoc is used in some of our tests (e.g. the ones checking that the docstring and the parameters match or something like this). You would need to update some other build lock-files as well, look for docstring_test_dependencies in build_tools/update_environments_and_lock_files.py.

Thanks for catching that! I actually updated those files initially but reverted them because I thought they were unrelated noise.

I will re-run the script to update the docstring_test_dependencies as well and push the fix shortly.

@lucyleeow

Copy link
Copy Markdown
Member

@prakritim01 thanks, but after discussing with @lesteve, we generally prefer maintainers to update lock files.

@prakritim01

Copy link
Copy Markdown
Contributor Author

@prakritim01 thanks, but after discussing with @lesteve, we generally prefer maintainers to update lock files.

Understood! I reverted my local changes. I will leave the lock file updates to the maintainers to avoid platform-specific noise. Thanks for handling it!

@lucyleeow

lucyleeow commented Dec 31, 2025 •

Copy link
Copy Markdown
Member

Finding it too difficult to see whats changed in the lock files with the history. I've reverted the lock file changes, leaving only changes to build_tools/update_environments_and_lock_files.py. I will open a new PR to update the lock files.

@lucyleeow
lucyleeow enabled auto-merge (squash) December 31, 2025 01:57
@lucyleeow
lucyleeow disabled auto-merge December 31, 2025 02:54
@lucyleeow

Copy link
Copy Markdown
Member

Ah can't merge due to changes requested, @lesteve feel free to merge when you're happy. I will open a new PR for lock file changes.

@lesteve

lesteve commented Dec 31, 2025

Copy link
Copy Markdown
Member

@lucyleeow I am confused, I don't think we want to merge a change to update_environment_and_lock_files.py without the associated lock-file changes. In other words, we need to generate the lock-files (doc* and a few others as mentioned in #32897 (comment)) and make sure the CI passes.

I don't feel there is any time pressure on this PR, I may take a closer look in a week or two.

@lucyleeow

Copy link
Copy Markdown
Member

Yeah sorry @lesteve, I am realising this was not a good first PR, though I appreciate @prakritim01 has now taken some time to work on it.

@prakritim01 how do you feel about picking a different issue to work on?

@prakritim01

Copy link
Copy Markdown
Contributor Author

Yeah sorry @lesteve, I am realising this was not a good first PR, though I appreciate @prakritim01 has now taken some time to work on it.

@prakritim01 how do you feel about picking a different issue to work on?

Hi @lucyleeow, thank you for the update!

I completely understand—dependencies can be tricky. I appreciate you letting me know. I am happy to close this PR and pick up a different issue that might be a better fit.

Do you have any suggestions for another "good first issue" or documentation fix I could tackle?

@lucyleeow

Copy link
Copy Markdown
Member

Thanks for your understanding @prakritim01 !

I would echo the advice given in: https://scikit-learn.org/dev/developers/contributing.html#new-contributors

We don't often have good first issues, because they often end up being more complex than anticipated. I would recommend trying other types of contributions (reviewing PRs, triaging issues etc) or finding an issue in a module/area you are already familiar with or use often.

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.

4 participants