From 0b17e5b615b88a8d9573e3066946a192aaae945a Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Wed, 14 Jan 2026 19:33:00 +0300 Subject: [PATCH 01/17] chore(pytest): add pytest config --- pytest.toml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 pytest.toml diff --git a/pytest.toml b/pytest.toml new file mode 100644 index 0000000..393454d --- /dev/null +++ b/pytest.toml @@ -0,0 +1,22 @@ +[pytest] +minversion = "9" +cache_dir = ".cache/pytest" +pythonpath = [ + "src", +] +testpaths = [ + "tests", +] +addopts = [ + "-ra", + "--strict-config", + "--strict-markers", + "--disable-warnings", + "--cov", +] +xfail_strict = true +log_cli = true +log_cli_level = "INFO" +filterwarnings = [ + "error", +] From c114f63f0287c8fec440ad2ecd7f552ec29733b1 Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Wed, 14 Jan 2026 20:49:22 +0300 Subject: [PATCH 02/17] chore(coverage): create coverage config file --- .coveragerc | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..f8d81ff --- /dev/null +++ b/.coveragerc @@ -0,0 +1,10 @@ +[run] +branch = true + +[paths] +source = + "src/app", + +[report] +exclude_lines = + "pragma: not covered", From bfc9e6e89482eaad273dcb3692c040d0826d8067 Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 00:01:49 +0300 Subject: [PATCH 03/17] chore(towncrier): add towncrier config file --- towncrier.toml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 towncrier.toml diff --git a/towncrier.toml b/towncrier.toml new file mode 100644 index 0000000..1a6505f --- /dev/null +++ b/towncrier.toml @@ -0,0 +1,40 @@ +[tool.towncrier] +directory = "changelog.d" +filename = "docs/changelog.md" +title_format = "## [{version}](https://github.com/LandSight/backend/releases/tag/{version}) - {project_date}" +issue_format = "[#{issue}](https://github.com/LandSight/backend/issues/{issue})" + +[[tool.towncrier.type]] +name = "Feature" +directory = "feat" +showcontent = true + +[[tool.towncrier.type]] +name = "Bugfix" +directory = "bugfix" +showcontent = true + +[[tool.towncrier.type]] +name = "Security" +directory = "security" +showcontent = true + +[[tool.towncrier.type]] +name = "Deprecation" +directory = "deprecation" +showcontent = true + +[[tool.towncrier.type]] +name = "Removal" +directory = "removal" +showcontent = true + +[[tool.towncrier.type]] +name = "Docs" +directory = "docs" +showcontent = true + +[[tool.towncrier.type]] +name = "Ops" +directory = "ops" +showcontent = true From 731f9d3957d6a46da9afef37d4de7d1efef6b95b Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 00:10:20 +0300 Subject: [PATCH 04/17] chore(ty): add ty config file --- ty.toml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 ty.toml diff --git a/ty.toml b/ty.toml new file mode 100644 index 0000000..06f131b --- /dev/null +++ b/ty.toml @@ -0,0 +1,5 @@ +[src] +include = [ + "src", + "tests", +] From c4c0907b7f7e702dd42cec83c145eca6c104cfc3 Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 00:11:19 +0300 Subject: [PATCH 05/17] chore: remove ty section --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 99c8e71..c56c0d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,7 +120,3 @@ showcontent = true name = "Ops" directory = "ops" showcontent = true - -[tool.ty.environment] -root = [ "src", "tests" ] -python-version = "3.14" From b1b0194836c041b6c072f0bdee5a7f03501975a2 Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 00:16:00 +0300 Subject: [PATCH 06/17] chore: remove towncrier section --- pyproject.toml | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c56c0d8..bdf55c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,44 +79,3 @@ branch = true exclude_lines = [ "pragma: not covered", ] - -[tool.towncrier] -directory = "changelog.d" -filename = "docs/changelog.md" -title_format = "## [{version}](https://github.com/LandSight/backend/releases/tag/{version}) - {project_date}" -issue_format = "[#{issue}](https://github.com/LandSight/backend/issues/{issue})" - -[[tool.towncrier.type]] -name = "Feature" -directory = "feat" -showcontent = true - -[[tool.towncrier.type]] -name = "Bugfix" -directory = "bugfix" -showcontent = true - -[[tool.towncrier.type]] -name = "Security" -directory = "security" -showcontent = true - -[[tool.towncrier.type]] -name = "Deprecation" -directory = "deprecation" -showcontent = true - -[[tool.towncrier.type]] -name = "Removal" -directory = "removal" -showcontent = true - -[[tool.towncrier.type]] -name = "Docs" -directory = "docs" -showcontent = true - -[[tool.towncrier.type]] -name = "Ops" -directory = "ops" -showcontent = true From e35df8b14f59af882feb4600141df0f2d0875b6c Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 00:16:20 +0300 Subject: [PATCH 07/17] chore: remove coverage section --- pyproject.toml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bdf55c1..7750022 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,12 +70,3 @@ log_cli_level = "INFO" filterwarnings = [ "error", ] - -[tool.coverage.run] -source = [ "src/app" ] -branch = true - -[tool.coverage.report] -exclude_lines = [ - "pragma: not covered", -] From f6cc9fbb6445c0851ecaa63beef4fa737a8f6f50 Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 00:16:37 +0300 Subject: [PATCH 08/17] chore: remove pytest section --- pyproject.toml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7750022..fd2066e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,20 +53,3 @@ attribute = "__version__" [tool.hatch.build.targets.wheel] packages = [ "src/app" ] - -[tool.pytest.ini_options] -cache_dir = ".cache/pytest" -pythonpath = [ "src" ] -testpaths = [ "tests" ] -addopts = [ - "-ra", - "--strict-config", - "--strict-markers", - "--disable-warnings", -] -xfail_strict = true -log_cli = true -log_cli_level = "INFO" -filterwarnings = [ - "error", -] From a8c73a4429cfed4a86cfc24c780e80e3dec37af5 Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 00:38:33 +0300 Subject: [PATCH 09/17] chore(version): use static version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fd2066e..d19041b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,7 @@ requires = [ "hatchling" ] [project] name = "land-sight-backend" +version = "0.1.0" description = "LandSight backend." readme = "README.md" license = "MIT" @@ -13,7 +14,6 @@ authors = [ ] requires-python = ">=3.14" classifiers = [ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.14" ] -dynamic = [ "version" ] dependencies = [ "pydantic-settings>=2.12", ] From 1f02c47a676f554e2476006ec8cd95816c5bcd63 Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 00:39:06 +0300 Subject: [PATCH 10/17] chore: remove build system --- pyproject.toml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d19041b..5830216 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,3 @@ -[build-system] -build-backend = "hatchling.build" -requires = [ "hatchling" ] - [project] name = "land-sight-backend" version = "0.1.0" @@ -45,11 +41,3 @@ pre-commit = [ changelog = [ "towncrier>=25.8", ] - -[tool.hatch.version] -source = "code" -path = "src/app/__meta__.py" -attribute = "__version__" - -[tool.hatch.build.targets.wheel] -packages = [ "src/app" ] From 6b0588443c3f356e94e22a68af6b2113bc523a68 Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 00:41:00 +0300 Subject: [PATCH 11/17] test: remove test app version --- tests/test_version.py | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 tests/test_version.py diff --git a/tests/test_version.py b/tests/test_version.py deleted file mode 100644 index 8077f7e..0000000 --- a/tests/test_version.py +++ /dev/null @@ -1,13 +0,0 @@ -import re - -from app import __version__ - - -VERSION_PATTERN = re.compile(r"^(?P\d+)\.(?P\d+)\.(?P\d+)(?P.*)$") - - -def test_version_format() -> None: - """Ensure __version__ looks like major.minor.patch optionally followed by any suffix such as 'a0'.""" - match = VERSION_PATTERN.match(__version__) - assert match is not None, "Version must start with three numeric release components." - assert all(part.isdigit() for part in match.group("major", "minor", "patch")) From ff3c8fc1217e3c453ceb49335abe7192b7e2991c Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 00:41:41 +0300 Subject: [PATCH 12/17] chore(version): remove version variable --- src/app/__init__.py | 4 ---- src/app/__meta__.py | 1 - 2 files changed, 5 deletions(-) delete mode 100644 src/app/__meta__.py diff --git a/src/app/__init__.py b/src/app/__init__.py index 1e4e3d4..e69de29 100644 --- a/src/app/__init__.py +++ b/src/app/__init__.py @@ -1,4 +0,0 @@ -from .__meta__ import __version__ - - -__all__ = ("__version__",) diff --git a/src/app/__meta__.py b/src/app/__meta__.py deleted file mode 100644 index 0beccff..0000000 --- a/src/app/__meta__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "0.0.0a0" From 6c5d1ebd7d7635d73328830be5eb8848965d4957 Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 00:42:20 +0300 Subject: [PATCH 13/17] chore: add version --- uv.lock | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uv.lock b/uv.lock index c885b58..44f705b 100644 --- a/uv.lock +++ b/uv.lock @@ -224,7 +224,8 @@ sdist = { url = "https://files.pythonhosted.org/packages/5e/73/e01e4c5e11ad0494f [[package]] name = "land-sight-backend" -source = { editable = "." } +version = "0.1.0" +source = { virtual = "." } dependencies = [ { name = "pydantic-settings" }, ] From dec977df5621197fb8e5e7b1d9838e0f1e48439f Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 10:46:55 +0300 Subject: [PATCH 14/17] chore(pytest): remove filter warning option --- pytest.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pytest.toml b/pytest.toml index 393454d..a291fba 100644 --- a/pytest.toml +++ b/pytest.toml @@ -17,6 +17,3 @@ addopts = [ xfail_strict = true log_cli = true log_cli_level = "INFO" -filterwarnings = [ - "error", -] From 3dc6b8259783e7f7d679f5c985fa61a5c3131755 Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 10:49:53 +0300 Subject: [PATCH 15/17] test(pytest): add explicit test discovery patterns --- pytest.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pytest.toml b/pytest.toml index a291fba..b95000f 100644 --- a/pytest.toml +++ b/pytest.toml @@ -7,6 +7,9 @@ pythonpath = [ testpaths = [ "tests", ] +python_files = ["test_*.py",] +python_classes = ["Test*",] +python_functions = ["test_*",] addopts = [ "-ra", "--strict-config", From fad2c56140855db08d5ef242ee0a6d9ee7830fda Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 10:51:16 +0300 Subject: [PATCH 16/17] chore(pytest): format config arrays on single lines --- pytest.toml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pytest.toml b/pytest.toml index b95000f..bfe0d7e 100644 --- a/pytest.toml +++ b/pytest.toml @@ -1,12 +1,8 @@ [pytest] minversion = "9" cache_dir = ".cache/pytest" -pythonpath = [ - "src", -] -testpaths = [ - "tests", -] +pythonpath = ["src",] +testpaths = ["tests",] python_files = ["test_*.py",] python_classes = ["Test*",] python_functions = ["test_*",] From c749efd9012b90dd4c2ee6b733576eb13f1ddbcd Mon Sep 17 00:00:00 2001 From: Vlad Korneev Date: Thu, 15 Jan 2026 10:53:12 +0300 Subject: [PATCH 17/17] chore(coverage): remove unnecessary quotes in config --- .coveragerc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.coveragerc b/.coveragerc index f8d81ff..872f85c 100644 --- a/.coveragerc +++ b/.coveragerc @@ -3,8 +3,8 @@ branch = true [paths] source = - "src/app", + src/app [report] exclude_lines = - "pragma: not covered", + pragma: not covered