From 12fbcaeed97bd33a9d4ba997a4809080933017d2 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 9 Jun 2020 16:46:04 -0300 Subject: [PATCH 1/2] add interrogate to inspect docstrings --- .pre-commit-config.yaml | 10 +++++++++- pyproject.toml | 13 +++++++++++++ requirements-dev.txt | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d93aec8..f0bec03 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,12 @@ repos: + +- repo: https://github.com/econchick/interrogate + rev: 1.2.0 + hooks: + - id: interrogate + exclude: ^(docs|setup.py|tests) + args: [--config=pyproject.toml] + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.1.0 hooks: @@ -25,7 +33,7 @@ repos: hooks: - id: isort additional_dependencies: [toml] - args: [--project=mymodule, --multi-line=3, --lines-after-imports=2, --lines-between-types=1, --trailing-comma, --force-grid-wrap=0, --use-parentheses, --line-width=88] + args: [--project=ioos_pkg_skeleton, --multi-line=3, --lines-after-imports=2, --lines-between-types=1, --trailing-comma, --force-grid-wrap=0, --use-parentheses, --line-width=88] - repo: https://github.com/asottile/seed-isort-config rev: v2.1.1 diff --git a/pyproject.toml b/pyproject.toml index cc6f2c6..feed8b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,16 @@ [build-system] requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"] build-backend = "setuptools.build_meta" + +[tool.interrogate] +ignore-init-method = true +ignore-init-module = false +ignore-magic = false +ignore-semiprivate = false +ignore-private = false +ignore-module = false +fail-under = 95 +exclude = ["setup.py", "docs", "tests"] +verbose = 1 +quiet = false +color = true diff --git a/requirements-dev.txt b/requirements-dev.txt index a4e12ae..52b2fc6 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,6 +6,7 @@ flake8-builtins flake8-comprehensions flake8-mutable flake8-print +interrogate isort nbsphinx pre-commit From 3a52ff563778180f603bc35d81d03dad45484e2a Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 9 Jun 2020 17:28:05 -0300 Subject: [PATCH 2/2] add docstring --- ioos_pkg_skeleton/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ioos_pkg_skeleton/__init__.py b/ioos_pkg_skeleton/__init__.py index 4a3a2ac..8c8a97c 100644 --- a/ioos_pkg_skeleton/__init__.py +++ b/ioos_pkg_skeleton/__init__.py @@ -1,3 +1,7 @@ +""" +ioos_pkg_skeleton is not a reak package, just a set of best practices examples. +""" + from ioos_pkg_skeleton.ioos_pkg_skeleton import meaning_of_life, meaning_of_life_url