Skip to content

Commit

Permalink
update CONTRIBUTING
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Sanchez authored and chekos committed Feb 18, 2022
1 parent 632ce48 commit 8b034de
Showing 1 changed file with 10 additions and 28 deletions.
38 changes: 10 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,21 @@
# How to contribute
To contribute to this library, first checkout the code. Then create a new virtual environment:

## Dependencies
cd pypums
python -m venv venv
source venv/bin/activate

We use `poetry` to manage the [dependencies](https://github.com/python-poetry/poetry).
If you dont have `poetry` installed, you should run the command below.
Or if you are using `pipenv`:

```bash
make download-poetry
```
pipenv shell

To install dependencies and prepare [`pre-commit`](https://pre-commit.com/) hooks you would need to run `install` command:
Now install the dependencies and test dependencies:

```bash
make install
```
pip install -e '.[test]'

To activate your `virtualenv` run `poetry shell`.
To run the tests:

## Codestyle

After you run `make install` you can execute the automatic code formatting.

```bash
make codestyle
```

### Checks

Many checks are configured for this project. Command `make check-style` will run black diffs, darglint docstring style and mypy.
The `make check-safety` command will look at the security of your code.

You can also use `STRICT=1` flag to make the check be strict.
pytest

### Before submitting

Expand All @@ -39,9 +24,6 @@ Before submitting your code please do the following steps:
1. Add any changes you want
1. Add tests for the new changes
1. Edit documentation if you have changed something significant
1. Run `make codestyle` to format your changes.
1. Run `STRICT=1 make check-style` to ensure that types and docs are correct
1. Run `STRICT=1 make check-safety` to ensure that security of your code is correct

## Other help

Expand Down

0 comments on commit 8b034de

Please sign in to comment.