Skip to content

Commit b4587dc

Browse files
authored
README: add prerequisites for contributions (#338)
Signed-off-by: Schrotti <Schrott.Micha@web.de>
1 parent da9d03a commit b4587dc

3 files changed

Lines changed: 26 additions & 20 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ You can inspect the current state:
100100

101101
```
102102

103-
Or get a complete state repr for debugging purposes:
103+
Or get a complete state representation for debugging purposes:
104104

105105
```py
106106
>>> traffic_light.current_state
@@ -326,14 +326,14 @@ https://python-statemachine.readthedocs.io.
326326

327327
## Contributing
328328

329-
<a class="github-button" href="https://github.com/fgmacedo/python-statemachine" data-icon="octicon-star" aria-label="Star fgmacedo/python-statemachine on GitHub">Star this project</a>
330-
<a class="github-button" href="https://github.com/fgmacedo/python-statemachine/issues" data-icon="octicon-issue-opened" aria-label="Issue fgmacedo/python-statemachine on GitHub">Open an Issue</a>
331-
<a class="github-button" href="https://github.com/fgmacedo/python-statemachine/fork" data-icon="octicon-repo-forked" aria-label="Fork fgmacedo/python-statemachine on GitHub">Fork</a>
329+
* <a class="github-button" href="https://github.com/fgmacedo/python-statemachine" data-icon="octicon-star" aria-label="Star fgmacedo/python-statemachine on GitHub">Star this project</a>
330+
* <a class="github-button" href="https://github.com/fgmacedo/python-statemachine/issues" data-icon="octicon-issue-opened" aria-label="Issue fgmacedo/python-statemachine on GitHub">Open an Issue</a>
331+
* <a class="github-button" href="https://github.com/fgmacedo/python-statemachine/fork" data-icon="octicon-repo-forked" aria-label="Fork fgmacedo/python-statemachine on GitHub">Fork</a>
332332

333333
- If you found this project helpful, please consider giving it a star on GitHub.
334334

335335
- **Contribute code**: If you would like to contribute code to this project, please submit a pull
336-
request. For more information on how to contribute, please see our [contributing.md](contributing.md) file.
336+
request. For more information on how to contribute, please see our [contributing.md]contributing.md) file.
337337

338338
- **Report bugs**: If you find any bugs in this project, please report them by opening an issue
339339
on our GitHub issue tracker.
File renamed without changes.

docs/contributing.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Contributing
22

3-
<a class="github-button" href="https://github.com/fgmacedo/python-statemachine" data-icon="octicon-star" aria-label="Star fgmacedo/python-statemachine on GitHub">Star this project</a>
4-
<a class="github-button" href="https://github.com/fgmacedo/python-statemachine/issues" data-icon="octicon-issue-opened" aria-label="Issue fgmacedo/python-statemachine on GitHub">Open an Issue</a>
5-
<a class="github-button" href="https://github.com/fgmacedo/python-statemachine/fork" data-icon="octicon-repo-forked" aria-label="Fork fgmacedo/python-statemachine on GitHub">Fork</a>
3+
* <a class="github-button" href="https://github.com/fgmacedo/python-statemachine" data-icon="octicon-star" aria-label="Star fgmacedo/python-statemachine on GitHub">Star this project</a>
4+
* <a class="github-button" href="https://github.com/fgmacedo/python-statemachine/issues" data-icon="octicon-issue-opened" aria-label="Issue fgmacedo/python-statemachine on GitHub">Open an Issue</a>
5+
* <a class="github-button" href="https://github.com/fgmacedo/python-statemachine/fork" data-icon="octicon-repo-forked" aria-label="Fork fgmacedo/python-statemachine on GitHub">Fork</a>
66

77
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit
88
will always be given.
@@ -23,7 +23,6 @@ If you are reporting a bug, please include:
2323

2424
### Fix Bugs
2525

26-
2726
Look through the GitHub issues for bugs. Anything tagged with "bug"
2827
and "help wanted" is open to whoever wants to implement it.
2928

@@ -53,32 +52,38 @@ If you are proposing a feature:
5352

5453
Ready to contribute? Here's how to set up `python-statemachine` for local development.
5554

55+
1. Install dependencies.
56+
1. [graphviz](https://graphviz.org/download/#linux)
57+
1. [poetry](https://python-poetry.org/docs/#installation)
5658

5759
1. Fork the `python-statemachine` repository on GitHub.
5860

59-
2. Clone the forked repository to your local machine by running::
61+
1. Clone the forked repository to your local machine by running::
6062

6163
git clone https://github.com/YOUR-USERNAME/python-statemachine.git.
6264

6365

64-
3. Run `poetry install` to install all the dependencies and create a virtual environment::
66+
1. Run `poetry install` once to install all the dependencies and create a virtual environment::
6567

6668
poetry install
6769

68-
4. Install the pre-commit validations:
70+
1. Run `poetry shell` to enter the provided virtual
71+
72+
1. Install the pre-commit validations:
6973

7074
pre-commit install
7175

72-
5. Create a branch for local development:
76+
1. Create a branch for local development:
77+
78+
git checkout -b <name-of-your-bugfix-or-feature>
7379

74-
git checkout -b name-of-your-bugfix-or-feature
80+
1. Make changes to the code.
7581

76-
6. Make changes to the code.
77-
7. Run tests to ensure they pass by running:
82+
1. Run tests to ensure they pass by running:
7883

7984
poetry run pytest
8085

81-
8. Update the documentation as needed.
86+
1. Update the documentation as needed.
8287

8388
Build the documentation:
8489

@@ -102,15 +107,16 @@ Ready to contribute? Here's how to set up `python-statemachine` for local develo
102107

103108
rm -rf docs/_build/ docs/auto_examples
104109

105-
9. Commit your changes and push them to your forked repository:
110+
1. Commit your changes and push them to your forked repository:
106111

107112
git add -A .
108-
git commit -m "Your detailed description of your changes."
113+
git commit -s -m "Your detailed description of your changes."
109114
git push origin name-of-your-bugfix-or-feature
110115

111-
10. Create a pull request on the original repository for your changes to be reviewed and potentially
116+
1. Create a pull request on the original repository for your changes to be reviewed and potentially
112117
merged. Be sure to follow the project's code of conduct and contributing guidelines.
113118

119+
1. Use `exit` to leave the virtual environment.
114120

115121
## Pull Request Guidelines
116122

0 commit comments

Comments
 (0)