Skip to content

Commit dcba8d3

Browse files
authored
Merge pull request #61 from Cyber-Syntax/refactor/migrate-src-layout
refactor: migrate to src layout
2 parents 8c86841 + 4d1fa30 commit dcba8d3

45 files changed

Lines changed: 104 additions & 359 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Changed
11+
12+
- Migrated to src layout from flat layout.
813

914
## [0.8.1-alpha] - 2026-05-04
1015

autotarcompress/commands/__init__.py

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/adr/adr-0005-migrate-src-layout.md

Lines changed: 0 additions & 120 deletions
This file was deleted.

docs/adr/adr-0006-move-commands-to-cli.md

Lines changed: 0 additions & 118 deletions
This file was deleted.

pyproject.toml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ classifiers = [
1616
]
1717
readme = { file = "README.md", content-type = "text/markdown" }
1818

19+
[project.urls]
20+
repository = "https://github.com/Cyber-Syntax/AutoTarCompress"
21+
issues = "https://github.com/Cyber-Syntax/AutoTarCompress/issues"
22+
changelog = "https://github.com/Cyber-Syntax/AutoTarCompress/blob/main/CHANGELOG.md"
23+
funding = "https://github.com/sponsors/Cyber-Syntax"
24+
documentation = "https://github.com/Cyber-Syntax/AutoTarCompress#readme"
25+
1926
[project.scripts]
2027
autotarcompress = "autotarcompress.main:main"
2128

@@ -32,22 +39,30 @@ managed = true
3239
required-environments = ["sys_platform == 'linux'"]
3340

3441
[tool.setuptools.packages.find]
35-
where = ["."]
42+
where = ["src"]
3643
include = ["autotarcompress*"]
37-
exclude = ["autocomplete*", "tests*", "scripts*", "docs*", "examples*"]
38-
3944
[tool.pytest.ini_options]
40-
addopts = ["-vq"]
45+
addopts = ["--import-mode=importlib"]
4146
testpaths = ["tests"]
4247
python_files = "test_*.py"
4348
python_classes = "Test*"
4449
python_functions = "test_*"
45-
pythonpath = [".", "autotarcompress"]
50+
pythonpath = ["src"]
51+
log_cli = false
52+
log_cli_level = "INFO"
53+
log_file_level = "DEBUG"
54+
log_cli_format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
55+
log_cli_date_format = "%H:%M:%S"
4656
markers = [
4757
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
4858
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
59+
"network: marks tests that make network requests to external services",
60+
"e2e: marks end-to-end integration tests",
4961
]
5062

63+
[tool.pytest_env]
64+
AutoTarCompress_LOG_DIR = { value = "/tmp/pytest-of-{USER}-logs/autotarcompress", transform = true }
65+
5166
[tool.ruff]
5267
line-length = 79
5368
indent-width = 4
@@ -129,6 +144,10 @@ lines-after-imports = -1
129144
lines-between-types = 0
130145

131146
[tool.ruff.lint.per-file-ignores]
147+
"scripts/*.py" = [
148+
"INP001", # Scripts are standalone, not part of a package
149+
"T201", # print() is expected in CLI scripts
150+
]
132151
"test_*.py" = [
133152
"S101", # asserts allowed in tests...
134153
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
@@ -141,6 +160,13 @@ lines-between-types = 0
141160
# Use Google-style docstrings.
142161
convention = "google"
143162

163+
[tool.coverage.paths]
164+
source = ["autotarcompress"]
165+
166+
[tool.coverage.run]
167+
source = ["src/autotarcompress"]
168+
omit = ["tests/*", "scripts/*", "**/__pycache__/*"]
169+
144170
[tool.mypy]
145171
warn_return_any = true
146172
warn_unused_configs = true

0 commit comments

Comments
 (0)