Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-thuy committed Mar 7, 2024
1 parent 98dc383 commit 8b8a1f2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
31 changes: 25 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If you are proposing a feature:

Ready to contribute? Here's how to set up `reject` for local development.

1. Download a copy of `reject` locally.
1. Clone the `reject` repository locally.
2. Install `reject` using `poetry`:

```console
Expand All @@ -59,15 +59,34 @@ Ready to contribute? Here's how to set up `reject` for local development.

5. Commit your changes and open a pull request.

## Pre-commit hooks

A handful of [pre-commit](https://pre-commit.com) hooks are provided, and ensuring their checks pass pass is highly recommended as they are later ran as part of CI checks that will block PRs.

These hooks include:

* Trailing whitespace trimming.
* Ensure EOF newline.
* Code formatting ([black](https://github.com/psf/black)).
* PEP8 linting ([flake8](https://github.com/pycqa/flake8)).
* Import sorting ([isort](https://github.com/PyCQA/isort)).

All *pre-commit* hooks can be installed with:

```shell
pre-commit install
```

Alternatively, all of the aforementioned tools are installed with the *dev* dependency group and can ran individually, without *pre-commit* hooks. For example, to format files with *black*:

```shell
poetry run black reject/
```

## Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include additional tests if appropriate.
2. If the pull request adds functionality, the docs should be updated.
3. The pull request should work for all currently supported operating systems and versions of Python.

## Code of Conduct

Please note that the `reject` project is released with a
Code of Conduct. By contributing to this project you agree to abide by its terms.
10 changes: 6 additions & 4 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
Functionalities for classification with rejection.

### Todo
- [ ] Write development page (see [example](https://airflow-dbt-python.readthedocs.io/en/latest/development.html))
- [ ] Change sphinx theme
- [ ] Inspect how sklearn creates plot ([here](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.PrecisionRecallDisplay.html#sklearn.metrics.PrecisionRecallDisplay.from_estimator))
- [ ] Test code for a range of python versions
- [ ] Which linters to use? Pylint, Flake8, black?

- [ ] Maybe add flake8 to github actions
- [ ] Maybe add mypy to pre-commit hooks and add to CONTRIBUTING.md "* Static type checking ([mypy](https://github.com/python/mypy))."

### In Progress
- [ ] Use pre-commit hooks (also see [example](https://airflow-dbt-python.readthedocs.io/en/latest/development.html#pre-commit-hooks))


### Done ✓
- [x] Use Literal types in type hints
Expand All @@ -21,3 +20,6 @@ Functionalities for classification with rejection.
- [x] Update PyPi description to regular README
- [x] Fix bug in documentation build: ModuleNotFoundError
- [x] Check sphinx-build command
- [x] Which linters to use? Pylint, Flake8, black?
- [x] Use pre-commit hooks (also see [example](https://airflow-dbt-python.readthedocs.io/en/latest/development.html#pre-commit-hooks))
- [x] Update development page (see [example](https://airflow-dbt-python.readthedocs.io/en/latest/development.html))

0 comments on commit 8b8a1f2

Please sign in to comment.