Skip to main content

Map engine to serve all the people :)

Project description

Github Actions Coverage Status

Good Map

Map engine to serve all the people ;)

Setup

0. Clone the repo

git clone --recursive

Remember, everytime you want to pull the newest changes, run:

git pull
git submodule update

because goodmap contains a submodule.

#TODO remove all submodule connected instructions after removing platzky submodule (see #157)

1. Use python 3.10

If you have a different version of Python on your system, install python 3.10 alongside. For that, you can use pyenv. Follow the documentation. Useful commands: pyenv help <command>, pyenv install, pyenv shell, pyenv versions.

2. Install poetry in Python 3.10

poetry can create virtual environments associated with a project.
Make sure you are in the Python 3.10 environment and install:

pip install poetry

Useful commands: poetry -h <command>, poetry env list, poetry env info.

3. Install dependencies

poetry install

4. You're ready

When you enter the project directory, you can invoke any commands in your project like this:

poetry run <command>

Running App locally

TL;DR

If you don't want to go through all the configuration, e.g. you just simply want to test if everything works, you can simply run app with test dataset provided in examples directory:

poetry run flask --app 'goodmap.goodmap:create_app(config_path="./examples/e2e_test_config.yml")' run

Configuration

If you want to serve app with your configuration rename config-template.yml to config.yml and change its contents according to your needs.

Afterwards run it with:

poetry run flask --app 'goodmap.goodmap:create_app(config_path="/PATH/TO/YOUR/CONFIG")' --debug run

Option Description
USE_LAZY_LOADING Loads point data only after the user clicks a point. If set to false, point data is loaded together with the initial map.
FAKE_LOGIN If set to true, allows access to the admin panel by simply selecting the role instead of logging in. DO NOT USE IN PRODUCTION!
SHOW_ACCESSIBILITY_TABLE If set as true it shows special view to help with accessing application.

Database

The database is stored in JSON, in the map section. For an example database see examples/e2e_test_data.json. The first subsection data consists of the actual datapoints, representing points on a map.

Datapoints have fields. The next subsections define special types of fields:

  • obligatory_fields - here are explicitely stated all the fields that the application assumes are presnt in all datapoints. E.g.
"position",
"name",
"accessible_by"

TODO: obligatory_fields is a new subsection, start using it in the actual application

  • categories - fields that can somehow be used in the app, for example by which datapoints can be filtered. Every category has a specified list of allowed values. E.g.
"accessible_by": ["bikes", "cars", "pedestrians"]
  • visible_data - when a datapoint will be rendered as a pin on a map, these fields will be shown in the box when clicking on a pin. E.g.
"name",
"type_of_place"
  • meta-data - some special data like
"uuid"

You can define the fields in all these subsections. Besides these types of fields, there is no restriction on the number of fields a datapoint can have.

Examples

You can find examples of working configuration and database in examples/ directory:

  • e2e_test_config.yml - Basic configuration example
  • e2e_test_data.json - Example database with sample location data
  • mongo_e2e_test_config.yml - MongoDB configuration example

final test

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

goodmap-1.6.1.tar.gz (38.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

goodmap-1.6.1-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

Details for the file goodmap-1.6.1.tar.gz.

File metadata

  • Download URL: goodmap-1.6.1.tar.gz
  • Upload date:
  • Size: 38.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for goodmap-1.6.1.tar.gz
Algorithm Hash digest
SHA256 e45af87248b7a893a72aa5338082abed196ffabf2aad9934c89e1758771f3fdd
MD5 a326f93b42f1d5dd0060078193a6af29
BLAKE2b-256 b78614994bf98109b0aecb1064037acbbca08442f448223aa9cb5b6fdc50c13c

See more details on using hashes here.

Provenance

The following attestation bundles were made for goodmap-1.6.1.tar.gz:

Publisher: release.yml on Problematy/goodmap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goodmap-1.6.1-py3-none-any.whl.

File metadata

  • Download URL: goodmap-1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 42.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for goodmap-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1585a781981ac052859226d2be4af840532b732e76927d5943f3ab65dfbeb3f
MD5 6ecf7d1f403b9af66af583ed1f370c8d
BLAKE2b-256 d3ac45f97bd3af39ba32919579eb05f64f0f1a1b1e11ab83b4b66998649316c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for goodmap-1.6.1-py3-none-any.whl:

Publisher: release.yml on Problematy/goodmap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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