Skip to content

Commit c3daecd

Browse files
committed
Initial
0 parents  commit c3daecd

23 files changed

+2370
-0
lines changed

Diff for: .editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Check http://editorconfig.org for more information
2+
# This is the main config file for this project:
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
end_of_line = lf
9+
indent_style = space
10+
insert_final_newline = true
11+
indent_size = 2
12+
13+
[*.py]
14+
indent_size = 4
15+
16+
[*.pyi]
17+
indent_size = 4

Diff for: .gitignore

+200
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
#### joe made this: http://goel.io/joe
2+
#### python ####
3+
# Byte-compiled / optimized / DLL files
4+
.pytest_cache
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
*.egg-info/
27+
.installed.cfg
28+
*.egg
29+
pip-wheel-metadata/
30+
31+
# PyInstaller
32+
# Usually these files are written by a python script from a template
33+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
34+
*.manifest
35+
*.spec
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
.hypothesis/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
60+
# Flask stuff:
61+
instance/
62+
.webassets-cache
63+
64+
# Scrapy stuff:
65+
.scrapy
66+
67+
# Sphinx documentation
68+
docs/_build/
69+
70+
# PyBuilder
71+
target/
72+
73+
# Jupyter Notebook
74+
.ipynb_checkpoints
75+
76+
# pyenv
77+
.python-version
78+
79+
# celery beat schedule file
80+
celerybeat-schedule
81+
82+
# SageMath parsed files
83+
*.sage.py
84+
85+
# Environments
86+
.env
87+
.venv
88+
env/
89+
venv/
90+
ENV/
91+
92+
# Spyder project settings
93+
.spyderproject
94+
.spyproject
95+
96+
# Rope project settings
97+
.ropeproject
98+
99+
# mkdocs documentation
100+
/site
101+
102+
# mypy
103+
.mypy_cache/
104+
#### macos ####
105+
# General
106+
*.DS_Store
107+
.AppleDouble
108+
.LSOverride
109+
110+
# Icon must end with two \r
111+
Icon
112+
113+
114+
# Thumbnails
115+
._*
116+
117+
# Files that might appear in the root of a volume
118+
.DocumentRevisions-V100
119+
.fseventsd
120+
.Spotlight-V100
121+
.TemporaryItems
122+
.Trashes
123+
.VolumeIcon.icns
124+
.com.apple.timemachine.donotpresent
125+
126+
# Directories potentially created on remote AFP share
127+
.AppleDB
128+
.AppleDesktop
129+
Network Trash Folder
130+
Temporary Items
131+
.apdisk
132+
#### windows ####
133+
# Windows thumbnail cache files
134+
Thumbs.db
135+
ehthumbs.db
136+
ehthumbs_vista.db
137+
138+
# Dump file
139+
*.stackdump
140+
141+
# Folder config file
142+
Desktop.ini
143+
144+
# Recycle Bin used on file shares
145+
$RECYCLE.BIN/
146+
147+
# Windows Installer files
148+
*.cab
149+
*.msi
150+
*.msm
151+
*.msp
152+
153+
# Windows shortcuts
154+
*.lnk
155+
#### linux ####
156+
*~
157+
158+
# temporary files which can be created if a process still has a handle open of a deleted file
159+
.fuse_hidden*
160+
161+
# KDE directory preferences
162+
.directory
163+
164+
# Linux trash folder which might appear on any partition or disk
165+
.Trash-*
166+
167+
# .nfs files are created when an open file is removed but is still being accessed
168+
.nfs*
169+
#### jetbrains ####
170+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
171+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
172+
173+
# User-specific stuff:
174+
.idea/
175+
176+
## File-based project format:
177+
*.iws
178+
179+
## Plugin-specific files:
180+
181+
# IntelliJ
182+
/out/
183+
184+
# mpeltonen/sbt-idea plugin
185+
.idea_modules/
186+
187+
# JIRA plugin
188+
atlassian-ide-plugin.xml
189+
190+
# Cursive Clojure plugin
191+
.idea/replstate.xml
192+
193+
# Crashlytics plugin (for Android Studio and IntelliJ)
194+
com_crashlytics_export_strings.xml
195+
crashlytics.properties
196+
crashlytics-build.properties
197+
fabric.properties
198+
199+
### Custom ###
200+
ex.py

Diff for: .readthedocs.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
3+
build:
4+
image: latest
5+
6+
python:
7+
version: 3.6

Diff for: .travis.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
language: python
2+
dist: xenial
3+
4+
matrix:
5+
include:
6+
- python: 3.6
7+
- python: 3.7
8+
9+
10+
before_install:
11+
- pip freeze | xargs pip uninstall -y
12+
- curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
13+
- source "$HOME/.poetry/env"
14+
15+
install:
16+
- poetry install
17+
18+
script:
19+
- poetry run flake8 .
20+
- poetry run mypy lambdas tests/**/*.py
21+
- poetry run pytest
22+
- poetry run doc8 -q docs
23+
- poetry check
24+
- poetry run pip check
25+
- poetry run safety check --bare --full-report
26+
27+
after_success:
28+
- pip install coveralls
29+
- coveralls
30+
31+
notifications:
32+
email:
33+
on_success: never
34+
on_failure: change

Diff for: CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Version history
2+
3+
We follow Semantic Versions since the `1.0.0` release.
4+
Versions before `1.0.0` are `0Ver`-based:
5+
incremental in minor, bugfixes only are patches.
6+
See (0Ver)[https://0ver.org/].
7+
8+
9+
## Version 0.1.0
10+
11+
Initial release. Featuring only simple cases with lambdas.

Diff for: CONTRIBUTING.md

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# How to contribute
2+
3+
4+
## Dependencies
5+
6+
We use [`poetry`](https://github.com/sdispater/poetry) to manage the dependencies.
7+
8+
To install them you would need to run `install` command:
9+
10+
```bash
11+
poetry install
12+
```
13+
14+
To activate your `virtualenv` run `poetry shell`.
15+
16+
17+
## Tests
18+
19+
We use `pytest` and `flake8` for quality control.
20+
We also use `wemake_python_styleguide` to enforce the code quality.
21+
22+
To run all tests:
23+
24+
```bash
25+
pytest
26+
```
27+
28+
To run linting:
29+
30+
```bash
31+
flake8 .
32+
```
33+
34+
These steps are mandatory during the CI.
35+
36+
## Type checks
37+
38+
We use `mypy` to run type checks on our code.
39+
To use it:
40+
41+
```bash
42+
mypy lambdas tests/**/*.py
43+
```
44+
45+
This step is mandatory during the CI.
46+
47+
48+
## Submitting your code
49+
50+
We use [trunk based](https://trunkbaseddevelopment.com/)
51+
development (we also sometimes call it `wemake-git-flow`).
52+
53+
What the point of this method?
54+
55+
1. We use protected `master` branch,
56+
so the only way to push your code is via pull request
57+
2. We use issue branches: to implement a new feature or to fix a bug
58+
create a new branch named `issue-$TASKNUMBER`
59+
3. Then create a pull request to `master` branch
60+
4. We use `git tag`s to make releases, so we can track what has changed
61+
since the latest release
62+
63+
So, this way we achieve an easy and scalable development process
64+
which frees us from merging hell and long-living branches.
65+
66+
In this method, the latest version of the app is always in the `master` branch.
67+
68+
### Before submitting
69+
70+
Before submitting your code please do the following steps:
71+
72+
1. Run `pytest` to make sure everything was working before
73+
2. Add any changes you want
74+
3. Add tests for the new changes
75+
4. Edit documentation if you have changed something significant
76+
5. Update `CHANGELOG.md` with a quick summary of your changes
77+
6. Run `pytest` again to make sure it is still working
78+
7. Run `mypy` to ensure that types are correct
79+
8. Run `flake8` to ensure that style is correct
80+
9. Run `doc8` to ensure that docs are correct
81+
82+
83+
## Other help
84+
85+
You can contribute by spreading a word about this library.
86+
It would also be a huge contribution to write
87+
a short article on how you are using this project.
88+
You can also share your best practices with us.

Diff for: LICENSE

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright 2016-2019 dry-python organization
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
1. Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the
13+
distribution.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)