Skip to content

Update instruction how to update contraints files #672

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Czaki
Copy link
Contributor

@Czaki Czaki commented Apr 14, 2025

References and relevant issues

closes #670

napari/napari#7642
napari/napari#7487

Description

After the most recent updates of constraints update, we could simplify this instrucition.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 14, 2025

```bash
uv pip compile --python-version 3.11 --upgrade --output-file resources/constraints/constraints_py3.11_docs.txt pyproject.toml resources/constraints/version_denylist.txt resources/constraints/version_denylist_examples.txt ../docs/requirements.txt resources/constraints/pydantic_le_2.txt --extra pyqt5 --extra pyqt6 --extra pyside2 --extra pyside6_experimental --extra testing --extra testing_extra --extra optional
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't resources/constraints/version_denylist_examples.txt be kept (as in napari/napari#7788 ) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have changed from docs to normal constraints, as docs are still on python 3.10.

Once we understand the source of problems in #7714 we may get docs constraints here.

@@ -118,10 +118,12 @@ These constraints files need to be updated at least weekly on Monday, and may al
To get updated constraints for a PR, use `@napari-bot update constraints` in a PR comment, then follow the instruction added by the bot to the conversation.

````{admonition} Example
To update the docs constraints file, assuming you have the `napari/napari` repo and `napari/docs` repo cloned next to each other, you can install [uv](https://astral.sh/blog/uv) and run the following command from the root of the `napari` repo:
To manually update the constraint files, you need to have the [`uv`](https://github.com/astral-sh/uv) and copy
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
To manually update the constraint files, you need to have the [`uv`](https://github.com/astral-sh/uv) and copy
To manually update the constraints files, you need to have the [`uv`](https://github.com/astral-sh/uv) tool installed, then copy

@@ -118,10 +118,12 @@ These constraints files need to be updated at least weekly on Monday, and may al
To get updated constraints for a PR, use `@napari-bot update constraints` in a PR comment, then follow the instruction added by the bot to the conversation.

````{admonition} Example
To update the docs constraints file, assuming you have the `napari/napari` repo and `napari/docs` repo cloned next to each other, you can install [uv](https://astral.sh/blog/uv) and run the following command from the root of the `napari` repo:
To manually update the constraint files, you need to have the [`uv`](https://github.com/astral-sh/uv) and copy
the command from the second line of a given constraints file.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
the command from the second line of a given constraints file.
and run the command from the second line of a given constraints file.

Copy link
Contributor

@TimMonko TimMonko left a comment

Choose a reason for hiding this comment

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

Works locally now (with my comment), thanks!


```bash
uv pip compile --python-version 3.11 --upgrade --output-file resources/constraints/constraints_py3.11_docs.txt pyproject.toml resources/constraints/version_denylist.txt resources/constraints/version_denylist_examples.txt ../docs/requirements.txt resources/constraints/pydantic_le_2.txt --extra pyqt5 --extra pyqt6 --extra pyside2 --extra pyside6_experimental --extra testing --extra testing_extra --extra optional
uv pip compile --python-version 3.12 --output-file resources/constraints/constraints_py3.12.txt pyproject.toml resources/constraints/version_denylist.txt --extra pyqt6 --extra pyside2 --extra pyside6_experimental --extra testing --extra testing_extra --extra optional
Copy link
Contributor

Choose a reason for hiding this comment

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

this updates 3.12, we want to update docs though, right? I think this does that

Suggested change
uv pip compile --python-version 3.12 --output-file resources/constraints/constraints_py3.12.txt pyproject.toml resources/constraints/version_denylist.txt --extra pyqt6 --extra pyside2 --extra pyside6_experimental --extra testing --extra testing_extra --extra optional
uv pip compile --python-version 3.10 --output-file resources/constraints/constraints_py3.10_docs.txt pyproject.toml resources/constraints/version_denylist.txt --extra pyqt6 --extra pyside2 --extra pyside6_experimental --extra testing --extra testing_extra --extra optional

@psobolewskiPhD
Copy link
Member

@napari-bot make slimgallery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instructions for local updating of docs constraints out of date
4 participants