From ce6d60e5888ba4878931d9302e31eb964f82fdcb Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Fri, 15 Aug 2025 11:11:57 -0600 Subject: [PATCH] Cleanup for release 1.0.0. --- cista/serve.py | 3 +- pyproject.toml | 118 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 96 insertions(+), 25 deletions(-) diff --git a/cista/serve.py b/cista/serve.py index fd7fc9b..5e2a024 100644 --- a/cista/serve.py +++ b/cista/serve.py @@ -1,7 +1,6 @@ import os import re import signal -import sys from pathlib import Path from sanic import Sanic @@ -17,7 +16,7 @@ def run(*, dev=False): def signal_handler(signum, frame): print("\nReceived interrupt signal, exiting immediately...") os._exit(0) - + signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) diff --git a/pyproject.toml b/pyproject.toml index be704aa..1968531 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,28 +10,38 @@ readme = "README.md" authors = [ { name = "Vasanko" }, ] +maintainers = [ + { name = "Vasanko" }, +] +keywords = ["file-server", "web-interface", "dropbox", "storage"] classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Intended Audience :: End Users/Desktop", + "Intended Audience :: System Administrators", + "License :: Public Domain", + "License :: OSI Approved :: MIT License", ] requires-python = ">=3.11" dependencies = [ - "argon2-cffi", - "av", - "blake3", - "brotli", - "docopt", - "inotify", - "msgspec", - "natsort", + "argon2-cffi>=25.1.0", + "av>=15.0.0", + "blake3>=1.0.5", + "brotli>=1.1.0", + "docopt>=0.6.2", + "inotify>=0.2.12", + "msgspec>=0.19.0", + "natsort>=8.4.0", "numpy>=2.3.2", - "pathvalidate", - "pillow", + "pathvalidate>=3.3.1", + "pillow>=11.3.0", "pillow-heif>=1.1.0", - "pyjwt", - "pymupdf", - "sanic", - "setproctitle", - "stream-zip", - "tomli_w", + "pyjwt>=2.10.1", + "pymupdf>=1.26.3", + "sanic>=25.3.0", + "setproctitle>=1.3.6", + "stream-zip>=0.0.83", + "tomli_w>=1.2.0", ] [project.urls] @@ -42,8 +52,19 @@ cista = "cista.__main__:main" [project.optional-dependencies] dev = [ - "pytest", - "ruff", + "pytest>=8.4.1", + "ruff>=0.8.0", + "mypy>=1.13.0", + "pre-commit>=4.0.0", +] +test = [ + "pytest>=8.4.1", + "pytest-cov>=6.0.0", + "pytest-asyncio>=0.25.0", +] +docs = [ + "sphinx>=8.0.0", + "sphinx-rtd-theme>=3.0.0", ] [tool.hatch.version] @@ -65,18 +86,69 @@ only-packages = true [tool.pytest.ini_options] addopts = [ "--import-mode=importlib", - "--verbosity=-1", - "-p no:warnings", + "--verbosity=2", + "--strict-markers", + "--strict-config", + "--cov=cista", + "--cov-report=term-missing", + "--cov-report=html", + "--cov-branch", ] -testpaths = [ - "tests", +testpaths = ["tests"] +python_files = ["test_*.py", "*_test.py"] +python_classes = ["Test*"] +python_functions = ["test_*"] +markers = [ + "slow: marks tests as slow (deselect with '-m \"not slow\"')", + "integration: marks tests as integration tests", +] +filterwarnings = [ + "error", + "ignore::UserWarning", + "ignore::DeprecationWarning", ] [tool.ruff.lint] isort.known-first-party = ["cista"] -per-file-ignores."tests/*" = ["S", "ANN", "D", "INP"] +per-file-ignores."tests/*" = ["S", "ANN", "D", "INP", "PLR2004"] +per-file-ignores."scripts/*" = ["T20"] [dependency-groups] dev = [ "pytest>=8.4.1", + "ruff>=0.8.0", + "mypy>=1.13.0", + "pre-commit>=4.0.0", ] +test = [ + "pytest>=8.4.1", + "pytest-cov>=6.0.0", + "pytest-asyncio>=0.25.0", +] + +[tool.coverage.run] +source = ["cista"] +branch = true +omit = [ + "*/tests/*", + "*/test_*", + "*/__pycache__/*", + "cista/_version.py", +] + +[tool.coverage.report] +exclude_lines = [ + "pragma: no cover", + "def __repr__", + "if self.debug:", + "if settings.DEBUG", + "raise AssertionError", + "raise NotImplementedError", + "if 0:", + "if __name__ == .__main__.:", + "class .*\\bProtocol\\):", + "@(abc\\.)?abstractmethod", +] +show_missing = true +skip_covered = false +precision = 2