You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add --backend flag to over-ride manual detection of uv (#826)
* First draft of adding --backend flag to the usethis tool interface
* Tweak backend selection logic to check whether uv is available.
Fix add_* function when needing to remove
Tweak test config
* Move tests to reflect new package structure
* Remove duplicated `Test` in `TestOpinionatedUVInit` name
* Revert to importing module to pass mocked tests
* Add tests for `is_uv_available` and for `get_backend`
* Move tests module to reflect package restructure
* Test `add_default_groups` for the `backend=BackendEnum.none` case
* Remove empty file
* Add some tests to the deps module
* Document `ForbiddenBackendError` in docstring to `call_uv_subprocess`
* Add `--backend` option to all interfaces where it makes sense
* Fix broken test
* Remove disclaimers regarding uv-centrism
* Bump pyright from v1.1.399 -> v1.1.403
* Add some tests for the none backend when using requirements.txt
* Implement `get_project_deps` and tests
* Implement `Dependency.to_requirements_string`
* Use `Dependency.to_requirements_string()` in `Dependency.__str__`
* Remove duplicated code for `get_project_deps`
* Fix broken references and rename `to_requirements_string` to `to_requirement_string`
* Use `get_backend()` in `use_requirements_txt`
This will resolve the "auto" case and allows for proper type checking using `assert_never`
* Create correct requirements file using none backend
* Generate expected messages for `use_requirements_txt` with none backend
* Refactor to create abstract project init functions, making it backend agnostic
* Collate UI modules into their own layer
* Fix recursion issue in `ensure_pyproject_toml` by dispatching to `ensure_pyproject_toml_via_uv` instead of self
* Update test to reflect new uv-detection heuristics
* Skip test on rate limits
* Catch exceptions in failing tests' CLI invocation
* Support none backend in `ensure_pyproject_toml`
* Simplify instructions for checking `uv` version in README
* Fix issue with missing directory when subprocessing uv.
* Add failing test `TestProjectInit.test_none_backend` in `tests\usethis\test_init.py`
* Add `project_init` implementation for none backend
* Fix broken imports for re-homed test
* Sync README with docs
* Rename uv+python integration functions for clarity
* Support none backend in `install_pre_commit_hooks`
Move `usethis._backend` to `usethis._integrations.backend.dispatch`
* Support none backend in `uninstall_pre_commit_hooks`
* Test all interfaces, add missing backend pass-through
* Fix broken header in reference.md
* Fix file manager issues in tests
* Fix backend flag for `usethis status`
* Don't create README in `use_ci_bitbucket`
* Don't eagerly create `pyproject.toml` in `usethis tool codespell`
* Break up the complexity of `Tool.add_configs` with a new helper method
* Don't overwrite an alert-only state in `Tool.add_configs` and `RuffTool.apply_rule_config`
This is something to watch out for in the future.
* Display message when creating input files when adding config
Pass all `test_none_backend` tests
* Pass `test_none_backend` tests
* Change test to reflect new behaviour
* Respect backend in print-how-to-use messages
* Don't use bitwise operators to avoid confusion
* rework `is_uv_used` for robustness
* Refactor `add_configs` for clarity
Copy file name to clipboardExpand all lines: README.md
+3-10Lines changed: 3 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,6 @@ usethis gives detailed messages about what it is doing (and what you need to do
25
25
26
26
Inspired by an [**R** package of the same name](https://usethis.r-lib.org/index.html), this package brings a similar experience to the Python ecosystem as a CLI tool.
27
27
28
-
> [!TIP]
29
-
> usethis is great for fresh projects using [uv](https://docs.astral.sh/uv), but also supports updating existing projects. However, this should be considered experimental. If you encounter problems or have feedback, please [open an issue](https://github.com/usethis-python/usethis-python/issues/new?template=idea.md).
30
-
31
28
## Highlights
32
29
33
30
- 🧰 First-class support for state-of-the-practice tooling: uv, Ruff, pytest, pre-commit, and many more.
@@ -40,10 +37,7 @@ Inspired by an [**R** package of the same name](https://usethis.r-lib.org/index.
40
37
## 🧭 Getting Started
41
38
42
39
First, it is strongly recommended you [install the uv package manager](https://docs.astral.sh/uv/getting-started/installation/): this is a simple, documented process. If you're already using uv, make sure you're using at least
43
-
version v0.6.8. To check this, run `uv self version` to check (if available, otherwise `uv version`), and run `uv self update` to upgrade.
44
-
45
-
> [!TIP]
46
-
> At the moment, usethis assumes you will have uv installed in some circumstances. Support for projects that don't use uv is planned for late 2025.
40
+
version v0.6.8 (run `uv --version` to check, and `uv self update` to upgrade).
47
41
48
42
You can install usethis directly into the project environment:
49
43
@@ -189,9 +183,8 @@ If you're using Cookiecutter, then you can update to a latest version of a templ
189
183
190
184
Major features planned for later in 2025 are:
191
185
192
-
- Support for users who aren't using uv, e.g. poetry users,
193
-
- Support for automated GitHub Actions workflows ([#57](https://github.com/usethis-python/usethis-python/issues/57)), and
194
-
- Support for a typechecker (likely Pyright, [#121](https://github.com/usethis-python/usethis-python/issues/121)).
186
+
- Support for automated GitHub Actions workflows ([#57](https://github.com/usethis-python/usethis-python/issues/57)),
187
+
- Support for a typechecker (likely Pyright, [#121](https://github.com/usethis-python/usethis-python/issues/121)), and
195
188
196
189
Other features are tracked in the [GitHub Issues](https://github.com/usethis-python/usethis-python/issues) page.
Copy file name to clipboardExpand all lines: docs/getting-started.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,7 @@
1
1
# 🧭 Getting Started
2
2
3
3
First, it is strongly recommended you [install the uv package manager](https://docs.astral.sh/uv/getting-started/installation/): this is a simple, documented process. If you're already using uv, make sure you're using at least
4
-
version v0.6.8. To check this, run `uv self version` to check (if available, otherwise `uv version`), and run `uv self update` to upgrade.
5
-
6
-
At the moment, usethis assumes you will have uv installed in some circumstances. Support for projects that don't use uv is planned for late 2025.
4
+
version v0.6.8 (run `uv --version` to check, and `uv self update` to upgrade).
7
5
8
6
You can install usethis directly into the project environment:
Copy file name to clipboardExpand all lines: docs/index.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,6 @@ usethis gives detailed messages about what it is doing (and what you need to do
12
12
13
13
Inspired by an [**R** package of the same name](https://usethis.r-lib.org/index.html), this package brings a similar experience to the Python ecosystem as a CLI tool.
14
14
15
-
usethis is great for fresh projects using [uv](https://docs.astral.sh/uv), but also supports updating existing projects. However, this should be considered experimental. If you encounter problems or have feedback, please [open an issue](https://github.com/usethis-python/usethis-python/issues/new?template=idea.md).
16
-
17
15
## Highlights
18
16
19
17
- 🧰 First-class support for state-of-the-practice tooling: uv, Ruff, pytest, pre-commit, and many more.
0 commit comments