Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/zappagh-879-add-url-decoding-for-qu…
Browse files Browse the repository at this point in the history
…ery-string
  • Loading branch information
monkut authored Aug 12, 2022
2 parents 73d8fd4 + fff5ed8 commit ca71d90
Show file tree
Hide file tree
Showing 49 changed files with 1,249 additions and 2,179 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--- Provide a general summary of the issue in the Title above -->
## Context
<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->
<!--- Also, please make sure that you are running Zappa _from a virtual environment_ and are using Python 3.6/3.7/3.8 -->
<!--- Also, please make sure that you are running Zappa _from a virtual environment_ and are using Python 3.7/3.8/3.9 -->

## Expected Behavior
<!--- Tell us what should happen -->
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Before you submit this PR, please make sure that you meet these criteria:
* Did you **make sure this code actually works on Lambda**, as well as locally?
* Did you test this code with all of **Python 3.6**, **Python 3.7** and **Python 3.8** ?
* Did you test this code with all of **Python 3.7**, **Python 3.8** and **Python 3.9** ?
* Does this commit ONLY relate to the issue at hand and have your linter shit all over the code?
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CD

on: # yamllint disable-line rule:truthy
# From documentation:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
# on.push.tags: If you define only tags/tags-ignore or only branches/branches-ignore, the workflow won't run for events affecting the undefined Git ref.
#
# This workflow will only run when a tag matching the criteria is pushed
push:
tags: ["v?[0-9]+.[0-9]+.[0-9]+"]

jobs:
publish:
runs-on: ubuntu-20.04
steps:
- name: Checkout Code Repository
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install `pypa/build`
run: python -m pip install build
- name: Build sdist and wheel
run: python -m build --sdist --wheel --outdir ./dist/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on: # yamllint disable-line rule:truthy
pull_request:
branches: ["master"]
push:
branches: ["master"]

jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python: [3.7, 3.8, 3.9]
steps:
- name: Checkout Code Repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip${{ matrix.python }}-${{ hashFiles('Pipfile') }}
restore-keys: ${{ runner.os }}-pip${{ matrix.python }}-
- name: make sure we have version tags
run: git fetch --unshallow --tags
- name: Setup Virtualenv
run: python -m venv .venv
- name: Install
run: source .venv/bin/activate && make requirements && python setup.py install
- name: Lint
run: source .venv/bin/activate && make flake black-check isort-check
- name: Test
run: source .venv/bin/activate && make tests
- name: Upload Coverage
run: .venv/bin/coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: py${{ matrix.python }}
COVERALLS_PARALLEL: true

coverage:
needs: test
runs-on: ubuntu-20.04
steps:
- name: Set up Python
uses: actions/setup-python@v2
- name: Finalise Coverage
run: pip3 install --upgrade coveralls && coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*~
*.zip
Pipfile.lock

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

32 changes: 30 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
# Zappa Changelog

## 0.53.0
## 0.55.0
* Fix "cd workflow fired event outside of the create tags event" (#1152)
* Remove 'futures' package requirement (#826,#808)
* Remove function invoke command does not need quotes around function (#900)
* Add python_requires to setup.py (#1111)
* Remove python 3.6 support (#1151)
* Update handler to be global if INSTANTIATE_LAMBDA_HANDLER_ON_IMPORT=True (#1096)
* Fix async invocation in Python 3 (#1006)
* Drastically reduce cold start times by calling LambdaHandler externally (#982)
* Support Newest Manylinux Version for dependencies (#1083)
* Decode zappa invoke output regardless of --no-color option (#1069)
* Convert project to using 'pipenv' to manage dependencies (#1077)
* Ensure unique scheduled event names (#1080)
* Check isort in CI (#1078)
* Use 'black' everywhere (#1076)
* Update setup.py (#1050)

## 0.54.2
* Update documentation to reflect python 3.9 support (#1137)

## 0.54.1
* Increase Lambda client read timeout to 15m (#1065)
* Unpin `Werkzeug` from `v0.x` (#1067)

## 0.54.0
* Pin troposphere version and update to 3.x (#1029)
* Relax stage name restrictions when not using apigateway (#993)
* Wait for lambda to become active during deploy/update (#992)
* add support for Python 3.9 (#1026)

## 0.53.0
* Deprecated ACME v1 for Lets Encrypt
* Global black formatting
* Update & deploy using a docker container
* See [blog post](https://ianwhitestone.work/zappa-serverless-docker/) for more details on the current functionality and how it works
* See [PR](https://github.com/zappa/Zappa/pull/967) or [original issue](https://github.com/Miserlou/Zappa/issues/2188) for discussion around what is currently supported & next steps


## 0.52.0
* Remove dateutil version restriction
* Fix failed downloads of wheel packages with non-alphanumeric characters
Expand Down
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributing to Zappa
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer

## We Develop with Github
We use github to host code, to track issues and feature requests, as well as accept pull requests.
We actively welcome your pull requests:

1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Issue that pull request!

## Any contributions you make will be under the MIT Software License
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's [issues](https://github.com/zappa/Zappa/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/zappa/Zappa/issues/new); it's that easy!

## Write bug reports with detail, background, and sample code
Here are two great examples:
- [http://stackoverflow.com/q/12488905/180626](http://stackoverflow.com/q/12488905/180626)
- [http://www.openradar.me/11905408](http://www.openradar.me/11905408)

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

People *love* thorough bug reports, not even kidding.

## License
By contributing, you agree that your contributions will be licensed under its MIT License.

## References
This document was adapted from the basic template for contributing guideliens by @briandk
[Contributing to Transcriptase](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62). The template itself is based on the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ clean:
rm -f .coverage

requirements:
./requirements.sh
pip install -r requirements.txt
pip install -r test_requirements.txt
pip install pipenv>2021.11.15
pipenv lock
pipenv sync --dev

build: clean requirements-install
python setup.py sdist
Expand All @@ -39,18 +39,21 @@ mypy:
mypy --show-error-codes --pretty --ignore-missing-imports --strict zappa tests

black:
black zappa tests
black --line-length 127 .

black-check:
black zappa tests --check
black --line-length 127 . --check
@echo "If this fails, simply run: make black"

isort:
isort --recursive .
isort . --profile=black

isort-check:
isort --check . --profile=black

flake:
flake8 zappa --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 zappa --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 zappa --count --exit-zero --max-complexity=55 --max-line-length=127 --statistics --ignore F403,F405,E203,E231,E252,W503

test-docs:
nosetests tests/tests_docs.py --with-coverage --cover-package=zappa --with-timer
Expand Down
48 changes: 48 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
black = "*"
boto3-stubs = "*"
coveralls = "*"
Django = "<4"
django-stubs = "*"
flake8 = "*"
Flask = "*"
isort = "*"
mock = "*"
mypy = "*"
nose = "*"
nose-timer = "*"
pipenv = ">2021.11.15"
packaging = "*"

[packages]
argcomplete = "*"
boto3 = ">=1.17.28"
durationpy = "*"
hjson = "*"
jmespath = "*"
kappa = "==0.6.0"
pip = ">=9.0.1"
# Workaround until tests are updated to work with 'placebo' 0.10
# Move to 'dev-packages' when unpinned
placebo = "<0.10"
python-dateutil = "*"
python-slugify = "*"
PyYAML = "*"
# previous versions don't work with urllib3 1.24
requests = ">=2.20.0"
six = "*"
toml = "*"
tqdm = "*"
troposphere = ">=3.0"
Werkzeug = "*"
wheel = "*"
wsgi-request-logger = "*"

[pipenv]
# Required for 'black' since all of its release tags contain 'b'
allow_prereleases = true
Loading

0 comments on commit ca71d90

Please sign in to comment.