Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c91ea58
chore(deps): Bump setuptools from 65.5.1 to 70.3.0
dependabot[bot] Jul 17, 2024
4cbff69
Merge pull request #660 from cordada/dependabot/pip/setuptools-70.0.0
jtrobles-cdd Aug 23, 2024
547fb09
chore: Bump django from 4.2.14 to 4.2.15
dependabot[bot] Aug 23, 2024
643aa8a
Merge pull request #672 from cordada/dependabot/pip/django-4.2.15
jtrobles-cdd Aug 23, 2024
dee5b29
chore(deps): Update `pip` from 23.3 to 24.2
jtrobles-cdd Aug 23, 2024
8204158
Merge pull request #676 from cordada/task/update-pip
jtrobles-cdd Aug 23, 2024
83d2650
chore(deps): Update `wheel` from ≤0.43.0 to 0.44.0
jtrobles-cdd Aug 23, 2024
a2da966
Merge pull request #677 from cordada/task/update-wheel
jtrobles-cdd Aug 23, 2024
1ebac1c
chore: Update documentation links in Python Project Configuration
jtrobles-cdd Aug 23, 2024
fe06140
chore: Replace Setuptools Config. with Python Project Configuration
jtrobles-cdd Aug 23, 2024
06f4b1b
Merge pull request #675 from cordada/task/replace-setuptools-config-w…
jtrobles-cdd Aug 23, 2024
1fb6322
chore: Bump jsonschema from 4.22.0 to 4.23.0
dependabot[bot] Aug 23, 2024
90ec9d4
Merge pull request #670 from cordada/dependabot/pip/jsonschema-4.23.0
jtrobles-cdd Aug 23, 2024
e239c97
chore: Bump the development-dependencies group with 7 updates
dependabot[bot] Aug 23, 2024
da84feb
chore: Reformat source code using 'Black'
jtrobles-cdd Aug 23, 2024
144c147
Merge pull request #678 from cordada/dependabot/pip/development-depen…
jtrobles-cdd Aug 23, 2024
827d811
chore: Bump the production-dependencies group with 2 updates
dependabot[bot] Aug 23, 2024
f2f0c3b
Merge pull request #679 from cordada/dependabot/github_actions/produc…
jtrobles-cdd Aug 23, 2024
5d6fb27
fix: Test coverage broken by migration from setup.py to pyproject.toml
jtrobles-cdd Aug 23, 2024
696efad
Merge pull request #680 from cordada/bugfix/no-test-coverage
jtrobles-cdd Aug 23, 2024
996c447
chore: Bump pyopenssl from 24.1.0 to 24.2.1
dependabot[bot] Aug 23, 2024
50202d6
Merge pull request #668 from cordada/dependabot/pip/pyopenssl-24.2.1
jtrobles-cdd Aug 23, 2024
500d1b5
chore(deps): Bump importlib-metadata from 7.1.0 to 8.4.0
dependabot[bot] Aug 23, 2024
e18b4a6
Merge pull request #673 from cordada/dependabot/pip/importlib-metadat…
jtrobles-cdd Aug 23, 2024
9cf5c39
chore: Move Flake8 configuration from `setup.cfg` to its own file
jtrobles-cdd Aug 28, 2024
d437d74
Merge pull request #681 from cordada/task/move-flake8-config-to-separ…
jtrobles-cdd Aug 28, 2024
7a4e171
chore: Move Coverage.py configuration from `setup.cfg` to its own file
jtrobles-cdd Aug 28, 2024
8fe9027
Merge pull request #682 from cordada/task/move-coveragepy-config-to-s…
jtrobles-cdd Aug 28, 2024
7a805c8
chore: Replace `setup.py sdist` and `bdist_wheel` with `build`
jtrobles-cdd Aug 28, 2024
a4f7566
chore(deps): Install Python package `build`
jtrobles-cdd Aug 28, 2024
2f050fa
Merge pull request #683 from cordada/task/replace-setuptools-sdist-bd…
jtrobles-cdd Aug 28, 2024
e147978
chore: When running `twine check`, fail on warnings
jtrobles-cdd Aug 28, 2024
ddc5508
Merge pull request #684 from cordada/task/enable-twine-strict-checking
jtrobles-cdd Aug 28, 2024
e6126cf
chore: Update history for new version
jtrobles-cdd Aug 28, 2024
1530138
chore: Bump version from 0.31.0 to 0.32.0
jtrobles-cdd Aug 28, 2024
ee1b47e
Merge pull request #685 from cordada/release/v0.32.0
jtrobles-cdd Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.31.0
current_version = 0.32.0
commit = True
tag = False
message = chore: Bump version from {current_version} to {new_version}
Expand Down
18 changes: 18 additions & 0 deletions .coveragerc.test.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[run]
source = src/
omit =
src/scripts/*
src/tests/*
branch = True

[report]
exclude_lines =
pragma: no cover
if __name__ == .__main__.
show_missing = True

[xml]
output = test-reports/coverage/xml/coverage.xml

[html]
directory = test-reports/coverage/html
20 changes: 20 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[flake8]
ignore =
# W503 line break before binary operator
W503

exclude =
*.egg-info/,
.git/,
.mypy_cache/,
.pyenvs/,
__pycache__/,
build/,
dist/,
docs/

max-line-length = 100

doctests = True
show-source = True
statistics = True
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:

- name: Store Artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4.3.4
uses: actions/upload-artifact@v4.3.6
with:
name: test_reports_${{ matrix.python_version }}
path: test-reports/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
uses: actions/checkout@v4.1.7

- name: Dependency Review
uses: actions/dependency-review-action@v4.3.3
uses: actions/dependency-review-action@v4.3.4
with:
fail-on-severity: critical
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
make dist

- name: Store Artifacts
uses: actions/upload-artifact@v4.3.4
uses: actions/upload-artifact@v4.3.6
with:
name: release
path: ${{ env.ARTIFACTS_PATH }}/
Expand Down
18 changes: 18 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# History

## 0.32.0 (2024-08-28)

- (PR #660, 2024-08-23) chore: Bump setuptools from 65.5.1 to 70.3.0
- (PR #672, 2024-08-23) chore: Bump django from 4.2.14 to 4.2.15
- (PR #676, 2024-08-23) chore(deps): Update `pip` from 23.3 to 24.2
- (PR #677, 2024-08-23) chore(deps): Update `wheel` from ≤0.43.0 to 0.44.0
- (PR #675, 2024-08-23) Replace Setuptools Configuration with Python Project Configuration
- (PR #670, 2024-08-23) chore: Bump jsonschema from 4.22.0 to 4.23.0
- (PR #678, 2024-08-23) chore: Bump the development-dependencies group across 1 directory with 7 updates
- (PR #679, 2024-08-23) chore: Bump the production-dependencies group across 1 directory with 2 updates
- (PR #680, 2024-08-23) Test coverage broken by migration from `setup.py` to `pyproject.toml`
- (PR #668, 2024-08-23) chore: Bump pyopenssl from 24.1.0 to 24.2.1
- (PR #673, 2024-08-23) chore(deps): Bump importlib-metadata from 7.1.0 to 8.4.0
- (PR #681, 2024-08-28) Move Flake8 configuration from `setup.cfg` to its own file
- (PR #682, 2024-08-28) Move Coverage.py configuration from `setup.cfg` to its own file
- (PR #683, 2024-08-28) Replace `setup.py sdist` and `bdist_wheel` with `build`
- (PR #684, 2024-08-28) When running `twine check`, fail on warnings

## 0.31.0 (2024-07-17)

- (PR #661, 2024-07-17) extras: Add `RutFilter` for Django views and DRF views
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,29 @@ test-all: ## run tests on every Python version with tox
tox

test-coverage: ## run tests and record test coverage
coverage run --rcfile=setup.cfg setup.py test
coverage run --rcfile=.coveragerc.test.ini -m unittest discover -v -c -b -s src -t src

test-coverage-report: test-coverage-report-console
test-coverage-report: test-coverage-report-xml
test-coverage-report: test-coverage-report-html
test-coverage-report: ## Run tests, measure code coverage, and generate reports

test-coverage-report-console: ## print test coverage summary
coverage report --rcfile=setup.cfg -m
coverage report --rcfile=.coveragerc.test.ini -m

test-coverage-report-xml: ## Generate test coverage XML report
coverage xml --rcfile=setup.cfg
coverage xml --rcfile=.coveragerc.test.ini

test-coverage-report-html: ## generate test coverage HTML report
coverage html --rcfile=setup.cfg
coverage html --rcfile=.coveragerc.test.ini

build: ## Build Python package
$(PYTHON) setup.py build

dist: build ## builds source and wheel package
python setup.py sdist
python setup.py bdist_wheel
twine check dist/*
python -m build --sdist
python -m build --wheel
twine check --strict dist/*
ls -l dist

upload-release: ## upload dist packages
Expand Down
92 changes: 86 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,94 @@
# Python Project Configuration
#
# Documentation:
# - https://packaging.python.org/en/latest/specifications/pyproject-toml/
# (https://github.com/pypa/packaging.python.org/blob/caa20073/source/specifications/pyproject-toml.rst)
# - https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/
# - https://github.com/pypa/pip/blob/23.2.1/docs/html/reference/build-system/pyproject-toml.md
# - https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
# - https://github.com/pypa/packaging.python.org/blob/df2c8b22/source/specifications/declaring-project-metadata.rst
# (https://github.com/pypa/pip/blob/24.2/docs/html/reference/build-system/pyproject-toml.md)
# - https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
# (https://github.com/pypa/setuptools/blob/v70.3.0/docs/userguide/pyproject_config.rst)

[build-system]
requires = [
"setuptools==65.5.1",
"wheel==0.41.3",
"setuptools==70.3.0",
"wheel==0.44.0",
]
build-backend = "setuptools.build_meta:__legacy__"
build-backend = "setuptools.build_meta"

[project]
name = "cl-sii"
dependencies = [
"cryptography>=38.0.0",
"defusedxml>=0.6.0,<1",
"jsonschema>=3.1.1",
"lxml>=4.6.5,<6",
"marshmallow>=3,<4",
"pydantic>=2.3.0,!=1.7.*,!=1.8.*,!=1.9.*",
"pyOpenSSL>=22.0.0",
"pytz>=2019.3",
"signxml>=3.1.0",
]
requires-python = ">=3.8, <3.11"
authors = [
{name = "Fyntex TI SpA", email = "no-reply@fyntex.ai"},
]
description = "Python library for Servicio de Impuestos Internos (SII) of Chile."
readme = "README.md"
license = {text = "MIT"}
classifiers = [
# See https://pypi.org/classifiers/
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
dynamic = ["version"]

[project.optional-dependencies]
django = ["Django>=2.2.24"]
django-filter = ["django-filter>=24.2"]
djangorestframework = ["djangorestframework>=3.10.3,<3.16"]

[project.urls]
Homepage = "https://github.com/fyntex/lib-cl-sii-python"
Changelog = "https://github.com/fyntex/lib-cl-sii-python/blob/develop/HISTORY.md"

[tool.setuptools]
include-package-data = true
zip-safe = false

[tool.setuptools.packages.find]
where = ["src"]
include = ["*"]
exclude = [
"scripts",
"tests*",
]
namespaces = true

[tool.setuptools.package-data]
# note: the "typing information" of this project's packages is not made available to its users
# automatically; it needs to be packaged and distributed. The way to do so is fairly new and
# it is specified in PEP 561 - "Distributing and Packaging Type Information".
# See:
# - https://www.python.org/dev/peps/pep-0561/#packaging-type-information
# - https://github.com/python/typing/issues/84
# - https://github.com/python/mypy/issues/3930
# warning: remember to replicate this in the manifest file for source distribution ('MANIFEST.in').
cl_sii = [
# Indicates that the "typing information" of the package should be distributed.
"py.typed",
# Data files that are not in a sub-package.
"data/cte/schemas-json/*.schema.json",
"data/ref/factura_electronica/schemas-xml/*.xsd",
]

[tool.setuptools.dynamic]
version = {attr = "cl_sii.__version__"}

[tool.distutils.bdist_wheel]
universal = false
17 changes: 9 additions & 8 deletions requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@

-c requirements.txt

black==24.4.2
black==24.8.0
build==1.0.3
bumpversion==0.5.3
coverage==7.5.4
flake8==7.1.0
coverage==7.6.1
flake8==7.1.1
isort==5.13.2
mypy==1.10.1
mypy==1.11.1
pip-tools==7.4.1
tox==4.16.0
tox==4.18.0
twine==5.1.1
types-jsonschema==4.22.0.20240610
types-pyOpenSSL==24.1.0.20240425
types-jsonschema==4.23.0.20240813
types-pyOpenSSL==24.1.0.20240722
types-pytz==2024.1.0.20240417
wheel==0.43.0
wheel==0.44.0
28 changes: 15 additions & 13 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ attrs==23.2.0
# via
# -c requirements.txt
# referencing
black==24.4.2
black==24.8.0
# via -r requirements-dev.in
bleach==5.0.1
# via readme-renderer
build==1.0.3
# via pip-tools
# via
# -r requirements-dev.in
# pip-tools
bumpversion==0.5.3
# via -r requirements-dev.in
cachetools==5.3.3
cachetools==5.5.0
# via tox
certifi==2024.7.4
# via
Expand All @@ -36,7 +38,7 @@ click==8.0.3
# pip-tools
colorama==0.4.6
# via tox
coverage==7.5.4
coverage==7.6.1
# via -r requirements-dev.in
cryptography==42.0.8
# via
Expand All @@ -51,11 +53,11 @@ filelock==3.15.4
# via
# tox
# virtualenv
flake8==7.1.0
flake8==7.1.1
# via -r requirements-dev.in
idna==3.7
# via requests
importlib-metadata==7.1.0
importlib-metadata==8.4.0
# via
# -c requirements.txt
# build
Expand All @@ -74,7 +76,7 @@ mccabe==0.7.0
# via flake8
mdurl==0.1.2
# via markdown-it-py
mypy==1.10.1
mypy==1.11.1
# via -r requirements-dev.in
mypy-extensions==1.0.0
# via
Expand Down Expand Up @@ -151,15 +153,15 @@ tomli==2.0.1
# pyproject-api
# pyproject-hooks
# tox
tox==4.16.0
tox==4.18.0
# via -r requirements-dev.in
twine==5.1.1
# via -r requirements-dev.in
types-cffi==1.16.0.20240331
# via types-pyopenssl
types-jsonschema==4.22.0.20240610
types-jsonschema==4.23.0.20240813
# via -r requirements-dev.in
types-pyopenssl==24.1.0.20240425
types-pyopenssl==24.1.0.20240722
# via -r requirements-dev.in
types-pytz==2024.1.0.20240417
# via -r requirements-dev.in
Expand All @@ -179,7 +181,7 @@ virtualenv==20.26.3
# via tox
webencodings==0.5.1
# via bleach
wheel==0.43.0
wheel==0.44.0
# via
# -r requirements-dev.in
# pip-tools
Expand All @@ -189,7 +191,7 @@ zipp==3.19.2
# importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
pip==23.3
pip==24.2
# via pip-tools
setuptools==65.5.1
setuptools==70.3.0
# via pip-tools
6 changes: 3 additions & 3 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ defusedxml==0.7.1
django-filter>=24.2
Django>=2.2.24
djangorestframework>=3.10.3,<3.16
importlib-metadata==7.1.0
jsonschema==4.22.0
importlib-metadata==8.4.0
jsonschema==4.23.0
lxml==5.2.2
marshmallow==3.21.3
pydantic==2.7.2
pyOpenSSL==24.1.0
pyOpenSSL==24.2.1
pytz==2024.1
signxml==3.2.2
Loading