Skip to content

Commit

Permalink
Merge branch 'main' into ghi1674
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwhitehead authored Mar 21, 2022
2 parents fd0e51f + 1697569 commit 279b68f
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
repos:
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v2.2.0
hooks:
- id: commitlint
stages: [commit-msg]
args: ["--config", ".commitlint.config.js"]
additional_dependencies: ['@commitlint/config-conventional']
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
stages: [commit]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.0
hooks:
- id: flake8
stages: [commit]
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,21 @@ end-user and developer demos in the repo should include updates or extensions to
If you would like to propose a significant change, please open an issue first to discuss the work with the community.

Contributions are made pursuant to the Developer's Certificate of Origin, available at [https://developercertificate.org](https://developercertificate.org), and licensed under the Apache License, version 2.0 (Apache-2.0).

## Development Tools

### Pre-commit

A configuration for [pre-commit](https://pre-commit.com/) is included in this repository. This is an optional tool to help contributors commit code that follows the formatting requirements enforced by the CI pipeline. Additionally, it can be used to help contributors write descriptive commit messages that can be parsed by changelog generators.

On each commit, pre-commit hooks will run that verify the committed code complies with flake8 and is formatted with black. To install the flake8 and black checks:

```
$ pre-commit install
```

To install the commit message linter:

```
$ pre-commit install --hook-type commit-msg
```
1 change: 1 addition & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ flake8==3.9.0
flake8-docstrings==1.5.0
flake8-rst==0.7.2
pydocstyle==3.0.0
pre-commit

sphinx==1.8.4
sphinx-rtd-theme>=0.4.3
Expand Down

0 comments on commit 279b68f

Please sign in to comment.