-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Improve contributing docs (#5708)
- Loading branch information
Showing
2 changed files
with
28 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<!-- | ||
The content of this file is manually kept in sync with docs/contributing.md. There are formatting differences because this file uses plain markdown. | ||
--> | ||
|
||
# Contributing to Poetry | ||
|
||
First off, thanks for taking the time to contribute! | ||
|
@@ -104,11 +108,13 @@ the code base, join us on our [Discord Server](https://discordapp.com/invite/awx | |
|
||
You will need Poetry to start contributing on the Poetry codebase. Refer to the [documentation](https://python-poetry.org/docs/#introduction) to start using Poetry. | ||
|
||
> **Note:** Local development of Poetry requires Python 3.8 or newer. | ||
You will first need to clone the repository using `git` and place yourself in its directory: | ||
|
||
```bash | ||
$ git clone [email protected]:python-poetry/poetry.git | ||
$ cd poetry | ||
git clone [email protected]:python-poetry/poetry.git | ||
cd poetry | ||
``` | ||
|
||
> **Note:** We recommend that you use a personal [fork](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo) for this step. If you are new to GitHub collaboration, | ||
|
@@ -118,15 +124,15 @@ Now, you will need to install the required dependency for Poetry and be sure tha | |
tests are passing on your machine: | ||
|
||
```bash | ||
$ poetry install | ||
$ poetry run pytest tests/ | ||
poetry install | ||
poetry run pytest tests/ | ||
``` | ||
|
||
Poetry uses [mypy](https://github.com/python/mypy) for typechecking, and the CI | ||
will fail if it finds any errors. To run mypy locally: | ||
|
||
```bash | ||
$ poetry run mypy | ||
poetry run mypy | ||
``` | ||
|
||
Poetry uses the [black](https://github.com/psf/black) coding style and you must ensure that your | ||
|
@@ -139,13 +145,13 @@ To make sure that you don't accidentally commit code that does not follow the co | |
install a pre-commit hook that will check that everything is in order: | ||
|
||
```bash | ||
$ poetry run pre-commit install | ||
poetry run pre-commit install | ||
``` | ||
|
||
You can also run it anytime using: | ||
|
||
```bash | ||
$ poetry run pre-commit run --all-files | ||
poetry run pre-commit run --all-files | ||
``` | ||
|
||
Your code must always be accompanied by corresponding tests, if tests are not present your code | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,10 @@ menu: | |
weight: 100 | ||
--- | ||
|
||
<!-- | ||
The content of this file is manually kept in sync with ../CONTRIBUTING.md. There are formatting differences because this file uses Hugo templating. | ||
--> | ||
|
||
# Contributing to Poetry | ||
|
||
First off, thanks for taking the time to contribute! | ||
|
@@ -119,11 +123,15 @@ the code base, join us on our [Discord Server](https://discordapp.com/invite/awx | |
|
||
You will need Poetry to start contributing on the Poetry codebase. Refer to the [documentation](https://python-poetry.org/docs/#introduction) to start using Poetry. | ||
|
||
{{% note %}} | ||
Local development of Poetry requires Python 3.8 or newer. | ||
{{% /note %}} | ||
|
||
You will first need to clone the repository using `git` and place yourself in its directory: | ||
|
||
```bash | ||
$ git clone [email protected]:python-poetry/poetry.git | ||
$ cd poetry | ||
git clone [email protected]:python-poetry/poetry.git | ||
cd poetry | ||
``` | ||
|
||
{{% note %}} | ||
|
@@ -135,15 +143,15 @@ Now, you will need to install the required dependency for Poetry and be sure tha | |
tests are passing on your machine: | ||
|
||
```bash | ||
$ poetry install | ||
$ poetry run pytest tests/ | ||
poetry install | ||
poetry run pytest tests/ | ||
``` | ||
|
||
Poetry uses [mypy](https://github.com/python/mypy) for typechecking, and the CI | ||
will fail if it finds any errors. To run mypy locally: | ||
|
||
```bash | ||
$ poetry run mypy | ||
poetry run mypy | ||
``` | ||
|
||
Poetry uses the [black](https://github.com/psf/black) coding style and you must ensure that your | ||
|
@@ -156,13 +164,13 @@ To make sure that you don't accidentally commit code that does not follow the co | |
install a pre-commit hook that will check that everything is in order: | ||
|
||
```bash | ||
$ poetry run pre-commit install | ||
poetry run pre-commit install | ||
``` | ||
|
||
You can also run it anytime using: | ||
|
||
```bash | ||
$ poetry run pre-commit run --all-files | ||
poetry run pre-commit run --all-files | ||
``` | ||
|
||
Your code must always be accompanied by corresponding tests, if tests are not present your code | ||
|