lists.arthurdejong.org
RSS feed

python-stdnum branch master updated. 0.7-11-g99586c9

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

python-stdnum branch master updated. 0.7-11-g99586c9



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  99586c9258b77d4855e874c79055ce8e0dc479f3 (commit)
      from  a655e8272c8318f82be7db265d29ebf60a3d3dbf (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=99586c9258b77d4855e874c79055ce8e0dc479f3

commit 99586c9258b77d4855e874c79055ce8e0dc479f3
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Fri Jun 7 21:05:52 2013 +0200

    Revert generating stdnum docstring dynamically
    
    Generating the docstring dynamically results in all stdnum modules being
    imported for every import from any stdnum module which is a performance hit.
    
    So we switch back to a manually generated list, using:
    
    from stdnum.util import get_module_list
    print '\n'.join(get_module_list())
    
    This also shortens a few short descriptions to attempt to fit things on
    one line.

diff --git a/stdnum/__init__.py b/stdnum/__init__.py
index b014314..80ea7d6 100644
--- a/stdnum/__init__.py
+++ b/stdnum/__init__.py
@@ -1,7 +1,7 @@
 # __init__.py - main module
 # coding: utf-8
 #
-# Copyright (C) 2010, 2011, 2012 Arthur de Jong
+# Copyright (C) 2010, 2011, 2012, 2013 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
@@ -23,16 +23,76 @@
 This library offers functions for parsing, validating and reformatting
 standard numbers and codes in various formats.
 
-Currently this package supports the following formats and algorithms:
+Currently this package supports the following formats:
 
+ * at.uid: UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number)
+ * be.vat: BTW, TVA, NWSt (Belgian VAT number)
+ * bg.egn: EGN (ЕГН, Единен граждански номер, Bulgarian personal identity 
codes)
+ * bg.pnf: PNF (ЛНЧ, Личен номер на чужденец, Bulgarian number of a foreigner)
+ * bg.vat: VAT (Идентификационен номер по ДДС, Bulgarian VAT number)
+ * br.cpf: CPF (Cadastro de Pessoas Físicas, Brazillian national identifier)
+ * cy.vat: Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number)
+ * cz.dic: DIČ (Daňové identifikační číslo, Czech VAT number)
+ * cz.rc: RČ (Rodné číslo, the Czech birth number)
+ * de.vat: Ust ID Nr. (Umsatzsteur Identifikationnummer, German VAT number)
+ * dk.cpr: CPR (personnummer, the Danish citizen number)
+ * dk.cvr: CVR (Momsregistreringsnummer, Danish VAT number)
+ * ean: EAN (International Article Number)
+ * ee.kmkr: KMKR (Käibemaksukohuslase, Estonian VAT number)
+ * es.cif: CIF (Certificado de Identificación Fiscal, Spanish company tax 
number)
+ * es.dni: DNI (Documento nacional de identidad, Spanish personal identity 
codes)
+ * es.nie: NIE (Número de Identificación de Extranjeros, Spanish foreigner 
number)
+ * es.nif: NIF (Número de Identificación Fiscal, Spanish VAT number)
+ * eu.vat: VAT (European Union VAT number)
+ * fi.alv: ALV nro (Arvonlisäveronumero, Finnish VAT number)
+ * fi.hetu: HETU (Henkilötunnus, Finnish personal identity code)
+ * fr.siren: SIREN (a French company identification number)
+ * fr.tva: n° TVA (taxe sur la valeur ajoutée, French VAT number)
+ * gb.vat: VAT (United Kingdom (and Isle of Man) VAT registration number)
+ * gr.vat: FPA, ΦΠΑ (Foros Prostithemenis Aksias, the Greek VAT number)
+ * grid: GRid (Global Release Identifier)
+ * hr.oib: OIB (Osobni identifikacijski broj, Croatian identification number)
+ * 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)
+ * imei: IMEI (International Mobile Equipment Identity)
+ * imsi: IMSI (International Mobile Subscriber Identity)
+ * isan: ISAN (International Standard Audiovisual Number)
+ * isbn: ISBN (International Standard Book Number)
+ * isil: ISIL (International Standard Identifier for Libraries)
+ * ismn: ISMN (International Standard Music Number)
+ * issn: ISSN (International Standard Serial Number)
+ * it.iva: Partita IVA (Italian VAT number)
+ * lt.pvm: PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT 
number)
+ * lu.tva: TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number)
+ * lv.pvn: PVN (Pievienotās vērtības nodokļa, Latvian VAT number)
+ * meid: MEID (Mobile Equipment Identifier)
+ * mt.vat: VAT (Maltese VAT number)
+ * nl.bsn: BSN (Burgerservicenummer, Dutch national identification number)
+ * nl.btw: BTW-nummer (Omzetbelastingnummer, the Dutch VAT number)
+ * nl.onderwijsnummer: Onderwijsnummer (Dutch school number)
+ * pl.nip: NIP (Numer Identyfikacji Podatkowej, Polish VAT number)
+ * pt.nif: NIF (Número de identificação fiscal, Portuguese VAT number)
+ * ro.cf: CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number)
+ * ro.cnp: CNP (Cod Numeric Personal, Romanian Numerical Personal Code)
+ * se.vat: VAT (Moms, Mervärdesskatt, Swedish VAT number)
+ * si.ddv: ID za DDV (Davčna številka, Slovenian VAT number)
+ * sk.dph: IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number)
+ * sk.rc: RČ (Rodné číslo, the Slovak birth number)
+ * us.ssn: SSN (U.S. Social Security Number)
+
+Furthermore a number of generic check digit algorithms are available:
+
+ * 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
+ * iso7064.mod_37_36: The ISO 7064 Mod 37, 36 algorithm
+ * iso7064.mod_97_10: The ISO 7064 Mod 97, 10 algorithm
+ * luhn: The Luhn and Luhn mod N algorithms
+ * verhoeff: The Verhoeff algorithm
 """
-# this docstring is automatically extended below
 
 
 # the version number of the library
 __version__ = '0.7'
-
-
-# extend the docstring with information from the modules
-from stdnum.util import get_module_list
-__doc__ += '\n'.join(get_module_list())
diff --git a/stdnum/de/vat.py b/stdnum/de/vat.py
index e886b75..1151585 100644
--- a/stdnum/de/vat.py
+++ b/stdnum/de/vat.py
@@ -17,7 +17,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
-"""Ust ID Nr. (Umsatzsteur Identifikationnummer, the German VAT number).
+"""Ust ID Nr. (Umsatzsteur Identifikationnummer, German VAT number).
 
 The number is 10 digits long and uses the ISO 7064 Mod 11, 10 check digit
 algorithm.
diff --git a/stdnum/nl/bsn.py b/stdnum/nl/bsn.py
index 4e2c1df..24c804b 100644
--- a/stdnum/nl/bsn.py
+++ b/stdnum/nl/bsn.py
@@ -17,7 +17,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
-"""BSN (Burgerservicenummer, the Dutch national identification number).
+"""BSN (Burgerservicenummer, Dutch national identification number).
 
 The BSN is a number with up to 9 digits (the leading 0's are commonly left
 out) which is used as the Dutch national identification number.
diff --git a/stdnum/util.py b/stdnum/util.py
index ee12508..b9fab29 100644
--- a/stdnum/util.py
+++ b/stdnum/util.py
@@ -58,7 +58,7 @@ def get_number_modules(base='stdnum'):
 
 def get_module_name(module):
     """Return the short description of the number."""
-    return pydoc.splitdoc(pydoc.getdoc(module))[0]
+    return pydoc.splitdoc(pydoc.getdoc(module))[0].strip('.')
 
 
 def get_module_description(module):

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

Summary of changes:
 stdnum/__init__.py |   76 ++++++++++++++++++++++++++++++++++++++++++++++------
 stdnum/de/vat.py   |    2 +-
 stdnum/nl/bsn.py   |    2 +-
 stdnum/util.py     |    2 +-
 4 files changed, 71 insertions(+), 11 deletions(-)


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/