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

Document building from the monorepo using PIP_CONSTRAINT=$SAGE_ROOT/constraints_pkgs.txt #37434

Merged
merged 21 commits into from
Sep 3, 2024

Conversation

mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented Feb 23, 2024

This is aimed at the intermediate level, for users who wish to build a set of distribution packages as supplied in pkgs/ but without using the wheelhouse infrastructure of Sage-the-distribution.

Documentation included in the files.

It can also be tested using new tox environments defined in pkgs/sagemath-standard/tox.ini, and is tested on GH Actions: https://github.com/mkoeppe/sage/actions/workflows/ci-linux-incremental.yml?query=branch%3Aconstraints_pkgs

  • this also provides the missing automatic test for the sagemath-standard distribution built out of pkgs/sagemath-standard/

Marked as critical because it is hoped to ease the adoption of modularized distribution packages by downstream packagers.

📝 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

src/pyproject.toml.m4 Outdated Show resolved Hide resolved
@mkoeppe mkoeppe changed the title SAGE_ROOT/constraints_pkgs.txt, pkgs/sagemath-standard/constraints_pkgs.txt Building from the monorepo using PIP_CONSTRAINT=$SAGE_ROOT/constraints_pkgs.txt Feb 24, 2024
@mkoeppe mkoeppe requested a review from kiwifb February 24, 2024 22:45
@mkoeppe mkoeppe force-pushed the constraints_pkgs branch 2 times, most recently from c75ddba to a59d7d5 Compare March 2, 2024 05:37
@mkoeppe mkoeppe requested a review from kwankyu March 6, 2024 07:39
@mkoeppe mkoeppe requested a review from saraedum March 17, 2024 16:55
@mkoeppe mkoeppe changed the title Building from the monorepo using PIP_CONSTRAINT=$SAGE_ROOT/constraints_pkgs.txt Document building from the monorepo using PIP_CONSTRAINT=$SAGE_ROOT/constraints_pkgs.txt Mar 23, 2024
@mkoeppe mkoeppe force-pushed the constraints_pkgs branch 2 times, most recently from 29702ff to 0b1acff Compare April 1, 2024 00:44
Copy link

github-actions bot commented Apr 1, 2024

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

@mkoeppe mkoeppe mentioned this pull request Apr 15, 2024
2 tasks
@kiwifb
Copy link
Member

kiwifb commented Apr 15, 2024

Yes, I understand how this would have failed if the sdist had no .py files like it is happening for 10.3.beta4 right now. For that reason, CI will probably fail if we commit this PR now. I cannot see any obvious problem. I would consider a clean CI run to be enough to decide this can be included.

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 17, 2024

Did you run it within sage -sh? That's needed so that the lrcalc Python bindings can find the lrcalc library -- unless you have a systemwide installation of it.

No. I ran it in a new venv. What is the point of installing the sagemath-standard wheel within sage -sh?

Within sage -sh, environment variables are set that are needed to discover the libraries installed in SAGE_LOCAL.

You can activate your venv within the sage -sh.

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 17, 2024

I see. My venvs are outside of sage -sh. There was no problem except lrcalc.

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 17, 2024

The step pip install lrcalc was not really necessary.

This is the first time that I successfully installed sagemath-standard distribution package. Personally, it is the most impressive product of the modularization efforts :-)

@mkoeppe mkoeppe marked this pull request as ready for review August 17, 2024 01:39
@kwankyu
Copy link
Collaborator

kwankyu commented Aug 17, 2024

Perhaps not an issue directly related with this PR, but I wonder if lrcalc (and others if any) is a prerequisite of sagemath-standard and if that should be documented somewhere.

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 17, 2024

Basically all standard packages are dependencies of sagemath-standard, so https://doc.sagemath.org/html/en/reference/spkg/index.html#standard-packages provides this documentation.

The direct non-Python dependencies of sagemath-standard are also declared in https://github.com/sagemath/sage/blob/develop/src/pyproject.toml#L25, but this is at the moment only decoration because there is no tooling that reads this information.

Note that the user-facing documentation of installation with Python tools is in https://github.com/sagemath/sage/blob/develop/README.md#alternative-installation-using-pypi - it provisions the non-Python dependencies via sage_conf.

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 18, 2024

Note that the user-facing documentation of installation with Python tools is in https://github.com/sagemath/sage/blob/develop/README.md#alternative-installation-using-pypi - it provisions the non-Python dependencies via sage_conf.

So Python dependencies are automatically resolved and installed via pip, and non-Python dependencies should be provisioned by the system or by sage_conf. For my case, my system only lacked lrcalc, rather fortunately.

https://github.com/sagemath/sage/blob/develop/README.md#alternative-installation-using-pypi perfectly explains the installation procedure of sagemath-standard. I think that there should be a link to it or a copy in the Project description of sagemath-standard at https://pypi.org/project/sagemath-standard.

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 18, 2024

Good idea, done in 02f6e88

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 18, 2024

Perhaps another test run of the changed workflows?

Otherwise lgtm.

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 18, 2024

Thanks. I think I'll iterate on the workflows in a follow up, when changes such as #38518 have been merged

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 18, 2024

OK, as the changes on the workflows are just additions and can be tested on the battleground.

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 18, 2024

Thanks for the review!

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 27, 2024
…TRAINT=$SAGE_ROOT/constraints_pkgs.txt`

    
<!-- ^^^^^
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 -->
This is aimed at the intermediate level, for users who wish to build a
set of distribution packages as supplied in `pkgs/` but without using
the wheelhouse infrastructure of Sage-the-distribution.

Documentation included in the files.

It can also be tested using new tox environments defined in
`pkgs/sagemath-standard/tox.ini`, and is tested on GH Actions:
https://github.com/mkoeppe/sage/actions/workflows/ci-linux-
incremental.yml?query=branch%3Aconstraints_pkgs
- this also provides the missing automatic test for the **sagemath-
standard** distribution built out of `pkgs/sagemath-standard/`

Marked as critical because it is hoped to ease the adoption of
modularized distribution packages by downstream packagers.

<!-- 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.
- [x] 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! -->

- Depends on sagemath#38515 (merged here)
- Depends on sagemath#38500 (merged here)
    
URL: sagemath#37434
Reported by: Matthias Köppe
Reviewer(s): François Bissey, Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 27, 2024
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Broken in sagemath#37287
- Reported in
sagemath#37434 (comment)
- Reported in
sagemath#36524 (comment)

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38515
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 27, 2024
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Thanks to the more powerful runners in use since early 2024, we can do
away with the splits between
- `standard-pre` and `standard`
- `minimal-pre` and `minimal`
- `optional-0-o` and `optional-p-z`
- `experimental-0-o` and `experimental-p-z`

This makes the CI runs a bit easier to navigate for those who look at
them.

- Test run: https://github.com/mkoeppe/sage/actions/runs/10438362191

This should also fix "No space left on device" aborts as seen for
example in https://github.com/mkoeppe/sage/actions/runs/10426436105 for
standard-pre (where we did not use to maximize the available disk
space).

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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 and checked the documentation
preview.

### ⌛ Dependencies

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

- Depends on sagemath#37434 (merged here)
    
URL: sagemath#38518
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 28, 2024
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Broken in sagemath#37287
- Reported in
sagemath#37434 (comment)
- Reported in
sagemath#36524 (comment)

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38515
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 28, 2024
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Thanks to the more powerful runners in use since early 2024, we can do
away with the splits between
- `standard-pre` and `standard`
- `minimal-pre` and `minimal`
- `optional-0-o` and `optional-p-z`
- `experimental-0-o` and `experimental-p-z`

This makes the CI runs a bit easier to navigate for those who look at
them.

- Test run: https://github.com/mkoeppe/sage/actions/runs/10438362191

This should also fix "No space left on device" aborts as seen for
example in https://github.com/mkoeppe/sage/actions/runs/10426436105 for
standard-pre (where we did not use to maximize the available disk
space).

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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 and checked the documentation
preview.

### ⌛ Dependencies

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

- Depends on sagemath#37434 (merged here)
    
URL: sagemath#38518
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
@vbraun vbraun merged commit 5ee375c into sagemath:develop Sep 3, 2024
17 of 20 checks passed
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.

5 participants