-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Version #1
Merged
Changes from all commits
Commits
Show all changes
100 commits
Select commit
Hold shift + click to select a range
e6097b8
Add .editorconfig
jtdoepke ab71883
Add basic package framework
jtdoepke baa95ff
Convert README.md to README.rst
jtdoepke b6937de
Add some more license stuff
jtdoepke a847edb
Add pypy3 env to tox.ini
jtdoepke c679ceb
Don't need Docker to lint
jtdoepke 0b97bc6
Add rst to .editorconfig
jtdoepke 960cd5a
Add Travis-CI status badge to README
jtdoepke a1adbb2
Add some other badges to README
jtdoepke 85b910b
Add Makefile
jtdoepke 9204472
Add Codecov integration
jtdoepke 273b82b
Add .coveragerc
jtdoepke eb8365e
Add Codecov badge to README
jtdoepke f5ad49e
Drop coverage from setup.py test requirements
jtdoepke 64e62d7
Drop tox
jtdoepke 6b833e7
Drop Python 3 requirement from Pipfile
jtdoepke 12a7d30
Lint first
jtdoepke 80508f1
Add isort target to Makefile
jtdoepke 588e2af
Add compat.py and utils.py
jtdoepke 5303edb
Move more test deps into setup.py and .travis.yml
jtdoepke be9ee2d
Don't run coverage for pypy tests
jtdoepke 9c629c3
Drop pypy support
jtdoepke 3343cb5
Add DockerLogTailer
jtdoepke b6dba5e
Upgrade setuptools before tests
jtdoepke 4322055
Add stubs for session, contrib, and pluggins
jtdoepke 92a0c1d
Ignore tests directory when linting
jtdoepke ddbe26d
Add separate lint configuration for tests
jtdoepke 3aeb8dc
Omit hookspecs.py from code coverage
jtdoepke 90a1695
Check for mismatched proxy env vars
jtdoepke 6569b75
big commit o' stuff
jtdoepke 3502e16
Fix README code blocks
jtdoepke baf25e3
Fix import in Python 2.7
jtdoepke ff2b99f
Unwrap function from method
jtdoepke bb4768e
Fix fake log line generation in Python 3.4
jtdoepke 1c8ea77
Used original _unbind function
jtdoepke 227440f
Use backport of ExitStack for nested() in Python 2
jtdoepke abfd715
lint
jtdoepke 6497e2e
Upgrade pip/setuptools during lint
jtdoepke d9e0ef0
Check .rst files during lint
jtdoepke 455c6b1
Install source dist (not editable) during Travis-CI
jtdoepke 57b3463
Add docutils so rst linting works
jtdoepke 2e33b27
Add Pygments for linting
jtdoepke 781526f
Make .rst checking part of the 'list' command
jtdoepke c27cb4b
Add basic docs
jtdoepke 85e3c4b
Remove pdb
jtdoepke 12c18da
Fix docs
jtdoepke 4640bb2
Attempt to fix Travis build
jtdoepke 27d31f4
Add .pytest_cache/ to .gitignore
jtdoepke d1df32f
Install editable in Travis
jtdoepke 34cd74d
Add some docs options and sidebars
jtdoepke 39c6b59
Add docs to pytest paths
jtdoepke 106e177
Merge compat.py into utils.py
jtdoepke 17f3a50
lint
jtdoepke a5226db
Add README to pytest paths
jtdoepke 7a86dc4
Drop old LocalstackSession.patch method
jtdoepke 428ff4b
Drop old bumpversion part number
jtdoepke f3f1a6f
Fix docs conf paths
jtdoepke 33839ac
Don't add docs to pytest paths
jtdoepke f5d27c7
Remove faker from test requirements
jtdoepke 125cc3d
Add CHANGELOG
jtdoepke 2b6492b
docs
jtdoepke a4f97e8
Move nested() and unbind() to utils.py
jtdoepke 00935da
docs
jtdoepke 153f4fc
Add command to build docs in realtime
jtdoepke 11861a8
Use shield.io for all badges
jtdoepke f4ff46e
docs
jtdoepke d2adcbb
Add empty _build and _static docs dirs
jtdoepke 5d8bb3a
Add pre-commit hooks
jtdoepke 76b83a5
Add plugin tests
jtdoepke 2a83ddb
lint
jtdoepke a43948f
Don't install pip/setuptools twice
jtdoepke acafb3f
Cache pip in Travis-CI builds
jtdoepke cce48e9
Add .codecov.yml
jtdoepke d3ce383
Use different Codecov flags for unit, integration, and functional tests
jtdoepke 29e15dd
Remove codecov -c arg
jtdoepke b6067a2
Try breaking up test types into separate Travis-CI jobs
jtdoepke 726e89b
Try explicit pip caching
jtdoepke 210cb51
Make codecov required
jtdoepke cd0b735
Fix Travis-CI test segmentation
jtdoepke c4fd047
typo
jtdoepke e8b0a4b
I bet -k works when you spell things correctly
jtdoepke fb1dbed
Clean up Makefile
jtdoepke fbd496d
Add missing mock dependency
jtdoepke 2932c24
Print pytest version for debugging
jtdoepke b602234
Correct pytest dependency
jtdoepke 9015a1b
docs
jtdoepke 09c76cd
docs
jtdoepke 52f635f
Fix docs link
jtdoepke 93415b9
Fix docs-live options [skip ci]
jtdoepke c9ab9cd
Change requirements doc [skip ci]
jtdoepke b58e94e
Stylish lint
jtdoepke ef86022
Remove Travis-CI cache directive
jtdoepke cf0ea4f
Add PHONY to help command [skip ci]
jtdoepke 3aa141d
Don't CI individual commits in branches
jtdoepke 6dfcdcc
Enhance newline stripping from Docker logs
jtdoepke 1193ba7
Ensure consistent test parameterization
jtdoepke 51bdb68
Only run docker in Travis CI functional tests
jtdoepke 2f801d7
Make lint part of test stage
jtdoepke 4c1ad7e
Install test requirements as one line
jtdoepke b07ea54
Run Travis CI unit and integration tests in parallel
jtdoepke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[bumpversion] | ||
current_version = 0.1.0-dev | ||
commit = True | ||
tag = True | ||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))? | ||
serialize = | ||
{major}.{minor}.{patch}-{release} | ||
{major}.{minor}.{patch} | ||
|
||
[bumpversion:part:release] | ||
optional_value = gamma | ||
values = | ||
dev | ||
gamma | ||
|
||
[bumpversion:file:pytest_localstack/_version.py] | ||
search = __version__ = '{current_version}' | ||
replace = __version__ = '{new_version}' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
codecov: | ||
branch: master | ||
|
||
coverage: | ||
range: 50..90 | ||
round: down | ||
precision: 2 | ||
|
||
# TODO: uncomment this after initial merge | ||
# status: | ||
# patch: | ||
# default: | ||
# target: 100% | ||
# only_pulls: true | ||
|
||
flags: | ||
contrib: | ||
paths: | ||
- pytest_localstack/contrib/ | ||
botocore: | ||
paths: | ||
- pytest_localstack/contrib/botocore.py | ||
boto3: | ||
paths: | ||
- pytest_localstack/contrib/boto3.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[run] | ||
omit = | ||
pytest_localstack/_version.py | ||
pytest_localstack/hookspecs.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_size = 4 | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{py,md,rst}] | ||
indent_style = space | ||
|
||
[.coveragerc] | ||
indent_style = tab | ||
|
||
[*.{ini,cfg,bat}] | ||
indent_style = tab | ||
|
||
[{Makefile,.coveragerc}] | ||
indent_style = tab | ||
|
||
[.bumpversion.cfg] | ||
indent_style = tab | ||
# .bumpversion.cfg gets rewritten by Python ConfigParser. | ||
# Ignore any changes to whitespace. | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false | ||
|
||
[*.{yml,yaml}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
repos: | ||
- repo: git@github.com:pre-commit/pre-commit-hooks | ||
sha: v1.1.1 | ||
hooks: | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-symlinks | ||
- id: check-vcs-permalinks | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: detect-aws-credentials | ||
args: ["--allow-missing-credentials"] | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
exclude: '(?:.*[\\/])?\.bumpversion\.cfg$' | ||
- id: flake8 | ||
- id: trailing-whitespace | ||
exclude: '(?:.*[\\/])?\.bumpversion\.cfg$' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
language: python | ||
|
||
python: | ||
- 2.7 | ||
- 3.4 | ||
- 3.5 | ||
- 3.6 | ||
- 3.7-dev | ||
|
||
branches: | ||
only: | ||
- master | ||
- /v.*/ | ||
|
||
env: | ||
- TEST_SUITE=unit | ||
- TEST_SUITE=integration | ||
|
||
matrix: | ||
fast_finish: true | ||
allow_failures: | ||
- python: 3.7-dev | ||
|
||
stages: | ||
- test | ||
- docs | ||
|
||
before_install: pip install --upgrade pip setuptools | ||
|
||
install: pip install --upgrade -e '.[test]' codecov pytest-cov pytest-xdist | ||
|
||
script: | ||
- pytest --version | ||
- pytest -ra --cov=pytest_localstack/ --cov-config .coveragerc -k "tests/$TEST_SUITE" $([ "$TEST_SUITE" != "functional" ] && echo -n '-n 4 --forked') | ||
- codecov --required -e TRAVIS_EVENT_TYPE -F "$TEST_SUITE" | ||
|
||
jobs: | ||
include: | ||
- stage: test | ||
python: 3.6 | ||
services: [] | ||
env: TEST_SUITE=lint | ||
install: pip install --upgrade pipenv docutils flake8 flake8-debugger flake8-docstrings flake8-isort Pygments | ||
script: | ||
- pipenv check | ||
- flake8 | ||
- flake8 --config tests/.flake8 tests/ | ||
- python setup.py check --restructuredtext --strict | ||
|
||
- stage: test | ||
python: 2.7 | ||
services: docker | ||
env: TEST_SUITE=functional | ||
|
||
- stage: test | ||
python: 3.4 | ||
services: docker | ||
env: TEST_SUITE=functional | ||
|
||
- stage: test | ||
python: 3.5 | ||
services: docker | ||
env: TEST_SUITE=functional | ||
|
||
- stage: test | ||
python: 3.6 | ||
services: docker | ||
env: TEST_SUITE=functional | ||
|
||
- stage: test | ||
python: 3.7-dev | ||
services: docker | ||
env: TEST_SUITE=functional | ||
|
||
- stage: docs | ||
python: 3.6 | ||
services: [] | ||
env: TEST_SUITE=docs | ||
install: pip install --upgrade Sphinx recommonmark | ||
script: cd docs && make html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Change Log | ||
========== | ||
|
||
0.1.0-dev (unreleased) | ||
---------------------- | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
VIRTUALENV := $(shell python -c 'from __future__ import print_function; import sys; print(sys.prefix if hasattr(sys, "real_prefix") or (hasattr(sys, "base_prefix") and sys.base_prefix != sys.prefix) else "", end="")') | ||
ifeq ($(VIRTUALENV),) | ||
VIRTUALENV := .venv | ||
endif | ||
|
||
PIPENV_VARS := PIPENV_VENV_IN_PROJECT=1 | ||
PIPENV := $(PIPENV_VARS) pipenv | ||
PIPENV_RUN := $(PIPENV) run | ||
|
||
T := $(shell tput sgr0) | ||
TBOLD := $(shell tput bold) | ||
TGREEN := $(shell tput setaf 2) | ||
TRED := $(shell tput setaf 1) | ||
|
||
|
||
|
||
help: ## print this help | ||
@# https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
.PHONY: help | ||
|
||
|
||
env: $(VIRTUALENV) ## create development virtualenv | ||
.PHONY: env | ||
$(VIRTUALENV): $(VIRTUALENV)/bin/activate | ||
$(VIRTUALENV)/bin/activate: Pipfile.lock | ||
$(PIPENV) install --dev --deploy | ||
touch $(VIRTUALENV)/bin/activate | ||
Pipfile.lock: Pipfile setup.py | ||
$(PIPENV) lock | ||
|
||
|
||
test: $(VIRTUALENV) ## run tests | ||
$(PIPENV_RUN) pytest | ||
.PHONY: ftest | ||
|
||
|
||
lint: $(VIRTUALENV) ## check code style | ||
@$(PIPENV) check | ||
|
||
@echo "$(TBOLD)Checking code style…$(T)" | ||
@if $(PIPENV_RUN) flake8; then \ | ||
echo "$(TGREEN)OK!$(T)"; \ | ||
else \ | ||
echo "$(TRED)ERROR!$(T)"; \ | ||
fi | ||
|
||
@echo "$(TBOLD)Checking test style…$(T)" | ||
@if $(PIPENV_RUN) flake8 --config tests/.flake8 tests/; then \ | ||
echo "$(TGREEN)OK!$(T)"; \ | ||
else \ | ||
echo "$(TRED)ERROR!$(T)"; \ | ||
fi | ||
|
||
@echo "$(TBOLD)Checking .rst file syntax…$(T)" | ||
@if $(PIPENV_RUN) python setup.py check --restructuredtext --strict; then\ | ||
echo "$(TGREEN)OK!$(T)"; \ | ||
else \ | ||
echo "$(TRED)ERROR!$(T)"; \ | ||
fi | ||
.PHONY: lint | ||
|
||
|
||
isort: $(VIRTUALENV) ## sort import statements | ||
$(PIPENV_RUN) isort | ||
.PHONY: isort | ||
|
||
|
||
docs: $(VIRTUALENV) | ||
$(PIPENV_RUN) $(MAKE) -C docs html | ||
.PHONY: docs | ||
|
||
|
||
docs-live: $(VIRTUALENV) ## build and view docs in real-time | ||
$(PIPENV_RUN) sphinx-autobuild -b html \ | ||
-p 0 \ | ||
--open-browser \ | ||
--watch ./ \ | ||
--ignore ".git/*" \ | ||
--ignore ".venv/*" \ | ||
--ignore "*.swp" \ | ||
--ignore "*.pdf" \ | ||
--ignore "*.log" \ | ||
--ignore "*.out" \ | ||
--ignore "*.toc" \ | ||
--ignore "*.aux" \ | ||
--ignore "*.idx" \ | ||
--ignore "*.ind" \ | ||
--ignore "*.ilg" \ | ||
--ignore "*.tex" \ | ||
--ignore "Makefile" \ | ||
--ignore "setup.py" \ | ||
--ignore "setup.cfg" \ | ||
--ignore "Pipfile*" \ | ||
docs docs/_build/html | ||
.PHONY: docs-live | ||
|
||
|
||
lock: $(VIRTUALENV) ## regenerate Pipfile.lock file | ||
$(PIPENV) lock | ||
.PHONY: lock | ||
|
||
|
||
clean: clean-build clean-pyc clean-env clean-test ## remove all build, test, coverage and Python artifacts | ||
.PHONY: clean | ||
|
||
|
||
clean-build: ## remove build artifacts | ||
rm -fr build/ | ||
rm -fr dist/ | ||
rm -fr .eggs/ | ||
find . -name '*.egg-info' -exec rm -fr {} + | ||
find . -name '*.egg' -exec rm -f {} + | ||
.PHONY: clean-build | ||
|
||
|
||
clean-pyc: ## remove Python file artifacts | ||
find . -name '*.pyc' -exec rm -f {} + | ||
find . -name '*.pyo' -exec rm -f {} + | ||
find . -name '*~' -exec rm -f {} + | ||
find . -name '__pycache__' -exec rm -fr {} + | ||
.PHONY: clean-pyc | ||
|
||
|
||
clean-env: ## remove development virtualenv | ||
pipenv --rm || true | ||
.PHONY: clean-env | ||
|
||
|
||
clean-test: ## remove test and coverage artifacts | ||
rm -rf .tox/ \ | ||
.coverage \ | ||
htmlcov/ \ | ||
coverage.xml \ | ||
junit.xml \ | ||
junit-*.xml | ||
.PHONY: clean-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[[source]] | ||
|
||
url = "https://pypi.python.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
|
||
[packages] | ||
|
||
"ab7dc8" = {path = ".", editable = true, extras = ["test"]} | ||
|
||
|
||
[dev-packages] | ||
|
||
docutils = "*" | ||
bumpversion = "*" | ||
"flake8" = "*" | ||
"flake8-debugger" = "*" | ||
"flake8-docstrings" = "*" | ||
"flake8-isort" = "*" | ||
isort = "*" | ||
pygments = "*" | ||
recommonmark = "*" | ||
sphinx = "*" | ||
sphinx-autobuild = "*" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather trivial, but this URL redirects to add a tailing
/
. This makes me wonder how much energy and time amending this would save v.s. how much it takes to report+act on this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends on what pipenv's doing with it. I bet it's just
urljoin()
ing it with each package name.