Sign inSign up

tor2tor/d2d-ma-cli

By tor2tor

Updated over 7 years ago

Docker image for MA-CLI

Image
0

4.0K

tor2tor/d2d-ma-cli repository overview

ma-cli


|Build Status|

Command line tool for MA

Usage

::

$ ma --help

Or see the documentation (see below for instructions on how to run it).

For instructions on how to onboard a region to Insights, go to this Confluence page <https://allyapp.atlassian.net/wiki/spaces/PD2/pages/568230134/Onboarding+a+region+-+Jira+template+and+detailed+steps>_.

.. docs-import-start-marker-do-not-remove

Development

Install

  1. Clone the git repository. ::

    $ git clone https://github.com/door2door-io/ma-cli.git $ cd ma-cli

  2. Create and activate the virtual environment. ::

    $ virtualenv -p python3 venv $ source venv/bin/activate

  3. Dependencies (assuming MacOS/Homebrew, visit the sites for alternative installation options) a. Tippecanoe_ ::

     $ brew install tippecanoe
    

    b. libspatialindex_ ::

     $ brew install spatialindex
    

    c. GDAL_ (>=2.2) ::

  4. Install everything else ::

    $ make bootstrap

  5. Copy the .env file and fill it: ::

    $ cp .env.example .env

Test

You should setup the ma_planning_test database locally first, to run the test. To do so, please setup ma-planning locally and run the tests there first.

Run tests: ::

$ make test

View the documentation

  1. Build docs locally once ::

    $ make docs-build

  2. Build and run docs (opens browser automatically, or head to localhost:8000) ::

    $ make docs-run

  3. Add new submodule to the documentation: go to the source folder and edit docs.rst, ma.models.rst, or modules.rst ::

    $ cd docs/source

  4. Edit an installation/setup step/etc: This is directly imported from README.rst, so change it there and re-run the docs.

Containerize Application

Setup


1. `Install Docker <https://docs.docker.com/docker-for-mac/install/>`__
2. Setup your env vars

Build image

::

$ make image-build

Test image

::

   $ make image-test

Run dev data deployment in container

::

$ make REGION=region_name container-run

.. docs-import-end-marker-do-not-remove

.. |Build Status| image:: https://app.wercker.com/status/04696e88a2b0d89b7c751767aae50494/m/master :target: https://app.wercker.com/status/04696e88a2b0d89b7c751767aae50494 .. _Tippecanoe: https://github.com/mapbox/tippecanoe .. _GDAL: https://tilemill-project.github.io/tilemill/docs/guides/gdal/ .. _libspatialindex: https://libspatialindex.github.io/

Tag summary

Content type

Image

Digest

Size

781.8 MB

Last updated

over 7 years ago

docker pull tor2tor/d2d-ma-cli