Contributing
All contributions to ormar are welcome!
issue
To make it as easy as possible for us to help you, please include the following:
- operating system
- Python version
- Ormar version
- Database backend (mysql, sqlite, or postgresql)
Please try to always include the above unless you are unable to install ormar or know that it has nothing to do with your problem or feature request.
request requests
Getting started and creating a pull request should be pretty simple.
!!!Note that unless your changes are trivial (spelling errors, document adjustments, etc.), create a question to discuss the changes before creating a pull request.
To make contributions as simple and fast as possible, you need to run tests and linting locally.
You need to install Python 3.6.2, 3.7, or 3.8, poetry, and git.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 | # 1. clone your fork and cd into the repo directory
git clone git@github.com:<your username>/ormar.git
cd ormar
# 2. Install ormar, dependencies and test dependencies
poetry install -E dev
# 3. Checkout a new branch and make your changes
git checkout -b my-new-feature-branch
# make your changes...
# 4. Formatting and linting
# ormar uses black for formatting, flake8 for linting and mypy for type hints check
# run all of the following as all those calls will be run on travis after every push
black ormar tests
flake8 ormar
mypy ormar tests
# 5. Run tests
# on localhost all tests are run against sglite backend
# rest of the backends will be checked after push
pytest -svv --cov=ormar --cov=tests --cov-fail-under=100 --cov-report=term-missing
# 6. Build documentation
mkdocs build
# if you have changed the documentation make sure it builds successfully
# you can also use `mkdocs serve` to serve the documentation at localhost:8000
# ... commit, push, and create your pull request
|
!!!tip For more information on how and why ormar works, see the API documentation