diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 7a929b2f..00df10a3 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.49.0 +current_version = 0.50.0 commit = True tag = False message = chore: Bump version from {current_version} to {new_version} diff --git a/.ecrc b/.editorconfig-checker.json similarity index 92% rename from .ecrc rename to .editorconfig-checker.json index fb7235dd..9c88de55 100644 --- a/.ecrc +++ b/.editorconfig-checker.json @@ -2,7 +2,7 @@ "Verbose": false, "Debug": false, "IgnoreDefaults": false, - "SpacesAftertabs": false, + "SpacesAfterTabs": false, "NoColor": false, "Exclude": [], "AllowedContentTypes": [], diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5080e955..d0585e25 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -128,7 +128,7 @@ jobs: make test-coverage-report - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v5.4.3 + uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 with: token: ${{ secrets.CODECOV_TOKEN }} directory: ./test-reports/coverage/ diff --git a/HISTORY.md b/HISTORY.md index 43a2f879..8091b3a5 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,11 @@ # History +## 0.50.0 (2025-08-20) + +- (PR #843, 2025-07-30) chore(task): Update editorconfig checker +- (PR #844, 2025-08-01) Pin GitHub Action `codecov/codecov-action` to commit hash +- (PR #848, 2025-08-20) rcv: Add RcTipoCompra enum to represent "Tipo de Compra" in RCV + ## 0.49.0 (2025-07-08) - (PR #837, 2025-07-02) dte: Customize range of random folio in `DteNaturalKey.random()` diff --git a/src/cl_sii/__init__.py b/src/cl_sii/__init__.py index bca78b9c..32f03b96 100644 --- a/src/cl_sii/__init__.py +++ b/src/cl_sii/__init__.py @@ -4,4 +4,4 @@ """ -__version__ = '0.49.0' +__version__ = '0.50.0' diff --git a/src/cl_sii/rcv/constants.py b/src/cl_sii/rcv/constants.py index ed87ac26..9a33800b 100644 --- a/src/cl_sii/rcv/constants.py +++ b/src/cl_sii/rcv/constants.py @@ -97,6 +97,19 @@ class RcEstadoContable(enum.Enum): PENDIENTE = 'PENDIENTE' +@enum.unique +class RcTipoCompra(enum.Enum): + """ + Enum of "Tipo de Compra" for the RCV domain. + """ + + DEL_GIRO = "DEL_GIRO" + """Del Giro""" + + NO_CORRESPONDE_INCLUIR = "NO_CORRESPONDE_INCLUIR" + """No corresponde incluir""" + + @enum.unique class RcvTipoDocto(enum.IntEnum): """ diff --git a/src/tests/test_rcv_constants.py b/src/tests/test_rcv_constants.py index 3ae8533c..490b4856 100644 --- a/src/tests/test_rcv_constants.py +++ b/src/tests/test_rcv_constants.py @@ -2,7 +2,7 @@ from cl_sii.dte.constants import TipoDte # noqa: F401 from cl_sii.rcv import constants # noqa: F401 -from cl_sii.rcv.constants import RcEstadoContable, RcvKind, RcvTipoDocto # noqa: F401 +from cl_sii.rcv.constants import RcEstadoContable, RcTipoCompra, RcvKind, RcvTipoDocto # noqa: F401 class RcvKindTest(unittest.TestCase): @@ -48,6 +48,20 @@ def test_values_type(self) -> None: self.assertSetEqual({type(x.value) for x in RcEstadoContable}, {str}) +class RcTipoCompraTest(unittest.TestCase): + def test_members(self) -> None: + self.assertSetEqual( + {x for x in RcTipoCompra}, + { + RcTipoCompra.DEL_GIRO, + RcTipoCompra.NO_CORRESPONDE_INCLUIR, + }, + ) + + def test_values_type(self) -> None: + self.assertSetEqual({type(x.value) for x in RcTipoCompra}, {str}) + + class RcvTipoDoctoTest(unittest.TestCase): def test_members(self) -> None: self.assertSetEqual(