You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@echo "first update the .env file with the new api key and then run this script with tms_name=your_tms_provider_name to update API key"; docker compose run --rm mapswipe_workers_creation python python_scripts/change_tms_api_key_for_projects.py $(tms_name)
30
+
31
+
list_all_project_managers:
32
+
docker compose run --rm mapswipe_workers_creation python python_scripts/list_all_project_managers.py
Copy file name to clipboardExpand all lines: docs/source/configuration.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
Most of the configuration is stored in environment variables.
4
4
At the root of the GitHub repository (in the same directory as `docker-compose.yml`) an example file (`example.env`) with all possible configuration variables exists. To get started copy this file to `.env` (no name is required) and fill in missing variables. The Docker Compose file will access those variables when needed.
5
5
6
-
> Note: If you want those variables to be accessible as Environment Variables in your current shell (Eg. Inside a Python virtual environment for development.) your need to parse the file and export the variables: `export $(cat .env | xargs)`
6
+
> Note: If you want those variables to be accessible as Environment Variables in your current shell (E.g. Inside a Python virtual environment for development.) your need to parse the file and export the variables: `export $(cat .env | xargs)`
7
7
8
8
In following chapters configuration values and keys are discussed for each part of the MapSwipe Back-end.
Copy file name to clipboardExpand all lines: docs/source/dev_setup.md
+19-18
Original file line number
Diff line number
Diff line change
@@ -46,17 +46,6 @@ The path to the Service Account Key is defined in the `GOOGLE_APPLICATION_CREDEN
46
46
You could also set up your own Firebase instance. However, this is not recommended.
47
47
If you still want to do it, get your Service Account Key from Firebase from [Google Cloud Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts).
48
48
49
-
#### Directories
50
-
51
-
MapSwipe Workers needs access to a data directory for logs and data for the API:
52
-
53
-
To create this directories run:
54
-
```
55
-
mkdir --parents ~/.local/share/mapswipe_workers
56
-
```
57
-
58
-
> Note: XDG Base Directory Specification is respected
59
-
60
49
61
50
### Database
62
51
@@ -74,21 +63,33 @@ Or set up Postgres using the `initdb.sql` file in the `postgres/` folder.
74
63
75
64
### Mapswipe-Workers Python Package
76
65
77
-
1. Export environment variables to current shell.
78
-
2. Create a Python virtual environment with `system-site-packages` option enabled to get access to GDAL/OGR Python packages
79
-
3. Activate the virtual environment.
80
-
5. Install MapSwipe Workers using pip.
81
-
6. Run it.
66
+
#### Installation
67
+
68
+
The Python virtual environment needs to be created with `system-site-packages` option enabled to get access to GDAL/OGR Python packages.
69
+
Also the MapSwipe Workers Python Package needs access to a data directory for logs and data for the API.
82
70
83
71
```bash
84
-
export$(cat .env | xargs)
85
72
cd mapswipe_workers
86
73
python -m venv --system-site-packages venv
87
74
source venv/bin/activate
88
-
pip install --editable mapswipe_workers/
75
+
pip install --editable .
76
+
pre-commit install
77
+
mkdir --parents ~/.local/share/mapswipe_workers
78
+
```
79
+
80
+
#### Usage
81
+
82
+
```bash
83
+
export$(cat .env | xargs)# See section on Configuration above
89
84
mapswipe_workers --help
90
85
```
91
86
87
+
#### Tests
88
+
89
+
```bash
90
+
python -m unittest
91
+
```
92
+
92
93
> Yeah! If you reached this point, you are ready to get into coding. Below you find some more information on Logging, Firebase Functions and Database Backup. However, you don't need this to get started for now.
0 commit comments