Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2016-07-26 23:33:48 +0200
committerArthur de Jong <arthur@arthurdejong.org>2016-07-26 23:39:42 +0200
commit01a7f34edc5d09d800f43e4fee966b2e7ea6ad3e (patch)
tree38f1659c65e918db43154b3444b7e1aac7268ed1
parent3e4e9e2c7682efb46d5bc25b7e640ab1cfd5f17e (diff)
Get files ready for 1.4 release1.4
-rw-r--r--ChangeLog199
-rw-r--r--NEWS19
-rw-r--r--README10
-rw-r--r--docs/index.rst6
-rw-r--r--docs/stdnum.damm.rst5
-rw-r--r--docs/stdnum.fr.nif.rst5
-rw-r--r--docs/stdnum.fr.nir.rst5
-rw-r--r--docs/stdnum.fr.siret.rst5
-rw-r--r--docs/stdnum.gb.nhs.rst5
-rw-r--r--docs/stdnum.tr.tckimlik.rst5
-rw-r--r--stdnum/__init__.py10
11 files changed, 270 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a78944c..412b3ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,202 @@
+2016-07-26 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [3e4e9e2] getmybp.py, stdnum/cn/loc.dat, stdnum/iban.dat,
+ stdnum/imsi.dat, stdnum/isbn.dat, stdnum/isil.dat: Update
+ database files
+
+ This also updates the getmybp script to support the new layout.
+
+2016-07-26 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [3e344d1] stdnum/iso6346.py: Add formatting of ISO 6346 container
+ codes
+
+2016-07-26 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [aa1c298] getnumlist.py, stdnum/damm.py, tests/test_damm.doctest:
+ Implement Damm algorithm
+
+ This is a generic check digit algorithm. 2016-07-26 Arthur de
+Jong <arthur@arthurdejong.org>
+
+ * [411d038] stdnum/fr/nif.py: Fix French NIF format test
+
+ Fixes 2409ee9. 2016-07-26 Arthur de Jong
+<arthur@arthurdejong.org>
+
+ * [06e4165] stdnum/ch/ssn.py: Improve validation to Swiss SSN number
+
+ The EAN-13 number should start with 756.
+
+2016-07-26 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [1907c67] stdnum/br/cpf.py: Add documentation to Brazillian CPF
+
+2016-07-26 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [cf428ac] stdnum/iso6346.py: Add pointer to ISO 6346 information
+
+2016-07-26 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [011c0f0] stdnum/gb/nhs.py: Fix copyright notice
+
+2016-05-22 Dimitri Papadopoulos <dimitri.papadopoulos@cea.fr>
+
+ * [2409ee9] stdnum/fr/nif.py: Add NIF - French tax identification
+ number
+
+ Add module for NIF also known as SPI number.
+
+2016-07-26 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [43b58d3] stdnum/fr/nir.py: Move NIR check digit calculation
+ to function
+
+ This also fixes a number of formatting issues, improves the
+ module description and adds tests for the 2A and 2B departments.
+
+2016-05-29 Dimitri Papadopoulos <dimitri.papadopoulos@cea.fr>
+
+ * [879f2d3] stdnum/fr/nir.py: Improve French NIR validation
+
+ Please note that the 7th character of the NIR might be 'A' or
+ 'B'. Other than that the NIR contains digits only.
+
+2016-07-25 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [fd9f953] stdnum/fr/siren.py, stdnum/fr/siret.py,
+ tests/test_fr_siren.doctest, tests/test_fr_siret.doctest: Add
+ extra tests for SIREN and SIRET
+
+ This adds tests for a few numbers that have been found online
+ and allows the dot as a seprator because those numbers were found.
+
+ It also ensures that the SIREN validation is also called for
+ SIRET and adds a SIRET formatting function.
+
+2016-05-27 Yoann Aubineau <y.aubineau@criteo.com>
+
+ * [5ba3a87] stdnum/fr/siret.py: Add French SIRET number
+
+ Add a SIRET (Système d'Identification du Répertoire des
+ ETablissements, a French company etablishment identification
+ number) module.
+
+2016-05-29 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [dc708f0] stdnum/isil.py, tests/test_isil.doctest: Add more
+ ISIL tests
+
+ This moves a few of the tests from the module to a dedicated
+ test file and adds tests for a number of ISIL numbers found online.
+
+2016-05-29 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [4a57d84] stdnum/us/tin.py: Fix formatting of bulleted list
+
+2016-05-28 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [9b74840] stdnum/ch/ssn.py, tests/test_ch_ssn.doctest: Fix bug
+ in Swiss SSN validation
+
+ The validation was delegated to the EAN module but the number
+ is supposed to be an EAN-13 only and and EAN-8 was also accepted.
+
+ This also reformats the docstring.
+
+2016-05-28 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [f3c2491] stdnum/ie/vat.py, tests/test_ie_vat.doctest: Fix bug
+ in Irish VAT number validation
+
+ The last digits of the number that should be letters were not
+ tested to be letters which could result in ValueError being
+ raised for certain validations.
+
+ This also clarifies the documentation and adds a convert()
+ function to convert numbers from the old format (where the
+ second character would be a letter or symbol) to the new format
+ (7 digits followed by 1 or 2 letters).
+
+2016-05-28 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [b5397ed] tests/test_robustness.doctest: Small improvements
+ to tests
+
+ This includes a formatting fix and removes an unused variable
+ from a test.
+
+2016-05-28 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [d85b27f] stdnum/util.py: Fix get_module_description()
+
+ This fixes the initial implementation in 3f6d52a.
+
+2016-05-22 Dimitri Papadopoulos <dimitri.papadopoulos@cea.fr>
+
+ * [a1afa76] stdnum/fr/nir.py: Add French NIR
+
+ Add module for NIR also known as social security number.
+
+2016-05-09 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [0a2f39e] stdnum/gb/nhs.py: Add United Kingdom NHS number
+
+ Add module for United Kingdom National Health Service patient
+ identifier.
+
+2016-05-09 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [2126947] stdnum/numdb.py: Read numdb files in context manager
+
+ This ensures that the file is explicitly closed in the function
+ to avoid "unclosed file" warnings.
+
+ See: https://github.com/arthurdejong/python-stdnum/issues/33
+
+2016-04-11 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [e28b5e1] stdnum/ch/uid.py, stdnum/ch/vat.py, stdnum/cusip.py,
+ stdnum/dk/cpr.py, stdnum/iban.py, stdnum/imei.py, stdnum/isbn.py,
+ stdnum/isil.py, stdnum/isin.py, stdnum/issn.py, stdnum/mx/rfc.py,
+ stdnum/nl/bsn.py, stdnum/nl/onderwijsnummer.py, stdnum/pl/regon.py,
+ stdnum/tr/tckimlik.py, stdnum/us/ssn.py, stdnum/verhoeff.py:
+ Make more information links consistent
+
+ Also fix a docstring in stdnum.nl.bsn and add a pointer to
+ stdnum.nl.onderwijsnummer.
+
+2016-04-09 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [feab917] stdnum/eu/vat.py, stdnum/tr/tckimlik.py, stdnum/util.py:
+ Implement online TC Kimlik check
+
+ This refactors out the SOAP client function that was implemented
+ for VIES to the stdnum.utils module.
+
+2016-04-09 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [619b097] stdnum/tr/__init__.py, stdnum/tr/tckimlik.py,
+ tests/test_tr_tckimlik.doctest: Add Turkish personal identification
+ number
+
+2016-04-01 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [095dcbb] stdnum/mx/rfc.py, tests/test_mx_rfc.doctest: Document
+ accuracy of RFC check digit test
+
+ There is an online service that allows validating RFC numbers. It
+ seems there are a lot of numbers that do not match the check
+ digit algorithm which confirms disabling the check digit test
+ by default is a good idea.
+
+ Also see https://github.com/arthurdejong/python-stdnum/issues/32
+
+2016-03-05 Arthur de Jong <arthur@arthurdejong.org>
+
+ * [41cecb5] ChangeLog, NEWS, getnumlist.py, setup.py,
+ stdnum/__init__.py: Get files ready for 1.3 release
+
2016-03-03 Arthur de Jong <arthur@arthurdejong.org>
* [6457734] getcnloc.py, getiban.py, stdnum/cn/loc.dat,
diff --git a/NEWS b/NEWS
index 50e94c4..1f8261d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,22 @@
+changes from 1.3 to 1.4
+-----------------------
+
+* add modules for the following number formats:
+ - NIF (Numéro d'Immatriculation Fiscale, French tax identification number)
+ provided by Dimitri Papadopoulos
+ - NIR (French personal identification number) provided by Dimitri
+ Papadopoulos
+ - SIRET (a French company establishment identification number) provided by
+ Yoann Aubineau
+ - NHS (United Kingdom National Health Service patient identifier)
+ - T.C. Kimlik No. (Turkish personal identification number)
+* add an implementation of the Damm algorithm
+* ensure data files are properly closed
+* documentation improvements
+* extend test suite
+* a number of minor bug fixes and improvements
+
+
changes from 1.2 to 1.3
-----------------------
diff --git a/README b/README
index f9be19e..4c8c8de 100644
--- a/README
+++ b/README
@@ -50,8 +50,12 @@ Currently this package supports the following formats:
* Finnish Association Identifier
* HETU (Henkilötunnus, Finnish personal identity code)
* Y-tunnus (Finnish business identifier)
+ * NIF (Numéro d'Immatriculation Fiscale, French tax identification number)
+ * NIR (French personal identification number)
* SIREN (a French company identification number)
+ * SIRET (a French company establishment identification number)
* n° TVA (taxe sur la valeur ajoutée, French VAT number)
+ * NHS (United Kingdom National Health Service patient identifier)
* SEDOL number (Stock Exchange Daily Official List number)
* VAT (United Kingdom (and Isle of Man) VAT registration number)
* FPA, ΦΠΑ, ΑΦΜ (Αριθμός Φορολογικού Μητρώου, the Greek VAT number)
@@ -60,7 +64,7 @@ Currently this package supports the following formats:
* ANUM (Közösségi adószám, Hungarian VAT number)
* IBAN (International Bank Account Number)
* PPS No (Personal Public Service Number, Irish personal number)
- * VAT (Irish VAT number)
+ * VAT (Irish tax reference number)
* IMEI (International Mobile Equipment Identity)
* IMO number (International Maritime Organization number)
* IMSI (International Mobile Subscriber Identity)
@@ -103,6 +107,7 @@ Currently this package supports the following formats:
* IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number)
* RČ (Rodné číslo, the Slovak birth number)
* COE (Codice operatore economico, San Marino national tax number)
+ * T.C. Kimlik No. (Turkish personal identification number)
* ATIN (U.S. Adoption Taxpayer Identification Number)
* EIN (U.S. Employer Identification Number)
* ITIN (U.S. Individual Taxpayer Identification Number)
@@ -114,6 +119,7 @@ Currently this package supports the following formats:
Furthermore a number of generic check digit algorithms are available:
* the Verhoeff algorithm
+ * the Damm algorithm
* the Luhn and Luhn mod N algorithms
* some algorithms described in ISO/IEC 7064: Mod 11, 2, Mod 37, 2,
Mod 97, 10, Mod 11, 10 and Mod 37, 36
@@ -152,7 +158,7 @@ also work with older versions of Python.
Copyright
---------
-Copyright (C) 2010-2015 Arthur de Jong and others
+Copyright (C) 2010-2016 Arthur de Jong and others
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/docs/index.rst b/docs/index.rst
index 59df1d5..b85a8e0 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -74,6 +74,7 @@ Generic check digit algorithms
.. autosummary::
:toctree:
+ damm
iso7064
luhn
verhoeff
@@ -126,8 +127,12 @@ Available formats
fi.associationid
fi.hetu
fi.ytunnus
+ fr.nif
+ fr.nir
fr.siren
+ fr.siret
fr.tva
+ gb.nhs
gb.sedol
gb.vat
gr.vat
@@ -179,6 +184,7 @@ Available formats
sk.dph
sk.rc
sm.coe
+ tr.tckimlik
us.atin
us.ein
us.itin
diff --git a/docs/stdnum.damm.rst b/docs/stdnum.damm.rst
new file mode 100644
index 0000000..e4bb865
--- /dev/null
+++ b/docs/stdnum.damm.rst
@@ -0,0 +1,5 @@
+stdnum.damm
+===========
+
+.. automodule:: stdnum.damm
+ :members: \ No newline at end of file
diff --git a/docs/stdnum.fr.nif.rst b/docs/stdnum.fr.nif.rst
new file mode 100644
index 0000000..33b76ac
--- /dev/null
+++ b/docs/stdnum.fr.nif.rst
@@ -0,0 +1,5 @@
+stdnum.fr.nif
+=============
+
+.. automodule:: stdnum.fr.nif
+ :members: \ No newline at end of file
diff --git a/docs/stdnum.fr.nir.rst b/docs/stdnum.fr.nir.rst
new file mode 100644
index 0000000..13ee2e7
--- /dev/null
+++ b/docs/stdnum.fr.nir.rst
@@ -0,0 +1,5 @@
+stdnum.fr.nir
+=============
+
+.. automodule:: stdnum.fr.nir
+ :members: \ No newline at end of file
diff --git a/docs/stdnum.fr.siret.rst b/docs/stdnum.fr.siret.rst
new file mode 100644
index 0000000..a54ea58
--- /dev/null
+++ b/docs/stdnum.fr.siret.rst
@@ -0,0 +1,5 @@
+stdnum.fr.siret
+===============
+
+.. automodule:: stdnum.fr.siret
+ :members: \ No newline at end of file
diff --git a/docs/stdnum.gb.nhs.rst b/docs/stdnum.gb.nhs.rst
new file mode 100644
index 0000000..f1d97d4
--- /dev/null
+++ b/docs/stdnum.gb.nhs.rst
@@ -0,0 +1,5 @@
+stdnum.gb.nhs
+=============
+
+.. automodule:: stdnum.gb.nhs
+ :members: \ No newline at end of file
diff --git a/docs/stdnum.tr.tckimlik.rst b/docs/stdnum.tr.tckimlik.rst
new file mode 100644
index 0000000..fd9f38c
--- /dev/null
+++ b/docs/stdnum.tr.tckimlik.rst
@@ -0,0 +1,5 @@
+stdnum.tr.tckimlik
+==================
+
+.. automodule:: stdnum.tr.tckimlik
+ :members: \ No newline at end of file
diff --git a/stdnum/__init__.py b/stdnum/__init__.py
index 8da7c35..d12dcd4 100644
--- a/stdnum/__init__.py
+++ b/stdnum/__init__.py
@@ -66,8 +66,12 @@ Currently this package supports the following formats:
* fi.associationid: Finnish Association Identifier
* fi.hetu: HETU (Henkilötunnus, Finnish personal identity code)
* fi.ytunnus: Y-tunnus (Finnish business identifier)
+* fr.nif: NIF (Numéro d'Immatriculation Fiscale, French tax identification number)
+* fr.nir: NIR (French personal identification number)
* fr.siren: SIREN (a French company identification number)
+* fr.siret: SIRET (a French company establishment identification number)
* fr.tva: n° TVA (taxe sur la valeur ajoutée, French VAT number)
+* gb.nhs: NHS (United Kingdom National Health Service patient identifier)
* gb.sedol: SEDOL number (Stock Exchange Daily Official List number)
* gb.vat: VAT (United Kingdom (and Isle of Man) VAT registration number)
* gr.vat: FPA, ΦΠΑ, ΑΦΜ (Αριθμός Φορολογικού Μητρώου, the Greek VAT number)
@@ -76,7 +80,7 @@ Currently this package supports the following formats:
* hu.anum: ANUM (Közösségi adószám, Hungarian VAT number)
* iban: IBAN (International Bank Account Number)
* ie.pps: PPS No (Personal Public Service Number, Irish personal number)
-* ie.vat: VAT (Irish VAT number)
+* ie.vat: VAT (Irish tax reference number)
* imei: IMEI (International Mobile Equipment Identity)
* imo: IMO number (International Maritime Organization number)
* imsi: IMSI (International Mobile Subscriber Identity)
@@ -119,6 +123,7 @@ Currently this package supports the following formats:
* sk.dph: IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number)
* sk.rc: RČ (Rodné číslo, the Slovak birth number)
* sm.coe: COE (Codice operatore economico, San Marino national tax number)
+* tr.tckimlik: T.C. Kimlik No. (Turkish personal identification number)
* us.atin: ATIN (U.S. Adoption Taxpayer Identification Number)
* us.ein: EIN (U.S. Employer Identification Number)
* us.itin: ITIN (U.S. Individual Taxpayer Identification Number)
@@ -129,6 +134,7 @@ Currently this package supports the following formats:
Furthermore a number of generic check digit algorithms are available:
+* damm: The Damm algorithm
* iso7064.mod_11_10: The ISO 7064 Mod 11, 10 algorithm
* iso7064.mod_11_2: The ISO 7064 Mod 11, 2 algorithm
* iso7064.mod_37_2: The ISO 7064 Mod 37, 2 algorithm
@@ -153,4 +159,4 @@ parsing, validation, formatting or conversion functions.
# the version number of the library
-__version__ = '1.3'
+__version__ = '1.4'