Fixed documentation.

This commit is contained in:
Franco Masotti 2020-07-06 18:38:33 +02:00
parent a6af3af0e3
commit 0440e647ce
Signed by: frnmst
GPG Key ID: 24116ED85666780A
8 changed files with 40 additions and 23 deletions

View File

@ -79,3 +79,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with fattura-elettronica-reader. If not, see <http://www.gnu.org/licenses/>.
Trusted source
--------------
You can check the authenticity of new releases using my public key.
Instructions, sources and keys can be found at `frnmst.gitlab.io/software <https://frnmst.gitlab.io/software/>`_.

View File

@ -15,12 +15,12 @@ output types.
.. autofunction:: is_xml_file_conforming_to_schema
.. autofunction:: parse_xml_file
.. autofunction:: get_invoice_filename
.. autofunction:: is_invoice_file_signed
.. autofunction:: is_p7m_file_signed
.. autofunction:: invoice_file_checksum_matches
.. autofunction:: get_remote_file
.. autofunction:: get_ca_certificates
.. autofunction:: is_invoice_file_authentic
.. autofunction:: remove_signature_from_invoice_file
.. autofunction:: is_p7m_file_authentic
.. autofunction:: remove_signature_from_p7m_file
.. autofunction:: extract_attachments_from_invoice_file
.. autofunction:: get_invoice_as_html
.. autofunction:: patch_invoice_schema_file
@ -29,15 +29,16 @@ output types.
.. autofunction:: define_appdirs_user_config_dir_file_path
.. autofunction:: write_configuration_file
.. autofunction:: load_configuration
.. autofunction:: assert_data_structure
.. autofunction:: pipeline
Exceptions
----------
.. autoexception:: InvoiceFileDoesNotHaveACoherentCryptographicalSignature
.. autoexception:: P7MFileDoesNotHaveACoherentCryptographicalSignature
.. autoexception:: InvoiceFileChecksumFailed
.. autoexception:: InvoiceFileNotAuthentic
.. autoexception:: CannotExtractOriginalInvoiceFile
.. autoexception:: P7MFileNotAuthentic
.. autoexception:: CannotExtractOriginalP7MFile
.. autoexception:: MissingTagInMetadataFile
.. autoexception:: XMLFileNotConformingToSchema
.. autoexception:: ExtractedAttachmentNotInExtensionWhitelist

View File

@ -1,12 +1,20 @@
Contributing
============
Talk
----
Suggestions, improvements and discussion:
- https://gitter.im/fattura-elettronica-reader/community
Git branches
------------
What follows is a table of the git branches used in fattura-elettronica-reader's repository.
Please, do NOT open pull requests on the ``master``, ``dev`` or ``gh-pages`` branches.
Use ``bugfix-${fix_name}`` or ``newfeature-${new_feature_name}`` instead.
What follows is a table of the git branches used in this repository.
.. important:: Open pull requests on the ``dev`` target branch.
Use ``bugfix-${fix_name}`` or ``newfeature-${new_feature_name}`` as names.
===================================== ==================================================== ==============================
Branch Description Update schedule
@ -21,15 +29,16 @@ Branch Description
Dependencies
------------
First of all install the software requirements from the ``requirements.txt`` file
in the repository's root:
First of all install `pipenv <https://pipenv.readthedocs.io/en/latest/>`_ and then
install the software requirements from the Pipfile in the repository's root:
::
$ pip install -r requirements.txt
$ make install-dev
.. note:: don't forget to add ``~/.local/bin`` to ``PATH``.
Unit tests
----------
@ -42,14 +51,6 @@ in a terminal:
::
$ python setup.py test
or simply:
::
$ make test
@ -58,6 +59,7 @@ You can also add this command before every git commit as by running:
::
$ make githook
@ -114,3 +116,5 @@ Contribution Steps
6. run PEP linter and check
7. update relevant documentation, if necessary
8. pull request
.. note:: Have a look at `this post <https://frnmst.gitlab.io/notes/my-python-release-workflow.html>`_ as well.

View File

@ -15,6 +15,7 @@ Welcome to fattura-pa-reader's documentation!
considerations
examples
contributing
source_code
copyright_license
Indices and tables

4
docs/source_code.rst Normal file
View File

@ -0,0 +1,4 @@
Source code
===========
https://github.com/frnmst/fattura-elettronica-reader

View File

@ -27,7 +27,7 @@ from .api import (
get_ca_certificates, is_p7m_file_authentic, remove_signature_from_p7m_file,
extract_attachments_from_invoice_file, get_invoice_as_html, patch_invoice_schema_file,
create_appdirs, define_appdirs_user_data_dir_file_path, define_appdirs_user_config_dir_file_path,
write_configuration_file, load_configuration, pipeline)
write_configuration_file, load_configuration, assert_data_structure, pipeline)
from .cli import (CliInterface)
from .exceptions import (P7MFileDoesNotHaveACoherentCryptographicalSignature,
InvoiceFileChecksumFailed, P7MFileNotAuthentic,

View File

@ -504,6 +504,7 @@ def load_configuration(configuration_file: str):
return configuration
def assert_data_structure(source: str, file_type: str, data: dict):
r"""TODO."""
pass
def pipeline(source: str, file_type: str, data: dict):

View File

@ -35,10 +35,10 @@ class CannotExtractOriginalP7MFile(Exception):
"""The cryptographical signature from the invoice file cannot be removed."""
class MissingTagInMetadataFile(Exception):
"""There is something useful missing in the metadata file."""
"""A necessary element is missing from the metadata file."""
class XMLFileNotConformingToSchema(Exception):
"""XML file is not conformant to the XML schema."""
"""XML file is not-conforming to the XML schema."""
class ExtractedAttachmentNotInExtensionWhitelist(Exception):
"""An extracted attachment is not in the extension whitelist."""