Skip to content

Commit 23e241d

Browse files
committed
Initial release after forking
1 parent d71f4b1 commit 23e241d

262 files changed

Lines changed: 1317 additions & 22619 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/CONTRIBUTING.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
>First off, thank you for considering contributing to tupperware!
2+
3+
# Introduction
4+
5+
Hello! Are you here to help on Tupperware?
6+
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.
7+
8+
All members of our community are expected to follow our [Code of Conduct][CodeOfConduct].
9+
Please make sure you are welcoming and friendly in all of our spaces.
10+
11+
# How to contribute
12+
13+
## Tutorials
14+
15+
If you want to start working on this project,
16+
you will need to get familiar with these concepts:
17+
18+
- http://learnyouahaskell.com/functors-applicative-functors-and-monoids
19+
- https://github.com/dbrattli/OSlash/wiki/Functors,-Applicatives,-And-Monads-In-Pictures
20+
21+
## Dependencies
22+
23+
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.
24+
If you don't you can install it with `brew install python3.7` or `brew install python3.8` respectively.
25+
26+
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:
27+
28+
```shell
29+
git clone git@github.com:flpStrri/tupperware.git
30+
cd tupperware
31+
poetry env use <-- Python python3 path -->
32+
make test
33+
```
34+
35+
This will install all the dependencies (including development ones),
36+
and run all static and unit tests.
37+
38+
## Tests
39+
40+
We use `pytest`, `mypy`, `flake8`, and `black` for quality control.
41+
42+
To run all tests:
43+
44+
```bash
45+
make test
46+
```
47+
48+
To run static tests (style, linting and typing):
49+
50+
```bash
51+
make test-static
52+
```
53+
54+
These steps are mandatory during the CI.
55+
56+
### Type tests
57+
58+
We also use `pytest-mypy-plugins`. Tests cases are located inside `./typesafety`
59+
If you create new types or typed functions, it is required to test their types.
60+
Here's [a tutorial](https://sobolevn.me/2019/08/testing-mypy-types) on how to do that.
61+
62+
63+
## Type checks
64+
65+
We use `mypy` to run type checks on our code.
66+
To use it:
67+
68+
```bash
69+
make test-type
70+
```
71+
72+
This step is mandatory during the CI.
73+
74+
75+
## Submitting your code
76+
77+
We use [trunk based](https://trunkbaseddevelopment.com/) development (we also sometimes call it `github-flow`).
78+
79+
What the point of this method?
80+
81+
1. We use protected `master` branch, so the only way to push your code is via pull request
82+
2. We use issue branches: to implement a new feature or to fix a bug create a new branch named `issue-$TASKNUMBER`
83+
3. Then create a pull request to `master` branch
84+
4. We use `git tag`s to make releases, so we can track what has changed since the latest release
85+
86+
So, this way we achieve an easy and scalable development process which frees us from merging hell and long-living branches.
87+
88+
In this method, the latest version of the app is always in the `master` branch.
89+
90+
### Before submitting
91+
92+
Before submitting your code please do the following steps:
93+
94+
1. Run `make test` to make sure everything was working before
95+
2. Add any changes you want
96+
3. Add tests for the new changes
97+
4. Edit documentation if you have changed something significant
98+
5. Update `CHANGELOG.md` with a quick summary of your changes
99+
6. Run `make test` again to make sure it is still working
100+
101+
102+
## Other help
103+
104+
You can contribute by spreading a word about this library.
105+
It would also be a huge contribution to write a short article on how you are using this project.
106+
You can also share your best practices with us.
107+
108+
[CodeOfConduct]: https://github.com/flpStrri/tupperware/blob/master/CODE_OF_CONDUCT.md
109+
[poetry](https://github.com/python-poetry/poetry)

.github/FUNDING.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/misspell.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python-version: [3.6, 3.7, 3.8]
10+
python-version: [3.7, 3.8]
1111

1212
steps:
1313
- uses: actions/checkout@v2
@@ -21,31 +21,15 @@ jobs:
2121
curl -sSL \
2222
"https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py" | python
2323
24-
- name: Set up cache
24+
- name: Cache poetry modules
2525
uses: actions/cache@v1
26+
env:
27+
cache-name: cache-poetry-modules
2628
with:
27-
path: .venv
28-
key: venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
29-
- name: Install dependencies
30-
run: |
31-
source "$HOME/.poetry/env"
32-
33-
poetry config virtualenvs.in-project true
34-
poetry install
29+
path: ~/.cache/pypoetry
30+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
3531

3632
- name: Run tests
3733
run: |
3834
source "$HOME/.poetry/env"
39-
40-
poetry run flake8 .
41-
poetry run mypy returns ./tests/**/*.py
42-
poetry run pytest . docs/pages
43-
poetry run doc8 -q docs
44-
poetry run poetry check
45-
poetry run pip check
46-
poetry run safety check --bare --full-report
47-
48-
- name: Upload coverage to Codecov
49-
uses: codecov/codecov-action@v1
50-
with:
51-
file: ./coverage.xml
35+
make test

0 commit comments

Comments
 (0)