Skip to content

Commit

Permalink
Setup troubleshooting and poetry package additions (bcgov#3111)
Browse files Browse the repository at this point in the history
- Add some troubleshooting to api README
- Add greenlet to poetry managed dependencies
  • Loading branch information
brettedw authored Sep 7, 2023
1 parent c2a85a3 commit 7c4ae2b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
18 changes: 17 additions & 1 deletion api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ You will need an environment file. See: `.env.example`. Contact current maintain
- then activate the virtual environment with `poetry shell`
- then run:
- python -m pip install gdal==$(gdal-config --version)
- pip install greenlet
- Follow [vsc setup steps](../setup/VSC.md)
- Manual (linux): See [manual setup](../docs/MANUAL_SETUP.md).
Note: you may want to alias `python3` as `python` in your profile
Expand Down Expand Up @@ -43,3 +42,20 @@ Or run continuously with pytest-testmon and pytest-watch (`ptw --runner "pytest
```bash
make test-watch
```

### Troubleshooting

**Poetry can't install rpy2**
Error: `ld: library not found for -lpcre2-8`

pcre2 should be installed after running [mac.sh](../setup/mac.sh). This can be verified by running

```bash
brew list pcre2
```

This issue can be resolved by running the following command before `poetry_setup.sh`: (adjust path as necessary)

```bash
export LIBRARY_PATH="/opt/homebrew/Cellar/pcre2/10.42/lib/:$LIBRARY_PATH"
```
6 changes: 3 additions & 3 deletions api/poetry.lock

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

1 change: 1 addition & 0 deletions api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ rasterio = "^1.3.2"
scikit-learn = "^1.1.3"
httpx = "^0.24.0"
orjson = "^3.9.0"
greenlet = "^2.0.2"

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.1"
Expand Down

0 comments on commit 7c4ae2b

Please sign in to comment.