diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 1799a203..e3f99111 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.24.0 +current_version = 0.25.0 commit = True tag = False message = chore: Bump version from {current_version} to {new_version} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a45a6387..5839e4f2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v4.1.1 - name: Set Up Python ${{ matrix.python_version }} - uses: actions/setup-python@v4.7.1 + uses: actions/setup-python@v5.0.0 with: python-version: "${{ matrix.python_version }}" @@ -78,7 +78,7 @@ jobs: uses: actions/checkout@v4.1.1 - name: Set Up Python ${{ matrix.python_version }} - uses: actions/setup-python@v4.7.1 + uses: actions/setup-python@v5.0.0 with: python-version: "${{ matrix.python_version }}" @@ -137,7 +137,7 @@ jobs: - name: Store Artifacts if: ${{ always() }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.0.0 with: name: test_reports_${{ matrix.python_version }} path: test-reports/ diff --git a/.github/workflows/dependency-review.yaml b/.github/workflows/dependency-review.yaml index 1bd31795..dcea71d1 100644 --- a/.github/workflows/dependency-review.yaml +++ b/.github/workflows/dependency-review.yaml @@ -24,6 +24,6 @@ jobs: uses: actions/checkout@v4.1.1 - name: Dependency Review - uses: actions/dependency-review-action@v3.1.0 + uses: actions/dependency-review-action@v3.1.4 with: fail-on-severity: critical diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 691a49a1..ead87069 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -42,7 +42,7 @@ jobs: - name: Set Up Python id: set_up_python - uses: actions/setup-python@v4.7.1 + uses: actions/setup-python@v5.0.0 with: python-version: "3.10.9" @@ -53,7 +53,7 @@ jobs: key: py-v1-deps-${{ runner.os }}-${{ steps.set_up_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('Makefile', 'make/**.mk') }} - name: Restore Artifacts (Release) - uses: actions/download-artifact@v3.0.2 + uses: actions/download-artifact@v4.1.0 with: name: release path: ${{ inputs.artifacts_path }}/ diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 25f5543c..46d9bcb1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -39,7 +39,7 @@ jobs: - name: Set Up Python id: set_up_python - uses: actions/setup-python@v4.7.1 + uses: actions/setup-python@v5.0.0 with: python-version: "3.10.9" @@ -68,7 +68,7 @@ jobs: make dist - name: Store Artifacts - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.0.0 with: name: release path: ${{ env.ARTIFACTS_PATH }}/ diff --git a/HISTORY.md b/HISTORY.md index 09a3a101..47e77833 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,13 @@ # History +## 0.25.0 (2024-10-01) + +- (PR #581, 2024-01-03) chore: Bump the production-dependencies group with 4 updates +- (PR #571, 2024-01-03) chore: Bump cryptography from 41.0.4 to 41.0.6 +- (PR #580, 2024-01-09) chore: Bump the development-dependencies group with 7 updates +- (PR #583, 2024-01-10) dte: Allow gaps when validating order of `DteXmlData.referencias` +- (PR #579, 2024-01-10) chore: Bump pydantic from 2.4.2 to 2.5.3 + ## 0.24.0 (2023-11-09) - (PR #555, 2023-10-23) Fix GitHub code scanning alerts 'Clear-text logging of sensitive info' diff --git a/requirements-dev.in b/requirements-dev.in index b3497daa..2d021c81 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -4,16 +4,16 @@ -c requirements.txt -black==23.10.1 +black==23.12.1 bumpversion==0.5.3 -coverage==7.3.2 +coverage==7.4.0 flake8==6.1.0 -isort==5.12.0 -mypy==1.6.1 +isort==5.13.2 +mypy==1.8.0 pip-tools==7.3.0 -tox==4.11.3 +tox==4.11.4 twine==4.0.2 -types-jsonschema==4.19.0.4 +types-jsonschema==4.20.0.0 types-pyOpenSSL==23.3.0.0 types-pytz==2023.3.1.1 -wheel==0.41.3 +wheel==0.42.0 diff --git a/requirements-dev.txt b/requirements-dev.txt index 5000f3a9..d2494502 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -8,7 +8,7 @@ attrs==23.1.0 # via # -c requirements.txt # referencing -black==23.10.1 +black==23.12.1 # via -r requirements-dev.in bleach==5.0.1 # via readme-renderer @@ -36,9 +36,9 @@ click==8.0.3 # pip-tools colorama==0.4.6 # via tox -coverage==7.3.2 +coverage==7.4.0 # via -r requirements-dev.in -cryptography==41.0.4 +cryptography==41.0.6 # via # -c requirements.txt # secretstorage @@ -60,7 +60,7 @@ importlib-metadata==6.1.0 # -c requirements.txt # build # twine -isort==5.12.0 +isort==5.13.2 # via -r requirements-dev.in jeepney==0.8.0 # via @@ -74,7 +74,7 @@ mccabe==0.7.0 # via flake8 mdurl==0.1.2 # via markdown-it-py -mypy==1.6.1 +mypy==1.8.0 # via -r requirements-dev.in mypy-extensions==1.0.0 # via @@ -149,11 +149,11 @@ tomli==2.0.1 # pyproject-api # pyproject-hooks # tox -tox==4.11.3 +tox==4.11.4 # via -r requirements-dev.in twine==4.0.2 # via -r requirements-dev.in -types-jsonschema==4.19.0.4 +types-jsonschema==4.20.0.0 # via -r requirements-dev.in types-pyopenssl==23.3.0.0 # via -r requirements-dev.in @@ -173,7 +173,7 @@ virtualenv==20.24.5 # via tox webencodings==0.5.1 # via bleach -wheel==0.41.3 +wheel==0.42.0 # via # -r requirements-dev.in # pip-tools diff --git a/requirements.in b/requirements.in index b6309c88..319d11cb 100644 --- a/requirements.in +++ b/requirements.in @@ -5,7 +5,7 @@ # Note: To install a package from a Git VCS repository, see the following example: # git+https://github.com/example/example.git@example-vcs-ref#egg=example-pkg[foo,bar]==1.42.3 -cryptography==41.0.4 +cryptography==41.0.6 defusedxml==0.7.1 Django>=2.2.24 djangorestframework>=3.10.3,<3.15 @@ -13,7 +13,7 @@ importlib-metadata==6.1.0 jsonschema==4.19.2 lxml==4.9.2 marshmallow==3.20.1 -pydantic==2.4.2 +pydantic==2.5.3 pyOpenSSL==23.2.0 pytz==2023.3.post1 signxml==3.2.1 diff --git a/requirements.txt b/requirements.txt index 370b84c2..f2139b95 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,7 @@ certifi==2023.7.22 # via signxml cffi==1.15.1 # via cryptography -cryptography==41.0.4 +cryptography==41.0.6 # via # -r requirements.in # pyopenssl @@ -51,9 +51,9 @@ pkgutil-resolve-name==1.3.10 # via jsonschema pycparser==2.20 # via cffi -pydantic==2.4.2 +pydantic==2.5.3 # via -r requirements.in -pydantic-core==2.10.1 +pydantic-core==2.14.6 # via pydantic pyopenssl==23.2.0 # via diff --git a/src/cl_sii/__init__.py b/src/cl_sii/__init__.py index 7fff42a2..5c2a3976 100644 --- a/src/cl_sii/__init__.py +++ b/src/cl_sii/__init__.py @@ -5,4 +5,4 @@ """ -__version__ = '0.24.0' +__version__ = '0.25.0' diff --git a/src/cl_sii/dte/data_models.py b/src/cl_sii/dte/data_models.py index 06f822b4..192a7fcc 100644 --- a/src/cl_sii/dte/data_models.py +++ b/src/cl_sii/dte/data_models.py @@ -809,15 +809,13 @@ def validate_non_empty_stripped_str(cls, v: object) -> object: @classmethod def validate_referencias_numero_linea_ref_order(cls, v: object) -> object: if isinstance(v, Sequence): - for idx, referencia in enumerate(v, start=1): - if referencia.numero_linea_ref != idx: - raise ValueError( - "items must be ordered according to their 'numero_linea_ref'. " - f"Expected index value: {idx}, " - f"actual numero linea ref: {referencia.numero_linea_ref}. " - f"All numero_linea_refs: " - f"{', '.join(str(ref.numero_linea_ref) for ref in v)}" - ) + numero_linea_refs = [referencia.numero_linea_ref for referencia in v] + if numero_linea_refs != sorted(numero_linea_refs): + raise ValueError( + "items must be ordered according to their 'numero_linea_ref'. " + f"All numero_linea_refs: " + f"{', '.join(str(num_linea_ref) for num_linea_ref in numero_linea_refs)}" + ) return v @pydantic.model_validator(mode='after') diff --git a/src/tests/test_dte_data_models.py b/src/tests/test_dte_data_models.py index 8c7372c1..b37b1091 100644 --- a/src/tests/test_dte_data_models.py +++ b/src/tests/test_dte_data_models.py @@ -1701,7 +1701,6 @@ def test_validate_referencias_numero_linea_ref_order(self) -> None: 'loc': ('referencias',), 'msg': ( "Value error, items must be ordered according to their 'numero_linea_ref'. " - "Expected index value: 1, actual numero linea ref: 2. " "All numero_linea_refs: 2, 1" ), 'type': 'value_error', diff --git a/src/tests/test_rtc_data_models.py b/src/tests/test_rtc_data_models.py index e4bd225c..4792c3f9 100644 --- a/src/tests/test_rtc_data_models.py +++ b/src/tests/test_rtc_data_models.py @@ -1002,7 +1002,7 @@ def test_validate_contribuyente_razon_social(self) -> None: expected_validation_errors = [ { 'loc': ('cedente_razon_social',), - 'msg': 'String should have at least 1 characters', + 'msg': 'String should have at least 1 character', 'type': 'string_too_short', }, { @@ -1012,7 +1012,7 @@ def test_validate_contribuyente_razon_social(self) -> None: }, { 'loc': ('dte_emisor_razon_social',), - 'msg': 'String should have at least 1 characters', + 'msg': 'String should have at least 1 character', 'type': 'string_too_short', }, {