Skip to content

Commit 44d2f31

Browse files
authored
Merge pull request #31 from mbsantiago/fix/pip_installation
Fix/pip installation
2 parents 0b75152 + 550d77b commit 44d2f31

File tree

7 files changed

+566
-302
lines changed

7 files changed

+566
-302
lines changed

.github/workflows/publish.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
runs-on: ubuntu-latest
1717
needs: [build-user-guide, build-frontend]
1818
steps:
19-
- uses: actions/checkout@v4
19+
- name: Checkout source code
20+
uses: actions/checkout@v4
2021

21-
- uses: actions/setup-python@v5
22-
with:
23-
python-version: "3.12"
22+
- name: Install Hatch
23+
uses: pypa/hatch@install
2424

2525
- name: Retrieve built frontend
2626
uses: actions/download-artifact@v4
@@ -34,13 +34,10 @@ jobs:
3434
name: user_guide
3535
path: back/src/whombat/user_guide/
3636

37-
- name: Install pypa/build
38-
run: pip install build
39-
4037
- name: Build a binary wheel and source tarball
4138
run: |
4239
cd back
43-
python -m build
40+
hatch build
4441
4542
- name: Store the distribution packages
4643
uses: actions/upload-artifact@v4

back/MANIFEST.in

-11
This file was deleted.

back/guide_requirements.txt

-3
This file was deleted.

back/pyproject.toml

+19-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies = [
1818
"bcrypt==4.0.1",
1919
"colorama>=0.4.6",
2020
]
21-
requires-python = "~=3.12"
21+
requires-python = ">=3.11"
2222
readme = "README.md"
2323
keywords = ["audio", "annotation", "tool", "bioacoustics", "machine learning"]
2424
license = { file = "LICENSE" }
@@ -29,15 +29,31 @@ Documentation = "https://mbsantiago.github.io/whombat/"
2929
"Isue Tracker" = "https://github.com/mbsantiago/whombat/issues"
3030
Releases = "https://github.com/mbsantiago/whombat/releases"
3131

32+
[project.scripts]
33+
whombat = "whombat.__main__:main"
34+
3235
[project.optional-dependencies]
3336
postgre = ["asyncpg>=0.29.0", "psycopg2-binary>=2.9.9"]
3437

3538
[build-system]
3639
requires = ["hatchling"]
3740
build-backend = "hatchling.build"
3841

42+
[tool.hatch.build.targets.sdist]
43+
ignore-vcs = true
44+
include = [
45+
"src/whombat/*.py",
46+
"src/whombat/migrations/",
47+
"src/whombat/statics/",
48+
"src/whombat/user_guide/",
49+
]
50+
3951
[tool.hatch.build.targets.wheel]
40-
artifacts = ["src/whombat/migrations/versions/", "src/whombat/statics/"]
52+
artifacts = [
53+
"src/whombat/migrations/",
54+
"src/whombat/statics/",
55+
"src/whombat/user_guide/",
56+
]
4157

4258
[tool.uv]
4359
dev-dependencies = [
@@ -67,7 +83,7 @@ convention = "numpy"
6783

6884
[tool.ruff]
6985
line-length = 79
70-
target-version = "py311"
86+
target-version = "py312"
7187

7288
[tool.ruff.format]
7389
docstring-code-format = true

back/requirements.txt

-13
This file was deleted.

back/src/whombat/__main__.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
from whombat.system import get_logging_config, get_settings
99

10-
if __name__ == "__main__":
10+
11+
def main():
1112
settings = get_settings()
1213
config = get_logging_config(settings)
1314
uvicorn.run(
@@ -18,3 +19,7 @@
1819
reload=settings.dev,
1920
log_config=config,
2021
)
22+
23+
24+
if __name__ == "__main__":
25+
main()

back/uv.lock

+536-263
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)