Skip to main content

Geographic data visualizer backend for terra-visu

Project description

Terra Layer

This django applications aims to provide an API to connect django_geosource to django_geodata. It serve an API that provides informations wanted by a frontend to configure data rendering.

Pre-requisite

You need the last version of docker and docker-compose to execute a dev instance.

Set configuration

In Django settings, you must set the different views provided to fronted, like this:

TERRA_DEFAULT_MAP_SETTINGS = {
    "accessToken": "<your mapbox access token>",
    "backgroundStyle": "<background style file>",
    'center': [-0.655, 43.141], # Default view center
    'zoom': 7.7, # Default zoom
    'maxZoom': 19.9,
    'minZoom': 5,
    'fitBounds': { # Default bounding box
        'coordinates': [
            [-4.850, 46.776],
            [-0.551, 48.886]
        ],
    },
}

To start a dev instance

Define settings you wants in test_terralayer django project.

docker-compose up

First start should failed as the database need to be initialized. Just launch the same command twice.

Then initialize the database:

docker-compose run web /code/venv/bin/python3 /code/src/manage.py migrate

You can now edit your code. A django runserver is launched internally so the this is an autoreload server.

You can access to the api on http://localhost:8000/api/

Test

To run test suite, just launch:

docker-compose run web /code/venv/bin/python3 /code/src/manage.py test

Contributing

You must use factoryboy factories to develop your tests. The factories are available at terra_layer/tests/factories

0.3.13 (2019-12-11)

Improves

  • Update code documentation
  • Allow layer ordering by view name
  • Allow layer search by name and settings
  • Allow layer filter by source

0.3.12 (2019-11-25)

Fixes

  • Custom styles must be anonymized on exports to be importables

0.3.11 (2019-11-21)

Fixes

  • Fixes some layer's export/import mistakes

0.3.10 (2019-11-20)

Improves

  • Add layer_dump and layer_load_dump management command to save and restore layers

0.3.9 (2019-11-19)

Improves

  • Add default layer activation support
  • Add layer_dump and layer_load_dump management command to save and restore layers

0.3.8 (2019-11-13)

Fix

  • Deep layer groups raises an error

0.3.7 (2019-11-12)

Fix

  • slug can now be modified and is optionnal

Improves

  • Add default layer activation support

0.3.6 (2019-11-07)

Fix

  • Fix geolayer urls double dash

0.3.5 (2019-11-06)

Improves

  • Set correct permission classes to viewsets

0.3.4 (2019-11-06)

Fixes

  • Fix geostore namespace that is not necessary anymore

0.3.3 (2019-11-06)

Fixes

  • Add Manifest

0.3.2 (2019-11-05)

Fixes

  • Fix url namespace of geostore

0.3.1 (2019-11-05)

Improves

  • Integrate terra permissions mecanism

0.3.0 (2019-10-18)

Release

  • First release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terra-layer-0.3.13.tar.gz (18.2 kB view details)

Uploaded Source

File details

Details for the file terra-layer-0.3.13.tar.gz.

File metadata

  • Download URL: terra-layer-0.3.13.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.7

File hashes

Hashes for terra-layer-0.3.13.tar.gz
Algorithm Hash digest
SHA256 96e13c9a3f698a75503396395b87c8dd74137456ad90295cc9be60e4ca51f7ad
MD5 8626a9f57c66339f0af81deb5439cffb
BLAKE2b-256 9c166c0ae36d664375bb6a23d219fbc40f15a1f1f78349f87fadd260650344ab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page