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

pip 24, setuptools 69.5.1, hatchling 1.22.5, hatch_fancy_pypi_readme 24.1.0, platformdirs 4.2.0, packaging 24.0, trove_classifiers 2024.4.10, wheel 0.43.0 #37277

Merged
merged 15 commits into from May 2, 2024

Conversation

mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented Feb 10, 2024

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 11, 2024

There is a strange malfunction on ubuntu-mantic-standard
https://github.com/sagemath/sage/actions/runs/7852863047/job/21431835515?pr=37277#step:11:10319

sage -t --random-seed=293799319091173329856561880001578538606 src/sage/misc/package.py
**********************************************************************
File "src/sage/misc/package.py", line 186, in sage.misc.package.pip_installed_packages
Failed example:
    d['prompt-toolkit']
Exception raised:
    Traceback (most recent call last):
      File "/sage/src/sage/doctest/forker.py", line 712, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/sage/src/sage/doctest/forker.py", line 1147, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.misc.package.pip_installed_packages[3]>", line 1, in <module>
        d['prompt-toolkit']
        ~^^^^^^^^^^^^^^^^^^
    KeyError: 'prompt-toolkit'
**********************************************************************

pip list sees prompt_toolkit (underscore) instead prompt-toolkit (dash)

But this build is incremental from an ancient version:

### Incremental build from SageMath version 10.1.beta6, Release Date: 2023-07-09

so can probably ignore.

@mkoeppe mkoeppe changed the title pip 24, setuptools 69.0.3, hatchling 1.21.1, hatch_fancy_pypi_readme 24.1.0 pip 24, setuptools 69.1.0, hatchling 1.21.1, hatch_fancy_pypi_readme 24.1.0 Feb 12, 2024
@mkoeppe mkoeppe changed the title pip 24, setuptools 69.1.0, hatchling 1.21.1, hatch_fancy_pypi_readme 24.1.0 pip 24, setuptools 69.1.1, hatchling 1.21.1, hatch_fancy_pypi_readme 24.1.0 Feb 24, 2024
@mkoeppe mkoeppe changed the title pip 24, setuptools 69.1.1, hatchling 1.21.1, hatch_fancy_pypi_readme 24.1.0 pip 24, setuptools 69.2.0, hatchling 1.21.1, hatch_fancy_pypi_readme 24.1.0, platformdirs 4.2.0, packaging 24.0, wheel 0.43.0 Mar 27, 2024
Copy link

github-actions bot commented Apr 1, 2024

Documentation preview for this PR (built with commit d2bee8e; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@mkoeppe mkoeppe changed the title pip 24, setuptools 69.2.0, hatchling 1.21.1, hatch_fancy_pypi_readme 24.1.0, platformdirs 4.2.0, packaging 24.0, wheel 0.43.0 pip 24, setuptools 69.2.0, hatchling 1.22.5, hatch_fancy_pypi_readme 24.1.0, platformdirs 4.2.0, packaging 24.0, wheel 0.43.0 Apr 14, 2024
@mkoeppe mkoeppe changed the title pip 24, setuptools 69.2.0, hatchling 1.22.5, hatch_fancy_pypi_readme 24.1.0, platformdirs 4.2.0, packaging 24.0, wheel 0.43.0 pip 24, setuptools 69.2.0, hatchling 1.22.5, hatch_fancy_pypi_readme 24.1.0, platformdirs 4.2.0, packaging 24.0, trove_classifiers 2024.4.10, wheel 0.43.0 Apr 14, 2024
@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 15, 2024

The build failures in CI Linux are unrelated (#37786)

@mkoeppe mkoeppe changed the title pip 24, setuptools 69.2.0, hatchling 1.22.5, hatch_fancy_pypi_readme 24.1.0, platformdirs 4.2.0, packaging 24.0, trove_classifiers 2024.4.10, wheel 0.43.0 pip 24, setuptools 69.5.1, hatchling 1.22.5, hatch_fancy_pypi_readme 24.1.0, platformdirs 4.2.0, packaging 24.0, trove_classifiers 2024.4.10, wheel 0.43.0 Apr 17, 2024
@kwankyu
Copy link
Collaborator

kwankyu commented Apr 19, 2024

There is a strange malfunction on ubuntu-mantic-standard https://github.com/sagemath/sage/actions/runs/7852863047/job/21431835515?pr=37277#step:11:10319

sage -t --random-seed=293799319091173329856561880001578538606 src/sage/misc/package.py
**********************************************************************
File "src/sage/misc/package.py", line 186, in sage.misc.package.pip_installed_packages
Failed example:
    d['prompt-toolkit']
Exception raised:
    Traceback (most recent call last):
      File "/sage/src/sage/doctest/forker.py", line 712, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/sage/src/sage/doctest/forker.py", line 1147, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.misc.package.pip_installed_packages[3]>", line 1, in <module>
        d['prompt-toolkit']
        ~^^^^^^^^^^^^^^^^^^
    KeyError: 'prompt-toolkit'
**********************************************************************

pip list sees prompt_toolkit (underscore) instead prompt-toolkit (dash)

But this build is incremental from an ancient version:

### Incremental build from SageMath version 10.1.beta6, Release Date: 2023-07-09

so can probably ignore.

I get the same failure with sage built from scratch on mac.

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 19, 2024

Both pip install prompt_toolkit and pip install prompt-toolkit work, and we have

upstream_url=https://pypi.io/packages/source/p/prompt_toolkit/prompt_toolkit-VERSION.tar.gz  

Why prompt-tookit (with dash) is expected?

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 24, 2024

Both pip install prompt_toolkit and pip install prompt-toolkit work

Yes, these are all equivalent.

I see the failure now on various platforms. e.g. https://github.com/mkoeppe/sage/actions/runs/8761823524/job/24053507902#step:11:12409

I'll investigate.

Copy link
Collaborator

@kwankyu kwankyu left a comment

Choose a reason for hiding this comment

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

LGTM.

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 25, 2024

Good. Thanks.

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2024

Thanks for the review!

vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 28, 2024
…fancy_pypi_readme 24.1.0, platformdirs 4.2.0, packaging 24.0, trove_classifiers 2024.4.10, wheel 0.43.0

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37277
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request May 2, 2024
…arate jobs for pyright, build, modularized tests, long tests

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
Running the containers explicitly, instead of using the declarative
`container:` feature of GH Actions gives us more control:
- we can create more space on the host if necessary; we just scraped by
an out of space condition in sagemath#36473 /
sagemath#36469 (comment)
- we can run some operations outside of the container but in the same
job; this will make the separate "Get CI fixes" jobs unnecessary,
addressing the cosmetic concerns from
sagemath#36338 (comment),
sagemath#36349
- it enables caching between the various workflows (as first discussed
in sagemath#36446).

We split out static type checking with pyright into its separate
workflow:
- **pyright.yml**: As static checking does not need  a build of the Sage
library, for PRs that do not make any changes to packages, there's
nothing to build, and the workflow gives a fast turnaround just after 10
minutes. For applying the CI fixes from blocker tickets, this workflow
uses the technique favored in sagemath#36349.

The workflow **build.yml** first launches a job:
- **test-new:** It builds incrementally (using a tox-generated
`Dockerfile` and https://github.com/marketplace/actions/build-and-push-
docker-images) and does the quick incremental test. This completes
within 10 to 20 minutes when there's no change.

After this is completed, more jobs are launched:
- **test-mod:** It again builds incrementally and tests a modularized
distribution. Later (with more from sagemath#35095), more jobs will be added to
this matrix job for other distributions.
- **test-long:** It again builds incrementally and runs the long test.

The workflows **doc-build.yml** and **doc-build-pdf.yml** again build
incrementally and then build the documentation. The diffing code for the
HTML documentation now runs in the host, not the container, which
simplifies things. (To show that diffing still works, we include a small
change to the Sage library.)

Splitting the workflow jobs implements @kwankyu's  suggestion from:
- sagemath#35652 (comment)
(Fixes sagemath#35814)

The steps "again builds incrementally" actually use the GH Actions
cache, https://docs.docker.com/build/ci/github-actions/cache/#cache-
backend-api. When nothing is cached and the 3 workflows are launched in
parallel, they may each build the same thing. But when there's
congestion that leads to the workflows to be run serially, the 2nd and
3rd workflow will be able to use the cache from the 1st workflow. This
elasticity may be helpful in reducing congestion.

There is a rather small per-project limit of 10 GB for this cache, so
we'll have to see how effectively caching works in practice. See
https://github.com/sagemath/sage/actions/caches


<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->
- Depends on sagemath#36938 (merged here)
- Depends on sagemath#36951 (merged here)
- Depends on sagemath#37351 (merged here)
- Depends on sagemath#37750 (merged here)
- Depends on sagemath#37277 (merged here)

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36498
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
@vbraun vbraun merged commit 2d77ac5 into sagemath:develop May 2, 2024
12 of 32 checks passed
@mkoeppe mkoeppe added this to the sage-10.4 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants