-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
46 changed files
with
692 additions
and
709 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: django-brackets-typing | ||
on: [pull_request, workflow_dispatch] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- run: pip install mypy django-stubs[compatible-mypy] djangorestframework-stubs[compatible-mypy] | ||
- name: Run mypy | ||
env: | ||
PYTHONPATH: tests/project/:src/ | ||
run: mypy --install-types --non-interactive src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ coverage.xml | |
.vscode/ | ||
lcov.* | ||
.pdm-python | ||
_site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,35 @@ | ||
--- | ||
hide: | ||
- navigation | ||
- toc | ||
- navigation | ||
--- | ||
|
||
# Contributing | ||
|
||
First of all, thank you for wanting to make `django-brackets` better! We love | ||
getting input and suggestions from the community. Secondly, we just want to | ||
put out a few ground rules for contributing so that we can get your pull | ||
requests in sooner and cause fewer headaches all around. | ||
First of all, thank you for wanting to make `django-brackets` better! We love getting input and suggestions from the community. Secondly, we just want to put out a few ground rules for contributing so that we can get your pull requests in sooner and cause fewer headaches all around. | ||
|
||
## Installation | ||
|
||
When you want to install `django-brackets` for local development, first clone the project from GitHub. Secondly, install it as an editable package and install the testing and development dependencies: `pip install -e django-brackets[testing,development]`. You can test the project via `pytest` and check types with `mypy src`. | ||
|
||
## Code of Conduct | ||
|
||
Any communication around `django-brackets`, any contribution, any issue, | ||
is under the guidelines of the | ||
[Django code of conduct](https://www.djangoproject.com/conduct/). We don't | ||
allow any form of hate or discrimination in this project. | ||
Any communication around `django-brackets`, any contribution, any issue, is under the guidelines of the [Django code of conduct](https://www.djangoproject.com/conduct/). We don't allow any form of hate or discrimination in this project. | ||
|
||
If you object to the code of conduct, you are not licensed to use | ||
this software. | ||
If you object to the code of conduct, you are not licensed to use this software. | ||
|
||
## Code Style | ||
|
||
All contributions require certain formatting and checks before they can | ||
be accepted. Your PR should: | ||
- be formatted with `black` with an allowed line length of 99. | ||
- have docstrings for all files, classes, and functions. Use `interrogate` | ||
to verify your work. | ||
- be well-typed. We use `mypy` for static type checking. Run `mypy src` | ||
to check your types. | ||
All contributions require certain formatting and checks before they can be accepted. Your PR should: | ||
- be formatted with `ruff` with an allowed line length of 88. | ||
- have docstrings for all files, classes, and functions. Use `interrogate` to verify your work. | ||
- be well-typed. We use `mypy` for static type checking. Run `mypy src` to check your types. | ||
- maintain or increase code coverage. | ||
|
||
## Tests | ||
|
||
Your PR should also be well-tested. We use the `pytest` testing framework | ||
and make heavy use of fixtures over mocks. We aim for 100% test coverage | ||
but we also recognize that 100% is a magic number and won't prevent all | ||
bugs. Still, makes refactors easier! | ||
Your PR should also be well-tested. We use the `pytest` testing framework and make heavy use of fixtures over mocks. We aim for 100% test coverage but we also recognize that 100% is a magic number and won't prevent all bugs. Still, makes refactors easier! | ||
|
||
We test `django-brackets` against the newest stable version of Python and | ||
the latest Long Term Support (LTS) release of Django. Other versions of | ||
Python and Django may work but are not tested against and, thus, unsupported. | ||
We test `django-brackets` against the newest stable version of Python and the latest Long Term Support (LTS) release of Django. Other versions of Python and Django may work but are not tested against and, thus, unsupported. | ||
|
||
## Documentation | ||
|
||
Documentation is one of the most important parts of any project. If you | ||
don't know how to use it, you probably won't. All PRs should come with | ||
corresponding documentation updates. New mixins should come with a usage | ||
example and documentation explaining the concept. We use Mkdocs for our | ||
documentation needs. | ||
Documentation is one of the most important parts of any project. If you don't know how to use it, you probably won't. All PRs should come with corresponding documentation updates. New mixins should come with a usage example and documentation explaining the concept. We use Mkdocs for our documentation needs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.