Skip to content

Commit

Permalink
doc/source: Update contributing
Browse files Browse the repository at this point in the history
  • Loading branch information
e10harvey committed Mar 20, 2024
1 parent 0b97988 commit 57fb35b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,23 @@ Continuous integration (CI) testing will fail if the changes are not pep8 compli

# Apply correct formatting in CI
pip install black
black /path/to/opencsp
black /path/to/opencsp -C -S


NOTE, the following pre-commit hook can be added to automatically apply black to your
commits:

::
$ cat .git/hooks/pre-commit
for FILE in $(git diff --cached --name-only | egrep '.*\.py$')
do
if [ -e $FILE ]; then
black $FILE -C -S
git add $FILE
fi
done
Online OpenCSP documentation is generated using Sphinx. For API documentation, we use
NumPy-style docstrings with bulleted lists. We require NumPy compliant docstrings for
Models, Public Classes, and Public Functions. For more internal and development-facing
Expand Down

0 comments on commit 57fb35b

Please sign in to comment.