📝 Document .git-blame-ignore-revs

This commit is contained in:
Gina Häußge committed 2020-10-07 18:04:07 +02:00
1 parent 9ab1a56935
commit eb37b72dc1
2 files changed
+21 -14

No files matched your search

+11 -11
View File
@@ -351,27 +351,27 @@ and branching strategy.
by running
```
pre-commit run --all-files
pre-commit run --hook-stage manual --all-files
```
in the OctoPrint checkout folder. If you install the pre-commit hooks via
`pre-commit install` this will even be taken care of for you prior to committing.
`pre-commit install` (which you really should!) this will even be taken care of for you prior to committing.
An [automatic build workflow](https://github.com/OctoPrint/OctoPrint/actions?query=workflow%3ABuild)
is in place that will run these checks - if they fail your PR will be marked accordingly.
9. **Test your changes thoroughly**. That also means testing with usage
scenarios you don't normally use, e.g. if you only use access control, test
without and vice versa. If you only test with your printer, test with the
virtual printer and vice versa. State in your pull request how you tested
your changes. Ideally **add unit tests** - OctoPrint severely lacks in that
department, but we are trying to change that, so any new code already covered
with a test suite helps a lot!
10. In your pull request's description, **state what your pull request does**,
10. **Test your changes thoroughly**. That also means testing with usage
scenarios you don't normally use, e.g. if you only use access control, test
without and vice versa. If you only test with your printer, test with the
virtual printer and vice versa. State in your pull request how you tested
your changes. Ideally **add unit tests** - OctoPrint severely lacks in that
department, but we are trying to change that, so any new code already covered
with a test suite helps a lot!
11. In your pull request's description, **state what your pull request does**,
as in, what feature does it implement, what bug does it fix. The more
thoroughly you explain your intent behind the PR here, the higher the
chances it will get merged fast. There is a template provided below
that can help you here.
11. Don't forget to **add yourself to the [AUTHORS](./AUTHORS.md)
12. Don't forget to **add yourself to the [AUTHORS](./AUTHORS.md)
file** :)
Template to use for Pull Request descriptions:
+10 -3
View File
@@ -13,8 +13,8 @@ below.
* Prerequisites:
* `Python 2.7 <https://python.org>`_ including ``pip``, ``setuptools`` and ``virtualenv``
* `Python 3.7 <https://python.org>`_ including ``pip``, ``setuptools`` and ``virtualenv``
* `Python 2.7 <https://python.org>`_ including ``pip``, ``setuptools`` and ``virtualenv``
* `Git <https://git-scm.com>`_
* Checkout the OctoPrint sources from their Git repository:
@@ -26,8 +26,8 @@ below.
installing and running OctoPrint and its dependencies. Creating virtual environments avoids potential versioning
issues for the dependencies with system wide installed instances:
* PY2: ``virtualenv --python=python2 venv2``
* PY3: ``virtualenv --python=python3 venv3``
* PY2: ``virtualenv --python=python2 venv2``
.. note::
@@ -54,12 +54,16 @@ below.
* ``pre-commit install``
* Tell ``git`` where to find the file with revisions to exclude for ``git blame``:
* ``git config blame.ignoreRevsFile .git-blame-ignore-revs``
When the virtual environment is activated you can then:
* run the OctoPrint server via ``octoprint serve``
* run the test suite from the checked out source folder via ``pytest``
* trigger the pre-commit check suite manually from the checked out source folder via
``pre-commit run --all-files``
``pre-commit run --hook-stage manual --all-files``
To switch the activated virtual environment, simply activate the new environment as described above.
@@ -114,6 +118,7 @@ Then:
pip install --upgrade pip
pip install -e .[develop,plugins,docs]
pre-commit install
git config blame.ignoreRevsFile .git-blame-ignore-revs
You can then start OctoPrint via ``octoprint`` after activating one of the two virtual environments.
@@ -158,6 +163,7 @@ Open the Git Bash you just installed and in that:
pip install --upgrade pip
pip install -e .[develop,plugins,docs]
pre-commit install
git config blame.ignoreRevsFile .git-blame-ignore-revs
.. _sec-development-environment-mac:
@@ -208,6 +214,7 @@ You'll need a user account with administrator privileges.
pip install --upgrade pip
pip install -e .[develop,plugins]
pre-commit install
git config blame.ignoreRevsFile .git-blame-ignore-revs
.. _sec-development-environment-ides: