Skip to content

Commit

Permalink
Added dev dependencies and updated github actions to use uv
Browse files Browse the repository at this point in the history
  • Loading branch information
mbsantiago committed Nov 10, 2024
2 parents c65fe1c + d05bec8 commit 1c1fbd8
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 17 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
pip install .
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Test with pytest
run: |
pytest
run: uv run pytest
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
Expand Down
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = [
dependencies = [
"librosa>=0.10.1",
"matplotlib>=3.7.1",
"numpy>=1.23.5",
"numpy>=1.23.5,<2",
"pandas>=1.5.3",
"scikit-learn>=1.2.2",
"scipy>=1.10.1",
Expand Down Expand Up @@ -51,7 +51,11 @@ build-backend = "hatchling.build"
batdetect2 = "batdetect2.cli:cli"

[tool.uv]
dev-dependencies = ["pytest>=7.2.2"]
dev-dependencies = [
"pyright>=1.1.388",
"pytest>=7.2.2",
"ruff>=0.7.3",
]

[tool.ruff]
line-length = 79
Expand All @@ -69,7 +73,7 @@ ignore = ["D1"]
convention = "numpy"

[tool.pyright]
include = ["bat_detect", "tests"]
include = ["batdetect2", "tests"]
venvPath = "."
venv = ".venv"
pythonVersion = "3.9"
Expand Down
57 changes: 55 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1c1fbd8

Please # to comment.