mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Add top-level benchmark to the README (#2622)
## Summary Steps involved in creating this: - Open the raw data in [Vega-Lite](https://vega.github.io/editor/#/url/vega-lite/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYBXAI0poHsDp5kTykBaADZ04JAKyUAVhDYA7EABoQAEySYUqUMSSCGcCGgDaoTGzaC0IHAwBmNmvKVQksOJYDuSAE4JFIJnCysMheANaWXvrmpH6YNAhuqAAMlEkAjADMACwA7GIAbBn5AJw5ABxiYlkATGn5SnEJAGJsPmqWKekGAL4KJmYW6NZ2Dn7Orh7evkoBQTAh4egOEOqCFg3xiZ1iOfnVZcXFSWUbza3ImB2p+T19IKbmlsP2jiDj8JZQ5sp+s8HeixAkRkghipy2lDESSSWQyOSSxXye3BLTal3QKSht36jyGbDgmC8AE8xi4PuhPD5foF-mEIlFQW5wWgUvkktVyvDqvkcllodDqijzu0MZQ2dj7gMnrYXqSJugvoIfjMafMAZZlqt1vdNizKDkjjk0pk0sU6vz0kK0VcDRKHoMrPjCSSnGTEiBKdN-KqFhrZCsdNrGhDimUcrUykUxEcLWkrRcroc7VKhjQcPwvggcDRBEy3m7JlSVXNfehgdE88G0GlIQU6vkxGUEVl4yKQDWCsncVZlF73u7PdSS+qlv6tbFdagawcSvk0tUsmbDsviq30e3KEcuw6cE7iXLyW9vkPaYDNYGJwk0NVKPOF-kso3o-UdWdregb-Pt09ewf3YrlW9Yc6VHAM1kvRIbyyMMkiKNI+SSF9g1RBMP0oRdvyGX9XXlD0phPNUQKBBkwVfRIMkoOE+SyWEMmOBDoQyNdLAouFMMdAl9xww8AII0tiJBUiq1QLJKGqYoCgqaFigyQUyJQttRLo9js3TTNs1zP9PmPYtT3pQTK0nUTKjEDJSjSMosnnZj0GMm4QF6HEdzTfgICJIItIpfDdMIs8xwvZkRLFDJMmgjIym5GyQFEwoVJctyPO4-8dKAvTQPHQKclSapGJhNkyjZaE43k4V1yy9kVOw-NcN4nz+PLRkILQLLahycKihhJdlyilrqh6ABdXp7i8JB-Rsc4jFAexBEwOAvEsVRMAYBBKH7AACABeDa1oAck9HaHLuabZvm9BFuWyg-l8zbtp2881gO7p+qcOR7DINBQBwJBlGUBx3uSJQvpGhADFQYwQFkJArzOuAbCQBgZpaWRLiUbRdHdfgkBwHBc1cokVkQBQACFhFkUIAFkXAAZXx2aECRzAFAAHRAKnyHxNaAFUAEkWYUAAJOBGTiZwFAAQS8GgdAUCBRogVy5poGxmZAMXsdzNaAGFzFaNaAFEEDYSQaD5lm2bIDmef1w3jZZw7QEh6GdUwXNtcEVo-DRvRLAAYgyf2A-tiGofdQQkACQQ3Y91GdG99A-YD-2HOejA4G+uaPpAMOI4ZzO4AADxwU6VFh+HEbkS4hriF24FzzQQALouFtLhHMFzqu6FzBmAHU4BoMgsDQKEkirgv0Smiu88L4vlBb8vkcOo93dO0BG+L7Ohaj+buiG0sJ4X+u1+buHW-bl7l6npv0A3yOde3jua8z8aD9X6fj7LtvJ6GiBmGrrvJ8Pm-GGJ956VyUM-TAvd+6D1QMPIaSB840FBqAG+W9L7r3DpvO+i8b511flfEuIDP4Lwfv-F+DcgGEI-mfZ2ZDIF9wHuiYeGwa5oMAQQv+cA0GkNrhXKmNAABeiR5xDVzGQQIPx66cJ7gwmBzDaFcOwew4unDuEsLofwoR1Y5KoKUfgjBEc1FZ0wYIPBFCCGzyITQ6RAD9Hv1Pl-IaxAaBwHcJnFYXg2ChESLIBGgghpMBcKEMgniGCyEkcNOWQNAhgJABAL6UA-poCKDMIJIS2BhIiYSKJ3gYl+DhlAAkmdPFuPrvYIWESrq+iUDILw65Z7QAkUk9RPi-FKHgOnU6vi1g7yUA1GI9doA6ESKAfOfpZ44AkXkpQJJRwTKmSQ7+kyoB5yCGwX6sh-qgFmVNFxSpLD2liESSZlhZBsAQA4HQfgEFIMziEmgki4aCAgHAFpaBumCCULgvhgjhFyRFqEUGTyXlfJMQABW+hs-6aQkhKGUOcpAoxUDArgN-Vo6IPlDTGfXJAZAQl8FmpYH+Xpyn7PQFWBoxz3QAEcGCjWrmoGgpEbnIIUe8tpxiI560oedFaXs4BrQANS7QgAdDYUBQjazCeiJiOoJWaK2KCiOEKfpJNQC+G+YthBkHkAqGJGclVCwZgq7R4rJVKKBGQQJAAKecOQFB2odRyBQKRqhiAAJR+HucoNhlqbWOoDc611Hq-DwuQEilFO8hrwGgeiI4Sh3APPoGgBCoKiQZzBqAfigT5pKBpOstVoAIC-Mzvy6sGQhqKg9vXL44S6DsF1SYfQ9S1AXXtDdXazwHBipAGW+OhQ+Ri01ovPtIAfYDqSEOhyvSTAjTGhNTNIBjoZpUK2la7aACEW1O0ym7cnJQe97hUoOWPa52rdVZ1hijfwSAXmk3dBcn6mk4XYpfBAk1U45LTQdAnROi981QszrNfO48l17KyZsBSlcZ2RPnVSRdy6Z5rsoO2rat0u2yEeinQ9mBj3ktPUoHQ-cL25hsNewJd6HAPoecoZ9KhX3gJ+Voz9jHkZQMYZYJgx4hoAcLfcU9ZTwMHMg6VRe37M61t+nEOQQHm0LWQ6h9Du7MOe1ju6X9gcnFqd9onJOUbBrdCAA). - Download as SVG. - Manually edit to: (1) remove all class names, (2) change the width and height to match the view box, (3) change puffin to uv, (4) make uv bold. - Copy to create the dark-mode variant, and replace `#333333` with `#C9D1D9`.
This commit is contained in:
parent
a5cae02922
commit
01b7a27be4
5 changed files with 391 additions and 1 deletions
20
.github/workflows/build-binaries.yml
vendored
20
.github/workflows/build-binaries.yml
vendored
|
@ -43,6 +43,8 @@ jobs:
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
- name: "Prep README.md"
|
||||||
|
run: python scripts/transform_readme.py --target pypi
|
||||||
- name: "Build sdist"
|
- name: "Build sdist"
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -70,6 +72,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
architecture: x64
|
architecture: x64
|
||||||
|
- name: "Prep README.md"
|
||||||
|
run: python scripts/transform_readme.py --target pypi
|
||||||
- name: "Build wheels - x86_64"
|
- name: "Build wheels - x86_64"
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -109,6 +113,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
architecture: x64
|
architecture: x64
|
||||||
|
- name: "Prep README.md"
|
||||||
|
run: python scripts/transform_readme.py --target pypi
|
||||||
- name: "Build wheels - universal2"
|
- name: "Build wheels - universal2"
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -159,6 +165,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
architecture: ${{ matrix.platform.arch }}
|
architecture: ${{ matrix.platform.arch }}
|
||||||
|
- name: "Prep README.md"
|
||||||
|
run: python scripts/transform_readme.py --target pypi
|
||||||
- name: "Build wheels"
|
- name: "Build wheels"
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -206,6 +214,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
architecture: x64
|
architecture: x64
|
||||||
|
- name: "Prep README.md"
|
||||||
|
run: python scripts/transform_readme.py --target pypi
|
||||||
- name: "Build wheels"
|
- name: "Build wheels"
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -282,6 +292,8 @@ jobs:
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
- name: "Prep README.md"
|
||||||
|
run: python scripts/transform_readme.py --target pypi
|
||||||
- name: "Build wheels"
|
- name: "Build wheels"
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -347,6 +359,8 @@ jobs:
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
- name: "Prep README.md"
|
||||||
|
run: python scripts/transform_readme.py --target pypi
|
||||||
- name: "Build wheels"
|
- name: "Build wheels"
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -414,6 +428,8 @@ jobs:
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
- name: "Prep README.md"
|
||||||
|
run: python scripts/transform_readme.py --target pypi
|
||||||
- name: "Build wheels"
|
- name: "Build wheels"
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -484,6 +500,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
architecture: x64
|
architecture: x64
|
||||||
|
- name: "Prep README.md"
|
||||||
|
run: python scripts/transform_readme.py --target pypi
|
||||||
- name: "Build wheels"
|
- name: "Build wheels"
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -546,6 +564,8 @@ jobs:
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
- name: "Prep README.md"
|
||||||
|
run: python scripts/transform_readme.py --target pypi
|
||||||
- name: "Build wheels"
|
- name: "Build wheels"
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
|
14
README.md
14
README.md
|
@ -10,7 +10,17 @@
|
||||||
An extremely fast Python package installer and resolver, written in Rust. Designed as a drop-in
|
An extremely fast Python package installer and resolver, written in Rust. Designed as a drop-in
|
||||||
replacement for common `pip` and `pip-tools` workflows.
|
replacement for common `pip` and `pip-tools` workflows.
|
||||||
|
|
||||||
uv is backed by [Astral](https://astral.sh), the creators of [Ruff](https://github.com/astral-sh/ruff).
|
<p align="center">
|
||||||
|
<picture align="center">
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/astral-sh/uv/assets/1309177/03aa9163-1c79-4a87-a31d-7a9311ed9310">
|
||||||
|
<source media="(prefers-color-scheme: light)" srcset="https://github.com/astral-sh/uv/assets/1309177/629e59c0-9c6e-4013-9ad4-adb2bcf5080d">
|
||||||
|
<img alt="Shows a bar chart with benchmark results." src="https://github.com/astral-sh/uv/assets/1309177/629e59c0-9c6e-4013-9ad4-adb2bcf5080d">
|
||||||
|
</picture>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<i>Installing the Trio dependencies with a warm cache.</i>
|
||||||
|
</p>
|
||||||
|
|
||||||
## Highlights
|
## Highlights
|
||||||
|
|
||||||
|
@ -29,6 +39,8 @@ uv is backed by [Astral](https://astral.sh), the creators of [Ruff](https://gith
|
||||||
dependencies, direct URL dependencies, local dependencies, constraints, source distributions,
|
dependencies, direct URL dependencies, local dependencies, constraints, source distributions,
|
||||||
HTML and JSON indexes, and more.
|
HTML and JSON indexes, and more.
|
||||||
|
|
||||||
|
uv is backed by [Astral](https://astral.sh), the creators of [Ruff](https://github.com/astral-sh/ruff).
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
Install uv with our standalone installers, or from [PyPI](https://pypi.org/project/uv/):
|
Install uv with our standalone installers, or from [PyPI](https://pypi.org/project/uv/):
|
||||||
|
|
147
assets/svg/Benchmark-Dark.svg
Normal file
147
assets/svg/Benchmark-Dark.svg
Normal file
|
@ -0,0 +1,147 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="496" height="107" viewBox="0 0 469 107">
|
||||||
|
<g fill="none" stroke-miterlimit="10" transform="translate(60,0)">
|
||||||
|
<g role="graphics-object"
|
||||||
|
aria-roledescription="group mark container">
|
||||||
|
<g transform="translate(0,0)">
|
||||||
|
<path aria-hidden="true" d="M0,0h0v0h0Z"/>
|
||||||
|
<g>
|
||||||
|
<g role="graphics-object"
|
||||||
|
aria-roledescription="group mark container">
|
||||||
|
<g transform="translate(0,0)">
|
||||||
|
<path aria-hidden="true" d="M0,0h400v90h-400Z"/>
|
||||||
|
<g>
|
||||||
|
<g aria-hidden="true">
|
||||||
|
<g transform="translate(0.5,90.5)">
|
||||||
|
<path aria-hidden="true" d="M0,0h0v0h0Z"
|
||||||
|
pointer-events="none"/>
|
||||||
|
<g>
|
||||||
|
<g pointer-events="none">
|
||||||
|
<line transform="translate(0,0)" x2="0" y2="-90"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
<line transform="translate(160,0)" x2="0" y2="-90"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
<line transform="translate(320,0)" x2="0" y2="-90"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path aria-hidden="true" d="" pointer-events="none"
|
||||||
|
display="none"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g role="graphics-symbol" aria-roledescription="axis"
|
||||||
|
aria-label="X-axis for a linear scale with values from 0 to 5">
|
||||||
|
<g transform="translate(0.5,90.5)">
|
||||||
|
<path aria-hidden="true" d="M0,0h0v0h0Z"
|
||||||
|
pointer-events="none"/>
|
||||||
|
<g>
|
||||||
|
<g pointer-events="none">
|
||||||
|
<line transform="translate(0,0)" x2="0" y2="0"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
<line transform="translate(160,0)" x2="0" y2="0"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
<line transform="translate(320,0)" x2="0" y2="0"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
</g>
|
||||||
|
<g pointer-events="none">
|
||||||
|
<text text-anchor="middle" transform="translate(0,15)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#C9D1D9" opacity="1">0s
|
||||||
|
</text>
|
||||||
|
<text text-anchor="middle" transform="translate(160,15)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#C9D1D9" opacity="1">2s
|
||||||
|
</text>
|
||||||
|
<text text-anchor="middle" transform="translate(320,15)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#C9D1D9" opacity="1">4s
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path aria-hidden="true" d="" pointer-events="none"
|
||||||
|
display="none"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g role="graphics-symbol" aria-roledescription="axis"
|
||||||
|
aria-label="Y-axis for a discrete scale with 4 values: uv, poetry, pdm, pip-sync">
|
||||||
|
<g transform="translate(0.5,0.5)">
|
||||||
|
<path aria-hidden="true" d="M0,0h0v0h0Z"
|
||||||
|
pointer-events="none"/>
|
||||||
|
<g>
|
||||||
|
<g pointer-events="none">
|
||||||
|
<text text-anchor="end" transform="translate(-10,14.75)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" font-weight="bold" fill="#C9D1D9" opacity="1">uv
|
||||||
|
</text>
|
||||||
|
<text text-anchor="end" transform="translate(-10,37.25)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#C9D1D9" opacity="1">poetry
|
||||||
|
</text>
|
||||||
|
<text text-anchor="end" transform="translate(-10,59.75)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#C9D1D9" opacity="1">pdm
|
||||||
|
</text>
|
||||||
|
<text text-anchor="end" transform="translate(-10,82.25)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#C9D1D9" opacity="1">pip-sync
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path aria-hidden="true" d="" pointer-events="none"
|
||||||
|
display="none"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g role="graphics-object"
|
||||||
|
aria-roledescription="rect mark container">
|
||||||
|
<path aria-label="Sum of time: 0.0576289908; tool: uv" role="graphics-symbol"
|
||||||
|
aria-roledescription="bar" d="M0,4.75h4.610319264v13h-4.610319264Z"
|
||||||
|
fill="#6340AC"/>
|
||||||
|
<path aria-label="Sum of time: 0.9872183659; tool: poetry" role="graphics-symbol"
|
||||||
|
aria-roledescription="bar" d="M0,27.25h78.97746927200001v13h-78.97746927200001Z"
|
||||||
|
fill="#6340AC"/>
|
||||||
|
<path aria-label="Sum of time: 1.8969612492; tool: pdm" role="graphics-symbol"
|
||||||
|
aria-roledescription="bar" d="M0,49.75h151.756899936v13h-151.756899936Z"
|
||||||
|
fill="#6340AC"/>
|
||||||
|
<path aria-label="Sum of time: 4.6313483826; tool: pip-sync"
|
||||||
|
role="graphics-symbol" aria-roledescription="bar"
|
||||||
|
d="M0,72.25h370.50787060799996v13h-370.50787060799996Z" fill="#6340AC"/>
|
||||||
|
</g>
|
||||||
|
<g role="graphics-object"
|
||||||
|
aria-roledescription="text mark container">
|
||||||
|
<text aria-label="Sum of time: 0.9872183659; tool: poetry; timeFormat: 0.99s"
|
||||||
|
role="graphics-symbol" aria-roledescription="text mark" text-anchor="start"
|
||||||
|
transform="translate(84.97746927200001,37.75)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#C9D1D9">0.99s
|
||||||
|
</text>
|
||||||
|
<text aria-label="Sum of time: 1.8969612492; tool: pdm; timeFormat: 1.90s"
|
||||||
|
role="graphics-symbol" aria-roledescription="text mark" text-anchor="start"
|
||||||
|
transform="translate(157.756899936,60.25)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#C9D1D9">1.90s
|
||||||
|
</text>
|
||||||
|
<text aria-label="Sum of time: 4.6313483826; tool: pip-sync; timeFormat: 4.63s"
|
||||||
|
role="graphics-symbol" aria-roledescription="text mark" text-anchor="start"
|
||||||
|
transform="translate(376.50787060799996,82.75)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#C9D1D9">4.63s
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
<g role="graphics-object"
|
||||||
|
aria-roledescription="text mark container">
|
||||||
|
<text aria-label="Sum of time: 0.0576289908; tool: uv; timeFormat: 0.06s"
|
||||||
|
role="graphics-symbol" aria-roledescription="text mark" text-anchor="start"
|
||||||
|
transform="translate(10.610319264000001,15.25)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" font-weight="bold" fill="#C9D1D9">0.06s
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path aria-hidden="true" d="" display="none"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path aria-hidden="true" d="" display="none"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 9.2 KiB |
147
assets/svg/Benchmark-Light.svg
Normal file
147
assets/svg/Benchmark-Light.svg
Normal file
|
@ -0,0 +1,147 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="496" height="107" viewBox="0 0 469 107">
|
||||||
|
<g fill="none" stroke-miterlimit="10" transform="translate(60,0)">
|
||||||
|
<g role="graphics-object"
|
||||||
|
aria-roledescription="group mark container">
|
||||||
|
<g transform="translate(0,0)">
|
||||||
|
<path aria-hidden="true" d="M0,0h0v0h0Z"/>
|
||||||
|
<g>
|
||||||
|
<g role="graphics-object"
|
||||||
|
aria-roledescription="group mark container">
|
||||||
|
<g transform="translate(0,0)">
|
||||||
|
<path aria-hidden="true" d="M0,0h400v90h-400Z"/>
|
||||||
|
<g>
|
||||||
|
<g aria-hidden="true">
|
||||||
|
<g transform="translate(0.5,90.5)">
|
||||||
|
<path aria-hidden="true" d="M0,0h0v0h0Z"
|
||||||
|
pointer-events="none"/>
|
||||||
|
<g>
|
||||||
|
<g pointer-events="none">
|
||||||
|
<line transform="translate(0,0)" x2="0" y2="-90"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
<line transform="translate(160,0)" x2="0" y2="-90"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
<line transform="translate(320,0)" x2="0" y2="-90"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path aria-hidden="true" d="" pointer-events="none"
|
||||||
|
display="none"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g role="graphics-symbol" aria-roledescription="axis"
|
||||||
|
aria-label="X-axis for a linear scale with values from 0 to 5">
|
||||||
|
<g transform="translate(0.5,90.5)">
|
||||||
|
<path aria-hidden="true" d="M0,0h0v0h0Z"
|
||||||
|
pointer-events="none"/>
|
||||||
|
<g>
|
||||||
|
<g pointer-events="none">
|
||||||
|
<line transform="translate(0,0)" x2="0" y2="0"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
<line transform="translate(160,0)" x2="0" y2="0"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
<line transform="translate(320,0)" x2="0" y2="0"
|
||||||
|
stroke="rgba(127,127,127,0.25)" stroke-width="1" opacity="1"/>
|
||||||
|
</g>
|
||||||
|
<g pointer-events="none">
|
||||||
|
<text text-anchor="middle" transform="translate(0,15)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#333333" opacity="1">0s
|
||||||
|
</text>
|
||||||
|
<text text-anchor="middle" transform="translate(160,15)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#333333" opacity="1">2s
|
||||||
|
</text>
|
||||||
|
<text text-anchor="middle" transform="translate(320,15)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#333333" opacity="1">4s
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path aria-hidden="true" d="" pointer-events="none"
|
||||||
|
display="none"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g role="graphics-symbol" aria-roledescription="axis"
|
||||||
|
aria-label="Y-axis for a discrete scale with 4 values: uv, poetry, pdm, pip-sync">
|
||||||
|
<g transform="translate(0.5,0.5)">
|
||||||
|
<path aria-hidden="true" d="M0,0h0v0h0Z"
|
||||||
|
pointer-events="none"/>
|
||||||
|
<g>
|
||||||
|
<g pointer-events="none">
|
||||||
|
<text text-anchor="end" transform="translate(-10,14.75)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" font-weight="bold" fill="#333333" opacity="1">uv
|
||||||
|
</text>
|
||||||
|
<text text-anchor="end" transform="translate(-10,37.25)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#333333" opacity="1">poetry
|
||||||
|
</text>
|
||||||
|
<text text-anchor="end" transform="translate(-10,59.75)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#333333" opacity="1">pdm
|
||||||
|
</text>
|
||||||
|
<text text-anchor="end" transform="translate(-10,82.25)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#333333" opacity="1">pip-sync
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path aria-hidden="true" d="" pointer-events="none"
|
||||||
|
display="none"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g role="graphics-object"
|
||||||
|
aria-roledescription="rect mark container">
|
||||||
|
<path aria-label="Sum of time: 0.0576289908; tool: uv" role="graphics-symbol"
|
||||||
|
aria-roledescription="bar" d="M0,4.75h4.610319264v13h-4.610319264Z"
|
||||||
|
fill="#6340AC"/>
|
||||||
|
<path aria-label="Sum of time: 0.9872183659; tool: poetry" role="graphics-symbol"
|
||||||
|
aria-roledescription="bar" d="M0,27.25h78.97746927200001v13h-78.97746927200001Z"
|
||||||
|
fill="#6340AC"/>
|
||||||
|
<path aria-label="Sum of time: 1.8969612492; tool: pdm" role="graphics-symbol"
|
||||||
|
aria-roledescription="bar" d="M0,49.75h151.756899936v13h-151.756899936Z"
|
||||||
|
fill="#6340AC"/>
|
||||||
|
<path aria-label="Sum of time: 4.6313483826; tool: pip-sync"
|
||||||
|
role="graphics-symbol" aria-roledescription="bar"
|
||||||
|
d="M0,72.25h370.50787060799996v13h-370.50787060799996Z" fill="#6340AC"/>
|
||||||
|
</g>
|
||||||
|
<g role="graphics-object"
|
||||||
|
aria-roledescription="text mark container">
|
||||||
|
<text aria-label="Sum of time: 0.9872183659; tool: poetry; timeFormat: 0.99s"
|
||||||
|
role="graphics-symbol" aria-roledescription="text mark" text-anchor="start"
|
||||||
|
transform="translate(84.97746927200001,37.75)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#333333">0.99s
|
||||||
|
</text>
|
||||||
|
<text aria-label="Sum of time: 1.8969612492; tool: pdm; timeFormat: 1.90s"
|
||||||
|
role="graphics-symbol" aria-roledescription="text mark" text-anchor="start"
|
||||||
|
transform="translate(157.756899936,60.25)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#333333">1.90s
|
||||||
|
</text>
|
||||||
|
<text aria-label="Sum of time: 4.6313483826; tool: pip-sync; timeFormat: 4.63s"
|
||||||
|
role="graphics-symbol" aria-roledescription="text mark" text-anchor="start"
|
||||||
|
transform="translate(376.50787060799996,82.75)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" fill="#333333">4.63s
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
<g role="graphics-object"
|
||||||
|
aria-roledescription="text mark container">
|
||||||
|
<text aria-label="Sum of time: 0.0576289908; tool: uv; timeFormat: 0.06s"
|
||||||
|
role="graphics-symbol" aria-roledescription="text mark" text-anchor="start"
|
||||||
|
transform="translate(10.610319264000001,15.25)"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji""
|
||||||
|
font-size="12px" font-weight="bold" fill="#333333">0.06s
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path aria-hidden="true" d="" display="none"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path aria-hidden="true" d="" display="none"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 9.2 KiB |
64
scripts/transform_readme.py
Normal file
64
scripts/transform_readme.py
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
"""Transform the README.md to support a specific deployment target.
|
||||||
|
|
||||||
|
By default, we assume that our README.md will be rendered on GitHub. However, different
|
||||||
|
targets have different strategies for rendering light- and dark-mode images. This script
|
||||||
|
adjusts the images in the README.md to support the given target.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
URL = "https://github.com/astral-sh/uv/assets/1309177/{}"
|
||||||
|
URL_LIGHT = URL.format("629e59c0-9c6e-4013-9ad4-adb2bcf5080d")
|
||||||
|
URL_DARK = URL.format("03aa9163-1c79-4a87-a31d-7a9311ed9310")
|
||||||
|
|
||||||
|
# https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#specifying-the-theme-an-image-is-shown-to
|
||||||
|
GITHUB = f"""
|
||||||
|
<p align="center">
|
||||||
|
<picture align="center">
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="{URL_DARK}">
|
||||||
|
<source media="(prefers-color-scheme: light)" srcset="{URL_LIGHT}">
|
||||||
|
<img alt="Shows a bar chart with benchmark results." src="{URL_LIGHT}">
|
||||||
|
</picture>
|
||||||
|
</p>
|
||||||
|
"""
|
||||||
|
|
||||||
|
# https://github.com/pypi/warehouse/issues/11251
|
||||||
|
PYPI = f"""
|
||||||
|
<p align="center">
|
||||||
|
<img alt="Shows a bar chart with benchmark results." src="{URL_LIGHT}">
|
||||||
|
</p>
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
def main(target: str) -> None:
|
||||||
|
"""Modify the README.md to support the given target."""
|
||||||
|
with Path("README.md").open(encoding="utf8") as fp:
|
||||||
|
content = fp.read()
|
||||||
|
if GITHUB not in content:
|
||||||
|
msg = "README.md is not in the expected format."
|
||||||
|
raise ValueError(msg)
|
||||||
|
|
||||||
|
if target == "pypi":
|
||||||
|
with Path("README.md").open("w", encoding="utf8") as fp:
|
||||||
|
fp.write(content.replace(GITHUB, PYPI))
|
||||||
|
else:
|
||||||
|
msg = f"Unknown target: {target}"
|
||||||
|
raise ValueError(msg)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
description="Modify the README.md to support a specific deployment target.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--target",
|
||||||
|
type=str,
|
||||||
|
required=True,
|
||||||
|
choices=("pypi", "mkdocs"),
|
||||||
|
)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
main(target=args.target)
|
Loading…
Add table
Add a link
Reference in a new issue