Add troubleshooting docs for some Windows issues (#97)
* docs * more instruction * Add more detailed contribution docs to the README Co-authored-by: Kyle Lahnakoski <kyle@lahnakoski.com> Co-authored-by: Andrew Halberstadt <ahal@pm.me>
This commit is contained in:
Родитель
303bb4cf0a
Коммит
737e2389e2
|
@ -110,3 +110,4 @@ venv.bak/
|
|||
/example.py
|
||||
/*.iml
|
||||
/requirements.txt
|
||||
/requirements.in
|
||||
|
|
35
README.md
35
README.md
|
@ -58,3 +58,38 @@ and are excluded from the default test run. But if needed, you can run them loca
|
|||
```bash
|
||||
$ tox -e integration
|
||||
```
|
||||
|
||||
Since `tox` installs packages on every invocation, it's much faster to run tests directly with `pytest`:
|
||||
|
||||
```bash
|
||||
$ poetry run pytest tests
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
$ poetry shell
|
||||
$ pytest tests
|
||||
```
|
||||
|
||||
Additionally, you can install the `pre-commit` hooks by running:
|
||||
|
||||
```bash
|
||||
$ pre-commit install
|
||||
```
|
||||
|
||||
Linters and formatters will now run every time you commit.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
#### `poetry install` locks up on Windows ([upstream issue](https://github.com/python-poetry/poetry/issues/2244))
|
||||
|
||||
This can potentially be worked around like this:
|
||||
|
||||
python -m pip install virtualenv
|
||||
python -m virtualenv .venv # IMPORTANT: Notice the dot in the name
|
||||
.venv\Scripts\activate
|
||||
pip install pip-tools
|
||||
poetry export --dev --without-hashes -f requirements.txt > requirements.in
|
||||
pip-compile --upgrade --generate-hashes --output-file requirements.txt requirements.in
|
||||
pip install -r requirements.txt
|
||||
|
|
Загрузка…
Ссылка в новой задаче