Code Monkey home page Code Monkey logo

setup-uv's Introduction

setup-uv

Build Status

This action sets up a uv for use in actions by installing a version of UV and adding to PATH. The action will fail if no matching versions are found.

This action supports versions of:

  • Python >=3.8
  • uv >=0.1.2

Usage

Install latest available version of UV

steps:
  - uses: actions/checkout@v3
  - uses: actions/setup-python@v4
    with:
      python-version: "3.11"
  - uses: yezz123/setup-uv@v4
  - run: uv --version

Exact version of UV to install, using SemVer's version syntax

steps:
  - uses: actions/checkout@v3
  - uses: actions/setup-python@v4
    with:
      python-version: "3.11"
  - uses: yezz123/setup-uv@v4
    with:
      uv-version: "0.1.12"
  - run: uv --version

Create and activate a virtual environment using uv

steps:
  - uses: actions/checkout@v3
  - uses: actions/setup-python@v4
    with:
      python-version: "3.11"
  - uses: yezz123/setup-uv@v4
    with:
      uv-venv: "your_venv_name"
  - run: uv pip install black # this command will run in the uv environment

Contributing

Create issues

You can create a new issue in the GitHub repository, for example to:

  • Ask a question or ask about a problem.
  • Suggest a new feature.

Note: if you create an issue, then I'm going to ask you to also help others. ๐Ÿ˜‰

Create a Pull Request

You can contribute to the source code with Pull Requests, for example:

  • To fix a typo you found on the documentation.
  • To propose new documentation sections.
  • To fix an existing issue/bug.
  • To add a new feature.

License ๐Ÿ“„

This project is licensed under the terms of the MIT License.

setup-uv's People

Contributors

aymane11 avatar coderjoshdk avatar dependabot[bot] avatar yezz123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mz0in

setup-uv's Issues

๐Ÿ› fix uv version implementation

currently, if we try to install a specific version of uv we implement it like this:

steps:
  - uses: actions/checkout@v3
  - uses: actions/setup-python@v4
    with:
      python-version: "3.11"
  - uses: yezz123/setup-uv@v1
    with:
      uv-version: "0.1.5"
  - run: uv --version

but as I noticed it installed the default version which is the latest one, i should investigate this here:

https://github.com/yezz123/setup-uv/blob/main/src/inputs.ts#L27-L44

Screenshot

Check here: https://github.com/yezz123/authx/actions/runs/7990744469/job/21820221268?pr=546

Support for auto-updating the uv version

Hey ๐Ÿ‘‹๐Ÿผ

Thanks for your work on this project! Integrating it into some of our repositories over at https://github.com/cda-tum was pretty smooth sailing and works nicely. Consider this issue more a request for comment or a suggestion and not as an issue per se.

Right now, the action will (rightfully, imo) emit a warning when not specifying an explicit version of uv to use.
However, not specifying a version generally lowers the maintenance overhead as one keeps automatically getting new versions.
If I would specify a version explicitly (maybe even using SemVer to permit patch version updates), I would have to manually check for new versions continuously and update them in all projects that use this action.
Given that the version is specified as an option to the action, this is cannot be simply updated by dependabot and I am not really aware of any other solutions for automating that particular setting. (that might just be my ignorance, though ๐Ÿ˜…)

Over at nox (and probably many others, such as cibulidwheel) this is solved by versioning the action with the same version as the tool the action provides. For convenience, some of those repositories provide additional (moving) tags for their actions that would, e.g., allow for action versions such as @2.5, which would correspond to ~2.5.0 in SemVer or @2, which would correspond to ~2.0.
This kind of versioning policy of the action allows for using dependabot to get automatic updates through CI, while still giving the user the option to decide which granularity of SemVer they want to go for.

Would you consider something like that? Feel free to close this issue if you feel that this is totally out of scope for this action here ๐Ÿ˜Œ
(Technically, one could directly bring this up to the folks at @astral-sh and ask if they would be willing to set something like that up.)

automate the setup of the virtual environment

steps:
  - uses: actions/checkout@v3
  - uses: actions/setup-python@v4
    with:
      python-version: "3.11"
  - uses: yezz123/setup-uv@v1
    with:
      uv-version: "0.1.2"
      uv-venv: ".venv"
  - run: uv --version

something like this to automate the setup of virtual environment

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.