-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use pyproject.toml and uv tool
This commit removes the existing way of building and publishing the CLI. We will now use pyproject.toml instead of setup.py and uv from astral.sh for all tooling. Fixes AB#18145
- Loading branch information
1 parent
f6bd3e8
commit e5ac892
Showing
18 changed files
with
1,424 additions
and
1,742 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,9 @@ on: | |
jobs: | ||
verify: | ||
name: Conventional Commits | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
name: Checkout code | ||
|
||
- uses: rapyuta-robotics/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: ✅ Quality Checks | ||
on: [ push ] | ||
|
||
jobs: | ||
code-quality-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run checks | ||
uses: astral-sh/ruff-action@v1 | ||
with: | ||
args: "check" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,38 @@ | ||
# Contribution Guidelines | ||
## Setup your development environment | ||
|
||
The project uses [pipenv](https://pipenv.pypa.io/en/latest/) for | ||
development. It needs to be installed to setup the development environment. | ||
The project uses [uv](https://docs.astral.sh/uv/) for development. | ||
It needs to be installed to set up the development environment. | ||
|
||
``` bash | ||
pip install pipenv | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
``` | ||
|
||
Once Pipenv is installed, a Python virtual environment can be quickly | ||
Once `uv` is installed, a Python virtual environment can be quickly | ||
bootstrapped by running the following commands in the root of the repository. | ||
|
||
``` bash | ||
pipenv install --dev | ||
uv venv | ||
source .venv/bin/activate | ||
``` | ||
|
||
This will create a virtual environment in the pipenv's preconfigured location | ||
(if one doesn't already exist). It will also install all the dependencies and | ||
`riocli` package in the location. | ||
This will create a virtual environment in `.venv` directory and activate it. | ||
|
||
To run the CLI (or any command) under the context of Pipenv's virtual | ||
environment, prepend the commands with `pipenv run` | ||
|
||
Next, install all dependencies using the following command | ||
```bash | ||
pipenv run rio | ||
uv sync | ||
``` | ||
|
||
To run the RIO CLI from the source directly, you can use `riocli` module | ||
directly. | ||
|
||
``` bash | ||
pipenv run python -m riocli | ||
To run the CLI (or any command) under the context of the virtual | ||
environment, prepend the commands with `uv run` | ||
```bash | ||
uv run rio --help | ||
``` | ||
|
||
New dependencies can be installed directly using `pipenv`. This modifies the | ||
`Pipfile` and `Pipfile.lock`. | ||
New dependencies can be installed directly using `uv`. This modifies the | ||
`pyproject.toml` and `uv.lock`. | ||
|
||
``` bash | ||
pipenv install {dependency} | ||
``` | ||
|
||
But using the `pipenv` directly doesn't sync the dependencies in the | ||
`setup.py` file. Please make sure you update the `setup.py` file with | ||
the new dependencies in the `install_requires` section. | ||
uv add <package-name> | ||
``` |
Oops, something went wrong.