First off, thank you for considering contributing to tupperware!
Hello! Are you here to help on Tupperware? Awesome, feel welcome and read the following sections in order to know how to ask questions and how to help us make this software better.
All members of our community are expected to follow our Code of Conduct. Please make sure you are welcoming and friendly in all of our spaces.
If you want to start working on this project, you will need to get familiar with these concepts:
- http://learnyouahaskell.com/functors-applicative-functors-and-monoids
- https://github.com/dbrattli/OSlash/wiki/Functors,-Applicatives,-And-Monads-In-Pictures
We use [poetry
][poetry] to manage dependencies, to get started — after installing it — ensure you have a python@3.7 or python@3.8 environment.
If you don't you can install it with brew install python3.7
or brew install python3.8
respectively.
After installing Python, find the python3
file location (if you installed with brew it will be at /usr/local/opt/python@3.7/bin/python3
or /usr/local/opt/python@3.8/bin/python3
) and follow these steps:
git clone git@github.com:flpStrri/tupperware.git
cd tupperware
poetry env use <-- Python python3 path -->
make test
This will install all the dependencies (including development ones), and run all static and unit tests.
We use pytest
, mypy
, flake8
, and black
for quality control.
To run all tests:
make test
To run static tests (style, linting and typing):
make test-static
These steps are mandatory during the CI.
We also use pytest-mypy-plugins
. Tests cases are located inside ./typesafety
If you create new types or typed functions, it is required to test their types.
Here's a tutorial on how to do that.
We use mypy
to run type checks on our code.
To use it:
make test-type
This step is mandatory during the CI.
We use trunk based development (we also sometimes call it github-flow
).
What the point of this method?
- We use protected
master
branch, so the only way to push your code is via pull request - We use issue branches: to implement a new feature or to fix a bug create a new branch named
issue-$TASKNUMBER
- Then create a pull request to
master
branch - We use
git tag
s to make releases, so we can track what has changed since the latest release
So, this way we achieve an easy and scalable development process which frees us from merging hell and long-living branches.
In this method, the latest version of the app is always in the master
branch.
Before submitting your code please do the following steps:
- Run
make test
to make sure everything was working before - Add any changes you want
- Add tests for the new changes
- Edit documentation if you have changed something significant
- Update
CHANGELOG.md
with a quick summary of your changes - Run
make test
again to make sure it is still working
You can contribute by spreading a word about this library. It would also be a huge contribution to write a short article on how you are using this project. You can also share your best practices with us.