forked from audreyfeldroy/cookiecutter-pypackage
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #37 - Renamed CHANGES.rst to CHANGELOG.rst - Remove leading '$' for commands to easy copy/pasting - Moved 'how to release' section from CONTRIBUTING to a dedicated docs/releasing.rst - Added 'all' dependency target to install both docs and dev dependencies - Added pre-commit install to the 'make dev' command
- Loading branch information
Showing
13 changed files
with
263 additions
and
183 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 |
---|---|---|
|
@@ -58,15 +58,15 @@ Ready to contribute? Here's how to set up `cookiecutter-pypackage` for local dev | |
|
||
.. code-block:: bash | ||
$ cd path_for_the_repo | ||
$ git clone [email protected]:YOUR_NAME/cookiecutter-pypackage.git | ||
cd path_for_the_repo | ||
git clone [email protected]:YOUR_NAME/cookiecutter-pypackage.git | ||
#. Assuming you have virtualenv installed (If you have Python 3.8+ this should already be there), you can create a new environment for your local development by typing: | ||
|
||
.. code-block:: bash | ||
$ virtualenv cookiecutter-pypackage-env | ||
$ source cookiecutter-pypackage-env/bin/activate | ||
virtualenv cookiecutter-pypackage-env | ||
source cookiecutter-pypackage-env/bin/activate | ||
This should change the shell to look something like: | ||
|
||
|
@@ -78,35 +78,35 @@ Ready to contribute? Here's how to set up `cookiecutter-pypackage` for local dev | |
|
||
.. code-block:: bash | ||
$ git checkout -b name-of-your-bugfix-or-feature | ||
git checkout -b name-of-your-bugfix-or-feature | ||
Now you can make your changes locally. | ||
|
||
#. When you're done making changes, check that your changes pass flake8. Since, this package contains mostly templates the flake should be run for tests directory: | ||
|
||
.. code-block:: bash | ||
$ flake8 ./tests | ||
flake8 ./tests | ||
#. The next step would be to run the test cases. `cookiecutter-pypackage` testing uses the `pytest` framework. Before you run `pytest` you should ensure all dependencies are installed: | ||
|
||
.. code-block:: bash | ||
$ pip install -r requirements_dev.txt | ||
$ pytest ./tests | ||
pip install -r requirements_dev.txt | ||
pytest ./tests | ||
If you get any errors while installing cryptography package (something like `#include <openssl/aes.h>`). Please update your pip version and try again: | ||
|
||
.. code-block:: bash | ||
# Update pip | ||
$ pip install -U pip | ||
pip install -U pip | ||
#. Before raising a pull request you should also run tox. This will run the tests across different versions of Python: | ||
|
||
.. code-block:: bash | ||
$ tox | ||
tox | ||
If you are missing flake8, pytest and/or tox, just `pip install` them into your virtualenv. | ||
|
||
|
@@ -116,9 +116,9 @@ Ready to contribute? Here's how to set up `cookiecutter-pypackage` for local dev | |
|
||
.. code-block:: bash | ||
$ git add . | ||
$ git commit -m "Your detailed description of your changes." | ||
$ git push origin name-of-your-bugfix-or-feature | ||
git add . | ||
git commit -m "Your detailed description of your changes." | ||
git push origin name-of-your-bugfix-or-feature | ||
#. Submit a pull request through the GitHub website. | ||
|
||
|
@@ -146,27 +146,27 @@ To write and run your new test, follow these steps: | |
|
||
.. code-block:: bash | ||
$ git stash | ||
$ git stash list | ||
git stash | ||
git stash list | ||
#. Run your test and confirm that your test fails. If your test does not fail, rewrite the test until it fails on the original code: | ||
|
||
.. code-block:: bash | ||
$ pytest ./tests | ||
pytest ./tests | ||
#. (Optional) Run the tests with tox to ensure that the code changes work with different Python versions: | ||
|
||
.. code-block:: bash | ||
$ tox | ||
tox | ||
#. Proceed work on your bug fix or new feature or restore your changes. To restore your stashed changes and confirm their restoration: | ||
|
||
.. code-block:: bash | ||
$ git stash pop | ||
$ git stash list | ||
git stash pop | ||
git stash list | ||
#. Rerun your test and confirm that your test passes. If it passes, congratulations! | ||
|
||
|
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,22 +1,23 @@ | ||
BAKE_OPTIONS=--no-input | ||
BAKE_OPTIONS ?= --no-input | ||
NO_CRUFT = generated_with_cruft=n | ||
|
||
help: | ||
@echo "bake Generate project using defaults" | ||
@echo "help Show this help" | ||
@echo "test Run the tests" | ||
@echo "replay Replay last cookiecutter run and watch for changes" | ||
@echo "watch Generate project using defaults and watch for changes" | ||
|
||
|
||
bake: # Generate project using defaults | ||
cookiecutter $(BAKE_OPTIONS) . --overwrite-if-exists | ||
cookiecutter $(BAKE_OPTIONS) . --overwrite-if-exists $(NO_CRUFT) | ||
|
||
watch: bake | ||
watchmedo shell-command -p '*.*' -c 'make bake -e BAKE_OPTIONS=$(BAKE_OPTIONS)' -W -R -D \{{cookiecutter.project_slug}}/ | ||
watchmedo shell-command -p '*.*' -c 'make bake -e BAKE_OPTIONS=$(BAKE_OPTIONS)' -W -R -D \{{cookiecutter.project_slug}}/ $(NO_CRUFT) | ||
|
||
replay: BAKE_OPTIONS=--replay | ||
replay: watch | ||
; | ||
|
||
test: | ||
pytest | ||
pytest |
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
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
========= | ||
Changelog | ||
========= | ||
|
||
`Unreleased <https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}>`_ (latest) | ||
{{ '-' * ('`Unreleased <https://github.com/' + cookiecutter.github_username + '/' + cookiecutter.project_slug + '>`_ (latest)')|length }} | ||
|
||
Contributors: | ||
|
||
Changes | ||
^^^^^^^ | ||
* No change. | ||
|
||
Fixes | ||
^^^^^ | ||
* No change. | ||
|
||
.. _changes_{{ cookiecutter.version }}: | ||
|
||
`v{{ cookiecutter.version }} <https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}/tree/{{ cookiecutter.version }}>`_ | ||
{{ '-' * ('`v' + cookiecutter.version + ' <https://github.com/' + cookiecutter.github_username + '/' + cookiecutter.project_slug + '/tree/' + cookiecutter.version + '>`_')|length }} | ||
|
||
Contributors: {{ cookiecutter.full_name }} `{{ cookiecutter.github_username }} <https://github.com/{{ cookiecutter.github_username }}>`_ | ||
|
||
Changes | ||
^^^^^^^ | ||
* First release on PyPI. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.