Commit Graph

146 Commits

Author SHA1 Message Date
konsti 6e310f2702 Rewrite resolver docs (#5723)
This PR rewrites the resolver concept and adds a resolver internals page
targeted at power users.

The new resolution concept documentation has three parts:
* An introduction for people how never heard of "resolution" before, and
a motivating example what it does. I've also shoved the part about
equally valid resolutions in there.
* Features you commonly use: Non-universal vs. universal resolution,
lowest resolution amd pre-releases.
* Expert features, we don't advertise them, you'll only need them in
complex cases when you already know and i kept them to the reference
points you need in this case: Constraints, overrides and exclude-newer.

I intentionally didn't lay out any detail of the resolution itself, the
idea is that users get a vague sense of "uv has to select fitting
versions", but then they learn the options they have to use and some
common failure points without ever coming near SAT or even graphs.

The resolution internals reference page is targeted at power users who
need to understand what is going on behind the scenes. It assumes ample
prior knowledge and exists to explain the uv-specific behaviors for
someone who already understands dependency resolution conceptually and
has interacted with their dependency tree before. I had a section on the
lockfile but removed it because it found the lockfile to be too
self-documenting.

I haven't touched the readme.

Closes #5603
Closes #5238
Closes #5237

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-08-03 08:47:11 -05:00
konsti db371560bc Use prettier to format the documentation (#5708)
To enforce the 100 character line limit in markdown files introduced in
https://github.com/astral-sh/uv/pull/5635, and to automate the
formatting of markdown files, i've added prettier and formatted our
markdown files with it.

I've excluded the changelog and the generated references documentation
from this for having too many changes, but we can also include them.

I'm not particular on which style we use. My main motivations are
(major) not having to reflow markdown files myself anymore and (minor)
consistence between all markdown files. I've chosen prettier for similar
reason as we chose black, it's a single good style that's automated and
shared in the community. I do prefer prettier's style of not breaking
inside of a link name though.

This PR is in two parts, the first adds prettier to CI and documents
using it, while the second actually formats the docs. When merge
conflicts arise, we can drop the last commit and regenerate it with `npx
prettier --prose-wrap always --write BENCHMARKS.md CONTRIBUTING.md
README.md STYLE.md docs/*.md docs/concepts/**/*.md docs/guides/**/*.md
docs/pip/**/*.md`.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-08-02 08:58:31 -05:00
Ahmed Ilyas ff9f3dede1 Support build constraints (#5639)
## Summary

Partially resolves #5561. Haven't added overrides support yet but I can
add it tomorrow if the current approach for constraints is ok.

## Test Plan

`cargo test`

Manually checked trace logs after changing the constraints.
2024-08-02 02:15:58 +00:00
Zanie Blue b14945a7b1 Bump version to 0.2.33 (#5712) 2024-08-01 21:39:17 +00:00
Charlie Marsh 38c232e466 Bump version to v0.2.32 (#5641) 2024-07-30 18:56:39 -04:00
Charlie Marsh 5d727cb0af Deprecate the --isolated flag (#5466)
## Summary

This PR deprecates the `--isolated` flag. The treatment varies across
the APIs:

- For non-preview APIs, we warn but treat it as equivalent to
`--no-config`.
- For preview APIs, we warn and ignore it, with two exceptions...
- For `tool run` and `run` specifically, we don't even warn, because we
can't differentiate the command-specific `--isolated` from the global
`--isolated`.
2024-07-30 22:40:38 +00:00
Charlie Marsh 48162de974 Bump version to v0.2.31 (#5568) 2024-07-29 14:06:20 -04:00
Charlie Marsh 6901a14aa0 Bump version to v0.2.30 (#5486) 2024-07-26 13:36:05 -04:00
Charlie Marsh d51b429837 Add --no-config to replace --isolated (#5463)
## Summary

I'll deprecate `--isolated` separately, since it _is_ still used for
some other behaviors.

Closes #5428.
2024-07-25 19:58:36 -04:00
Zanie Blue 35b6726df5 Bump version to 0.2.29 (#5431) 2024-07-24 22:23:34 +00:00
Zanie Blue 3a85353707 Bump version to 0.2.28 (#5363) 2024-07-23 14:04:55 -05:00
Zanie Blue 833097b93f Bump version to 0.2.27 (#5230) 2024-07-19 22:06:49 +00:00
Charlie Marsh fe403576c5 Bump version to v0.2.26 (#5149) 2024-07-17 12:51:11 -04:00
Charlie Marsh d1010228b3 Bump version to v0.2.25 (#5083) 2024-07-15 22:38:59 +00:00
Charlie Marsh b629ab89c5 Set absolute URLs prior to uploading to PyPI (#5038)
## Summary

Closes https://github.com/astral-sh/uv/issues/5030.
2024-07-13 17:29:21 +00:00
Zanie Blue 527b711bc7 Bump version to 0.2.24 (#4974) 2024-07-10 13:50:12 -05:00
Janosh Riebesell 8da91f5a97 Remove confusing punctuation in readme (#4929)
admittedly, nitpick PR but i initially misread the trailing dot in

```
# Create a virtual environment at .venv.
```

as part of the directory name, i.e. that the env would be placed in
`.venv.`
2024-07-09 13:01:07 -05:00
Zanie Blue 4bc36c0cb8 Bump version to 0.2.23 (#4903) 2024-07-08 12:29:37 -05:00
Charlie Marsh f5e84bbbab Bump version to v0.2.22 (#4862) 2024-07-07 19:23:38 +00:00
Charlie Marsh f450b45780 Add UV_OVERRIDE environment variable for --override (#4836)
Closes https://github.com/astral-sh/uv/issues/4827
2024-07-05 16:03:17 -05:00
Zanie Blue ebfe6d8fcc Bump version to 0.2.21 (#4757) 2024-07-03 04:27:00 +00:00
Zanie Blue e88e1373e6 Bump version to 0.2.20 (#4745) 2024-07-02 22:30:43 +00:00
Zanie Blue c5bf64abeb Bump version to 0.2.19 (#4738) 2024-07-02 21:15:58 +00:00
Charlie Marsh 13b0beb56f Bump version to v0.2.18 (#4650) 2024-06-29 14:30:01 -04:00
Zanie Blue 2eb1e6693c Bump version to 0.2.17 (#4573) 2024-06-26 23:16:44 +00:00
Charlie Marsh 95b4aacc25 Bump version to v0.2.16 (#4561) 2024-06-26 17:00:09 -04:00
Zanie Blue bfc342da94 Bump version to 0.2.15 (#4475)
Releasing 0.2.15 with a few additions over 0.2.14. Motivated by the
incorrect tagging of 0.2.14 (#4474).

Generated the changelog with a small patch to Rooster allowing me to
force the previous commit to be correct.

```diff
diff --git a/src/rooster/_cli.py b/src/rooster/_cli.py
index 2a4f61b..4ec1299 100644
--- a/src/rooster/_cli.py
+++ b/src/rooster/_cli.py
@@ -38,6 +38,7 @@ def release(
     without_sections: list[str] = typer.Option(
         [], help="Sections to exclude from the changelog"
     ),
+    previous_commit: str = None,
 ):
     """
     Create a new release.
@@ -58,7 +59,11 @@ def release(
         typer.echo("It looks like there are no version tags for this project.")
 
     # Get the commits since the last release
-    changes = list(get_commits_between(config, repo, last_version))
+    changes = list(
+        get_commits_between(
+            config, repo, last_version, force_first_commit=previous_commit
+        )
+    )
     since = "since last release" if last_version else "in the project"
     typer.echo(f"Found {len(changes)} commits {since}.")
 
diff --git a/src/rooster/_git.py b/src/rooster/_git.py
index 597bb88..66bc54e 100644
--- a/src/rooster/_git.py
+++ b/src/rooster/_git.py
@@ -29,12 +29,13 @@ def get_commits_between(
     target: Path,
     first_version: Version | None = None,
     second_version: Version | None = None,
+    force_first_commit: str | None = None,
 ) -> Generator[git.Commit, None, None]:
     """
     Yield all commits between two tags
     """
     repo = git.repository.Repository(target.absolute())
-    first_commit = (
+    first_commit = force_first_commit or (
         repo.lookup_reference(
             TAG_PREFIX + config.version_tag_prefix + str(first_version)
         )
```
2024-06-24 10:04:09 -05:00
Zanie Blue 64e07b68a8 Reapply "Bump version to 0.2.14" (#4472)
Restores #4431

This reverts commit 9ff6a5ed74 (#4436)
2024-06-24 09:14:16 -05:00
Zanie Blue 9ff6a5ed74 Revert "Bump version to 0.2.14 (#4431)" (#4436)
This reverts commit e0ad649c74.

We shouldn't be linking to this version in the readme.

See https://github.com/astral-sh/uv/issues/4432
2024-06-21 16:24:32 +00:00
Zanie Blue e0ad649c74 Bump version to 0.2.14 (#4431) 2024-06-20 13:58:10 -05:00
Zanie Blue fa6ed34105 Bump version to 0.2.13 (#4388) 2024-06-18 11:46:32 -05:00
Zanie Blue b8c0391667 Bump version to 0.2.12 (#4371) 2024-06-17 16:46:28 -05:00
Charlie Marsh c4483017ac Add UV_EXCLUDE_NEWER environment variable (#4287)
## Summary

Closes https://github.com/astral-sh/uv/issues/4286.
2024-06-12 15:54:01 -04:00
Charlie Marsh 44041bccd2 Bump version to v0.2.11 (#4258) 2024-06-11 20:47:25 -04:00
samypr100 68abf85f0d feat: mTLS support (#4171)
## Summary

Closes https://github.com/astral-sh/uv/issues/3626

This adds mTLS support to uv via the standard env var `SSL_CLIENT_CERT`.

## Test Plan

Tested locally using a [nginx proxy to
pypi](https://github.com/hauntsaninja/nginx_pypi_cache) using my own
self-signed ca + certs + client certs generated via
[mkcert](https://github.com/FiloSottile/mkcert). Used this proxy with
both uv and pip to make sure we have feature partity in mTLS
functionality.
2024-06-10 20:11:35 -05:00
Charlie Marsh c91fed550d Document Windows 10 requirement (#4210)
## Summary

Closes https://github.com/astral-sh/uv/issues/4207.
2024-06-10 18:50:21 +00:00
Zanie Blue 907727cb1b Bump version to 0.2.10 (#4201) 2024-06-10 11:40:19 -05:00
Zanie Blue 9a9ebe3262 Clarify role of --system flag in README (#4031)
For uv>=0.2.0 behavior

Closes #3951

---------

Co-authored-by: David Poznik <dpoznik@23andme.com>
2024-06-10 11:19:41 -05:00
Gilles Peiffer 1e6cc8a872 [README.md] Fix various typos (#4170) 2024-06-09 14:29:58 +00:00
Charlie Marsh e9fc99e622 Bump version to v0.2.9 (#4107) 2024-06-06 14:21:33 -04:00
Zanie Blue e89c181d66 Add install link for specific version to README (#4105)
More minimal version of https://github.com/astral-sh/uv/pull/4092
2024-06-06 12:57:56 -05:00
samypr100 1b3200b2af feat: support NO_COLOR and FORCE_COLOR env vars (#3979)
## Summary

Closes #3955

Adds explicit support to `NO_COLOR` and `FORCE_COLOR` via
GlobalSettings.

The order, per specs is now `NO_COLOR` > `FORCE_COLOR` > `color`.

This PR is a backup plan pending rust-cli/anstyle#192.

## Test Plan

Tested all cases locally for now; I didn't see existing tests for
GlobalSettings parsing.
2024-06-04 17:00:42 -04:00
Charlie Marsh 98b3325cd4 Add UV_CONFIG_FILE environment variable to documentation (#3653)
## Summary

Closes https://github.com/astral-sh/uv/issues/3648.
2024-05-19 02:25:32 +00:00
Ibraheem Ahmed 53633392c3 Add UV_CONCURRENT_INSTALLS variable in favor of RAYON_NUM_THREADS (#3646)
## Summary

Continuation of https://github.com/astral-sh/uv/pull/3493. This gives us
more flexibility in case we decide to move away from `rayon` in the
future.
2024-05-17 23:12:37 -04:00
Charlie Marsh 084529bad2 Fix later-to-earlier reference (#3615)
## Summary

We generally consider things earlier in the array to be higher-priority,
and so that's where project-level settings go when merging.
2024-05-15 18:19:39 +00:00
Charlie Marsh b20d5ad96f Remove pacman from README (#3582)
## Summary

If we want to enumerate more installers, I think they should go in a
dedicated section.
2024-05-14 13:34:39 -04:00
Ibraheem Ahmed 783df8f657 Consolidate concurrency limits (#3493)
## Summary

This PR consolidates the concurrency limits used throughout `uv` and
exposes two limits, `UV_CONCURRENT_DOWNLOADS` and
`UV_CONCURRENT_BUILDS`, as environment variables.

Currently, `uv` has a number of concurrent streams that it buffers using
relatively arbitrary limits for backpressure. However, many of these
limits are conflated. We run a relatively small number of tasks overall
and should start most things as soon as possible. What we really want to
limit are three separate operations:
- File I/O. This is managed by tokio's blocking pool and we should not
really have to worry about it.
- Network I/O.
- Python build processes.

Because the current limits span a broad range of tasks, it's possible
that a limit meant for network I/O is occupied by tasks performing
builds, reading from the file system, or even waiting on a `OnceMap`. We
also don't limit build processes that end up being required to perform a
download. While this may not pose a performance problem because our
limits are relatively high, it does mean that the limits do not do what
we want, making it tricky to expose them to users
(https://github.com/astral-sh/uv/issues/1205,
https://github.com/astral-sh/uv/issues/3311).

After this change, the limits on network I/O and build processes are
centralized and managed by semaphores. All other tasks are unbuffered
(note that these tasks are still bounded, so backpressure should not be
a problem).
2024-05-10 12:43:08 -04:00
Charlie Marsh 7d41e7d260 Respect MACOSX_DEPLOYMENT_TARGET in --python-platform (#3470)
## Summary

This is universal environment variable used to determine the mac OS
deployment target. We now respect it in `--python-platform` -- so we
default to 12.0, but users can override it as needed.
2024-05-08 20:03:41 +00:00
Charlie Marsh eec99f9349 Add basic documentation for persistent configuration (#3467) 2024-05-08 15:03:17 -04:00
Charlie Marsh 7e17dd10a3 Add UV_CUSTOM_COMPILE_COMMAND to environment variable docs (#3382)
Closes https://github.com/astral-sh/uv/issues/3381.
2024-05-05 23:33:27 +00:00