lists.arthurdejong.org
RSS feed

python-stdnum branch master updated. 1.0-18-g4d7163c

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum branch master updated. 1.0-18-g4d7163c



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-stdnum".

The branch, master has been updated
       via  4d7163c689fd1a79fd28552ace915c0b09ba6efa (commit)
       via  ba894d7c98072dd533e17a0c115d536c49a3a030 (commit)
       via  144e1a45d2f81f424fd71b0f6c0109737e638aec (commit)
       via  c69c8f0fc52d003faeba378a6834fe555eff3b72 (commit)
       via  3db826c62332bab0e839d83514781ff1f5f17320 (commit)
       via  88d1af32f28ec2e86bf15ad86ed68e4723d0c7a1 (commit)
      from  49d1e691c02ec1e3c89c6d4e9e5f8a232bb1255e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://arthurdejong.org/git/python-stdnum/commit/?id=4d7163c689fd1a79fd28552ace915c0b09ba6efa

commit 4d7163c689fd1a79fd28552ace915c0b09ba6efa
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Wed Apr 22 23:01:17 2015 +0200

    Add Argentinian CUIT (VAT) number
    
    Based partially on the implementation in the vatnumber module.

diff --git a/stdnum/ar/__init__.py b/stdnum/ar/__init__.py
new file mode 100644
index 0000000..999da35
--- /dev/null
+++ b/stdnum/ar/__init__.py
@@ -0,0 +1,24 @@
+# __init__.py - collection of Argentinian numbers
+# coding: utf-8
+#
+# Copyright (C) 2015 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+"""Collection of Argentinian numbers."""
+
+# provide vat as an alias
+from stdnum.ar import cuit as vat
diff --git a/stdnum/ar/cuit.py b/stdnum/ar/cuit.py
new file mode 100644
index 0000000..78e81aa
--- /dev/null
+++ b/stdnum/ar/cuit.py
@@ -0,0 +1,80 @@
+# cuit.py - functions for handling Argentinian VAT numbers
+# coding: utf-8
+#
+# Copyright (C) 2009 Mariano Reingart
+# Copyright (C) 2011 Sebastián Marró
+# Copyright (C) 2008-2011 Cédric Krier
+# Copyright (C) 2008-2011 B2CK
+# Copyright (C) 2015 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+"""CUIT (Código Único de Identificación Tributaria, Argentinian tax number).
+
+The CUIT is a taxpayer identification number used for VAT (IVA, Impuesto al
+Valor Agregado) and other taxes.
+
+>>> validate('200-5536168-2')
+'20055361682'
+>>> validate('2026756539')
+Traceback (most recent call last):
+    ...
+InvalidLength: ...
+>>> validate('2026756A393')
+Traceback (most recent call last):
+    ...
+InvalidFormat: ...
+>>> validate('20267565392')
+Traceback (most recent call last):
+    ...
+InvalidChecksum: ...
+"""
+
+from stdnum.exceptions import *
+from stdnum.util import clean
+
+
+def compact(number):
+    """Convert the number to the minimal representation. This strips the
+    number of any valid separators and removes surrounding whitespace."""
+    return clean(number, ' -').strip()
+
+
+def calc_check_digit(number):
+    """Calculate the check digit."""
+    weights = (5, 4, 3, 2, 7, 6, 5, 4, 3, 2)
+    check = sum(weights[i] * int(n) for i, n in enumerate(number)) % 11
+    return '012345678990'[11 - check]
+
+
+def validate(number):
+    """Checks to see if the number provided is a valid CUIT."""
+    number = compact(number)
+    if len(number) != 11:
+        raise InvalidLength()
+    if not number.isdigit():
+        raise InvalidFormat()
+    if calc_check_digit(number[:-1]) != number[-1]:
+        raise InvalidChecksum()
+    return number
+
+
+def is_valid(number):
+    """Checks to see if the number provided is a valid CUIT."""
+    try:
+        return bool(validate(number))
+    except ValidationError:
+        return False
diff --git a/tests/test_ar_cuit.doctest b/tests/test_ar_cuit.doctest
new file mode 100644
index 0000000..e12003a
--- /dev/null
+++ b/tests/test_ar_cuit.doctest
@@ -0,0 +1,236 @@
+test_ar_cuit.doctest - more detailed doctests for the stdnum.ac.cuit module
+
+Copyright (C) 2015 Arthur de Jong
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA
+
+
+This file contains more detailed doctests for the stdnum.ac.cuit module. It
+tries to validate a number of numbers that have been found online.
+
+>>> from stdnum.ar import cuit
+>>> from stdnum.exceptions import *
+
+
+These have been found online and should all be valid numbers.
+
+
+>>> numbers = '''
+...
+... 20040356437
+... 20047433747
+... 20050573452
+... 20054613009
+... 20058481425
+... 20058723410
+... 20058879089
+... 20073562954
+... 20073659486
+... 20076084735
+... 20077530127
+... 20081042404
+... 20086295106
+... 20086607043
+... 20101376630
+... 20102289855
+... 20103055475
+... 20105567643
+... 20108146304
+... 20108524244
+... 20108909170
+... 20110831243
+... 20112806440
+... 20113951517
+... 20120774019
+... 20121388570
+... 20125491783
+... 20128032801
+... 20129599058
+... 20131707992
+... 20132002755
+... 20136310136
+... 20143455905
+... 20144779674
+... 20145053294
+... 20146234306
+... 20171104042
+... 20171823960
+... 20182886530
+... 20184230446
+... 20187687137
+... 20202569456
+... 20203954795
+... 20204393363
+... 20205752766
+... 20209954088
+... 20213601785
+... 20220030165
+... 20223730907
+... 20224293578
+... 20225121169
+... 20227716011
+... 20237525613
+... 20238697752
+... 20245079541
+... 20248651793
+... 20250926155
+... 20255761367
+... 20259636117
+... 20261576393
+... 20262358977
+... 20271280344
+... 20272201588
+... 20275121364
+... 20282423910
+... 20283621759
+... 20285115664
+... 20287747722
+... 20290072981
+... 20293386162
+... 20298479932
+... 20300953655
+... 20305216950
+... 20314469616
+... 20314970951
+... 20319011987
+... 20320639361
+... 20321768165
+... 20323118249
+... 20324215809
+... 20324381709
+... 20324794043
+... 20328504708
+... 20344135763
+... 20344379131
+... 20347620204
+... 20354205271
+... 20355854974
+... 20360612679
+... 20373308359
+... 20922078182
+... 20922312401
+... 20929597916
+... 23042708194
+... 23045174999
+... 23081181489
+... 23102532279
+... 23161822434
+... 23175636404
+... 23214238519
+... 23233647969
+... 23244989004
+... 23270774199
+... 23278857069
+... 23279103009
+... 23314669649
+... 23324786244
+... 23334052729
+... 23338909764
+... 23355601684
+... 23935319099
+... 24276145513
+... 27018259899
+... 27023396861
+... 27032487705
+... 27056528240
+... 27057490638
+... 27060695488
+... 27063049366
+... 27066515678
+... 27066595485
+... 27098767849
+... 27107931738
+... 27114547382
+... 27121262059
+... 27122342420
+... 27127539923
+... 27130430142
+... 27134454569
+... 27172336472
+... 27173495094
+... 27175432812
+... 27177192010
+... 27177721994
+... 27179361642
+... 27180795672
+... 27185685298
+... 27201493841
+... 27205913209
+... 27215060417
+... 27216654523
+... 27216824178
+... 27221319619
+... 27232710921
+... 27234685568
+... 27243584871
+... 27245896609
+... 27247110831
+... 27248949770
+... 27250076679
+... 27259106430
+... 27259522078
+... 27261420215
+... 27262935081
+... 27267742249
+... 27273160103
+... 27276663084
+... 27278570601
+... 27279026271
+... 27281657025
+... 27283110546
+... 27284491675
+... 27284753505
+... 27288128389
+... 27296108591
+... 27303521211
+... 27304599451
+... 27310947828
+... 27312481389
+... 27314396036
+... 27316481677
+... 27335804088
+... 27354548165
+... 27366029902
+... 27366146259
+... 27372855350
+... 27373316690
+... 27937240444
+... 27938621395
+... 27940212664
+... 27949019387
+... 30653311857
+... 30670349760
+... 30691769336
+... 30700596210
+... 30710422636
+... 30710916574
+... 30711016046
+... 30711067074
+... 30711271003
+... 30711683166
+... 30712071199
+... 30712417419
+... 30714322296
+... 30714468088
+... 30714789062
+... 33534828379
+... 33708972679
+... 33712308589
+... 33714423709
+...
+... '''
+>>> [x for x in numbers.splitlines() if x and not cuit.is_valid(x)]
+[]

http://arthurdejong.org/git/python-stdnum/commit/?id=ba894d7c98072dd533e17a0c115d536c49a3a030

commit ba894d7c98072dd533e17a0c115d536c49a3a030
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sat Apr 18 23:27:44 2015 +0200

    Add San Marino COE (VAT) number
    
    Based partially on the implementation in the vatnumber module.

diff --git a/stdnum/sm/__init__.py b/stdnum/sm/__init__.py
new file mode 100644
index 0000000..59f8cce
--- /dev/null
+++ b/stdnum/sm/__init__.py
@@ -0,0 +1,24 @@
+# __init__.py - collection of San Marino numbers
+# coding: utf-8
+#
+# Copyright (C) 2015 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+"""Collection of San Marino numbers."""
+
+# provide vat as an alias
+from stdnum.sm import coe as vat
diff --git a/stdnum/sm/coe.py b/stdnum/sm/coe.py
new file mode 100644
index 0000000..cb3e487
--- /dev/null
+++ b/stdnum/sm/coe.py
@@ -0,0 +1,79 @@
+# coe.py - functions for handling San Marino tax numbers
+# coding: utf-8
+#
+# Copyright (C) 2008-2011 Cédric Krier
+# Copyright (C) 2008-2011 B2CK
+# Copyright (C) 2015 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+"""COE (Codice operatore economico, San Marino national tax number).
+
+The COE is a tax identification number of up to 5-digits used in San Marino.
+Leading zeroes are commonly dropped.
+
+>>> validate('51')
+'51'
+>>> validate('024165')
+'24165'
+>>> validate('2416A')
+Traceback (most recent call last):
+    ...
+InvalidFormat: ...
+>>> validate('1124165')
+Traceback (most recent call last):
+    ...
+InvalidLength: ...
+"""
+
+from stdnum.exceptions import *
+from stdnum.util import clean
+
+
+# a collection of all registered numbers with 2 or less digits
+_lownumbers = set((
+    2, 4, 6, 7, 8, 9, 10, 11, 13, 16, 18, 19, 20, 21, 25, 26, 30, 32, 33, 35,
+    36, 37, 38, 39, 40, 42, 45, 47, 49, 51, 52, 55, 56, 57, 58, 59, 61, 62,
+    64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 79, 80, 81, 84, 85,
+    87, 88, 91, 92, 94, 95, 96, 97, 99))
+
+
+def compact(number):
+    """Convert the number to the minimal representation. This strips
+    surrounding whitespace and separation dash."""
+    return clean(number, '.').strip().lstrip('0')
+
+
+def validate(number):
+    """Checks to see if the number provided is a valid number. This checks
+    the length and formatting."""
+    number = compact(number)
+    if len(number) > 5 or len(number) == 0:
+        raise InvalidLength()
+    if not number.isdigit():
+        raise InvalidFormat()
+    if len(number) < 3 and int(number) not in _lownumbers:
+        raise InvalidComponent()
+    return number
+
+
+def is_valid(number):
+    """Checks to see if the number provided is a valid number. This
+    checks the length, formatting and check digit."""
+    try:
+        return bool(validate(number))
+    except ValidationError:
+        return False

http://arthurdejong.org/git/python-stdnum/commit/?id=144e1a45d2f81f424fd71b0f6c0109737e638aec

commit 144e1a45d2f81f424fd71b0f6c0109737e638aec
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sat Apr 18 21:24:00 2015 +0100

    Add Colombian NIT/RUT (VAT) code
    
    Based on the implementation in the vatnumber module.

diff --git a/stdnum/co/__init__.py b/stdnum/co/__init__.py
new file mode 100644
index 0000000..687e210
--- /dev/null
+++ b/stdnum/co/__init__.py
@@ -0,0 +1,25 @@
+# __init__.py - collection of Colombian numbers
+# coding: utf-8
+#
+# Copyright (C) 2015 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+"""Collection of Colombian numbers."""
+
+# provide vat and rut as an alias
+from stdnum.co import nit as vat
+from stdnum.co import nit as rut
diff --git a/stdnum/co/nit.py b/stdnum/co/nit.py
new file mode 100644
index 0000000..3b4ec08
--- /dev/null
+++ b/stdnum/co/nit.py
@@ -0,0 +1,92 @@
+# nit.py - functions for handling Colombian identity codes
+# coding: utf-8
+#
+# Copyright (C) 2008-2011 Cédric Krier
+# Copyright (C) 2008-2011 B2CK
+# Copyright (C) 2015 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+"""NIT (Número De Identificación Tributaria, Colombian identity code).
+
+This number, also referred to as RUT (Registro Unico Tributario) is a 10-digit
+code that includes a check digit.
+
+>>> validate('213.123.432-1')
+'2131234321'
+>>> validate('2131234351')
+'2131234351'
+>>> validate('2131234350')
+Traceback (most recent call last):
+    ...
+InvalidChecksum: ...
+>>> validate('213123435')
+Traceback (most recent call last):
+    ...
+InvalidLength: ...
+>>> validate('213123435A')
+Traceback (most recent call last):
+    ...
+InvalidFormat: ...
+>>> format('2131234351')
+'213.123.435-1'
+"""
+
+from stdnum.exceptions import *
+from stdnum.util import clean
+
+
+def compact(number):
+    """Convert the number to the minimal representation. This strips
+    surrounding whitespace and separation dash."""
+    return clean(number, '.-').upper().strip()
+
+
+def calc_check_digit(number):
+    """Calculate the check digit. The number passed should not have the
+    check digit included."""
+    weights = (3, 7, 13, 17, 19, 23, 29, 37, 41, 43, 47, 53, 59, 67, 71)
+    s = sum(int(n) * weights[i] for i, n in enumerate(number[::-1]))
+    return '01987654321'[s % 11]
+
+
+def validate(number):
+    """Checks to see if the number provided is a valid number. This checks
+    the length, formatting and check digit."""
+    number = compact(number)
+    if len(number) != 10:
+        raise InvalidLength()
+    if not number.isdigit():
+        raise InvalidFormat()
+    if calc_check_digit(number[:-1]) != number[-1]:
+        raise InvalidChecksum()
+    return number
+
+
+def is_valid(number):
+    """Checks to see if the number provided is a valid number. This
+    checks the length, formatting and check digit."""
+    try:
+        return bool(validate(number))
+    except ValidationError:
+        return False
+
+
+def format(number):
+    """Reformat the passed number to the standard format."""
+    number = compact(number)
+    return (number[:-7] + '.' + number[-7:-4] + '.' +
+            number[-4:-1] + '-' + number[-1])

http://arthurdejong.org/git/python-stdnum/commit/?id=c69c8f0fc52d003faeba378a6834fe555eff3b72

commit c69c8f0fc52d003faeba378a6834fe555eff3b72
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sat Apr 18 18:02:41 2015 +0200

    Add Chilean national tax number (RUT)
    
    Based on the implementation in the vatnumber module.

diff --git a/stdnum/cl/__init__.py b/stdnum/cl/__init__.py
new file mode 100644
index 0000000..6a59365
--- /dev/null
+++ b/stdnum/cl/__init__.py
@@ -0,0 +1,25 @@
+# __init__.py - collection of Chilean numbers
+# coding: utf-8
+#
+# Copyright (C) 2015 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+"""Collection of Chilean numbers."""
+
+# provide vat and run as an alias
+from stdnum.cl import rut as vat
+from stdnum.cl import rut as run
diff --git a/stdnum/cl/rut.py b/stdnum/cl/rut.py
new file mode 100644
index 0000000..ba27fa8
--- /dev/null
+++ b/stdnum/cl/rut.py
@@ -0,0 +1,91 @@
+# rut.py - functions for handling Chile RUT/RUN numbers
+# coding: utf-8
+#
+# Copyright (C) 2008-2011 Cédric Krier
+# Copyright (C) 2008-2011 B2CK
+# Copyright (C) 2015 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+"""RUT (Rol Único Tributario, Chilean national tax number).
+
+The RUT, the Chilean national tax number is the same as the RUN (Rol Único
+Nacional) the Chilean national identification number. The number consists of
+8 digits, followed by a check digit.
+
+>>> validate('76086428-5')
+'760864285'
+>>> validate('CL 12531909-2')
+'125319092'
+>>> validate('12531909-3')
+Traceback (most recent call last):
+    ...
+InvalidChecksum: ...
+>>> validate('76086A28-5')
+Traceback (most recent call last):
+    ...
+InvalidFormat: ...
+>>> format('125319092')
+'12.531.909-2'
+"""
+
+from stdnum.exceptions import *
+from stdnum.util import clean
+
+
+def compact(number):
+    """Convert the number to the minimal representation. This strips the
+    number of any valid separators and removes surrounding whitespace."""
+    number = clean(number, ' -.').upper().strip()
+    if number.startswith('CL'):
+        number = number[2:]
+    return number
+
+
+def calc_check_digit(number):
+    """Calculate the check digit. The number passed should not have the
+    check digit included."""
+    s = sum(int(n) * (4 + (5 - i) % 6) for i, n in enumerate(number[::-1]))
+    return '0123456789K'[s % 11]
+
+
+def validate(number):
+    """Checks to see if the number provided is a valid number. This
+    checks the length, formatting and check digit."""
+    number = compact(number)
+    if len(number) not in (8, 9):
+        raise InvalidLength()
+    if not number[:-1].isdigit():
+        raise InvalidFormat()
+    if number[-1] != calc_check_digit(number[:-1]):
+        raise InvalidChecksum()
+    return number
+
+
+def is_valid(number):
+    """Checks to see if the number provided is a valid number. This
+    checks the length, formatting and check digit."""
+    try:
+        return bool(validate(number))
+    except ValidationError:
+        return False
+
+
+def format(number):
+    """Reformat the passed number to the standard format."""
+    number = compact(number)
+    return (number[:-7] + '.' + number[-7:-4] + '.' +
+            number[-4:-1] + '-' + number[-1])
diff --git a/tests/test_cl_rut.doctest b/tests/test_cl_rut.doctest
new file mode 100644
index 0000000..c0a96eb
--- /dev/null
+++ b/tests/test_cl_rut.doctest
@@ -0,0 +1,235 @@
+test_cl_rut.doctest - more detailed tests for stdnum.cl.rut
+
+Copyright (C) 2015 Arthur de Jong
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA
+
+
+This file contains more detailed doctests for the stdnum.cl.rut module.
+
+>>> from stdnum.cl import rut
+>>> from stdnum.exceptions import *
+
+
+This is a selection of numbers (which should be valid) found at
+https://palena.sii.cl/cvc/dte/ee_empresas_emisoras.html
+
+>>> numbers = '''
+...
+... 10075381-2
+... 10219183-8
+... 10273665-6
+... 10319569-1
+... 10402061-5
+... 10516143-3
+... 10548375-9
+... 10626628-K
+... 10726809-K
+... 10830138-4
+... 10860841-2
+... 11472349-5
+... 11482004-0
+... 11605334-9
+... 11840208-1
+... 11975507-7
+... 12150075-2
+... 12362626-5
+... 12392004-K
+... 12415074-4
+... 12423920-6
+... 12574946-1
+... 12584568-1
+... 12645789-8
+... 12723467-1
+... 12790819-2
+... 13021498-3
+... 13073522-3
+... 13095834-6
+... 13097057-5
+... 13309437-7
+... 13490667-7
+... 13531984-8
+... 13646691-7
+... 13674023-7
+... 13743324-9
+... 13831173-2
+... 13908671-6
+... 13940679-6
+... 13966594-5
+... 13972493-3
+... 14232760-0
+... 14391166-7
+... 14676291-3
+... 14684927-K
+... 14693665-2
+... 15187234-4
+... 15261623-6
+... 15264124-9
+... 15450326-9
+... 15930050-1
+... 16045507-1
+... 16607084-8
+... 3528355-2
+... 4769973-8
+... 52000543-9
+... 52003746-2
+... 5314394-6
+... 53311164-5
+... 5666126-3
+... 5759700-3
+... 5843733-6
+... 6188994-9
+... 6447064-7
+... 65700550-9
+... 6592333-5
+... 7092881-7
+... 7116223-0
+... 7341194-7
+... 7362723-0
+... 73968300-9
+... 76001215-7
+... 76001925-9
+... 76005843-2
+... 76007743-7
+... 76008294-5
+... 76009811-6
+... 76011739-0
+... 76012844-9
+... 76014309-K
+... 76015107-6
+... 76015662-0
+... 76016096-2
+... 76019921-4
+... 76026514-4
+... 76026754-6
+... 76029043-2
+... 76033711-0
+... 76035895-9
+... 76042275-4
+... 76043207-5
+... 76043478-7
+... 76044777-3
+... 76048222-6
+... 76049323-6
+... 76051527-2
+... 76063318-6
+... 76069188-7
+... 76069621-8
+... 76073759-3
+... 76077253-4
+... 76080924-1
+... 76083398-3
+... 76094260-K
+... 76164130-1
+... 76200530-1
+... 76200720-7
+... 76324600-0
+... 76327980-4
+... 76375410-3
+... 76377670-0
+... 76453840-4
+... 76461120-9
+... 76525260-1
+... 76527180-0
+... 76563850-K
+... 76565840-3
+... 76624810-1
+... 76650270-9
+... 76653690-5
+... 76654270-0
+... 76670180-9
+... 76688170-K
+... 76699320-6
+... 76724000-7
+... 76757480-0
+... 76758840-2
+... 76760580-3
+... 76792810-6
+... 76827950-0
+... 76884020-2
+... 76898760-2
+... 76953260-9
+... 76968400-K
+... 77060220-3
+... 77183530-9
+... 77248650-2
+... 77308020-8
+... 77380420-6
+... 77413050-0
+... 77416300-K
+... 7741928-4
+... 77451560-7
+... 77753800-4
+... 77827630-5
+... 77948290-1
+... 77962630-K
+... 77986680-7
+... 78006840-K
+... 78030800-1
+... 78072520-6
+... 78207580-2
+... 78281650-0
+... 78298460-8
+... 78432780-9
+... 78469000-8
+... 78477650-6
+... 78558880-0
+... 78780430-6
+... 78827280-4
+... 78861790-9
+... 78874150-2
+... 79586380-K
+... 8005083-6
+... 83156400-8
+... 8352320-4
+... 8378799-6
+... 8379191-8
+... 8649219-9
+... 88830500-9
+... 90753000-0
+... 91520000-1
+... 92648000-6
+... 9290661-2
+... 9334748-K
+... 93698000-7
+... 9475529-8
+... 9485538-1
+... 9506985-1
+... 9522447-4
+... 9580657-0
+... 96626570-1
+... 96632300-0
+... 96711760-9
+... 96721090-0
+... 96779280-2
+... 96813830-8
+... 96837220-3
+... 96919970-K
+... 96930440-6
+... 96953410-K
+... 96967100-K
+... 9890042-K
+... 9896013-9
+... 99147000-K
+... 99512950-7
+... 99540200-9
+... 99561530-4
+... 99568510-8
+... 99595090-1
+...
+... '''
+>>> [x for x in numbers.splitlines() if x and not rut.is_valid(x)]
+[]

http://arthurdejong.org/git/python-stdnum/commit/?id=3db826c62332bab0e839d83514781ff1f5f17320

commit 3db826c62332bab0e839d83514781ff1f5f17320
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sat Apr 18 16:38:36 2015 +0200

    Add Albanian NIPT (VAT) number
    
    Partially based on the implementation in the vatnumber module.
    
    Some valid numbers appear to start with an L so those are allowed as
    well.

diff --git a/stdnum/al/__init__.py b/stdnum/al/__init__.py
new file mode 100644
index 0000000..b0ab0ab
--- /dev/null
+++ b/stdnum/al/__init__.py
@@ -0,0 +1,24 @@
+# __init__.py - collection of Albanian numbers
+# coding: utf-8
+#
+# Copyright (C) 2015 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+"""Collection of Albanian numbers."""
+
+# provide vat as an alias
+from stdnum.al import nipt as vat
diff --git a/stdnum/al/nipt.py b/stdnum/al/nipt.py
new file mode 100644
index 0000000..1bb0002
--- /dev/null
+++ b/stdnum/al/nipt.py
@@ -0,0 +1,80 @@
+# nipt.py - functions for handling Albanian VAT numbers
+# coding: utf-8
+#
+# Copyright (C) 2008-2011 Cédric Krier
+# Copyright (C) 2008-2011 B2CK
+# Copyright (C) 2015 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+"""NIPT (Numri i Identifikimit për Personin e Tatueshëm, Albanian VAT number).
+
+The Albanian NIPT is a 10-digit number with the first and last character
+being letters.
+
+>>> validate('AL J 91402501 L')
+'J91402501L'
+>>> validate('K22218003V')
+'K22218003V'
+>>> validate('(AL) J 91402501')
+Traceback (most recent call last):
+    ...
+InvalidLength: ...
+>>> validate('Z 22218003 V')
+Traceback (most recent call last):
+    ...
+InvalidFormat: ...
+"""
+
+import re
+
+from stdnum.exceptions import *
+from stdnum.util import clean
+
+
+# regular expression for matching number
+_nipt_re = re.compile('^[JKL][0-9]{8}[A-Z]$')
+
+
+def compact(number):
+    """Convert the number to the minimal representation. This strips the
+    number of any valid separators and removes surrounding whitespace."""
+    number = clean(number, ' ').upper().strip()
+    if number.startswith('AL'):
+        number = number[2:]
+    if number.startswith('(AL)'):
+        number = number[4:]
+    return number
+
+
+def validate(number):
+    """Checks to see if the number provided is a valid VAT number. This
+    checks the length and formatting."""
+    number = compact(number)
+    if len(number) != 10:
+        raise InvalidLength()
+    if not _nipt_re.match(number):
+        raise InvalidFormat()
+    return number
+
+
+def is_valid(number):
+    """Checks to see if the number provided is a valid VAT number. This
+    checks the length and formatting."""
+    try:
+        return bool(validate(number))
+    except ValidationError:
+        return False
diff --git a/tests/test_al_nipt.doctest b/tests/test_al_nipt.doctest
new file mode 100644
index 0000000..786ebb7
--- /dev/null
+++ b/tests/test_al_nipt.doctest
@@ -0,0 +1,178 @@
+test_al_nitp.doctest - more detailed doctests stdnum.al.nipt
+
+Copyright (C) 2015 Arthur de Jong
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA
+
+
+This file contains more detailed doctests for the stdnum.al.nipt module.
+
+>>> from stdnum.al import nipt
+>>> from stdnum.exceptions import *
+
+
+These have been found online and should all be valid numbers. There is also
+a validation service at
+http://www.qkr.gov.al/nrc/kerko_per_subjekt.aspx
+
+>>> numbers = '''
+...
+... J 64103842 S
+... J 69102564 M
+... J 78311939 N
+... J 8291 6498 D
+... J 91402501 L
+... J 98624806 P
+... J61807017B
+... J61826022R
+... J61911008C
+... J61922018S
+... J61923008Q
+... J62903175S
+... J62903393F
+... J62903470T
+... J62903491S
+... J64103682L
+... J66702410U
+... J67902618M
+... J69405530G
+... J71824003C
+... J72603171B
+... J73706808B
+... J73721043Q
+... J74517201G
+... J77411245Q
+... J81314004P
+... J81402004E
+... J81508002V
+... J81804001C
+... J86526614T
+... J91305001Q
+... J91808007H
+... J92006014W
+... J92917219S
+... J93910409N
+... K 01725001F
+... K 02727202 O
+... K 11715005 L
+... K 22013001U
+... K 37507987 N
+... K 41316001 V
+... K 41424801 U
+... K 47905861 R
+... K 63005203 O
+... K 67204202 P
+... K 91426008 U
+... K11515001T
+... K11715005L
+... K12113002H
+... K14019001H
+... K21405003G
+... K21622001M
+... K22218003V
+... K26330201T
+... K31404025J
+... K31525146H
+... K31526056N
+... K31823059I
+... K31929010K
+... K32203501H
+... K32801430W
+... K33714725W
+... K34712418N
+... K36308746I
+... K36520204A
+... K42725403f
+... K46621201I
+... K51428013Q
+... K51518058O
+... K59418208E
+... K61710508W
+... K71903001A
+... K72410014H
+... K81427030E
+... K81428502L
+... K81618039O
+... K84508002F
+... K87101202A
+... K91725009J
+... K92402023O
+... L 21721005U
+... L 22614402 H
+... L01307052Q
+... L01510016S
+... L01622006F
+... L01909501I
+... L02003503P
+... L02023501H
+... L02226012N
+... L02602801H
+... L03321203G
+... L06426702Q
+... L06524402O
+... L06901403L
+... L06923204C
+... L07305201K
+... L08711201I
+... L09110504G
+... L11325024K
+... L11625013E
+... L11810502T
+... L11815018A
+... L12003021H
+... L12009010A
+... L12624002J
+... L13020404N
+... L14118803B
+... L14703202P
+... L21310054D
+... L21408015A
+... L21429502L
+... L21508023Q
+... L21923507N
+... L22201021E
+... L22203019C
+... L22804207O
+... L22825801P
+... L22902002B
+... L24006002V
+... L24018612J
+... L26311004G
+... L29616001A
+... L31511019E
+... L31911504A
+... L32210507A
+... L32319014A
+... L32522401O
+... L33117002J
+... L33318001M
+... L41309075A
+... L41320026E
+... L41410025S
+... L42008005H
+... L42115015G
+... L42206027K
+... L42307007E
+... L42710403A
+... L42720201A
+... L44119601E
+... L46812703Q
+... L47014204F
+... L48117101S
+...
+... '''
+>>> [x for x in numbers.splitlines() if x and not nipt.is_valid(x)]
+[]

http://arthurdejong.org/git/python-stdnum/commit/?id=88d1af32f28ec2e86bf15ad86ed68e4723d0c7a1

commit 88d1af32f28ec2e86bf15ad86ed68e4723d0c7a1
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Thu Apr 23 21:50:49 2015 +0200

    Extend the list of valid Cedula
    
    This is based on the list of Cedula found at
    
http://prd.org.do/2013/07/30/lista-del-cen-del-prd-actualizada-y-registrada-en-la-junta-central-electoral/
    (link provided by José Arturo García)

diff --git a/stdnum/do/cedula.py b/stdnum/do/cedula.py
index ec7b3f6..720a691 100644
--- a/stdnum/do/cedula.py
+++ b/stdnum/do/cedula.py
@@ -42,90 +42,86 @@ from stdnum import luhn
 
 
 # list of Cedulas that do not match the checksum but are nonetheless valid
-whitelist = set([
-    '00000021249', '00000035692', '00000058035', '00000065377',
-    '00000078587', '00000111941', '00000126295', '00000140874',
-    '00000155482', '00000236621', '00000292212', '00000564933',
-    '00000719400', '00004110056', '00100000169', '00100016495',
-    '00100053841', '00100061945', '00100083860', '00100126468',
-    '00100172940', '00100174666', '00100181057', '00100238382',
-    '00100239662', '00100255349', '00100288929', '00100322649',
-    '00100350928', '00100378440', '00100384523', '00100415853',
-    '00100523399', '00100524531', '00100530588', '00100593378',
-    '00100622461', '00100709215', '00100728113', '00100729795',
-    '00100756082', '00100759932', '00101118022', '00101527366',
-    '00101621981', '00101659661', '00101821735', '00101961125',
-    '00102025201', '00102577448', '00102630192', '00103266558',
-    '00103443802', '00103754365', '00103983004', '00104486903',
-    '00104662561', '00104785104', '00104862525', '00105328185',
-    '00105606543', '00107045499', '00108497822', '00108796883',
-    '00109402756', '00109785951', '00110047715', '00110071113',
-    '00114272360', '00114532330', '00116256005', '00117582001',
-    '00119161853', '00121581750', '00121581800', '00129737056',
-    '00130610001', '00131257003', '00134588056', '00142864013',
-    '00143072001', '00144435001', '00146965001', '00147485003',
-    '00155144906', '00161884001', '00162906003', '00163540003',
-    '00163549012', '00163709018', '00166533003', '00167311001',
-    '00170009162', '00170115579', '00171404771', '00174729003',
-    '00174940001', '00181880003', '00184129003', '00189213001',
-    '00189405093', '00190002567', '00196714003', '00200021994',
-    '00200028716', '00200040516', '00200063601', '00200123640',
-    '00200409772', '00201023001', '00207327056', '00208430205',
-    '00208832003', '00218507031', '00222017001', '00235482001',
-    '00236245013', '00241997013', '00246160013', '00261011013',
-    '00270764013', '00274652001', '00278005023', '00289931003',
-    '00291431001', '00291549003', '00297018001', '00298109001',
-    '00299724003', '00300001538', '00300011700', '00300013835',
-    '00300017875', '00300019575', '00300020806', '00300025568',
-    '00300169535', '00300244009', '00300636564', '00301200901',
-    '00305535206', '00345425001', '00352861001', '00356533003',
-    '00362684023', '00376023023', '00400001552', '00400012957',
-    '00425759001', '00435518003', '00475916056', '00481106001',
-    '00481595003', '00493593003', '00516077003', '00520207699',
-    '00524571001', '00539342005', '00540077717', '00544657001',
-    '00574599001', '00599408003', '00633126023', '00644236001',
-    '00648496171', '00651322001', '00686904003', '00720758056',
-    '00731054054', '00741721056', '00757398001', '00800106971',
-    '00848583056', '00857630012', '00971815056', '01000005580',
-    '01000268998', '01038813907', '01094560111', '01100014261',
-    '01100620962', '01154421047', '01200004166', '01200008613',
-    '01200011252', '01200014133', '01200033420', '01300001142',
-    '01300005424', '01300020331', '01400000282', '01400074875',
-    '01600009531', '01600026316', '01650257001', '01810035037',
-    '02038569001', '02300023225', '02300031758', '02300037618',
-    '02300047220', '02300052220', '02300054193', '02300062066',
-    '02300085158', '02600036132', '02600094954', '02700029905',
-    '02755972001', '02800000129', '02800021761', '02800025877',
-    '02800029588', '02831146001', '03000411295', '03100109611',
-    '03100673050', '03102828522', '03102936385', '03103749672',
-    '03111670001', '03121982479', '03200066940', '03400157849',
-    '03600127038', '03800032522', '03807240010', '03852380001',
-    '03900069856', '03900192284', '04400002002', '04600198229',
-    '04700004024', '04700020933', '04700027064', '04700061076',
-    '04700070460', '04700074827', '04800019561', '04800046910',
-    '04801245892', '04900011690', '04900026260', '04900028443',
-    '04902549001', '04941042001', '05300013029', '05400016031',
-    '05400021759', '05400022042', '05400028496', '05400033166',
-    '05400034790', '05400037495', '05400038776', '05400040523',
-    '05400047674', '05400048248', '05400049237', '05400049834',
-    '05400053627', '05400054156', '05400055485', '05400055770',
-    '05400057300', '05400058964', '05400059956', '05400060743',
-    '05400062459', '05400067703', '05400072273', '05400076481',
-    '05500003079', '05500006796', '05500008806', '05500012039',
-    '05500014375', '05500017761', '05500021118', '05500022399',
-    '05500023407', '05500024135', '05500024190', '05500027749',
-    '05500032681', '05600037761', '05600038251', '05600038964',
-    '05600051191', '05600063115', '05600267737', '05700071202',
-    '05900072869', '06100007818', '06100009131', '06100011935',
-    '06100013662', '06100016486', '06337850001', '06400007916',
-    '06400011981', '06400014372', '06486186001', '06800008448',
-    '06843739551', '07600000691', '07700009346', '07800000968',
-    '08016809001', '08498619001', '08800003986', '08900001310',
-    '08900005064', '08952698001', '09300006239', '09421581768',
-    '09700003030', '10061805811', '10462157001', '10491297001',
-    '10621581792', '10983439110', '11700000658', '12019831001',
-    '22321581834', '22721581818', '40200401324', '40200452735',
-    '40200639953', '40200700675', '90001200901'])
+whitelist = set('''
+00000021249 00000035692 00000058035 00000065377 00000078587 00000111941
+00000126295 00000140874 00000155482 00000236621 00000292212 00000564933
+00000719400 00004110056 00100000169 00100012146 00100013114 00100016495
+00100053841 00100061611 00100061945 00100083860 00100101767 00100126468
+00100145737 00100165504 00100169706 00100172940 00100174666 00100181057
+00100228718 00100231017 00100238382 00100239662 00100255349 00100288143
+00100288929 00100322649 00100350928 00100378440 00100384523 00100415853
+00100523399 00100524531 00100530588 00100587320 00100590683 00100593378
+00100622461 00100709215 00100728113 00100729795 00100756082 00100759932
+00101118022 00101166065 00101527366 00101541404 00101621981 00101659661
+00101684656 00101686299 00101821735 00101961125 00102025201 00102398239
+00102577448 00102630192 00103266558 00103436936 00103443802 00103754365
+00103822440 00103983004 00104486903 00104532086 00104662561 00104727362
+00104785104 00104862525 00105263314 00105328185 00105512386 00105530894
+00105606543 00105832408 00106190966 00106284933 00106418989 00106442522
+00106479922 00106916538 00107045499 00107184305 00107445493 00107602067
+00107665688 00107687383 00107691942 00108113363 00108132448 00108184024
+00108264871 00108286792 00108384121 00108413431 00108497822 00108784684
+00108796883 00109183462 00109229090 00109402756 00109785951 00109987435
+00110047715 00110071113 00110111536 00110490843 00110578459 00110646203
+00111014782 00111150559 00113453700 00114272360 00114532330 00114532355
+00114687216 00115039795 00115343847 00116256005 00116448241 00116508511
+00117582001 00119161853 00121344165 00121581750 00121581800 00129737056
+00130610001 00131257003 00133987848 00134588056 00142864013 00143072001
+00144435001 00146965001 00147485003 00149657590 00155144906 00161884001
+00162906003 00163540003 00163549012 00163709018 00166533003 00167311001
+00170009162 00170115579 00171404771 00174729003 00174940001 00181880003
+00184129003 00189213001 00189405093 00190002567 00196714003 00200021994
+00200028716 00200040516 00200063601 00200123640 00200291381 00200409772
+00200435544 00200969260 00201023001 00202110760 00202744522 00207327056
+00208430205 00208832003 00218507031 00222017001 00235482001 00236245013
+00241997013 00246160013 00261011013 00270764013 00274652001 00278005023
+00289931003 00291431001 00291549003 00297018001 00298109001 00299724003
+00300001538 00300011700 00300013835 00300017875 00300019575 00300020806
+00300025568 00300052890 00300169535 00300244009 00300636564 00301200901
+00305535206 00345425001 00352861001 00356533003 00362684023 00376023023
+00400001552 00400001614 00400012957 00400189811 00425759001 00435518003
+00475916056 00481106001 00481595003 00493593003 00516077003 00520207699
+00524571001 00539342005 00540077717 00544657001 00574599001 00599408003
+00633126023 00644236001 00648496171 00651322001 00686904003 00720758056
+00731054054 00741721056 00757398001 00800106971 00848583056 00857630012
+00971815056 01000005580 01000250733 01000268998 01000728704 01000855890
+01038813907 01094560111 01100014261 01100620962 01154421047 01200004166
+01200008613 01200011252 01200014133 01200033420 01200771767 01300001142
+01300005424 01300020331 01400000282 01400074875 01600009531 01600019983
+01600026316 01600027894 01650257001 01700052445 01700200811 01800022457
+01800058439 01800527104 01810035037 02038569001 02100061022 02300003061
+02300023225 02300031758 02300037618 02300047220 02300052220 02300054193
+02300062066 02300085158 02400229955 02500045676 02600036132 02600094954
+02700029905 02755972001 02800000129 02800021761 02800025877 02800029588
+02831146001 03000411295 03100109611 03100488033 03100654224 03100673050
+03100963776 03101070888 03102828522 03102936385 03103315310 03103749672
+03104354892 03111670001 03121982479 03200066940 03300023841 03400058730
+03400157849 03401709701 03500037890 03600046116 03600127038 03600180637
+03700663589 03800032522 03807240010 03852380001 03900069856 03900192284
+04022130495 04400002002 04600198229 04700004024 04700020933 04700027064
+04700061076 04700070460 04700074827 04700221469 04701174268 04800019561
+04800034846 04800046910 04800956889 04801245892 04900009932 04900011690
+04900013913 04900014592 04900026260 04900028443 04900448230 04902549001
+04941042001 05100085656 05300013029 05400016031 05400021759 05400022042
+05400028496 05400033166 05400034790 05400037495 05400038776 05400040523
+05400047674 05400048248 05400049237 05400049834 05400053627 05400054156
+05400055485 05400055770 05400057300 05400058964 05400059956 05400060743
+05400062459 05400067703 05400072273 05400076481 05400216948 05500003079
+05500006796 05500008806 05500012039 05500014375 05500017761 05500021118
+05500022399 05500023407 05500024135 05500024190 05500027749 05500032681
+05500173451 05500303477 05600037761 05600038251 05600038964 05600051191
+05600063115 05600267737 05600553831 05700064077 05700071202 05900072869
+06100007818 06100009131 06100011935 06100013662 06100016486 06337850001
+06400007916 06400011981 06400014372 06486186001 06500162568 06800008448
+06800245196 06843739551 06900069184 07000007872 07100018031 07100063262
+07400001254 07600000691 07700009346 07800000968 07800002361 08016809001
+08100002398 08498619001 08800003986 08900001310 08900005064 08952698001
+09000117963 09000169133 09010011235 09022066011 09300006239 09300035357
+09421581768 09500008222 09700003030 09700179110 09900017864 10061805811
+10100178199 10201116357 10462157001 10491297001 10621581792 10983439110
+11700000658 12019831001 12300074628 22321581834 22721581818 40200401324
+40200452735 40200639953 40200700675 90001200901
+'''.split())
 
 
 def compact(number):

-----------------------------------------------------------------------

Summary of changes:
 stdnum/{do => al}/__init__.py     |    7 +-
 stdnum/{is_/vsk.py => al/nipt.py} |   39 ++++--
 stdnum/{do => ar}/__init__.py     |    7 +-
 stdnum/{do/rnc.py => ar/cuit.py}  |   43 +++----
 stdnum/{do => cl}/__init__.py     |    8 +-
 stdnum/{cy/vat.py => cl/rut.py}   |   60 ++++++----
 stdnum/{do => co}/__init__.py     |    8 +-
 stdnum/{do/rnc.py => co/nit.py}   |   59 ++++++----
 stdnum/do/cedula.py               |  164 +++++++++++++-------------
 stdnum/{do => sm}/__init__.py     |    7 +-
 stdnum/{ec/ci.py => sm/coe.py}    |   59 +++++-----
 tests/test_al_nipt.doctest        |  178 ++++++++++++++++++++++++++++
 tests/test_ar_cuit.doctest        |  236 +++++++++++++++++++++++++++++++++++++
 tests/test_cl_rut.doctest         |  235 ++++++++++++++++++++++++++++++++++++
 14 files changed, 901 insertions(+), 209 deletions(-)
 copy stdnum/{do => al}/__init__.py (84%)
 copy stdnum/{is_/vsk.py => al/nipt.py} (67%)
 copy stdnum/{do => ar}/__init__.py (83%)
 copy stdnum/{do/rnc.py => ar/cuit.py} (66%)
 copy stdnum/{do => cl}/__init__.py (81%)
 copy stdnum/{cy/vat.py => cl/rut.py} (58%)
 copy stdnum/{do => co}/__init__.py (80%)
 copy stdnum/{do/rnc.py => co/nit.py} (53%)
 copy stdnum/{do => sm}/__init__.py (84%)
 copy stdnum/{ec/ci.py => sm/coe.py} (52%)
 create mode 100644 tests/test_al_nipt.doctest
 create mode 100644 tests/test_ar_cuit.doctest
 create mode 100644 tests/test_cl_rut.doctest


hooks/post-receive
-- 
python-stdnum
-- 
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits/