Skip to content

Commit

Permalink
Merge cda0ae2 into 57fcb4c
Browse files Browse the repository at this point in the history
  • Loading branch information
timgates42 authored Jan 6, 2021
2 parents 57fcb4c + cda0ae2 commit aae3ab7
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 248 deletions.
89 changes: 0 additions & 89 deletions .pyspelling.yml

This file was deleted.

4 changes: 2 additions & 2 deletions COOKIECUTTER_UPDATES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ consider application of new updates.
# Updates from the Cookiecutter Template
* Use an (Azure Pipelines)[https://azure.microsoft.com/en-au/services/devops/pipelines/] CI.
* Follow (3Amigos)[https://3amigos-dev.github.io/] to use CI container pattern.
* Use (pyspelling)[https://github.com/facelessuser/pyspelling] to check spelling in CI.
* Use (spelling)[https://github.com/resplendent-dev/spelling] to check spelling in CI.
* Use (flake8)[https://github.com/PyCQA/flake8] for static code analysis.
* Use (bandit)[https://github.com/PyCQA/bandit] for security static analysis.
* Use (pylint)[https://github.com/PyCQA/pylint] for static code analysis.
Expand All @@ -20,7 +20,7 @@ consider application of new updates.
* Use (pytest-cov)[https://github.com/pytest-dev/pytest-cov] to check 100% unit test coverage.
* Use (pytest-xdist)[https://github.com/pytest-dev/pytest-xdist] for test parallelization.
* Use (pytest-azurepipelines)[https://github.com/tonybaloney/pytest-azurepipelines] to publish tests results and coverage to Azure Pipelines Artifacts.
* Use (resplendent)[https://github.com/resplendent-dev/resplendent] to spell check reStructuredText in pyspelling.
* Use (resplendent)[https://github.com/resplendent-dev/resplendent] to spell check reStructuredText in spelling.
* Use (shellcheck)[https://github.com/koalaman/shellcheck] for shell script static analysis.
* Use (sphinx)[https://github.com/sphinx-doc/sphinx] for documentation generation.
* Use (twine)[https://github.com/pypa/twine] for publishing to PyPI.
Expand Down
8 changes: 5 additions & 3 deletions app/.isort.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[isort]
not_skip = __init__.py
line_length = 88
[settings]
not_skip=__init__.py
line_length=88
multi_line_output=3
include_trailing_comma=yes
33 changes: 30 additions & 3 deletions app/module_goes_here/__main__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
#!/usr/bin/env python
"""
Module load handler for execution via:
python -m module_goes_here
"""
from __future__ import absolute_import, division, print_function, unicode_literals

import click

def main():
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])

__version__ = "0.1"


@click.group(context_settings=CONTEXT_SETTINGS, invoke_without_command=True)
@click.version_option(version=__version__)
@click.pass_context
def main(ctxt):
"""
Main click group handler
"""
if ctxt.invoked_subcommand is None:
run_invocation()


@main.command()
def invoke():
"""
Primary command handler
"""
run_invocation()


def run_invocation():
"""
Test
Execute the invocation
"""
print(
"""\
Expand All @@ -19,4 +45,5 @@ def main():


if __name__ == "__main__":
main()
main() # pylint: disable=no-value-for-parameter
# vim: set ft=python:
2 changes: 1 addition & 1 deletion app/pip/3.6/spelling/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pyspelling
spelling
wcmatch<5.0
resplendent
unanimous
2 changes: 1 addition & 1 deletion app/pip/3.7/spelling/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pyspelling
spelling
wcmatch<5.0
resplendent
unanimous
5 changes: 1 addition & 4 deletions app/pip/3.8/spelling/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
pyspelling
wcmatch<5.0
resplendent
unanimous
spelling
2 changes: 1 addition & 1 deletion app/pip/3.9/spelling/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pyspelling
spelling
wcmatch<5.0
resplendent
unanimous
3 changes: 1 addition & 2 deletions app/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def read_version():
.strip(),
long_description=load_include("README.md", transform=True),
long_description_content_type="text/markdown",
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",
test_suite="tests",
test_requires=[
elem.strip()
Expand All @@ -85,7 +85,6 @@ def read_version():
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
Expand Down
16 changes: 11 additions & 5 deletions app/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@
module_goes_here.__main__
"""

import pytest
from click.testing import CliRunner

from module_goes_here.__main__ import main


def test_main():
@pytest.mark.parametrize("args,expected", [([], 0), (["invoke"], 0)])
def test_main(args, expected):
"""
GIVEN the .__main__ module entry point WHEN calling main THEN the call
executes successfully with a result of `None`
GIVEN the module_goes_here.__main__
module entry point WHEN calling main THEN the call
executes successfully.
"""
# Setup
runner = CliRunner()
# Exercise
result = main() # pylint: disable=assignment-from-no-return
result = runner.invoke(main, args)
# Verify
assert result is None # nosec
assert result.exit_code == expected # nosec # noqa=S101
4 changes: 2 additions & 2 deletions ci/in_docker/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ source "${BASEDIR}/ci/in_docker/prepare.sh"

cd "${BASEDIR}"
find . -iname \*.sh -print0 | xargs -0 shellcheck
# Run pyspelling in root to check docs
"python${PYVER}" -m pyspelling
# Run spelling in root to check docs
"python${PYVER}" -m spelling
# Run black to check all python
"python${PYVER}" -m black --check --diff "${BASEDIR}"
cd "${BASEDIR}/app"
Expand Down
140 changes: 5 additions & 135 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,135 +1,5 @@
alldevices
allgroups
allprobes
allsensors
api
Appveyor
args
assignees
automodule
azurepipelines
backlink
beautifulsoup
BeautifulSoup
bs
Bugfixes
buildkite
BuildKite
byid
charset
CLI
cobertura
config
conftest
contrib
cookiecutter
CookieCutter
cov
css
datetime
defusedxml
dev
deviceid
deviceobj
deviceobject
dlint
docopt
DOCTYPE
docutils
exename
genindex
GitPython
GPLv
hh
hostname
href
html
http
https
iOS
ip
isort
javascript
Json
junit
JUnit
li
logdecorator
lt
lxml
maxdepth
md
modindex
newname
newplaceid
noqa
nosec
pademelon
pademelon
parallelization
param
params
passhash
pipefish
plumbum
pre
probeobject
prtg
prtgadmin
PRTGApi
PRTGDevice
PRTGSensor
py
PyEnchant
PyGithub
PyInquirer
pylint
PyPi
PyPI
pyruncompare
pyspelling
pytest
Pytest
pytest-buildkite
quickstart
rc
README
ReadTheDocs
repr
resplendent
restructuredtext
reStructuredText
rootid
rst
sensorid
sensorobject
sensortree
setuptools
sexualized
shellcheck
socio
ss
stdout
submodules
Submodules
sys
tcp
testsuite
th
toctree
towncrier
txt
ui
ul
unanimous
undoc
unicode
unmaintained
urls
utf
wcmatch
webgui
xdist
xml
yyyy
module_goes_here
custom
dictionary
words
go
here

0 comments on commit aae3ab7

Please sign in to comment.