Uniform access to data sources and services
Go to file
Frédéric Péters e98fdad43f translation update 2021-07-15 20:26:38 +02:00
debian debian: enable uwsgi memory reports (#54610) 2021-06-07 13:11:22 +02:00
functests caluire-axel: child_activities_info enpoint (#53934) 2021-05-18 10:59:16 +02:00
passerelle translation update 2021-07-15 20:26:38 +02:00
tests base_adresse: add lat/lon/type to address'id to get by id through reverse (#55522) 2021-07-15 18:51:36 +02:00
.coveragerc add .coveragerc to omit south_migrations/ directories 2015-04-17 16:00:55 +02:00
.git-blame-ignore-revs misc: add isort reformat reference to git blame ignore list (#52937) 2021-05-07 13:53:52 +02:00
.gitignore gitignore: add build and test results files 2020-03-10 16:06:20 +01:00
.pre-commit-config.yaml misc: add isort (#52937) 2021-05-07 13:51:12 +02:00
Jenkinsfile jenkins: allow job to take up to 15 minutes (#54619) 2021-06-07 14:16:42 +02:00
LICENSE this will be AGPL 2013-02-11 11:04:19 +01:00
MANIFEST.in MANIFEST.in: add toulouse-wcs wcs template (#53860) 2021-05-10 13:23:02 +02:00
README misc: add isort (#52937) 2021-05-07 13:51:12 +02:00
config_example.py trivial: apply black (#49820) 2021-02-20 16:28:47 +01:00
get_wcs.sh tox: get additional modules using https (via #46904#note-2) 2020-09-24 20:06:25 +02:00
jenkins.sh run pylint inside tox 2016-06-09 16:37:30 +02:00
manage.py settings: changed to single file, with a execfile() tacked at the end (#6465) 2015-02-10 13:06:55 +01:00
pylint.sh misc: reduce verbosity of get_wcs.sh and pylint.sh 2019-11-19 17:29:43 +01:00
requirements.txt trivial: remove leftover SOAPpy references (#43756) 2020-06-09 08:45:13 +02:00
setup.py misc: apply isort (#52937) 2021-05-07 13:51:13 +02:00
tox.ini tox: stop testing against django 1.11 2021-07-02 14:32:48 +02:00

README

Passerelle provides an uniform access to multiple data sources and services.

Quickstart
==========

Setting up an environment (virtualenv)
--------------------------------------

The first thing you'll need is the Python virtualenv package. You probably
already have this, but if not, you can install it with:

    $ easy_install -UZ virtualenv

Once that's done, choose a location for the environment, and create it with the
virtualenv command. For our guide, we're going to choose "venv" in the current
directory:

    $ virtualenv venv
    $ source venv/bin/activate

From Passerelle source directory install required Python packages:

    $ pip install -e .

Initializing the database (quickstart: sqlite3)
-----------------------------------------------

To create the database, execute the following line:

    $ python manage.py migrate

The new database is created inside `passerelle.sqlite3` in the current
directory.

Create a first user with administrative rights:

    $ python manage.py createsuperuser


Running
-------

The command line for starting is:

    $ python manage.py runserver

Passerelle is available on http://127.0.0.1:8000/


Settings
--------

Default settings are loaded from settings.py, they can be overloaded by a
local_settings.py file set in the same directory, or by a file referenced
in the PASSERELLE_SETTINGS_FILE environment variable.


Code Style
----------

black is used to format the code, using thoses parameters:

    black --target-version py37 --skip-string-normalization --line-length 110

isort is used to format the imports, using those parameters:

    isort --profile black --line-length 110

There is .pre-commit-config.yaml to use pre-commit to automatically run black
before commits. (execute `pre-commit install` to install the git hook.)

The .git-blame-ignore-revs file could be used to hide the related
changes into the sources:

    git blame --ignore-revs-file .git-blame-ignore-revs


Tests
-----

Unit tests are written using py.test, and its pytest-django support library and
run using tox.

  tox

To run a specific test under a specific environment.

  tox -e py3-django111 -- -vv tests/test_csv_datasource.py

LICENSES
========

Passerelle
Copyright (C) 2013-2014 Entr'ouvert <info@entrouvert.com>

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 (LICENSE file). If not, see <http://www.gnu.org/licenses/>.


Copyright
---------

django-jsonresponse (https://github.com/jjay/django-jsonresponse)
 # Files: passerelle/utils/jsonresponse.py
 # Copyright (c) 2012 Yasha Borevich <j.borevich@gmail.com>
 # Licensed under the BSD license