Skip to content

Commit

Permalink
Merge pull request #31 from mbsantiago/fix/pip_installation
Browse files Browse the repository at this point in the history
Fix/pip installation
  • Loading branch information
mbsantiago authored Sep 28, 2024
2 parents 0b75152 + 550d77b commit 44d2f31
Show file tree
Hide file tree
Showing 7 changed files with 566 additions and 302 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-latest
needs: [build-user-guide, build-frontend]
steps:
- uses: actions/checkout@v4
- name: Checkout source code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Hatch
uses: pypa/hatch@install

- name: Retrieve built frontend
uses: actions/download-artifact@v4
Expand All @@ -34,13 +34,10 @@ jobs:
name: user_guide
path: back/src/whombat/user_guide/

- name: Install pypa/build
run: pip install build

- name: Build a binary wheel and source tarball
run: |
cd back
python -m build
hatch build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
Expand Down
11 changes: 0 additions & 11 deletions back/MANIFEST.in

This file was deleted.

3 changes: 0 additions & 3 deletions back/guide_requirements.txt

This file was deleted.

22 changes: 19 additions & 3 deletions back/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies = [
"bcrypt==4.0.1",
"colorama>=0.4.6",
]
requires-python = "~=3.12"
requires-python = ">=3.11"
readme = "README.md"
keywords = ["audio", "annotation", "tool", "bioacoustics", "machine learning"]
license = { file = "LICENSE" }
Expand All @@ -29,15 +29,31 @@ Documentation = "https://mbsantiago.github.io/whombat/"
"Isue Tracker" = "https://github.com/mbsantiago/whombat/issues"
Releases = "https://github.com/mbsantiago/whombat/releases"

[project.scripts]
whombat = "whombat.__main__:main"

[project.optional-dependencies]
postgre = ["asyncpg>=0.29.0", "psycopg2-binary>=2.9.9"]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
ignore-vcs = true
include = [
"src/whombat/*.py",
"src/whombat/migrations/",
"src/whombat/statics/",
"src/whombat/user_guide/",
]

[tool.hatch.build.targets.wheel]
artifacts = ["src/whombat/migrations/versions/", "src/whombat/statics/"]
artifacts = [
"src/whombat/migrations/",
"src/whombat/statics/",
"src/whombat/user_guide/",
]

[tool.uv]
dev-dependencies = [
Expand Down Expand Up @@ -67,7 +83,7 @@ convention = "numpy"

[tool.ruff]
line-length = 79
target-version = "py311"
target-version = "py312"

[tool.ruff.format]
docstring-code-format = true
Expand Down
13 changes: 0 additions & 13 deletions back/requirements.txt

This file was deleted.

7 changes: 6 additions & 1 deletion back/src/whombat/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

from whombat.system import get_logging_config, get_settings

if __name__ == "__main__":

def main():
settings = get_settings()
config = get_logging_config(settings)
uvicorn.run(
Expand All @@ -18,3 +19,7 @@
reload=settings.dev,
log_config=config,
)


if __name__ == "__main__":
main()
799 changes: 536 additions & 263 deletions back/uv.lock

Large diffs are not rendered by default.

0 comments on commit 44d2f31

Please sign in to comment.