refact: move temp files to /.temp/

This commit is contained in:
sebthom
2025-05-15 19:52:41 +02:00
parent cc25164b43
commit 83c0d6adf0
3 changed files with 13 additions and 13 deletions

View File

@@ -100,6 +100,7 @@ jobs:
- name: Git Checkout - name: Git Checkout
uses: actions/checkout@v4 # https://github.com/actions/checkout uses: actions/checkout@v4 # https://github.com/actions/checkout
- name: "Install: Chromium Browser" - name: "Install: Chromium Browser"
if: env.ACT == 'true' && startsWith(matrix.os, 'ubuntu') if: env.ACT == 'true' && startsWith(matrix.os, 'ubuntu')
run: | run: |
@@ -153,7 +154,7 @@ jobs:
- name: Run unit tests - name: Run unit tests
run: pdm run utest:cov -vv --cov=src/kleinanzeigen_bot run: pdm run utest:cov -vv
- name: Run integration tests - name: Run integration tests

8
.gitignore vendored
View File

@@ -14,19 +14,13 @@ downloaded-ads
# python # python
/.venv /.venv
__pycache__ __pycache__
/build
/dist /dist
/.temp
/.eggs /.eggs
/*.egg-info /*.egg-info
/.mypy_cache
/.pdm-build/ /.pdm-build/
/.pdm-python /.pdm-python
/.ruff_cache
# test coverage
/.coverage
/htmlcov/
/coverage.xml
# Eclipse # Eclipse
/.project /.project

View File

@@ -89,7 +89,7 @@ debug = "python -m pdb -m kleinanzeigen_bot"
# build & packaging # build & packaging
generate-schemas = "python scripts/generate_schemas.py" generate-schemas = "python scripts/generate_schemas.py"
compile.cmd = "python -O -m PyInstaller pyinstaller.spec --clean" compile.cmd = "python -O -m PyInstaller pyinstaller.spec --clean --workpath .temp"
compile.env = {PYTHONHASHSEED = "1", SOURCE_DATE_EPOCH = "0"} # https://pyinstaller.org/en/stable/advanced-topics.html#creating-a-reproducible-build compile.env = {PYTHONHASHSEED = "1", SOURCE_DATE_EPOCH = "0"} # https://pyinstaller.org/en/stable/advanced-topics.html#creating-a-reproducible-build
deps = "pdm list --fields name,version,groups" deps = "pdm list --fields name,version,groups"
@@ -112,9 +112,9 @@ lint = { composite = ["lint:ruff", "lint:mypy", "lint:pyright"] }
test = "python -m pytest --capture=tee-sys" test = "python -m pytest --capture=tee-sys"
utest = "python -m pytest --capture=tee-sys -m 'not itest'" utest = "python -m pytest --capture=tee-sys -m 'not itest'"
itest = "python -m pytest --capture=tee-sys -m 'itest'" itest = "python -m pytest --capture=tee-sys -m 'itest'"
"test:cov" = { composite = ["test --cov=src/kleinanzeigen_bot"] } "test:cov" = { composite = ["utest:cov", "itest:cov"] }
"utest:cov" = { composite = ["utest --cov=src/kleinanzeigen_bot"] } "utest:cov" = { composite = ["utest --cov=src/kleinanzeigen_bot --cov-report=xml:.temp/coverage-unit.xml"] }
"itest:cov" = { composite = ["itest --cov=src/kleinanzeigen_bot"] } "itest:cov" = { composite = ["itest --cov=src/kleinanzeigen_bot --cov-report=xml:.temp/coverage-integration.xml"] }
##################### #####################
@@ -140,6 +140,7 @@ aggressive = 3
# https://docs.astral.sh/ruff/configuration/ # https://docs.astral.sh/ruff/configuration/
##################### #####################
[tool.ruff] [tool.ruff]
cache-dir = ".temp/cache_ruff"
include = ["pyproject.toml", "scripts/**/*.py", "src/**/*.py", "tests/**/*.py"] include = ["pyproject.toml", "scripts/**/*.py", "src/**/*.py", "tests/**/*.py"]
line-length = 160 line-length = 160
indent-width = 4 indent-width = 4
@@ -282,6 +283,7 @@ max-public-methods = 25 # max. number of public methods for a class (R0904)
[tool.mypy] [tool.mypy]
# https://mypy.readthedocs.io/en/stable/config_file.html # https://mypy.readthedocs.io/en/stable/config_file.html
#mypy_path = "$MYPY_CONFIG_FILE_DIR/tests/stubs" #mypy_path = "$MYPY_CONFIG_FILE_DIR/tests/stubs"
cache_dir = ".temp/cache_mypy"
python_version = "3.10" python_version = "3.10"
files = "scripts,src,tests" files = "scripts,src,tests"
strict = true strict = true
@@ -311,6 +313,7 @@ typeCheckingMode = "standard"
# https://pypi.org/project/pytest/ # https://pypi.org/project/pytest/
##################### #####################
[tool.pytest.ini_options] [tool.pytest.ini_options]
cache_dir = ".temp/cache_pytest"
testpaths = [ testpaths = [
"src", "src",
"tests" "tests"
@@ -318,7 +321,6 @@ testpaths = [
# https://docs.pytest.org/en/stable/reference.html#confval-addopts # https://docs.pytest.org/en/stable/reference.html#confval-addopts
addopts = """ addopts = """
--strict-markers --strict-markers
-p no:cacheprovider
--doctest-modules --doctest-modules
--cov-report=term-missing --cov-report=term-missing
""" """
@@ -333,6 +335,9 @@ filterwarnings = [
"ignore::DeprecationWarning" "ignore::DeprecationWarning"
] ]
[tool.coverage.run]
data_file = ".temp/coverage.sqlite"
##################### #####################
# yamlfix # yamlfix