Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a short blurb on pre-commit workflow #3

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
Authors
=======

* Nicolas Beltran - https://blog.ionelmc.ro
* Nicolas Beltran - https://github.com/velezbeltran
* Alessandro Grande - https://github.com/aagrande
15 changes: 15 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,18 @@ To run a subset of tests::
To run all the test environments in *parallel*::

tox -p auto

Before committing it is important to run pre-commit (github will check that you
did). Running tox does this but if you want to dot it manually here is a short blurb
of what is and how it works.
`pre-commit` is tool that runs checks on your code before you commit it. It is great!
Here is the workflow on how to use it:
Assume there are files `file.txt` and `scripty.py`. Then the workflows is::

git add file.txt
git add scripty.py
pre-commit
... [fix all of the things that can't be automatically fixed ] ...
git add file.txt
git add script.txt
git commit -m "some message"
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To run all the tests run::
tox

However, this is usually excessive so it is easier to use pytest with
your environment. When you push tox will run automatically.
your environment. When you push tox will run automatically.

Note, to combine the coverage data from all the tox environments run:

Expand All @@ -53,7 +53,7 @@ Note, to combine the coverage data from all the tox environments run:



Before committing it is important to run pre-commit (github will check that you
Before committing it is important to run pre-commit (github will check that you
did). `pre-commit` will run automatically as a hook so that to commit things need
to adhere to the linter. To make sure this is the case you can use the following
work-stream. Assume there are files `file.txt` and `scripty.py`. Then the workflows is::
Expand All @@ -66,7 +66,7 @@ work-stream. Assume there are files `file.txt` and `scripty.py`. Then the workfl
git add script.txt
git commit -m "some message"



Note, to combine the coverage data from all the tox environments run:

Expand Down