Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
docs: add instructions to enable enforce-semantic-commit-message git …
…hook
  • Loading branch information
Angeluz-07 committed Apr 23, 2020
commit 7d3388330527a7ff363ac1e06d08f2cc917e7846
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ automatically [pip](https://pip.pypa.io/en/stable/) as well.


Remember to do it with Python 3.


- Run `pre-commit install`. For more details, check out Development > Git hooks.

### How to use it
- Set the env var `FLASK_APP` to `time_tracker_api` and start the app:

Expand Down Expand Up @@ -74,6 +76,16 @@ DateTime strings in Azure Cosmos DB is `YYYY-MM-DDThh:mm:ss.fffffffZ` which foll

## Development

### Git hooks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's reference this section as a step in the Setup.

  • Run pre-commit install. For more details, check out Development > Git hooks.

We use [pre-commit](https://github.com/pre-commit/pre-commit) library to manage local git hooks, as developers we just need to run in our virtual environment:

```
pre-commit install
```
With this command the library will take configuration from `.pre-commit-config.yaml` and will set up the hooks by us.

Currently, we only have a hook to enforce semantic commit message.

### Test
We are using [Pytest](https://docs.pytest.org/en/latest/index.html) for tests. The tests are located in the package
`tests` and use the [conventions for python test discovery](https://docs.pytest.org/en/latest/goodpractices.html#test-discovery).
Expand Down