mirror of
https://github.com/macaodha/batdetect2.git
synced 2025-06-29 14:41:58 +02:00
Merge pull request #33 from macaodha/feat/migrate-to-uv
Feat/migrate to uv
This commit is contained in:
commit
cb088359ae
21
.github/workflows/python-package.yml
vendored
21
.github/workflows/python-package.yml
vendored
@ -19,16 +19,15 @@ jobs:
|
|||||||
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Install uv
|
||||||
uses: actions/setup-python@v3
|
uses: astral-sh/setup-uv@v3
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
enable-cache: true
|
||||||
- name: Install dependencies
|
cache-dependency-glob: "uv.lock"
|
||||||
run: |
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
python -m pip install --upgrade pip
|
run: uv python install ${{ matrix.python-version }}
|
||||||
python -m pip install pytest
|
- name: Install the project
|
||||||
pip install .
|
run: uv sync --all-extras --dev
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: uv run pytest
|
||||||
pytest
|
|
||||||
|
2
.github/workflows/python-publish.yml
vendored
2
.github/workflows/python-publish.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
|
@ -1,28 +1,22 @@
|
|||||||
[tool.pdm]
|
|
||||||
[tool.pdm.dev-dependencies]
|
|
||||||
dev = [
|
|
||||||
"pytest>=7.2.2",
|
|
||||||
]
|
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "batdetect2"
|
name = "batdetect2"
|
||||||
version = "1.0.8"
|
version = "1.0.8"
|
||||||
description = "Deep learning model for detecting and classifying bat echolocation calls in high frequency audio recordings."
|
description = "Deep learning model for detecting and classifying bat echolocation calls in high frequency audio recordings."
|
||||||
authors = [
|
authors = [
|
||||||
{ "name" = "Oisin Mac Aodha", "email" = "oisin.macaodha@ed.ac.uk" },
|
{ "name" = "Oisin Mac Aodha", "email" = "oisin.macaodha@ed.ac.uk" },
|
||||||
{ "name" = "Santiago Martinez Balvanera", "email" = "santiago.balvanera.20@ucl.ac.uk" }
|
{ "name" = "Santiago Martinez Balvanera", "email" = "santiago.balvanera.20@ucl.ac.uk" },
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"click>=8.1.7",
|
||||||
"librosa>=0.10.1",
|
"librosa>=0.10.1",
|
||||||
"matplotlib>=3.7.1",
|
"matplotlib>=3.7.1",
|
||||||
"numpy>=1.23.5,<2",
|
"numpy>=1.23.5,<2",
|
||||||
"pandas>=1.5.3",
|
"pandas>=1.5.3",
|
||||||
"scikit-learn>=1.2.2",
|
"scikit-learn>=1.2.2",
|
||||||
"scipy>=1.10.1",
|
"scipy>=1.10.1",
|
||||||
"torch>=1.13.1",
|
"torch>=1.13.1,<2.5.0",
|
||||||
"torchaudio",
|
"torchaudio>=1.13.1,<2.5.0",
|
||||||
"torchvision",
|
"torchvision>=0.14.0",
|
||||||
"click>=8.1.7",
|
|
||||||
]
|
]
|
||||||
requires-python = ">=3.8,<3.12"
|
requires-python = ">=3.8,<3.12"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
@ -49,34 +43,36 @@ keywords = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["pdm-pep517>=1.0.0"]
|
requires = ["hatchling"]
|
||||||
build-backend = "pdm.pep517.api"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
batdetect2 = "batdetect2.cli:cli"
|
batdetect2 = "batdetect2.cli:cli"
|
||||||
|
|
||||||
[tool.black]
|
[tool.uv]
|
||||||
line-length = 79
|
dev-dependencies = [
|
||||||
|
"pyright>=1.1.388",
|
||||||
[[tool.mypy.overrides]]
|
"pytest>=7.2.2",
|
||||||
module = [
|
"ruff>=0.7.3",
|
||||||
"librosa",
|
|
||||||
"pandas",
|
|
||||||
]
|
]
|
||||||
ignore_missing_imports = true
|
|
||||||
|
|
||||||
[tool.pylsp-mypy]
|
[tool.ruff]
|
||||||
enabled = false
|
line-length = 79
|
||||||
live_mode = true
|
target-version = "py38"
|
||||||
strict = true
|
|
||||||
|
|
||||||
[tool.pydocstyle]
|
[tool.ruff.format]
|
||||||
|
docstring-code-format = true
|
||||||
|
docstring-code-line-length = 79
|
||||||
|
|
||||||
|
[tool.ruff.lint]
|
||||||
|
select = ["E4", "E7", "E9", "F", "B", "Q", "I"]
|
||||||
|
|
||||||
|
[tool.ruff.lint.pydocstyle]
|
||||||
convention = "numpy"
|
convention = "numpy"
|
||||||
|
|
||||||
[tool.pyright]
|
[tool.pyright]
|
||||||
include = [
|
include = ["batdetect2", "tests"]
|
||||||
"bat_detect",
|
|
||||||
"tests",
|
|
||||||
]
|
|
||||||
venvPath = "."
|
venvPath = "."
|
||||||
venv = ".venv"
|
venv = ".venv"
|
||||||
|
pythonVersion = "3.8"
|
||||||
|
pythonPlatform = "All"
|
||||||
|
Loading…
Reference in New Issue
Block a user