Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasschaub committed Aug 21, 2024
1 parent 96df50e commit 9fa2466
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
6 changes: 4 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To change the default configuration file path set the environment variable `SMT_
To create a new configuration file simply copy the sample configuration file and change the values.

```bash
cp sample.config.toml config.toml
cp config/sample.config.toml config/config.toml
```

## Required Configuration
Expand All @@ -26,7 +26,9 @@ All lot of configuration values come with defaults. Required configuration value
To get an ArcGIS/ESRI API key sign-up for [ArcGIS Location Platform](https://location.arcgis.com/sign-up/)
and follow [this tutorial](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/tutorials/create-an-api-key/).

> Note: Keep the referrer field empty.
Notes:
1. During registration enter your username into the "Your portal URL" and "Your portal display name" fields (not `heigit`).
2. During API key generation keep the referrer field empty.

### neptune.ai

Expand Down
23 changes: 2 additions & 21 deletions docs/development-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@ For contributing to this project please also read the [Contribution Guideline](/
- Poetry
- Node: `>=14`
- NPM
- git
- GDAL
- freetype *(dependency of reportlab for creating PDFs)*
- zbar *(dependency of pyzbar for reading QR-codes)*

This project uses [Poetry]() and [NPM]() for environment and dependencies management.
This project uses [Poetry](https://python-poetry.org/docs/) and [NPM](https://docs.npmjs.com/) for environment and dependencies management.

```bash
# Mac OS X:
# Make sure to have Python (and pip) and Node (and npm) installed
brew install \
pipx \
git \
gdal \
freetype \
zbar
Expand All @@ -37,7 +35,6 @@ sudo apt install \
pipx \
node \
npm \
git \
libgdal-dev \
libfreetype6-dev \
libzbar0
Expand All @@ -57,7 +54,7 @@ cd sketch-map-tool

poetry install
poetry shell
pip install gdal[numpy]=="$(gdal-config --version).*"
pip install gdal=="$(gdal-config --version).*"
pre-commit install

# compile languages:
Expand Down Expand Up @@ -189,22 +186,6 @@ To connect to the Postgres database when running it as Docker container with the
If you run the database as Docker Compose service run:
`psql -h localhost -d smt -U smt -p 5444 -W`.

## Setup in an IDE

If you setup sketch-map-tool in an IDE like PyCharm please make sure that your IDE does not setup a Poetry managed project/virtual environment.
Go thought the setup steps above in the terminal and change interpreter settings in the IDE to point to the mamba/conda environment.

Also make sure the environment variable `PROJ_LIB` to point to the `proj` directory of the mamba/conda environment:
```bash
PROJ_LIB=/home/$USERDIR/miniforge3/envs/smt/share/proj
```

## Setup on an Apple Mac with M2 chip

1. Install Mambaforge for Intel not for M2 architecture.
2. Please use [Rosetta 2](https://support.apple.com/en-us/102527) to open terminal.
3. Switch to x86_64: `$env /usr/bin/arch -x86_64 /bin/zsh --login`

## Troubleshooting

Make sure that Poetry does not try to manage the virtual environment. Check with `poetry env list`. If any environment are listed remove them: `poetry env remove ...`

0 comments on commit 9fa2466

Please sign in to comment.