Skip to content
Merged
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
34 changes: 12 additions & 22 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,18 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Rye
uses: eifinger/setup-rye@v2
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Sync with Rye
run: rye sync
- name: Install dependencies
run: uv sync --all-extras --dev --python ${{ matrix.python-version }}
- name: Run Ruff check
run: rye run ruff check src
run: uv run ruff check src
- name: Run Ruff format
run: rye run ruff format --check src
run: uv run ruff format --check src
- name: Run Mypy
run: rye run mypy src
run: uv run mypy src
test:
runs-on: ubuntu-latest
strategy:
Expand All @@ -56,21 +51,16 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Rye
uses: eifinger/setup-rye@v2
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Sync with Rye
run: rye sync
- name: Install dependencies
run: uv sync --all-extras --dev --python ${{ matrix.python-version }}
- name: Run pytest
run: |
set -o pipefail
rye run pytest --junitxml=pytest.xml --cov-report=term-missing --cov=src tests/ | tee pytest-coverage.txt
uv run pytest --junitxml=pytest.xml --cov-report=term-missing --cov=src tests/ | tee pytest-coverage.txt
- name: Comment coverage report in PR
uses: MishaKav/pytest-coverage-comment@v1.1.51
with:
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- [Using Field Names](#using-field-names)
- [Saving Your Work](#saving-your-work)
- [Contributing](#contributing)
- [Using Rye (Recommended)](#using-rye-recommended)
- [Using uv (Recommended)](#using-uv-recommended)
- [Using pip](#using-pip)
- [License](#license)

Expand Down Expand Up @@ -220,13 +220,16 @@ pc.save("nice_point_cloud.pcd")
We are always looking for contributors. If you are interested in contributing,
please run the lint and test before submitting a pull request:

### Using Rye (Recommended)
### Using uv (Recommended)

Just run the following command:
Just run the following commands:

```bash
rye sync
rye run lint
uv sync
uv run ruff check --fix src
uv run ruff format src
uv run mypy src
uv run tox
```

### Using pip
Expand Down
25 changes: 4 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies = [
"python-neo-lzf>=0.3.5",
]
readme = "README.md"
requires-python = ">= 3.8.2"
requires-python = ">= 3.8"
license = { file = "LICENSE.txt" }
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -34,17 +34,12 @@ urls."Release Notes" = "https://github.com/MapIV/pypcd4/releases"
urls.Source = "https://github.com/MapIV/pypcd4"
urls.Tracker = "https://github.com/MapIV/pypcd4/issues"

[project.optional-dependencies]
dev = ["ruff", "mypy", "setuptools-scm"]

[build-system]
# pinned hatchling version because https://github.com/astral-sh/rye/issues/1446
requires = ["hatchling==1.26.3", "hatch-vcs"]
requires = ["hatchling>=1.27", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.rye]
managed = true
dev-dependencies = [
[dependency-groups]
dev = [
"mypy>=1.5.1",
"setuptools-scm>=7.1.0",
"pre-commit>=3.4.0",
Expand All @@ -54,18 +49,6 @@ dev-dependencies = [
"ruff>=0.3.4",
]

[tool.rye.scripts]
lint = { chain = [
"lint:ruff-lint",
"lint:ruff-format",
"lint:mypy",
"lint:tox",
] }
"lint:ruff-lint" = "ruff check --fix src"
"lint:ruff-format" = "ruff format src"
"lint:mypy" = "mypy src"
"lint:tox" = "tox"

[tool.hatch.metadata]
allow-direct-references = true

Expand Down
77 changes: 0 additions & 77 deletions requirements-dev.lock

This file was deleted.

25 changes: 0 additions & 25 deletions requirements.lock

This file was deleted.

Loading
Loading