@@ -57,68 +57,72 @@ If you are proposing a feature:
5757Get Started!
5858------------
5959
60- Ready to contribute? Here's how to set up `python-statemachine ` for local development.
60+ Ready to contribute? Here's how to set up `` python-statemachine ` ` for local development.
6161
62- 1. Fork the `python-statemachine ` repo on GitHub.
63- 2. Clone your fork locally::
6462
65- $ git clone git@github.com:your_name_here/python-statemachine.git
63+ 1. Fork the `` python-statemachine `` repository on GitHub.
6664
67- 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development ::
65+ 2. Clone the forked repository to your local machine by running ::
6866
69- $ mkvirtualenv python-statemachine
70- $ cd python-statemachine/
71- $ python setup.py develop
67+ git clone https://github.com/YOUR-USERNAME/python-statemachine.git.
7268
73- 4. Create a branch for local development::
7469
75- $ git checkout -b name-of-your-bugfix-or-feature
70+ 3. Run `` poetry install `` to install all the dependencies and create a virtual environment::
7671
77- Now you can make your changes locally.
72+ poetry install
7873
79- 5. When you're done making changes, check that your changes pass flake8 and the tests, including
80- testing other Python versions with tox::
74+ 4. Install the pre-commit validations::
8175
82- $ flake8 statemachine tests
83- $ py.test
84- $ tox
76+ pre-commit install
8577
86- To get flake8 and tox, just pip install them into your virtualenv.
78+ 5. Create a branch for local development::
8779
88- 6. To build the documentation locally, run::
80+ git checkout -b name-of-your-bugfix-or-feature
8981
90- $ sphinx-build docs docs/_build/html
82+ 6. Make changes to the code.
83+ 7. Run tests to ensure they pass by running::
9184
92- Now you can serve the local documentation using a webserver, like the built-in included
93- with python::
85+ poetry run pytest
9486
95- $ python -m http.server --directory docs/_build/html
87+ 8. Update the documentation as needed.
9688
97- And access your browser at http://localhost:8000/
89+ Build the documentation::
9890
99- If you're specially writting documentation, I strongly recommend using ``sphinx-autobuild``
100- as it improves the workflow watching for file changes and with live reloading::
91+ poetry run sphinx-build docs docs/_build/html
10192
102- $ sphinx-autobuild docs docs/_build/html --re-ignore "auto_examples/.*"
10393
104- Sometimes you need a full fresh of the files being build for docs, you can use::
94+ Now you can serve the local documentation using a webserver, like the built-in included
95+ with python::
10596
106- $ rm -rf docs/_build/ docs/auto_examples
97+ python -m http.server --directory docs/_build/html
10798
108- .. note ::
99+ And access your browser at http://localhost:8000/
100+
101+ If you're specially writting documentation, I strongly recommend using ``sphinx-autobuild ``
102+ as it improves the workflow watching for file changes and with live reloading::
103+
104+ poetry run sphinx-autobuild docs docs/_build/html --re-ignore "auto_examples/.*"
109105
110- In order to get the tox working for all versions, I usually run pyenv enabling shell for
111- those versions ::
106+ Sometimes you need a full fresh of the files being build for docs, you can safelly remove
107+ all automatically generated files to get a clean state by running ::
112108
113- $ pyenv shell 3.8.1/envs/python-statemachine 3.7.6 3.6.10 3.5.9 2.7.17
109+ rm -rf docs/_build/ docs/auto_examples
114110
115- 1 . Commit your changes and push your branch to GitHub ::
111+ 9 . Commit your changes and push them to your forked repository ::
116112
117- $ git add .
118- $ git commit -m "Your detailed description of your changes."
119- $ git push origin name-of-your-bugfix-or-feature
113+ git add -A .
114+ git commit -m "Your detailed description of your changes."
115+ git push origin name-of-your-bugfix-or-feature
116+
117+ 10. Create a pull request on the original repository for your changes to be reviewed and potentially
118+ merged. Be sure to follow the project's code of conduct and contributing guidelines.
119+
120+
121+ .. note ::
122+
123+ In order to get the tox working for all versions, I usually use pyenv enabling shell for
124+ those versions.
120125
121- 2. Submit a pull request through the GitHub website.
122126
123127Pull Request Guidelines
124128-----------------------
@@ -128,14 +132,6 @@ Before you submit a pull request, check that it meets these guidelines:
1281321. The pull request should include tests.
1291332. If the pull request adds functionality, the docs should be updated. Put
130134 your new functionality into a function with a docstring, and add the
131- feature to the list in README.rst.
132- 3. The pull request should work for Python 2.7, 3.3, 3.4 and 3.5. Check
133- https://travis-ci.org/fgmacedo/python-statemachine/pull_requests
134- and make sure that the tests pass for all supported Python versions.
135-
136- Tips
137- ----
138-
139- To run a subset of tests::
140-
141- $ py.test tests.test_statemachine
135+ feature to the list in the next release notes.
136+ 3. Consider adding yourself on the contributors list.
137+ 4. The pull request should work for all supported Python versions.
0 commit comments