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:
Kyle Lahnakoski 2020-04-22 16:18:27 -04:00 коммит произвёл GitHub
Родитель 303bb4cf0a
Коммит 737e2389e2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 36 добавлений и 0 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -110,3 +110,4 @@ venv.bak/
/example.py
/*.iml
/requirements.txt
/requirements.in

Просмотреть файл

@ -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