-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
CI Use check-sdist to check sdist rather than check-manifest #28757
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
Conversation
Weird CI error in the OpenMP build that is completely unrelated to this PR, let's retrigger the CI to see if it persists:
|
I already saw this error. It looks like a race condition. It must be trying to build hdbscan while dist_metrics is not built yet. Is there a way to tell meson that some module depend on others ? |
I don't understand what's the difference between |
Interesting, there is probably a fix in the meson.build files, but I need to take a closer look. I thought that putting the subfolders in the right order would be enough but apparently not ... scikit-learn/sklearn/meson.build Lines 148 to 166 in 0e19a48
|
I don't know for sure either all my knowledge comes from mgedmin/check-manifest#163 (comment) |
I think with setup.py, I re-double-checked to be 100% sure, and there are some differences actually with Meson. I need to look into it more but maybe most of them are minor. The first difference is that the sdist filename is not the same There is an argument that was made in numpy/numpy#23981 (comment) that says that tweaking things for them to match is not that useful:
|
I opened #28761 to tweak pyproject.toml metadata to keep this PR about check-sdist vs check-manifest ... |
As discussed irl, let's avoid to include at least the directories we used to not include to avoid introducing new sources of vulnerability in our sdist (not saying that there are any, but by precaution). This should be doable for meson using |
I pushed a commit making both sdist closer:
I think differences are acceptable:
--- PKG-INFO-setup-reordered 2024-04-04 19:49:48.704495559 +0200
+++ PKG-INFO-meson-reordered 2024-04-04 19:50:01.624835679 +0200
@@ -131,7 +131,6 @@
.. _DOI: https://zenodo.org/badge/latestdoi/21369/scikit-learn/scikit-learn
.. |DOI| image:: https://zenodo.org/badge/21369/scikit-learn/scikit-learn.svg
- Download releases: https://pypi.org/project/scikit-learn/
-Download-URL: https://pypi.org/project/scikit-learn/#files
- Facebook: https://www.facebook.com/scikitlearnofficial/
- FAQ: https://scikit-learn.org/stable/faq.html
for a history of notable changes to scikit-learn.
@@ -158,13 +157,11 @@
It is currently maintained by a team of volunteers.
- joblib (>= |JoblibMinVersion|)
.. |JoblibMinVersion| replace:: 1.2.0
-License-File: COPYING
License: new BSD
- LinkedIn: https://www.linkedin.com/company/scikit-learn
- Logos & Branding: https://github.com/scikit-learn/scikit-learn/tree/main/doc/logos
- Mailing list: https://mail.python.org/mailman/listinfo/scikit-learn
-Maintainer-email: scikit-learn developers <scikit-learn@python.org>
-Maintainer: scikit-learn developers
+Maintainer-Email: scikit-learn developers <scikit-learn@python.org>
- Mastodon: https://mastodon.social/@sklearn@fosstodon.org
.. |MatplotlibMinVersion| replace:: 3.3.4
Metadata-Version: 2.1
@@ -184,11 +181,11 @@
pip install -U scikit-learn
.. |PlotlyMinVersion| replace:: 5.14.0
Project History
-Project-URL: download, https://pypi.org/project/scikit-learn/#files
-Project-URL: homepage, https://scikit-learn.org
-Project-URL: release notes, https://scikit-learn.org/stable/whats_new
-Project-URL: source, https://github.com/scikit-learn/scikit-learn
-Project-URL: tracker, https://github.com/scikit-learn/scikit-learn/issues
+Project-URL: Download, https://pypi.org/project/scikit-learn/#files
+Project-URL: Homepage, https://scikit-learn.org
+Project-URL: Release notes, https://scikit-learn.org/stable/whats_new
+Project-URL: Source, https://github.com/scikit-learn/scikit-learn
+Project-URL: Tracker, https://github.com/scikit-learn/scikit-learn/issues
Provides-Extra: benchmark
Provides-Extra: build
Provides-Extra: docs
|
I don't know about these ones. I have the same feeling as you.
I agree. I wonder why we explicitly exclude them in
Indeed they all seem minor (capital letters). Ping @thomasjpfan who reviewed the latest big change in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @lesteve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with the changes to the sdist
.
.github/workflows/check-sdist.yml
Outdated
@@ -19,15 +19,15 @@ jobs: | |||
# scipy and cython are required to build sdist | |||
run: | | |||
python -m pip install --upgrade pip | |||
pip install check-manifest scipy cython | |||
pip install check-sdist scipy cython |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By reading the check-sdist docs, we do not need to install the dependencies:
pip install check-sdist scipy cython | |
pip install check-sdist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
.github/workflows/check-sdist.yml
Outdated
- run: | | ||
check-manifest -v | ||
check-sdist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it'll be useful to include --inject-junk
here to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure but I included it 😉
Nice, I'll check tomorrow that the new check sdist workflow succeeds! |
if 😉 |
Close #28695
I have run this locally and it works fine, the CI is only run on a cron schedule so no real way to test in this PR.
I checked that the sdist with setup.py and meson were identical following numpy/numpy#23981 (comment)