Skip to content
Snippets Groups Projects
Commit b67abf4e authored by Moul's avatar Moul
Browse files

[doc] #165: Readme: change make commands with poetry, pre-commit, sphinx* commands

parent 4b6664b6
No related branches found
No related tags found
No related merge requests found
...@@ -83,16 +83,17 @@ poetry run python ...@@ -83,16 +83,17 @@ poetry run python
poetry install poetry install
``` ```
- Generate documentation - Generate documentation in `public` directory:
```bash ```bash
poetry run make docs poetry run sphinx-apidoc -o docs .
poetry run sphinx-build -b html docs public
``` ```
- The HTML documentation is generated in `docs/_build/html` folder. - The HTML documentation is generated in `docs/_build/html` folder.
## Development ## Development
* When writing docstrings, use the reStructuredText format recommended by https://www.python.org/dev/peps/pep-0287/#docstring-significant-features * When writing docstrings, use the reStructuredText format recommended by https://www.python.org/dev/peps/pep-0287/#docstring-significant-features
* Use `make` commands to check the code and the format. * Use `pre-commit run --all-files` commands to check the code and the format.
* Install runtime dependencies * Install runtime dependencies
```bash ```bash
...@@ -108,7 +109,7 @@ poetry install ...@@ -108,7 +109,7 @@ poetry install
* Check static typing with [mypy](http://mypy-lang.org/) * Check static typing with [mypy](http://mypy-lang.org/)
```bash ```bash
make check pre-commit run -a mypy
``` ```
## Packaging and deploy ## Packaging and deploy
...@@ -120,12 +121,13 @@ Change and commit and tag the new version number (semantic version number) ...@@ -120,12 +121,13 @@ Change and commit and tag the new version number (semantic version number)
Build the PyPI package in the `dist` folder Build the PyPI package in the `dist` folder
```bash ```bash
make build poetry build
``` ```
Deploy the package to PyPI test repository (prefix the command with a space for the shell to not save it in its history system, since the command contains credentials) Deploy the package to PyPI test repository (prefix the command with a space for the shell to not save it in its history system, since the command contains credentials)
```bash ```bash
[SPACE]make deploy_test PYPI_TEST_LOGIN=xxxx PYPI_TEST_PASSWORD=xxxx poetry config repositories.pypi_test https://test.pypi.org/legacy/
[SPACE]poetry publish --build --username $PYPI_TEST_LOGIN --password $PYPI_TEST_PASSWORD --repository pypi_test
``` ```
Install the package from PyPI test repository Install the package from PyPI test repository
...@@ -135,7 +137,7 @@ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https:// ...@@ -135,7 +137,7 @@ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://
Deploy the package on the PyPI repository (prefix the command with a space for the shell to not save it in its history system, since the command contains credentials) Deploy the package on the PyPI repository (prefix the command with a space for the shell to not save it in its history system, since the command contains credentials)
```bash ```bash
[SPACE]make deploy PYPI_LOGIN=xxxx PYPI_PASSWORD=xxxx [SPACE]poetry publish --build --username $PYPI_LOGIN --password $PYPI_PASSWORD
``` ```
## Packaging status ## Packaging status
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment