Skip to content

Commit

Permalink
docs: update CONTRIBUTING with automation
Browse files Browse the repository at this point in the history
  • Loading branch information
guilatrova committed Jul 21, 2021
1 parent f893dce commit e2b40f6
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Contributing

- [Contributing](#contributing)
- [Environment](#environment)
- [Setup](#setup)
- [Testing](#testing)
- [Linting](#linting)
- [Conventional Commits](#conventional-commits)

## Environment
## Setup

Today we use `flit` to build and publish packages (We're considering migrating to Poetry soon).
[Read more here](https://github.com/guilatrova/tryceratops/issues/19) if curious.

Here's how to install Tryceratops:
Install the dependency manager (if not already done):

```sh
pip install -r dev-requirements.txt
pip3 install poetry
```

pre-commit install
Install all dependencies and pre-commit hooks:

flit install --sym
```sh
poetry install
pre-commit install
```

and you should be ready to go!

```sh
❯ tryceratops --version
poetry run tryceratops --version
tryceratops, version 0.2.5
```

Expand All @@ -33,7 +33,7 @@ tryceratops, version 0.2.5
You can either run:

```sh
❯ pytest
poetry run pytest
================================================ test session starts ================================================
platform darwin -- Python 3.9.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/guilhermelatrova/guilatrova/tryceratops
Expand All @@ -48,7 +48,7 @@ src/tests/files_test.py .......
or test it against some violation files we have in place:

```sh
❯ tryceratops src/tests/samples/violations/call_too_many_try.py
poetry run tryceratops src/tests/samples/violations/call_too_many_try.py
[TC101] Too many try blocks in your function - src/tests/samples/violations/call_too_many_try.py:15:4
[TC101] Too many try blocks in your function - src/tests/samples/violations/call_too_many_try.py:27:4
[TC101] Too many try blocks in your function - src/tests/samples/violations/call_too_many_try.py:32:4
Expand All @@ -60,7 +60,7 @@ Found 3 violations
You can try it with flake8 if preferred:

```sh
❯ flake8 --select TC src/tests/samples/violations/call_too_many_try.py
poetry run flake8 --select TC src/tests/samples/violations/call_too_many_try.py
src/tests/samples/violations/call_too_many_try.py:15:5: TC101 Too many try blocks in your function
src/tests/samples/violations/call_too_many_try.py:27:5: TC101 Too many try blocks in your function
src/tests/samples/violations/call_too_many_try.py:32:5: TC101 Too many try blocks in your function
Expand All @@ -76,6 +76,6 @@ Please note `mypy` is broken, [we're going to solve it eventually](https://githu

## Conventional Commits

We have plans to automate the versioning and release process and it's only possible if we follow the conventional commits standards. Otherwise, the versioning might be inconsistent later on.
We automate the versioning and release process! It's only possible if we are consistent with the commit pattern and follow the conventional commits standards.

Refer to [Conventional Commits here](https://www.conventionalcommits.org/en/v1.0.0/) and if you're curious to understand how the automation works (not implemented yet) [check it here](https://mestrak.com/blog/semantic-release-with-python-poetry-github-actions-20nn).
Refer to [Conventional Commits here](https://www.conventionalcommits.org/en/v1.0.0/) and if you're curious to understand how the publishing works [check here](https://python-semantic-release.readthedocs.io/en/latest/).

0 comments on commit e2b40f6

Please sign in to comment.