Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
pip==23.2.1
nox==2023.4.22
nox-poetry==1.0.3
poetry==1.6.1
virtualenv==20.22.0
nox==2025.11.12
nox-uv==0.6.3
uv==0.9.15
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
pip install --constraint=.github/workflows/constraints.txt pip
pip --version

- name: Install Poetry
- name: Install uv
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
poetry --version
pip install --constraint=.github/workflows/constraints.txt uv
uv --version

- name: Check if there is a parent commit
id: check-parent-commit
Expand All @@ -43,18 +43,18 @@ jobs:
uses: salsify/action-detect-and-tag-new-version@v2.0.3
with:
version-command: |
bash -o pipefail -c "poetry version | awk '{ print \$2 }'"
bash -o pipefail -c "uv version | awk '{ print \$2 }'"

- name: Bump version for developmental release
if: "! steps.check-version.outputs.tag"
run: |
poetry version patch &&
version=$(poetry version | awk '{ print $2 }') &&
poetry version $version.dev.$(date +%s)
uv version patch &&
version=$(uv version | awk '{ print $2 }') &&
uv version $version.dev.$(date +%s)

- name: Build package
run: |
poetry build --ansi
uv build --ansi

- name: Publish package on PyPI
if: steps.check-version.outputs.tag
Expand Down
43 changes: 5 additions & 38 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.1
- run: pipx run ruff check --output-format=github --target-version=py310
- uses: astral-sh/ruff-action@v3

tests:
name: ${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }}
Expand Down Expand Up @@ -45,30 +45,9 @@ jobs:
python-version: ${{ matrix.python }}
python-version-file: pyproject.toml

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version

- name: Upgrade pip in virtual environments
shell: python
run: |
import os
import pip

with open(os.environ["GITHUB_ENV"], mode="a") as io:
print(f"VIRTUALENV_PIP={pip.__version__}", file=io)

- name: Install Poetry
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
poetry --version
- uses: astral-sh/setup-uv@v7

- name: Install Nox
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
nox --version
- run: uv tool install --with=nox-uv nox

- name: Compute pre-commit cache key
if: matrix.session == 'pre-commit'
Expand Down Expand Up @@ -125,21 +104,9 @@ jobs:
python-version: "3.11"
python-version-file: pyproject.toml

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version

- name: Install Poetry
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
poetry --version
- uses: astral-sh/setup-uv@v7

- name: Install Nox
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
nox --version
- run: uv tool install --with=nox-uv nox

- name: Download coverage data
uses: actions/download-artifact@v6
Expand Down
25 changes: 12 additions & 13 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,41 +45,40 @@ How to set up your development environment

First of all, clone the *Parasect* repository.

Then, you need Python 3.8+ and the following tools:
Then, you need Python 3.10+ and the following tools:

- Poetry_
- uv_
- Nox_
- nox-poetry_
- nox-uv_

Install Poetry_ by downloading and running the following script:
Install uv_ by downloading and running the following script:

.. code:: console

$ curl -sSL https://install.python-poetry.org | python3 -
$ curl -LsSf https://astral.sh/uv/install.sh | sh


Install Nox_ and nox-poetry_:
Install Nox_ and nox-uv_:

.. code:: console

$ pipx install nox
$ pipx inject nox nox-poetry
$ uv tool install --with=nox-uv nox

Navigate into the location where you cloned *Parasect* and install the package with development requirements:

.. code:: console

$ poetry install
$ uv install

You can now run an interactive Poetry shell, giving you access to the virtual environment.
You can now run an interactive uv shell, giving you access to the virtual environment.

.. code:: console

$ poetry shell
$ uv shell

.. _Poetry: https://python-poetry.org/
.. _uv: https://docs.astral.sh/uv/
.. _Nox: https://nox.thea.codes/
.. _nox-poetry: https://nox-poetry.readthedocs.io/
.. _nox-uv: https://github.com/dantebben/nox-uv/


How to test the project
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ List of currently supported autopilots:
Requirements
------------

*Parasect* is a pure-Python project. Its requirements are managed by the Poetry_ dependency manager.
*Parasect* is a pure-Python project. Its requirements are managed by the uv_ dependency manager.
When you install *Parasect* via pip_ its requirements will also be installed automatically.

Currently *Parasect* has been tested:
Expand Down Expand Up @@ -155,7 +155,7 @@ The project logo was created by `Cynthia de Vries <Cynthia_>`_.
.. _Concepts: https://parasect.readthedocs.io/en/latest/concepts.html
.. _PX4: https://px4.io/
.. _Ardupilot: https://ardupilot.org/
.. _Poetry: https://python-poetry.org/
.. _uv: https://docs.astral.sh/uv/
.. _Avy: https://avy.eu
.. github-only
.. _Contributor Guide: CONTRIBUTING.rst
18 changes: 10 additions & 8 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
import nox

try:
from nox_poetry import Session
from nox_poetry import session
except ImportError:
from nox import Session
from nox_uv import session
except ImportError as e:
message = f"""\
Nox failed to import the 'nox-poetry' package.
Nox failed to import the 'nox-uv' package.

Please install it using the following command:

{sys.executable} -m pip install nox-poetry"""
{sys.executable} -m pip install nox-uv

{e}"""
raise SystemExit(dedent(message)) from None


Expand Down Expand Up @@ -110,7 +112,7 @@ def precommit(session: Session) -> None:
@session(python="3.11")
def safety(session: Session) -> None:
"""Scan dependencies for insecure packages."""
requirements = session.poetry.export_requirements()
requirements = session.export_requirements()
session.install("safety")
session.run("safety", "check", "--full-report", f"--file={requirements}")

Expand All @@ -132,7 +134,7 @@ def tests(session: Session) -> None:
session.install(".")
session.install("coverage[toml]", "pytest", "pygments")
try:
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
session.run("coverage", "run", "--parallel", "-m", "pytest", "-vvv", *session.posargs)
finally:
if session.interactive:
session.notify("coverage", posargs=[])
Expand All @@ -156,7 +158,7 @@ def typeguard(session: Session) -> None:
"""Runtime type checking using Typeguard."""
session.install(".")
session.install("pytest", "typeguard", "pygments")
session.run("pytest", f"--typeguard-packages={package}", *session.posargs)
session.run("pytest", "-vvv", f"--typeguard-packages={package}", *session.posargs)


@session(python=python_versions)
Expand Down
Loading
Loading