Skip to content

Commit

Permalink
📝 Document .git-blame-ignore-revs
Browse files Browse the repository at this point in the history
  • Loading branch information
foosel committed Oct 7, 2020
1 parent 9ab1a56 commit eb37b72
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 10 additions & 3 deletions docs/development/environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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::

Expand All @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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:

Expand Down

0 comments on commit eb37b72

Please sign in to comment.