Skip to content

Commit

Permalink
build: fix build setup using mamba and poetry
Browse files Browse the repository at this point in the history
by removing gdal from pyproject.toml
  • Loading branch information
matthiasschaub committed Aug 18, 2023
1 parent 8699938 commit b00d3af
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 113 deletions.
17 changes: 12 additions & 5 deletions docs/development-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,23 @@ This project uses [Mamba](https://github.com/conda-forge/miniforge#install) for
### Python Package

```bash
# clone repository
git clone https://github.com/GIScience/sketch-map-tool.git
cd sketch-map-tool

# setup environment and install package
mamba env create --file environment.yml

mamba activate smt
poetry install # poetry installs directly into activated mamba environment

# install git commit hooks
pre-commit install

# fetch and run backend (postgres) and broker (redis) using docker
docker run --name smt-postgres -d -p 5432:5432 -e POSTGRES_PASSWORD=smt -e POSTGRES_USER=smt postgres
docker run --name smt-redis -d -p 6379:6379 redis

# install local versions of esbuild, eslint and stylelint to build and check JS and CSS
npm install
# hack away
Expand All @@ -36,11 +47,7 @@ Please refer to the [configuration documentation](/docs/configuration.md).

```bash
mamba activate smt
# backend (postgres)
docker run --name smt-redis -d -p 6379:6379 redis
# broker (redis)
docker run --name smt-postgres -d -p 5432:5432 -e POSTGRES_PASSWORD=smt -e POSTGRES_USER=smt postgres
# celery
docker start smt-postgres smt-redis
celery --app sketch_map_tool.tasks worker --loglevel=INFO
```

Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ channels:
dependencies:
- python=3.10.*
- poetry=1.*
- gdal=3.4.1 # same as in Dockerfile and pyproject.toml
- gdal=3.7.1 # same as in Dockerfile and pyproject.toml
- pyzbar=0.1.9 # same as in Dockerfile and pyproject.toml
106 changes: 1 addition & 105 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ PyMuPDF = {extras = ["Pillow"], version = "^1.21.0"}
psycopg2 = "^2.9.5"
plotly = "^5.15.0"
kaleido = "0.2.1" # Not working with '^', cf. https://github.com/plotly/Kaleido/issues/125
gdal = {version = "3.4.1", extras = ["numpy"]} # same as in Dockerfile and environment.yml
pyzbar = "0.1.9" # same as in Dockerfile and environment.yml
geojson = "^2.5.0"
matplotlib-scalebar = "^0.8.1"
redis = "^4.5.4"
Expand Down

0 comments on commit b00d3af

Please sign in to comment.