-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEAT: switch to
uv
as default package manager (#424)
* BEHAVIOR: use `uv` as default package manager * BEHAVIOR: write "MAINT: update lock files" in update PRs * BREAK: generalize `remove_from_gitignore()` * BREAK: rename `--package-managers` to `--package-manager` * DX: extend cSpell ignore path list * DX: add `uv.lock` pre-commit hook * DX: automatically remove Pixi support if `pixi` not package manager * ENH: add `.venv` to Pyright excludes * ENH: add `uv.lock` to EditorConfig * ENH: add Pixi and `uv` badge * ENH: add support for environment variables in `.envrc` * ENH: automatically update `CONTRIBUTING.md` file * ENH: create `.python-version` file for dev Python version * ENH: create dedicated `.envrc` for `uv` * ENH: do not add `myst-highlight` if unwanted * ENH: ignore `.prettierrc` check if `.prettierrc.yml` already available * ENH: only set `python.terminal.activateEnvironment` if Python repo * ENH: only set `rewrap.wrappingColumn` if Python repo * ENH: run `uv sync` on Read the Docs * FEAT: add `none` as --package-managers` choice * FEAT: implement `pixi+uv` environment manager with `pixi.toml` * FIX: do not open `pyproject.toml` if not existing * MAINT: autoupdate pre-commit hooks * MAINT: split `check_dev_files.pixi` sub-module
- Loading branch information
Showing
38 changed files
with
2,550 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,6 @@ indent_size = 4 | |
|
||
[LICENSE] | ||
indent_size = unset | ||
|
||
[uv.lock] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,2 @@ | ||
if [ -e .venv ]; then | ||
source .venv/bin/activate | ||
elif [ -e venv ]; then | ||
source venv/bin/activate | ||
elif [ -e .pixi ]; then | ||
watch_file pixi.lock | ||
eval "$(pixi shell-hook)" | ||
else | ||
layout anaconda | ||
fi | ||
uv sync --all-extras --quiet | ||
source .venv/bin/activate |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# How to contribute? | ||
|
||
[![Open in Visual Studio Code](https://img.shields.io/badge/vscode-open-blue?logo=visualstudiocode)](https://github.dev/ComPWA/policy) | ||
|
||
> [!TIP] | ||
> This package is part of the [ComPWA Organization](https://github.com/ComPWA). For more information about how to contribute to the packages, go to **[compwa.github.io/develop](https://compwa.github.io/develop)**! | ||
To contribute to the project, you need to install the package in a virtual environment. This can be done best with [`uv`](https://docs.astral.sh/uv) (see installation instructions [here](https://docs.astral.sh/uv/getting-started/installation)). For this, you first need to get the source code with [Git](https://git-scm.com): | ||
|
||
```shell | ||
git clone https://github.com/ComPWA/policy | ||
cd policy | ||
``` | ||
|
||
Now it's simply a matter of creating and activating the [virtual environment](https://docs.astral.sh/uv/pip/environments) with [`uv sync`](https://docs.astral.sh/uv/reference/cli/#uv-sync). The dependencies for the project are 'pinned' in each commit through the [`uv.lock` file](https://docs.astral.sh/uv/concepts/projects/#project-lockfile). | ||
|
||
```shell | ||
uv sync | ||
source .venv/bin/activate | ||
``` | ||
|
||
Formatting and linting checks are automatically performed when committing changes. This is done with [pre-commit](https://pre-commit.com). To install the hooks in your local repository, run [`pre-commit install`](https://pre-commit.com/#3-install-the-git-hook-scripts) **once**: | ||
|
||
```shell | ||
pre-commit install --install-hooks | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# How to contribute? | ||
|
||
[![Open in Visual Studio Code](https://img.shields.io/badge/vscode-open-blue?logo=visualstudiocode)](https://github.dev/ComPWA/{{ REPO_NAME }}) | ||
|
||
> [!TIP] | ||
> This package is part of the [ComPWA Organization](https://github.com/ComPWA). For more information about how to contribute to the packages, go to **[compwa.github.io/develop](https://compwa.github.io/develop)**! | ||
|
||
To contribute to the project, you need to install the package in a virtual environment. This can be done best with [`uv`](https://docs.astral.sh/uv) (see installation instructions [here](https://docs.astral.sh/uv/getting-started/installation)). For this, you first need to get the source code with [Git](https://git-scm.com): | ||
|
||
```shell | ||
git clone https://github.com/ComPWA/{{ REPO_NAME }} | ||
cd {{ REPO_NAME }} | ||
``` | ||
|
||
Now it's simply a matter of creating and activating the [virtual environment](https://docs.astral.sh/uv/pip/environments) with [`uv sync`](https://docs.astral.sh/uv/reference/cli/#uv-sync). The dependencies for the project are 'pinned' in each commit through the [`uv.lock` file](https://docs.astral.sh/uv/concepts/projects/#project-lockfile). | ||
|
||
```shell | ||
uv sync | ||
source .venv/bin/activate | ||
``` | ||
|
||
Formatting and linting checks are automatically performed when committing changes. This is done with [pre-commit](https://pre-commit.com). To install the hooks in your local repository, run [`pre-commit install`](https://pre-commit.com/#3-install-the-git-hook-scripts) **once**: | ||
|
||
```shell | ||
pre-commit install --install-hooks | ||
``` |
Oops, something went wrong.