From 9e2f9a28411a04157878bf1fd8d81c968d0ca61b Mon Sep 17 00:00:00 2001 From: ludeeus Date: Mon, 3 Dec 2018 19:03:15 +0100 Subject: [PATCH 1/6] test --- .codeclimate.yml | 17 +++++++++++++++++ Makefile | 18 ++++++++++++++++++ Pipfile | 20 ++++++++++++++++++++ tox.ini | 31 +++++++++++++++++++++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 .codeclimate.yml create mode 100644 Makefile create mode 100644 Pipfile create mode 100644 tox.ini diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..c993788 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,17 @@ +--- +engines: + duplication: + enabled: true + config: + languages: + - python + fixme: + enabled: true + radon: + enabled: true +ratings: + paths: + - "**.py" +exclude_paths: + - dist/ + - docs/ \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a5d2004 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +coverage: + pipenv run py.test -s --verbose --cov-report term-missing --cov-report xml --cov=googledevices tests +init: + pip install --upgrade pip pipenv + pipenv lock + pipenv install --dev +lint: + pipenv run flake8 googledevices + pipenv run pydocstyle googledevices + pipenv run pylint googledevices +publish: + pipenv run python setup.py sdist bdist_wheel + pipenv run twine upload dist/* + rm -rf dist/ build/ .egg googledevices.egg-info/ +test: + pipenv run py.test +typing: + pipenv run mypy --ignore-missing-imports googledevices \ No newline at end of file diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..dcfcba6 --- /dev/null +++ b/Pipfile @@ -0,0 +1,20 @@ +[[source]] +url = "https://pypi.python.org/simple" +verify_ssl = true + +[dev-packages] +"flake8" = "*" +aresponses = "*" +detox = "*" +mypy = "*" +pydocstyle = "*" +pylint = "*" +pytest-aiohttp = "*" +pytest-cov = "*" +tox = "*" +twine = "*" + +[packages] +aiodns = "*" +aiohttp = "*" +async-timeout = "*" \ No newline at end of file diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..47e2611 --- /dev/null +++ b/tox.ini @@ -0,0 +1,31 @@ +[tox] +envlist = py36, py37, py38, cov, lint, typing +skip_missing_interpreters = True + +[testenv] +whitelist_externals = make +deps = pipenv +commands= + make init + make test + +[testenv:cov] +whitelist_externals = make +deps = pipenv +commands= + make init + make coverage + +[testenv:lint] +whitelist_externals = make +deps = pipenv +commands= + make init + make lint + +[testenv:typing] +whitelist_externals = make +deps = pipenv +commands= + make init + make typing \ No newline at end of file From fd67c7b81a1c1cc30b92022516928139b049f0ec Mon Sep 17 00:00:00 2001 From: ludeeus Date: Mon, 3 Dec 2018 19:12:01 +0100 Subject: [PATCH 2/6] disable useless pylint rules --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a5d2004..a28000d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,3 @@ -coverage: - pipenv run py.test -s --verbose --cov-report term-missing --cov-report xml --cov=googledevices tests init: pip install --upgrade pip pipenv pipenv lock @@ -7,7 +5,7 @@ init: lint: pipenv run flake8 googledevices pipenv run pydocstyle googledevices - pipenv run pylint googledevices + pipenv run pylint --disable=R0205,R0903,I1101,R0801 googledevices publish: pipenv run python setup.py sdist bdist_wheel pipenv run twine upload dist/* From aac7e5d0bab367531aec0f7e8c9e94ba5ef078f9 Mon Sep 17 00:00:00 2001 From: ludeeus Date: Mon, 3 Dec 2018 19:12:49 +0100 Subject: [PATCH 3/6] inst uipdate --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index a28000d..b59a4e3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ init: pip install --upgrade pip pipenv + pip install --upgrade flake8 pydocstyle pylint pipenv lock pipenv install --dev lint: From 128562d48e82d1785dcbc6910bf4a9b1f26918c9 Mon Sep 17 00:00:00 2001 From: ludeeus Date: Mon, 3 Dec 2018 19:17:27 +0100 Subject: [PATCH 4/6] cleanup --- .codeclimate.yml | 3 +-- Makefile | 5 ----- Pipfile | 11 ++++------- tox.ini | 31 ------------------------------- 4 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 tox.ini diff --git a/.codeclimate.yml b/.codeclimate.yml index c993788..0f8701f 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -13,5 +13,4 @@ ratings: paths: - "**.py" exclude_paths: - - dist/ - - docs/ \ No newline at end of file + - dist/ \ No newline at end of file diff --git a/Makefile b/Makefile index b59a4e3..ff08d2e 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,11 @@ init: pip install --upgrade pip pipenv - pip install --upgrade flake8 pydocstyle pylint pipenv lock pipenv install --dev lint: pipenv run flake8 googledevices pipenv run pydocstyle googledevices pipenv run pylint --disable=R0205,R0903,I1101,R0801 googledevices -publish: - pipenv run python setup.py sdist bdist_wheel - pipenv run twine upload dist/* - rm -rf dist/ build/ .egg googledevices.egg-info/ test: pipenv run py.test typing: diff --git a/Pipfile b/Pipfile index dcfcba6..03692b0 100644 --- a/Pipfile +++ b/Pipfile @@ -4,17 +4,14 @@ verify_ssl = true [dev-packages] "flake8" = "*" -aresponses = "*" -detox = "*" mypy = "*" pydocstyle = "*" pylint = "*" pytest-aiohttp = "*" -pytest-cov = "*" -tox = "*" -twine = "*" + [packages] -aiodns = "*" aiohttp = "*" -async-timeout = "*" \ No newline at end of file +async-timeout = "*" +click = "*" +netifaces = "*" \ No newline at end of file diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 47e2611..0000000 --- a/tox.ini +++ /dev/null @@ -1,31 +0,0 @@ -[tox] -envlist = py36, py37, py38, cov, lint, typing -skip_missing_interpreters = True - -[testenv] -whitelist_externals = make -deps = pipenv -commands= - make init - make test - -[testenv:cov] -whitelist_externals = make -deps = pipenv -commands= - make init - make coverage - -[testenv:lint] -whitelist_externals = make -deps = pipenv -commands= - make init - make lint - -[testenv:typing] -whitelist_externals = make -deps = pipenv -commands= - make init - make typing \ No newline at end of file From ea4febc10034ef0149d988ad930ce0defb6beb17 Mon Sep 17 00:00:00 2001 From: ludeeus Date: Mon, 3 Dec 2018 19:33:29 +0100 Subject: [PATCH 5/6] adds maintainability --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c543054..73710c4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# googledevices [![Build Status][travis_status]][travis] [![PyPI version][pypi_badge]][pypi] +# googledevices + +[![Build Status][travis_status]][travis] +[![PyPI version][pypi_badge]][pypi] +[![Maintainability][maintainability-badge]][maintainability-url] _API wrapper for Google devices written in Python._ @@ -57,6 +61,8 @@ _This is not affiliated, associated, authorized, endorsed by, or in any way offi [eliseomartelli]: https://github.com/eliseomartelli [GHLocalApi]: https://github.com/rithvikvibhu/GHLocalApi [ludeeus]: https://github.com/ludeeus +[maintainability-badge]: https://api.codeclimate.com/v1/badges/7c88f618d3668ac24a22/maintainability +[maintainability-url]: https://codeclimate.com/github/ludeeus/googledevices/maintainability [travis]: https://travis-ci.com/ludeeus/googledevices [travis_status]: https://travis-ci.com/ludeeus/googledevices.svg?branch=master [pypi]:https://pypi.org/project/googledevices/ From babdefdf09dc3400974a627b61e4e4082e9b3c36 Mon Sep 17 00:00:00 2001 From: ludeeus Date: Mon, 3 Dec 2018 19:39:28 +0100 Subject: [PATCH 6/6] contrib desc --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 73710c4..d0f95b3 100644 --- a/README.md +++ b/README.md @@ -57,13 +57,29 @@ username@hostname:~$ googledevices scan-network _This is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [Alphabet][alphabet], or any of its subsidiaries or its affiliates. The name "Google" as well as related names, marks, emblems and images are registered trademarks of [Alphabet][alphabet]._ + +## Contributing + +1. [Check for open features/bugs][issues] + or [initiate a discussion on one][issues-new]. +2. [Fork the repository][fork]. +3. Install the dev environment: `make init`. +4. Enter the virtual environment: `pipenv shell` +5. Code your new feature or bug fix. +6. Run `make lint` and make sure the score still is `10.00/10` +7. Submit a [pull request][pull-request]! + [alphabet]: https://abc.xyz/ [eliseomartelli]: https://github.com/eliseomartelli +[fork]: https://github.com/ludeeus/googledevices/fork [GHLocalApi]: https://github.com/rithvikvibhu/GHLocalApi +[issues]: https://github.com/ludeeus/googledevices/issues +[issues-new]: https://github.com/ludeeus/googledevices/issues/new [ludeeus]: https://github.com/ludeeus [maintainability-badge]: https://api.codeclimate.com/v1/badges/7c88f618d3668ac24a22/maintainability [maintainability-url]: https://codeclimate.com/github/ludeeus/googledevices/maintainability [travis]: https://travis-ci.com/ludeeus/googledevices [travis_status]: https://travis-ci.com/ludeeus/googledevices.svg?branch=master +[pull-request]: https://github.com/ludeeus/googledevices/compare [pypi]:https://pypi.org/project/googledevices/ [pypi_badge]: https://badge.fury.io/py/googledevices.svg \ No newline at end of file