Skip to content

Commit 924af6d

Browse files
committed
Update project with latest dev standard and add multi stage travis
1 parent 73cad3c commit 924af6d

File tree

6 files changed

+200
-67
lines changed

6 files changed

+200
-67
lines changed

.flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
22
# E501: Line length is enforced by Black, so flake8 doesn't need to check it
3-
# W503: Black disagrees with this rule, so disable it
3+
# W503: Black disagrees with this rule, as does PEP 8; Black wins
44
ignore = E501, W503

.gitignore

+158-2
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,161 @@ dmypy.json
128128
# Pyre type checker
129129
.pyre/
130130

131-
# Temporary files
132-
*.swp
131+
### macOS ###
132+
# General
133+
.DS_Store
134+
.AppleDouble
135+
.LSOverride
136+
137+
# Thumbnails
138+
._*
139+
140+
# Files that might appear in the root of a volume
141+
.DocumentRevisions-V100
142+
.fseventsd
143+
.Spotlight-V100
144+
.TemporaryItems
145+
.Trashes
146+
.VolumeIcon.icns
147+
.com.apple.timemachine.donotpresent
148+
149+
# Directories potentially created on remote AFP share
150+
.AppleDB
151+
.AppleDesktop
152+
Network Trash Folder
153+
Temporary Items
154+
.apdisk
155+
156+
### Windows ###
157+
# Windows thumbnail cache files
158+
Thumbs.db
159+
Thumbs.db:encryptable
160+
ehthumbs.db
161+
ehthumbs_vista.db
162+
163+
# Dump file
164+
*.stackdump
165+
166+
# Folder config file
167+
[Dd]esktop.ini
168+
169+
# Recycle Bin used on file shares
170+
$RECYCLE.BIN/
171+
172+
# Windows Installer files
173+
*.cab
174+
*.msi
175+
*.msix
176+
*.msm
177+
*.msp
178+
179+
# Windows shortcuts
180+
*.lnk
181+
182+
### PyCharm ###
183+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
184+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
185+
186+
# User-specific stuff
187+
.idea/**/workspace.xml
188+
.idea/**/tasks.xml
189+
.idea/**/usage.statistics.xml
190+
.idea/**/dictionaries
191+
.idea/**/shelf
192+
193+
# Generated files
194+
.idea/**/contentModel.xml
195+
196+
# Sensitive or high-churn files
197+
.idea/**/dataSources/
198+
.idea/**/dataSources.ids
199+
.idea/**/dataSources.local.xml
200+
.idea/**/sqlDataSources.xml
201+
.idea/**/dynamic.xml
202+
.idea/**/uiDesigner.xml
203+
.idea/**/dbnavigator.xml
204+
205+
# Gradle
206+
.idea/**/gradle.xml
207+
.idea/**/libraries
208+
209+
# Gradle and Maven with auto-import
210+
# When using Gradle or Maven with auto-import, you should exclude module files,
211+
# since they will be recreated, and may cause churn. Uncomment if using
212+
# auto-import.
213+
# .idea/artifacts
214+
# .idea/compiler.xml
215+
# .idea/jarRepositories.xml
216+
# .idea/modules.xml
217+
# .idea/*.iml
218+
# .idea/modules
219+
# *.iml
220+
# *.ipr
221+
222+
# CMake
223+
cmake-build-*/
224+
225+
# Mongo Explorer plugin
226+
.idea/**/mongoSettings.xml
227+
228+
# File-based project format
229+
*.iws
230+
231+
# IntelliJ
232+
out/
233+
234+
# mpeltonen/sbt-idea plugin
235+
.idea_modules/
236+
237+
# JIRA plugin
238+
atlassian-ide-plugin.xml
239+
240+
# Cursive Clojure plugin
241+
.idea/replstate.xml
242+
243+
# Crashlytics plugin (for Android Studio and IntelliJ)
244+
com_crashlytics_export_strings.xml
245+
crashlytics.properties
246+
crashlytics-build.properties
247+
fabric.properties
248+
249+
# Editor-based Rest Client
250+
.idea/httpRequests
251+
252+
# Android studio 3.1+ serialized cache file
253+
.idea/caches/build_file_checksums.ser
254+
255+
### PyCharm Patch ###
256+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
257+
258+
# *.iml
259+
# modules.xml
260+
# .idea/misc.xml
261+
# *.ipr
262+
263+
# Sonarlint plugin
264+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
265+
.idea/**/sonarlint/
266+
267+
# SonarQube Plugin
268+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
269+
.idea/**/sonarIssues.xml
270+
271+
# Markdown Navigator plugin
272+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
273+
.idea/**/markdown-navigator.xml
274+
.idea/**/markdown-navigator-enh.xml
275+
.idea/**/markdown-navigator/
276+
277+
# Cache file creation bug
278+
# See https://youtrack.jetbrains.com/issue/JBR-2257
279+
.idea/$CACHE_FILE$
280+
281+
# CodeStream plugin
282+
# https://plugins.jetbrains.com/plugin/12206-codestream
283+
.idea/codestream.xml
284+
285+
### vscode ###
286+
.vscode/*
287+
288+
*.code-workspace

.travis.yml

+30-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,47 @@
11
---
2+
# Add additional stages in the order of execution here, and then under the job:include: key
3+
stages:
4+
- lint
5+
- test
6+
27
language: "python"
38
services:
49
- "docker"
5-
python:
6-
- 3.7
7-
- 3.8
810

911
env:
12+
matrix:
13+
- "PYTHON_VER=3.7"
14+
- "PYTHON_VER=3.8"
15+
- "PYTHON_VER=3.9"
1016
global:
1117
# yamllint disable-line rule:line-length
1218
- 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="
19+
1320
before_script:
1421
- "pip install invoke"
15-
- "invoke build-test-container -p $TRAVIS_PYTHON_VERSION"
22+
- invoke build-image --nocache
1623
- "curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > /tmp/get-poetry.py"
1724
- "python /tmp/get-poetry.py -y --version 1.0.2"
1825
- "source $HOME/.poetry/env"
26+
1927
script:
20-
- "invoke tests -p $TRAVIS_PYTHON_VERSION"
28+
- invoke pytest
29+
30+
jobs:
31+
include:
32+
- stage: lint
33+
env:
34+
- INVOKE_LOCAL=True
35+
before_script:
36+
- pip install invoke toml
37+
script:
38+
- invoke black
39+
- invoke bandit # Bandit fails to function on > Py3.8 https://github.com/PyCQA/bandit/issues/639
40+
- invoke pydocstyle
41+
- invoke flake8
42+
- invoke yamllint
43+
- invoke pylint
44+
2145
deploy:
2246
provider: "script"
2347
script: "poetry config pypi-token.pypi $PYPI_TOKEN && poetry publish --build"
@@ -26,3 +50,4 @@ deploy:
2650
tags: true
2751
branch: "master"
2852
python: "3.7"
53+

.yamllint

-58
This file was deleted.

.yamllint.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
extends: "default"
3+
rules:
4+
comments: "enable"
5+
empty-values: "enable"
6+
indentation:
7+
indent-sequences: "consistent"
8+
line-length: "disable"
9+
quoted-strings:
10+
quote-type: "double"

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ include = [
1515
]
1616

1717
[tool.poetry.dependencies]
18-
python = "^3.7"
18+
python = "~3.7 || ~3.8 || ~3.9"
1919
pydantic = "^1.7.2"
2020
structlog = "^20.1.0"
2121
colorama = {version = "^0.4.3", optional = true}

0 commit comments

Comments
 (0)