Skip to content
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
merged 100 commits into from
Mar 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
e6097b8
Add .editorconfig
jtdoepke Feb 24, 2018
ab71883
Add basic package framework
jtdoepke Feb 24, 2018
baa95ff
Convert README.md to README.rst
jtdoepke Feb 24, 2018
b6937de
Add some more license stuff
jtdoepke Feb 24, 2018
a847edb
Add pypy3 env to tox.ini
jtdoepke Feb 24, 2018
c679ceb
Don't need Docker to lint
jtdoepke Feb 24, 2018
0b97bc6
Add rst to .editorconfig
jtdoepke Feb 24, 2018
960cd5a
Add Travis-CI status badge to README
jtdoepke Feb 24, 2018
a1adbb2
Add some other badges to README
jtdoepke Feb 24, 2018
85b910b
Add Makefile
jtdoepke Feb 24, 2018
9204472
Add Codecov integration
jtdoepke Feb 24, 2018
273b82b
Add .coveragerc
jtdoepke Feb 24, 2018
eb8365e
Add Codecov badge to README
jtdoepke Feb 24, 2018
f5ad49e
Drop coverage from setup.py test requirements
jtdoepke Feb 24, 2018
64e62d7
Drop tox
jtdoepke Feb 25, 2018
6b833e7
Drop Python 3 requirement from Pipfile
jtdoepke Feb 25, 2018
12a7d30
Lint first
jtdoepke Feb 25, 2018
80508f1
Add isort target to Makefile
jtdoepke Feb 25, 2018
588e2af
Add compat.py and utils.py
jtdoepke Feb 25, 2018
5303edb
Move more test deps into setup.py and .travis.yml
jtdoepke Feb 25, 2018
be9ee2d
Don't run coverage for pypy tests
jtdoepke Feb 25, 2018
9c629c3
Drop pypy support
jtdoepke Feb 25, 2018
3343cb5
Add DockerLogTailer
jtdoepke Feb 26, 2018
b6dba5e
Upgrade setuptools before tests
jtdoepke Feb 26, 2018
4322055
Add stubs for session, contrib, and pluggins
jtdoepke Mar 1, 2018
92a0c1d
Ignore tests directory when linting
jtdoepke Mar 1, 2018
ddbe26d
Add separate lint configuration for tests
jtdoepke Mar 1, 2018
3aeb8dc
Omit hookspecs.py from code coverage
jtdoepke Mar 1, 2018
90a1695
Check for mismatched proxy env vars
jtdoepke Mar 1, 2018
6569b75
big commit o' stuff
jtdoepke Mar 5, 2018
3502e16
Fix README code blocks
jtdoepke Mar 5, 2018
baf25e3
Fix import in Python 2.7
jtdoepke Mar 5, 2018
ff2b99f
Unwrap function from method
jtdoepke Mar 5, 2018
bb4768e
Fix fake log line generation in Python 3.4
jtdoepke Mar 5, 2018
1c8ea77
Used original _unbind function
jtdoepke Mar 6, 2018
227440f
Use backport of ExitStack for nested() in Python 2
jtdoepke Mar 6, 2018
abfd715
lint
jtdoepke Mar 6, 2018
6497e2e
Upgrade pip/setuptools during lint
jtdoepke Mar 6, 2018
d9e0ef0
Check .rst files during lint
jtdoepke Mar 6, 2018
455c6b1
Install source dist (not editable) during Travis-CI
jtdoepke Mar 6, 2018
57b3463
Add docutils so rst linting works
jtdoepke Mar 6, 2018
2e33b27
Add Pygments for linting
jtdoepke Mar 6, 2018
781526f
Make .rst checking part of the 'list' command
jtdoepke Mar 6, 2018
c27cb4b
Add basic docs
jtdoepke Mar 6, 2018
85e3c4b
Remove pdb
jtdoepke Mar 6, 2018
12c18da
Fix docs
jtdoepke Mar 6, 2018
4640bb2
Attempt to fix Travis build
jtdoepke Mar 6, 2018
27d31f4
Add .pytest_cache/ to .gitignore
jtdoepke Mar 6, 2018
d1df32f
Install editable in Travis
jtdoepke Mar 6, 2018
34cd74d
Add some docs options and sidebars
jtdoepke Mar 6, 2018
39c6b59
Add docs to pytest paths
jtdoepke Mar 6, 2018
106e177
Merge compat.py into utils.py
jtdoepke Mar 6, 2018
17f3a50
lint
jtdoepke Mar 6, 2018
a5226db
Add README to pytest paths
jtdoepke Mar 6, 2018
7a86dc4
Drop old LocalstackSession.patch method
jtdoepke Mar 6, 2018
428ff4b
Drop old bumpversion part number
jtdoepke Mar 6, 2018
f3f1a6f
Fix docs conf paths
jtdoepke Mar 6, 2018
33839ac
Don't add docs to pytest paths
jtdoepke Mar 6, 2018
f5d27c7
Remove faker from test requirements
jtdoepke Mar 6, 2018
125cc3d
Add CHANGELOG
jtdoepke Mar 6, 2018
2b6492b
docs
jtdoepke Mar 6, 2018
a4f97e8
Move nested() and unbind() to utils.py
jtdoepke Mar 6, 2018
00935da
docs
jtdoepke Mar 7, 2018
153f4fc
Add command to build docs in realtime
jtdoepke Mar 7, 2018
11861a8
Use shield.io for all badges
jtdoepke Mar 7, 2018
f4ff46e
docs
jtdoepke Mar 7, 2018
d2adcbb
Add empty _build and _static docs dirs
jtdoepke Mar 7, 2018
5d8bb3a
Add pre-commit hooks
jtdoepke Mar 7, 2018
76b83a5
Add plugin tests
jtdoepke Mar 7, 2018
2a83ddb
lint
jtdoepke Mar 7, 2018
a43948f
Don't install pip/setuptools twice
jtdoepke Mar 7, 2018
acafb3f
Cache pip in Travis-CI builds
jtdoepke Mar 7, 2018
cce48e9
Add .codecov.yml
jtdoepke Mar 7, 2018
d3ce383
Use different Codecov flags for unit, integration, and functional tests
jtdoepke Mar 7, 2018
29e15dd
Remove codecov -c arg
jtdoepke Mar 7, 2018
b6067a2
Try breaking up test types into separate Travis-CI jobs
jtdoepke Mar 7, 2018
726e89b
Try explicit pip caching
jtdoepke Mar 7, 2018
210cb51
Make codecov required
jtdoepke Mar 7, 2018
cd0b735
Fix Travis-CI test segmentation
jtdoepke Mar 7, 2018
c4fd047
typo
jtdoepke Mar 7, 2018
e8b0a4b
I bet -k works when you spell things correctly
jtdoepke Mar 7, 2018
fb1dbed
Clean up Makefile
jtdoepke Mar 7, 2018
fbd496d
Add missing mock dependency
jtdoepke Mar 7, 2018
2932c24
Print pytest version for debugging
jtdoepke Mar 7, 2018
b602234
Correct pytest dependency
jtdoepke Mar 7, 2018
9015a1b
docs
jtdoepke Mar 8, 2018
09c76cd
docs
jtdoepke Mar 8, 2018
52f635f
Fix docs link
jtdoepke Mar 8, 2018
93415b9
Fix docs-live options [skip ci]
jtdoepke Mar 8, 2018
c9ab9cd
Change requirements doc [skip ci]
jtdoepke Mar 8, 2018
b58e94e
Stylish lint
jtdoepke Mar 8, 2018
ef86022
Remove Travis-CI cache directive
jtdoepke Mar 8, 2018
cf0ea4f
Add PHONY to help command [skip ci]
jtdoepke Mar 8, 2018
3aa141d
Don't CI individual commits in branches
jtdoepke Mar 8, 2018
6dfcdcc
Enhance newline stripping from Docker logs
jtdoepke Mar 12, 2018
1193ba7
Ensure consistent test parameterization
jtdoepke Mar 12, 2018
51bdb68
Only run docker in Travis CI functional tests
jtdoepke Mar 12, 2018
2f801d7
Make lint part of test stage
jtdoepke Mar 12, 2018
4c1ad7e
Install test requirements as one line
jtdoepke Mar 12, 2018
b07ea54
Run Travis CI unit and integration tests in parallel
jtdoepke Mar 12, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .bumpversion.cfg
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}'

25 changes: 25 additions & 0 deletions .codecov.yml
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
4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[run]
omit =
pytest_localstack/_version.py
pytest_localstack/hookspecs.py
33 changes: 33 additions & 0 deletions .editorconfig
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
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
Expand All @@ -61,9 +62,6 @@ instance/
# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

Expand Down
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
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$'
80 changes: 80 additions & 0 deletions .travis.yml
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
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Change Log
==========

0.1.0-dev (unreleased)
----------------------

- Initial release
137 changes: 137 additions & 0 deletions Makefile
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
25 changes: 25 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[[source]]

url = "https://pypi.python.org/simple"
Copy link

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.

Copy link
Contributor Author

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.

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 = "*"
Loading