Skip to content

Commit

Permalink
Merge branch 'main' into feature/add-random-iban-generation
Browse files Browse the repository at this point in the history
* main:
  chore: Add changelog for release 2024.05.2
  Install typing-extensions for Python <= 3.10
  chore: Add changelog for release 2024.05.1
  Revert "add pyinstaller support (#92)"
  Improve Pydantic support for BIC objects
  Remove the iso3166 library as we already have pycountry
  Use Self for more accurate typing (#201)
  Improve Pydantic support
  Update generated according to script spec (#199)
  Update missing Luxembourg bank (#198)
  Update IBAN registry spec (#197)
  chore: Update to GitHub actions setup-python@5
  Added manually curated bank registry for Montenegro
  Add CHANGELOG for 2024.04.0 release
  • Loading branch information
mdomke committed May 9, 2024
2 parents ba94bca + ad71235 commit 24f4b2c
Show file tree
Hide file tree
Showing 23 changed files with 1,979 additions and 1,805 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
Expand All @@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
Expand All @@ -38,7 +38,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
Expand All @@ -54,11 +54,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: pip install hatch
- name: Smoke test installation
run: pip install .
- name: Test
run: hatch run cov-test
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
65 changes: 65 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,67 @@ Changelog

Versions follow `CalVer <http://www.calver.org/>`_ with the scheme ``YY.0M.Micro``.

`2024.05.2`_ - 2024/05/09
-------------------------
Fixed
~~~~~
* Add `typing-extensions` as explicit dependency for Python < 3.11 to support the `Self` type.

`2024.05.1`_ - 2024/05/09
-------------------------
Changed
~~~~~~~
* Remove custom collection logic of the bank registry for ``pyinstaller``. The changes introduced in
`#92 <https://github.com/mdomke/schwifty/pull/92>`_ were wrong and have been reverted. Usage
example

.. code-block:: bash
$ pyinstaller <script> --collect-data schwifty --copy-metadata schwifty
`2024.05.0`_ - 2024/05/07
-------------------------
Fixed
~~~~~
* Loading JSON data into a Pydantic model with an ``IBAN`` or ``BIC``-field
(``Model.model_validate_json()``) was previously broken and has been fixed now.

Added
~~~~~
* JSON schema generation for Pydantic models.

Changed
~~~~~~~
* Updated bank registries.
* Remove the dependency to ``iso3166`` since its functionallity is already covered by ``pycountry``


`2024.04.0`_ - 2024/04/18
-------------------------
Added
~~~~~
* Added Revolut Bank for Spain `@brunovilla <https://github.com/brunovila>`_
* Added support for Python 3.12
* Added manually curated bank registry for Montenegro `@Djuka <https://github.com/Djuka>`_

Changed
~~~~~~~
* The bank registry is now internally validated, so that all domestic bank codes actaully match the
specification of the corresponding BBAN structure. As a result some entries had to be removed,
because they did contain invalid bank codes.
* The Danish national checksum algorithm is considered opaque and the checksum digit is assumed to
be part of the account number (which is now always 10 digits long).

Fixed
~~~~~
* The Czech bank registry was stored in latin-1 encoding while being read as UTF-8. This resulted
in invalid bank names `@Natim <https://github.com/Natim>`_ and
`@Cogax <https://github.com/Cogax>`_.
* The Norwegian national checksum algorithm was rendering wrong results in some edge-cases
`@Natim <https://github.com/Natim>`_



`2024.01.1`_ - 2024/01/05
-------------------------
Added
Expand Down Expand Up @@ -538,6 +599,10 @@ Added
* Added :attr:`.BIC.country` and :attr:`.IBAN.country`.


.. _2024.05.2: https://github.com/mdomke/schwifty/compare/2024.05.1...2024.05.2
.. _2024.05.1: https://github.com/mdomke/schwifty/compare/2024.05.0...2024.05.1
.. _2024.05.0: https://github.com/mdomke/schwifty/compare/2024.04.0...2024.05.0
.. _2024.04.0: https://github.com/mdomke/schwifty/compare/2024.01.1...2024.04.0
.. _2024.01.1: https://github.com/mdomke/schwifty/compare/2023.11.2...2024.01.1
.. _2023.11.2: https://github.com/mdomke/schwifty/compare/2023.11.1...2023.11.2
.. _2023.11.1: https://github.com/mdomke/schwifty/compare/2023.11.0...2023.11.1
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ authors = [
]
dependencies = [
"importlib_resources>=5.10; python_version <= '3.11'",
"iso3166",
"typing-extensions>=4.0.1; python_version <= '3.10'",
"pycountry",
"rstr",
]
Expand Down
30 changes: 7 additions & 23 deletions schwifty/bank_registry/generated_at.json
Original file line number Diff line number Diff line change
Expand Up @@ -1082,10 +1082,10 @@
{
"country_code": "AT",
"primary": true,
"bic": "OKOMATWWXXX",
"bic": "",
"bank_code": "18170",
"name": "KA Finanz AG",
"short_name": "KA Finanz AG"
"name": "KA Finanz AG i.A.",
"short_name": "KA Finanz AG i.A."
},
{
"country_code": "AT",
Expand Down Expand Up @@ -1575,14 +1575,6 @@
"name": "Raiffeisenbank Taxenbach eGen",
"short_name": "Raiffeisenbank Taxenbach eGen"
},
{
"country_code": "AT",
"primary": true,
"bic": "ASPKAT2LXXX",
"bank_code": "20315",
"name": "Sparkasse Ober\u00f6sterreich Bank AG",
"short_name": "Sparkasse Ober\u00f6sterreich Bank AG"
},
{
"country_code": "AT",
"primary": true,
Expand Down Expand Up @@ -4191,14 +4183,6 @@
"name": "Sparkasse Imst AG",
"short_name": "Sparkasse Imst AG"
},
{
"country_code": "AT",
"primary": true,
"bic": "LEGMATW1XXX",
"bank_code": "73800",
"name": "LEASFINANZ Bank GmbH",
"short_name": "LEASFINANZ Bank GmbH"
},
{
"country_code": "AT",
"primary": true,
Expand Down Expand Up @@ -4524,8 +4508,8 @@
"primary": true,
"bic": "PABXATW1XXX",
"bank_code": "18120",
"name": "paybox Bank AG",
"short_name": "paybox Bank AG"
"name": "A1 Bank AG",
"short_name": "A1 Bank AG"
},
{
"country_code": "AT",
Expand Down Expand Up @@ -6364,8 +6348,8 @@
"primary": true,
"bic": "VPAYATW2XXX",
"bank_code": "94648",
"name": "Viva Payment Services S.A. Zweigniederlassung Wien/\u00d6sterreich",
"short_name": "Viva Payment Services S.A. Zweigniederlassung Wien/\u00d6sterreich"
"name": "Viva Payment Services Single Member S.A. Zweigniederlassung Wien/ \u00d6sterreich",
"short_name": "Viva Payment Services Single Member S.A. Zweigniederlassung Wien/ \u00d6sterreich"
},
{
"country_code": "AT",
Expand Down
Loading

0 comments on commit 24f4b2c

Please sign in to comment.