Skip to content

Commit

Permalink
adding a contribution guide to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chanind committed Mar 27, 2024
1 parent 5c48811 commit 693c5b3
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
run: poetry install --no-root

- name: Deploy website
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: poetry run mkdocs gh-deploy
46 changes: 46 additions & 0 deletions docs/about/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributing

Contributions are welcome! To get setup for development, follow the instructions below.

## Setup

Make sure you have [poetry](https://python-poetry.org/) installed, clone the repository, and install dependencies with:

```bash
poetry install
```

## Testing, Linting, and Formatting

This project uses [pytest](https://docs.pytest.org/en/stable/) for testing, [flake8](https://flake8.pycqa.org/en/latest/) for linting, [pyright](/~https://github.com/microsoft/pyright) for type-checking, and [black](https://black.readthedocs.io/en/stable/) and [isort](https://pycqa.github.io/isort/) for formatting.

If you add new code, it would be greatly appreciated if you could add tests in the `tests/unit` directory. You can run the tests with:

```bash
make unit-test
```

Before commiting, make sure you format the code with:

```bash
make format
```

Finally, run all CI checks locally with:

```bash
make check-ci
```

If these pass, you're good to go! Open a pull request with your changes.

## Documentation

This project uses [mkdocs](https://www.mkdocs.org/) for documentation. You can see the docs locally with:

```bash
make docs-serve
```
If you make changes to code which requires updating documentation, it would be greatly appreciated if you could update the docs as well.


8 changes: 8 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ unit-test:

acceptance-test:
poetry run pytest -v --cov=sae_training/ --cov-report=term-missing --cov-branch tests/acceptance

check-ci:
make check-format
make check-type
make unit-test

docs-serve:
poetry run mkdocs serve

0 comments on commit 693c5b3

Please sign in to comment.