[project] name = "worblehat" dynamic = ["version"] description = "Worblehat is a simple library management system written specifically for Programvareverkstedet" authors = [ { name = "Programvareverkstedet", email = "projects@pvv.ntnu.no" } ] license = { file = "LICENSE" } readme = "README.md" requires-python = ">=3.12" dependencies = [ "alembic>=1.16", "beautifulsoup4>=4.14", "click>=8.2", "flask-admin>=1.6", "flask-sqlalchemy>=3.1", "flask>=3.0", "isbnlib>=3.10", "libdib", "psycopg2-binary>=2.9", "requests>=2.32", "sqlalchemy>=2.0", ] [dependency-groups] dev = [ "werkzeug", "poethepoet", ] test = [ "coverage-badge>=1.1.2", "pytest>=9.0.3", "pytest-cov>=7.1.0", "pytest-html>=4.2.0", # coverage-badge 1.1.2 imports pkg_resources, which setuptools removed in 82.0.0. # see https://github.com/dbrgn/coverage-badge/pull/35 "setuptools<82", "sqlparse>=0.5.5", ] [project.scripts] worblehat = "worblehat:main" [build-system] build-backend = "setuptools.build_meta" requires = [ "setuptools", "setuptools-scm", ] [tool.setuptools.packages.find] where = ["src"] include = ["worblehat*"] [tool.setuptools.package-dir] "" = "src" [tool.setuptools_scm] version_file = "src/worblehat/_version.py" [tool.poe.tasks] clean = """ rm -rf ./**/__pycache__ ./**/worblehat.sqlite """ # Migration related genmigration = "alembic revision --autogenerate -m" migrate = "alembic upgrade head" downmigrate = "alembic downgrade -1" # Be careful with cleanmigrations. If you run migrate a database and then # delete the migration file with this, there will be no easy way of downgrading cleanmigrations = "git clean -f src/worblehat/models/migrations/versions" [tool.uv.sources] libdib = { git = "https://git.pvv.ntnu.no/Projects/libdib.git" } [tool.black] line-length = 100 [tool.ruff] line-length = 100 [tool.ruff.lint] select = [ "A", # flake8-builtins "B", # flake8-bugbear "C4", # flake8-comprehensions "COM", # flake8-commas "ANN", # "E", # pycodestyle # "F", # Pyflakes "FA", # flake8-future-annotations "I", # isort "S", # flake8-bandit "ICN", # flake8-import-conventions "ISC", # flake8-implicit-str-concat # "N", # pep8-naming "PTH", # flake8-use-pathlib "RET", # flake8-return "SIM", # flake8-simplify "TC", # flake8-type-checking "UP", # pyupgrade "YTT", # flake8-2020 ] ignore = [ # "E501", # line too long "S101", # assert detected # "S311", # non-cryptographic random generator ] [tool.ruff.lint.flake8-annotations] suppress-dummy-args = true ignore-fully-untyped = true [tool.pytest.ini_options] addopts = [ "--cov=worblehat.queries", "--cov-report=html", "--cov-branch", "--self-contained-html", "--html=./test-report/index.html", ]