Map engine to serve all the people :)
Project description
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 tests/e2e_tests directory:
poetry run flask --app 'goodmap.goodmap:create_app(config_path="./tests/e2e_tests/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 tests/e2e_tests/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 tests/e2e_tests named:
e2e_test_config.ymle2e_test_data.json
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file goodmap-1.1.4.tar.gz.
File metadata
- Download URL: goodmap-1.1.4.tar.gz
- Upload date:
- Size: 26.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c351a602ff9147b3303085dc9fa951639425427497b99fc6995f95dc2ce34844
|
|
| MD5 |
60880f96bf49d51ba1341d9655d1c289
|
|
| BLAKE2b-256 |
2ce1e3561a3cc4ea787fb1e0d129613300a0b64dd634264069778de16272125a
|
Provenance
The following attestation bundles were made for goodmap-1.1.4.tar.gz:
Publisher:
release.yml on Problematy/goodmap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
goodmap-1.1.4.tar.gz -
Subject digest:
c351a602ff9147b3303085dc9fa951639425427497b99fc6995f95dc2ce34844 - Sigstore transparency entry: 612196096
- Sigstore integration time:
-
Permalink:
Problematy/goodmap@b9801597d2f918d8bab1c44c8c55d3ba8422daca -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Problematy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b9801597d2f918d8bab1c44c8c55d3ba8422daca -
Trigger Event:
push
-
Statement type:
File details
Details for the file goodmap-1.1.4-py3-none-any.whl.
File metadata
- Download URL: goodmap-1.1.4-py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dff83ad5578d74b54746d1fbf96cd639868bd679930f632fda027013391110c1
|
|
| MD5 |
6c734e251cc650b15038e0dd5c95dbb1
|
|
| BLAKE2b-256 |
b47c2a21f27f7ec98f6b1db0531c5540c6ce125ba715f1a8fe3df11e7436d827
|
Provenance
The following attestation bundles were made for goodmap-1.1.4-py3-none-any.whl:
Publisher:
release.yml on Problematy/goodmap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
goodmap-1.1.4-py3-none-any.whl -
Subject digest:
dff83ad5578d74b54746d1fbf96cd639868bd679930f632fda027013391110c1 - Sigstore transparency entry: 612196105
- Sigstore integration time:
-
Permalink:
Problematy/goodmap@b9801597d2f918d8bab1c44c8c55d3ba8422daca -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Problematy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b9801597d2f918d8bab1c44c8c55d3ba8422daca -
Trigger Event:
push
-
Statement type: