From 8a076aeee390e5b4d58958ed4786a3337e3f85a0 Mon Sep 17 00:00:00 2001 From: Jose Tomas Robles Hahn Date: Wed, 8 Jan 2025 16:37:47 -0300 Subject: [PATCH 1/4] chore: Exclude only individual test files in Mypy configuration Instead of excluding `src/tests/`, only include individual files. --- mypy.ini | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/mypy.ini b/mypy.ini index 6cadfb87..e3ec935c 100644 --- a/mypy.ini +++ b/mypy.ini @@ -6,7 +6,32 @@ mypy_path = files = *.py, src -exclude = (^(src/tests)/.*$) +exclude = (?x)( + ^src/tests/( # Tests + test_cte_f29_data_models + | test_dte_data_models + | test_dte_parse + | test_extras_dj_filters + | test_extras_dj_form_fields + | test_extras_dj_model_fields + | test_extras_mm_fields + | test_libs_crypto_utils + | test_libs_dataclass_utils + | test_libs_io_utils + | test_libs_tz_utils + | test_libs_xml_utils + | test_rcv_parse_csv + | test_rtc_data_models + | test_rtc_data_models_aec + | test_rtc_data_models_cesiones_periodo + | test_rtc_xml_utils + | test_rut + | test_rut_crypto_utils + )\.py$ + | ^src/tests/( # Test object factories + cte_f29_factories + )\.py$ + ) plugins = pydantic.mypy From 416b93e31a09ceb688683024818fe9196d53fb8a Mon Sep 17 00:00:00 2001 From: Jose Tomas Robles Hahn Date: Wed, 8 Jan 2025 18:21:33 -0300 Subject: [PATCH 2/4] chore: Improve Make tasks `clean-build`, `clean-pyc`, and `clean-test` This commit includes changes to the `Makefile` to improve the consistency and maintainability of the clean commands by using the `RM` variable instead of hardcoding the `rm` command. The most important changes include updates to the `clean-build`, `clean-pyc`, and `clean-test` targets. Improvements to clean commands: - `clean-build`: Replaced hardcoded `rm` commands with `${RM}` variable and adjusted `find` commands to use `-iname` for case-insensitive matching and `-prune` for directory handling. - `clean-pyc`: Simplified `find` commands by using `-delete` for file removal and `${RM}` variable for consistency. - `clean-test`: Replaced hardcoded `rm` commands with `${RM}` variable for consistency. --- Makefile | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 14542897..a753ff71 100644 --- a/Makefile +++ b/Makefile @@ -45,25 +45,24 @@ help: clean: clean-build clean-pyc clean-test ## remove all build, test, lint, coverage and Python artifacts clean-build: ## remove build artifacts - rm -rf .eggs/ - rm -rf build/ - rm -rf dist/ - find . -name '*.egg-info' -exec rm -rf {} + - find . -name '*.egg' -exec rm -f {} + + ${RM} -r .eggs/ + ${RM} -r build/ + ${RM} -r dist/ + find . -iname '*.egg-info' -type d -prune -exec ${RM} -r {} \; + find . -iname '*.egg' -prune -exec ${RM} -r {} \; clean-pyc: ## remove Python file artifacts - find . -name '*.pyc' -exec rm -f {} + - find . -name '*.pyo' -exec rm -f {} + - find . -name '*~' -exec rm -f {} + - find . -name '__pycache__' -exec rm -rf {} + + find . -iname '*.py[cod]' -delete + find . -iname '*~' -exec ${RM} {} + + find . -iname __pycache__ -type d -prune -exec ${RM} -r {} \; clean-test: ## remove test, lint and coverage artifacts - rm -rf .cache/ - rm -rf .tox/ - rm -f .coverage - rm -rf htmlcov/ - rm -rf test-reports/ - rm -rf .mypy_cache/ + ${RM} -r .cache/ + ${RM} -r .tox/ + ${RM} .coverage + ${RM} -r htmlcov/ + ${RM} -r test-reports/ + ${RM} -r .mypy_cache/ install-dev: install-deps-dev install-dev: ## Install for development From 74244cf04d942ad1bcdaf63bbb4c64cbd9a22347 Mon Sep 17 00:00:00 2001 From: Jose Tomas Robles Hahn Date: Wed, 8 Jan 2025 18:54:48 -0300 Subject: [PATCH 3/4] chore: Update history for new version --- HISTORY.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 14e8df0d..e63022db 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # History +## 0.41.0 (2025-01-08) + +- (PR #753, 2025-01-08) Exclude only individual test files in Mypy configuration +- (PR #755, 2025-01-08) Improve Make tasks `clean-build`, `clean-pyc`, and `clean-test` + ## 0.40.0 (2025-01-08) - (PR #748, 2025-01-06) Use most recent patch version of Python in CI/CD configuration From b342377cd12cc01e5228ffe91b08243c38e0f124 Mon Sep 17 00:00:00 2001 From: Jose Tomas Robles Hahn Date: Wed, 8 Jan 2025 18:55:08 -0300 Subject: [PATCH 4/4] chore: Bump version from 0.40.0 to 0.41.0 --- .bumpversion.cfg | 2 +- src/cl_sii/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 9a6b0109..d0989fd4 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.40.0 +current_version = 0.41.0 commit = True tag = False message = chore: Bump version from {current_version} to {new_version} diff --git a/src/cl_sii/__init__.py b/src/cl_sii/__init__.py index dd586b4a..89c02ee8 100644 --- a/src/cl_sii/__init__.py +++ b/src/cl_sii/__init__.py @@ -4,4 +4,4 @@ """ -__version__ = '0.40.0' +__version__ = '0.41.0'