-
Notifications
You must be signed in to change notification settings - Fork 32
Update project to support Python 3.6 & 3.9 and update travis to use stages #45
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
924af6d
Update project with latest dev standard and add multi stage travis
dgarros d56b1c9
Update task.py as well
dgarros 69be8d8
Remove requests_mock since it's not used
dgarros 3c58e97
Fix dockerfile and update for linter
dgarros 5697707
Remove ipython from dependencies and add support for python 3.6
dgarros 8b19cb3
Update pyproject to support ^3.6
dgarros 4bc4214
Update travis file
dgarros 4d1a83e
Add poetry during lint stage
dgarros 691245c
Refactor travis stages to use default python
dgarros 11151c0
Remove env for test stage
dgarros 58e3fce
Fix python version
dgarros f5b8194
Remove pytest from build stage
dgarros 9ea8fba
Add poetry build to build stage
dgarros d41469d
remove trailing space
dgarros f193c7e
Remove build stage
dgarros 76f5e08
Change base image
dgarros e732537
Add build in stage list
dgarros 34380fb
add poetry to build stage
dgarros 3ebf0b4
Rename stages
dgarros d935be5
Try to move python matrix under jobs
dgarros 2110aac
Got back to lint, test, build, deploy
dgarros 357ead1
Fix yamlint
dgarros e84b3c1
reenable 3.8 and 3.9
dgarros 83a182e
Add back mypy and coverage
dgarros 4df4285
Updated lock file
dgarros 1383935
Add mypy to travis and fix doc issues
dgarros 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 hidden or 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[flake8] | ||
# E501: Line length is enforced by Black, so flake8 doesn't need to check it | ||
# W503: Black disagrees with this rule, so disable it | ||
# W503: Black disagrees with this rule, as does PEP 8; Black wins | ||
ignore = E501, W503 |
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -1,28 +1,68 @@ | ||
--- | ||
# Add additional stages in the order of execution here, and then under the job:include: key | ||
dist: "focal" # Ubuntu 20.04 | ||
stages: | ||
- name: "lint" | ||
- name: "build" | ||
- name: "test" | ||
- name: "deploy" | ||
if: "branch = master" | ||
|
||
language: "python" | ||
services: | ||
- "docker" | ||
python: | ||
- 3.6 | ||
- 3.7 | ||
- 3.8 | ||
- 3.9 | ||
|
||
services: | ||
- "docker" | ||
|
||
env: | ||
global: | ||
# yamllint disable-line rule:line-length | ||
- secure: "oSEtMKAmz3dlzrFnRLp3D/KgdSFy7XmVv6c3aSP7LXi8L2ljRrqFOB6BU3RQ6hNbSF3/bvpM9I4QKfZmOyId23Pr5UoMzaN8eL+xL8ZLkjZp0ngVZcCeXRvGwcmg4WJvVOnq3T/NoC/zwtsZbUt19yIJVVCEQqc84im90g6cLNMUulxQOvh6M/qgW4AFhAfi7lUFybl/RiWZYhvFchWifYTj7IfvZSDtin4UStJj7UApguqW4SseTZ/bmt18GSkOn9WO0sOaUSkehkT3NEMy97TLY73KgYb3LNrP47C2NPYQyyzJdb0szJ9CcVKtFjBBl5bqN5MGW/fqtqbh84Jq2GhTHNiYBcu6u/CJ+fscWYJkEWo0nNeED/ef8Vwv1M/q68IVeWsNO3+Se41WvOhMRsM8u1ek6+sHyyTNcVpGIUw4phHBsfCNiIlydWr8VpjZv9N3E4KqKRyjtpOoZElY11ZJa5rEL4D0s3JgSug958dYg/vsh+QVivNb9bbC/o9vBFqZGhWzGmNW2F3ezODZ9JcBlf1TEIZf8QPAHEO2SF5XCVRcDyByefqW28pOzwgk9Acl1/zIh5fiH/9ZAemlxjr17t4DQQbeQ/wbF6Gsmn0cYYoxjWMSrLqMD7TRQOTAYcxWAOKN/hCK/K6DS96r2CW5pU506zKMvezrskDmmX0=" | ||
|
||
# Script & Before Script for test stage | ||
before_script: | ||
- "pip install invoke" | ||
- "invoke build-test-container -p $TRAVIS_PYTHON_VERSION" | ||
- "curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > /tmp/get-poetry.py" | ||
- "python /tmp/get-poetry.py -y --version 1.0.2" | ||
- "source $HOME/.poetry/env" | ||
- "pip install invoke poetry toml" | ||
- "poetry install" | ||
script: | ||
- "invoke tests -p $TRAVIS_PYTHON_VERSION" | ||
deploy: | ||
provider: "script" | ||
script: "poetry config pypi-token.pypi $PYPI_TOKEN && poetry publish --build" | ||
skip_cleanup: true | ||
"on": | ||
tags: true | ||
branch: "master" | ||
python: "3.7" | ||
- "invoke pytest --local" | ||
|
||
jobs: | ||
include: | ||
- stage: "lint" | ||
env: | ||
- "INVOKE_LOCAL=True" | ||
before_script: | ||
- "pip install invoke poetry toml" | ||
- "poetry install --no-interaction --no-ansi --no-root" | ||
script: | ||
- "invoke black" | ||
- "invoke bandit" # Bandit fails to function on > Py3.8 https://github.com/PyCQA/bandit/issues/639 | ||
- "invoke pydocstyle" | ||
- "invoke mypy" | ||
- "invoke flake8" | ||
- "invoke yamllint" | ||
- "invoke pylint" | ||
python: 3.7 | ||
|
||
- stage: "build" | ||
before_script: | ||
- "pip install invoke poetry toml" | ||
script: | ||
- "invoke build-image --nocache" | ||
- "poetry build" | ||
python: 3.7 | ||
|
||
- stage: "deploy" | ||
script: "skip" | ||
deploy: | ||
provider: "script" | ||
script: "poetry config pypi-token.pypi $PYPI_TOKEN && poetry publish --build" | ||
skip_cleanup: true | ||
"on": | ||
tags: true | ||
branch: "master" | ||
python: 3.7 |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,10 @@ | ||
--- | ||
extends: "default" | ||
rules: | ||
comments: "enable" | ||
empty-values: "enable" | ||
indentation: | ||
indent-sequences: "consistent" | ||
line-length: "disable" | ||
quoted-strings: | ||
quote-type: "double" |
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.