|
| 1 | +<!-- markdownlint-disable MD059 --> |
| 2 | + |
1 | 3 | # Template |
2 | 4 |
|
3 | 5 |  |
|
23 | 25 |
|
24 | 26 | - [uv](https://docs.astral.sh/uv/): manage dependencies, Python versions and virtual environments |
25 | 27 | - [ruff](https://docs.astral.sh/ruff/): lint and format Python code |
26 | | -- [mypy](https://mypy.readthedocs.io/): check types |
27 | 28 | - [pytest](https://docs.pytest.org/en/): run unit tests |
28 | 29 | - [pre-commit](https://pre-commit.com/): manage pre-commit hooks |
29 | 30 | - [prettier](https://prettier.io/): format YAML and Markdown |
@@ -59,12 +60,18 @@ Install package and pinned dependencies with the [`uv`](https://docs.astral.sh/u |
59 | 60 |
|
60 | 61 | ### Library |
61 | 62 |
|
62 | | -Install a specific version of the package with `pip` or `uv pip`: |
| 63 | +If using `pip` or `uv pip`, a specific version of the package can be installed with: |
63 | 64 |
|
64 | 65 | ```{bash} |
65 | 66 | pip install git+ssh://[email protected]/Komorebi-AI/[email protected] |
66 | 67 | ``` |
67 | 68 |
|
| 69 | +It can also be added to the `requirements.in` or `pyproject.toml`. If using `uv`, it can be added as a dependency with: |
| 70 | + |
| 71 | +```{bash} |
| 72 | +uv add "python-template @ git+https://github.com/Komorebi-AI/[email protected]" |
| 73 | +``` |
| 74 | + |
68 | 75 | ## Setup development environment (Unix) |
69 | 76 |
|
70 | 77 | Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/) and pre-commit hooks: |
@@ -95,6 +102,18 @@ Remove dependency with: |
95 | 102 | uv remove <PACKAGE> |
96 | 103 | ``` |
97 | 104 |
|
| 105 | +Upgrade all dependencies: |
| 106 | + |
| 107 | +```{bash} |
| 108 | +uv lock --upgrade |
| 109 | +``` |
| 110 | + |
| 111 | +or a single package: |
| 112 | + |
| 113 | +```{bash} |
| 114 | +uv lock --upgrade-package ruff |
| 115 | +``` |
| 116 | + |
98 | 117 | In all cases `uv` will automatically update the `uv.lock` file and sync the virtual environment. This can also be done manually with: |
99 | 118 |
|
100 | 119 | ```{bash} |
@@ -122,9 +141,3 @@ make ruff |
122 | 141 | ```{bash} |
123 | 142 | make test |
124 | 143 | ``` |
125 | | - |
126 | | -#### Run type checker |
127 | | - |
128 | | -```{bash} |
129 | | -make mypy |
130 | | -``` |
|
0 commit comments