Connecteur passerelle pour OpenADS
This repository has been archived on 2023-02-22. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Michael Bideau 990f1fb7bc Added 'guichet' (planned availability), added CRUD views for each entity, many fixes and refactoring
Features:
    * A connector now can be associated with 'collectivites',
      and each of them can have one 'guichet'.
      A 'collectivite' have a name and an openADS technical identifier
      A 'guichet' allow to define hours and days for when its 'collectivite' is "open"
    * Each of those entities have a view to CRUD it

    * For entity ForwardFile:
       - Added association with a connector, and eventually a 'collectivite'
       - Added ForwardFiles 'size' field
       - Added updating fields 'content_type', 'file_hash' and 'size' on save()
       - Added custom validation on save()

    * For entity AtrealOpenads:
       - Added permissions on each endpoint
       - Added 'email' field support for each type of 'demandeur'
       - 'numero_dossier' is now required in the url for some endpoints (previously was a GET param)
       - Added 'upload_user_files' as an endpoint (but can still be used as a method with request=None)
       - The 'upload_user_files()' method now only handle forward file that have status='pending'

Fixes:
    * Added "*args" and "**kwargs" arguments to some connector endpoint methods
    * Added 'verbose_name' and 'ordering' on each entity META
    * Added decorator '@force_encoded_string_output' to prevent utf-8 issues with python2
    * Added __repr__, __str__ and __unicode__ functions to each entities
    * Added database indexes for each entity
    * Commented out useless JSON schema imports
    * Removed unused variable assignations

Refactoring:
    * Moved utilities functions to utils.py file
    * Added a BaseModel to provide some default functions for Models
    * Added enum/translations of hard-coded values for ForwardFile 'upload_status' field

Tests:
    * Added test for each entity
    * Added tests files specific to utilities, forms and views
    * Total code coverage is 99% with only 10 statement missed
2019-08-20 17:00:12 +00:00
atreal_openads Added 'guichet' (planned availability), added CRUD views for each entity, many fixes and refactoring 2019-08-20 17:00:12 +00:00
debian debian: add settings.d default values 2019-07-22 13:16:31 +02:00
tests Added 'guichet' (planned availability), added CRUD views for each entity, many fixes and refactoring 2019-08-20 17:00:12 +00:00
.coveragerc 100% test coverage, dict strings are truncated when dumped, error messages homogeneized, and more 2019-07-25 14:29:06 +02:00
.gitignore Rebase from 'remote/origin' 2019-07-16 11:41:02 +02:00
Jenkinsfile add tests system, via tox 2019-07-15 18:06:38 +02:00
LICENSE Added testing with tox, added AGPLv3 license, replaced namespace, and more 2019-07-16 11:27:19 +02:00
MANIFEST.in Added testing with tox, added AGPLv3 license, replaced namespace, and more 2019-07-16 11:27:19 +02:00
README Rebase from 'remote/origin' 2019-07-16 11:41:02 +02:00
manage.py Added testing with tox, added AGPLv3 license, replaced namespace, and more 2019-07-16 11:27:19 +02:00
pylint.sh ensure tox.ini compatibility with Jenkinsfile 2019-07-15 18:23:40 +02:00
setup.py Rebase from 'remote/origin' 2019-07-16 11:41:02 +02:00
tox.ini Added testing with tox, added AGPLv3 license, replaced namespace, and more 2019-07-16 11:27:19 +02:00

README

Passerelle connector to openADS
===============================

Installation
------------

 - add to Passerelle installed apps settings:
   INSTALLED_APPS += ('atreal_openads',)


Usage
-----

 - create and configure new connector
   - Title/description: whatever you want
   - Collectivity: enter the technical ID from openADS
   - openADS API login : the login credential to connect to openADS.API
   - openADS API password : the password credential to connect to openADS.API
   - Extra debug: check if you want more debug logging

 - test service by clicking on the available links
   - the /test_openads_connexion/ endpoint try to establish a connection with openADS.API


Usage in w.c.s.
---------------

 - create dossier

   - a processing data to the workflow named 'Numéro dossier' with identifier 'numero_dossier'

   - wcs workflow action "call webservice"
     URL            : https://passerelle.dev.publik.love/atreal-openads/inst0/create_dossier/DIA/
     Method         : POST (JSON)
     Send form data : checked
     Response type  : JSON
     Identifier     : wsdia

   - wcs workflow action "processing data"
     Modify processing data:
        Field: Numéro dossier
        Value: wsdia_response_numero_dossier

   - wcs workflow action "message in history"
     Message        : "Récépissé reçu"
     Files attached : (Python expr) "utils.dict_from_prefix('wsdia_response_recepisse_', locals())"

 - get dossier

   - wcs workflow action "call webservice"
     URL            : https://passerelle.dev.publik.love/atreal-openads/inst0/get_dossier/DIA
     Data to send in parameter of the URL:
        Name : numero_dossier
        Value: (Python expr) "form_var_numero_dossier"
     Method         : GET
     Response type  : JSON
     Identifier     : wsetat

 - get courrier

   - wcs workflow action "call webservice"
     URL            : https://passerelle.dev.publik.love/atreal-openads/inst0/get_courrier/DIA
     Data to send in parameter of the URL:
        Name : numero_dossier
        Value: (Python expr) "form_var_numero_dossier"
     Method         : GET
     Response type  : JSON
     Identifier     : wscourrier


License
-------

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.

This program 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 Affero General Public License for more
details.

You should have received a copy of the GNU Affero General Public License along
with this program.  If not, see <http://www.gnu.org/licenses/>.