Skip to content

Commit

Permalink
fix and improve readme (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneBinder authored Nov 11, 2023
1 parent e2d7518 commit 65c3d53
Showing 1 changed file with 16 additions and 51 deletions.
67 changes: 16 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -551,61 +551,24 @@ that are already converted to the PIE format.

<!-- github-only -->

✨📚✨ [Read the full documentation](https://pytorch-ie.readthedocs.io/)
<!-- TODO ✨📚✨ [Read the full documentation](https://pytorch-ie.readthedocs.io/) -->

## 🔧 Project Development

### Setup

This project is build with [Poetry](https://python-poetry.org/). It is recommended, to install Poetry via
[pipx](https://pypa.github.io/pipx/).
This project is build with [Poetry](https://python-poetry.org/). If not yet done, follow the
[Poetry installation guide](https://python-poetry.org/docs/#installation) to install it. Then, install all
dependencies (including for development) for PyTorch-IE by calling the following command from the root of the
repository:

0. To install `pipx`, execute the following (taken from
[pipx installation instructions](https://pypa.github.io/pipx/installation/)):

```bash
# [IF PIP IS NOT AVAILABLE] install pip
python -m ensurepip --upgrade
# [OPTIONAL] update pip
python -m pip install --upgrade pip

# install pipx (requires pip 19.0 or later)
python3 -m pip install --user pipx
python3 -m pipx ensurepath
```

NOTE: This installs `pipx` globally!

1. Install Poetry via `pipx` (or see [Poetry installation guide](https://python-poetry.org/docs/#installation)):

```bash
pipx install poetry
```

NOTE: This installs `pipx` globally!

2. [IF REQUIRED PYTHON VERSION IS NOT AVAILABLE] install required python:

```bash
# for instance, to install python3.9 on Ubuntu:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo install python3.9
# or via conda:
conda create -n python3.9=python3.9 -y
conda activate python3.9
```

3. Finally, install the dependencies (including for development) for PyTorch-IE:

```bash
poetry install --with dev
```
```bash
poetry install --with dev
```

NOTE: If the installation gets stuck, try if disabling experimental parallel installer helps
([source](https://github.com/python-poetry/poetry/issues/3352#issuecomment-732761629)):
`poetry config experimental.new-installer false`
NOTE: If the installation gets stuck, try if disabling experimental parallel installer helps
([source](https://github.com/python-poetry/poetry/issues/3352#issuecomment-732761629)):
`poetry config experimental.new-installer false`

### Testing and code quality checks

Expand Down Expand Up @@ -638,12 +601,14 @@ To run all commands that also run on GitHub CI, call:
poetry run nox
```

To run more tests (also tests marked with `@pytest.mark.slow`, but without tests for all datasets which would take forever), call:
You can also start a shell with Poetry's virtual environment activated by calling:

```bash
poetry run nox -s tests_no_local_datasets-3.9
poetry shell
```

This allows you to run above commands without the `poetry run` prefix.

### Updating Dependencies

Call this to update individual packages:
Expand Down Expand Up @@ -671,7 +636,7 @@ Since this project is based on the [Cookiecutter template](https://cookiecutter-
`git push origin release`
5. Create a PR for that `release` branch on GitHub.
6. Wait until checks passed successfully.
7. Integrate the PR into the main branch (use `rebase` to have a linear history). This triggers the GitHub Action that
7. Integrate the PR into the main branch. This triggers the GitHub Action that
creates all relevant release artefacts and also uploads them to PyPI.
8. Cleanup: Delete the `release` branch.

Expand Down

0 comments on commit 65c3d53

Please sign in to comment.