From fd5307bb7cc95c47a0fe81e4fb05368e46a70c1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:01:28 +0000 Subject: [PATCH 1/7] chore: Bump the production-dependencies group with 4 updates Bumps the production-dependencies group with 4 updates: [actions/setup-python](https://github.com/actions/setup-python), [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/dependency-review-action](https://github.com/actions/dependency-review-action) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/setup-python` from 4.7.1 to 5.0.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4.7.1...v5.0.0) Updates `actions/upload-artifact` from 3.1.3 to 4.0.0 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3.1.3...v4.0.0) Updates `actions/dependency-review-action` from 3.1.0 to 3.1.4 - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](https://github.com/actions/dependency-review-action/compare/v3.1.0...v3.1.4) Updates `actions/download-artifact` from 3.0.2 to 4.1.0 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3.0.2...v4.1.0) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major dependency-group: production-dependencies - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: production-dependencies - dependency-name: actions/dependency-review-action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yaml | 6 +++--- .github/workflows/dependency-review.yaml | 2 +- .github/workflows/deploy.yaml | 4 ++-- .github/workflows/release.yaml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) 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 }}/ From 7345eae9169a57557eea0a9420f6899d5e584d21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 21:44:22 +0000 Subject: [PATCH 2/7] chore: Bump cryptography from 41.0.4 to 41.0.6 Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.4 to 41.0.6. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/41.0.4...41.0.6) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- requirements.in | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 5000f3a9..bd940e27 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -38,7 +38,7 @@ colorama==0.4.6 # via tox coverage==7.3.2 # via -r requirements-dev.in -cryptography==41.0.4 +cryptography==41.0.6 # via # -c requirements.txt # secretstorage diff --git a/requirements.in b/requirements.in index b6309c88..ef246111 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 diff --git a/requirements.txt b/requirements.txt index 370b84c2..38aac790 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 From 768cb2bc86aceda4f46f64f2a0eb07465a2db32c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 22:05:18 +0000 Subject: [PATCH 3/7] chore: Bump the development-dependencies group with 7 updates Bumps the development-dependencies group with 7 updates: | Package | From | To | | --- | --- | --- | | [black](https://github.com/psf/black) | `23.10.1` | `23.12.1` | | [coverage](https://github.com/nedbat/coveragepy) | `7.3.2` | `7.4.0` | | [isort](https://github.com/pycqa/isort) | `5.12.0` | `5.13.2` | | [mypy](https://github.com/python/mypy) | `1.6.1` | `1.8.0` | | [tox](https://github.com/tox-dev/tox) | `4.11.3` | `4.11.4` | | [types-jsonschema](https://github.com/python/typeshed) | `4.19.0.4` | `4.20.0.0` | | [wheel](https://github.com/pypa/wheel) | `0.41.3` | `0.42.0` | Updates `black` from 23.10.1 to 23.12.1 - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.10.1...23.12.1) Updates `coverage` from 7.3.2 to 7.4.0 - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.3.2...7.4.0) Updates `isort` from 5.12.0 to 5.13.2 - [Release notes](https://github.com/pycqa/isort/releases) - [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md) - [Commits](https://github.com/pycqa/isort/compare/5.12.0...5.13.2) Updates `mypy` from 1.6.1 to 1.8.0 - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.6.1...v1.8.0) Updates `tox` from 4.11.3 to 4.11.4 - [Release notes](https://github.com/tox-dev/tox/releases) - [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst) - [Commits](https://github.com/tox-dev/tox/compare/4.11.3...4.11.4) Updates `types-jsonschema` from 4.19.0.4 to 4.20.0.0 - [Commits](https://github.com/python/typeshed/commits) Updates `wheel` from 0.41.3 to 0.42.0 - [Release notes](https://github.com/pypa/wheel/releases) - [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst) - [Commits](https://github.com/pypa/wheel/compare/0.41.3...0.42.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: isort dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: tox dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: types-jsonschema dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: wheel dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies ... Signed-off-by: dependabot[bot] --- requirements-dev.in | 14 +++++++------- requirements-dev.txt | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) 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 bd940e27..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,7 +36,7 @@ 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.6 # via @@ -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 From ac5ec2f7a2a4c9c6a9e657364ca68ddb593d846e Mon Sep 17 00:00:00 2001 From: Jose Tomas Robles Hahn Date: Tue, 9 Jan 2024 20:41:26 -0300 Subject: [PATCH 4/7] chore(dte): Allow gaps when validating order of `DteXmlData.referencias` Relax validation of ordering of `DteXmlData.referencias` by `numero_linea_ref` by allowing ordered sequences of `referencias` to have gaps. Ref: https://app.shortcut.com/cordada/story/3733 [sc-3733] --- src/cl_sii/dte/data_models.py | 16 +++++++--------- src/tests/test_dte_data_models.py | 1 - 2 files changed, 7 insertions(+), 10 deletions(-) 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', From 45769e21dcb36b9f4a415008c3804670f267c5c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 23:17:51 +0000 Subject: [PATCH 5/7] chore: Bump pydantic from 2.4.2 to 2.5.3 Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.4.2 to 2.5.3. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/v2.5.3/HISTORY.md) - [Commits](https://github.com/pydantic/pydantic/compare/v2.4.2...v2.5.3) --- updated-dependencies: - dependency-name: pydantic dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 4 ++-- src/tests/test_rtc_data_models.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements.in b/requirements.in index ef246111..319d11cb 100644 --- a/requirements.in +++ b/requirements.in @@ -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 38aac790..f2139b95 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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/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', }, { From 8b79e0b4226b4d239a4c4342e281a833a0b8f193 Mon Sep 17 00:00:00 2001 From: Samuel Villegas Date: Wed, 10 Jan 2024 14:58:18 -0300 Subject: [PATCH 6/7] chore: Update history for new version --- HISTORY.md | 8 ++++++++ 1 file changed, 8 insertions(+) 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' From cd62a99f0fceaad51ad682884e475c47e2c0a937 Mon Sep 17 00:00:00 2001 From: Samuel Villegas Date: Wed, 10 Jan 2024 14:58:26 -0300 Subject: [PATCH 7/7] chore: Bump version from 0.24.0 to 0.25.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 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/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'