{ "info": { "author": "Gonzalo Pe\u00f1a-Castellanos", "author_email": "goanpeca@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ContinuumIO/ciocheck/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ContinuumIO/ciocheck/?branch=master)\n[![Code Issues](https://www.quantifiedcode.com/api/v1/project/ccc68df612024e7e8fd386ffe2252a95/badge.svg)](https://www.quantifiedcode.com/app/project/ccc68df612024e7e8fd386ffe2252a95)\n\n# ciocheck\nContinuum Analytics linter, formater and test suite helper.\n\n# How does ciocheck work?\n\nIt leverages on the different available linting, formatting and testing tools\navailbale for Python, including:\n\n## Linters\n- [pep8](https://pep8.readthedocs.io/) (Style check for code)\n- [pydocstyle](https://pydocstyle.readthedocs.io/en/latest/) (Style check for docstrings)\n- [flake8](http://flake8.readthedocs.io/en/latest/) (Style check based on [pep8](https://pep8.readthedocs.io/) and [pyflakes](https://github.com/pyflakes/pyflakes))\n- [pylint](https://pylint.readthedocs.io/) (Code quality check)\n\n## Formaters\n- [autopep8](https://github.com/hhatto/autopep8) (Code formater)\n- [yapf](https://github.com/google/yapf) (Code formater)\n- [isort](https://github.com/timothycrosley/isort/) (Import statements formater)\n\n## Test and coverage\n- [pytest-cov](http://pytest-cov.readthedocs.io/en/latest/) (Run code [coverage](http://coverage.readthedocs.io/en/latest) with the [pytest](http://pytest.org/latest/) library)\n\nPlus some extra goodies, like:\n- Single file configuration for all the tools (still working on eliminating\n redundancy)\n- Auto addition of `__init__.py` files for folders containing python files\n- Auto addition of custom encoding and copyright header for python files\n- Run the tools for staged/unstaged or committed diffs only (git support only)\n- Run the tools for modified lines, modified files or all files.\n\n# Why ciocheck?\nThere are many post commit tools out there for testing code quality, but the\nidea of ciocheck is to perform checks and autoformating before a commit-push.\n\n# Example config file\nConfiguration is saved in a single file named `.ciocheck`\n\n```ini\n# -----------------------------------------------------------------------------\n# ciocheck\n# https://github.com/ContinuumIO/ciocheck\n# -----------------------------------------------------------------------------\n[ciocheck]\ninherit_config = .ciocheck\nbranch = origin/master\ndiff_mode = commited\nfile_mode = lines\ncheck = pep8,pydocstyle,flake8,pylint,pyformat,isort,autopep8,yapf,coverage,pytest\nenforce = pep8,pydocstyle,flake8,pylint,pyformat,isort,autopep8,yapf,coverage,pytest\n\n# Python (pyformat)\nheader = # -*- coding: utf-8 -*-\ncopyright_file = '.cioencoding'\nadd_copyright = true\nadd_header = true\nadd_init = true\n\n# -----------------------------------------------------------------------------\n# pep8\n# https://pep8.readthedocs.io/en/release-1.7.x/intro.html#configuration\n# -----------------------------------------------------------------------------\n[pep8]\nexclude = */tests/*\nignore = E126,\nmax-line-length = 79\n\n# -----------------------------------------------------------------------------\n# pydocstyle\n# http://www.pydocstyle.org/en/latest/usage.html#example\n# -----------------------------------------------------------------------------\n[pydocstyle]\nadd-ignore = D203,\ninherit = false\n\n# -----------------------------------------------------------------------------\n# Flake 8\n# http://flake8.readthedocs.io/en/latest/config.html\n# -----------------------------------------------------------------------------\n[flake8]\nexclude = */tests/*\nignore = E126,\nmax-line-length = 79\nmax-complexity = 64\n\n# -----------------------------------------------------------------------------\n# pylint\n# https://pylint.readthedocs.io/en/latest/\n# -----------------------------------------------------------------------------\n#[pylint:messages]\n\n# -----------------------------------------------------------------------------\n# isort\n# https://github.com/timothycrosley/isort/wiki/isort-Settings\n# -----------------------------------------------------------------------------\n[isort]\nfrom_first = true\nimport_heading_stdlib = Standard library imports\nimport_heading_firstparty = Local imports\nimport_heading_thirdparty = Third party imports\nindent = ' '\nknown_first_party = ciocheck\nknown_third_party = six,pytest,autopep8,yapf,pylint\nline_length = 79\nsections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER\n\n# -----------------------------------------------------------------------------\n# YAPF\n# https://github.com/google/yapf#formatting-style\n# -----------------------------------------------------------------------------\n[yapf:style]\nbased_on_style = pep8\ncolumn_limit = 79\nspaces_before_comment = 2\n\n# -----------------------------------------------------------------------------\n# autopep8\n# http://pep8.readthedocs.io/en/latest/intro.html#configuration\n# -----------------------------------------------------------------------------\n[autopep8]\nexclude = */tests/*\nignore = E126,\nmax-line-length = 99\naggressive = 0\n\n# -----------------------------------------------------------------------------\n# Coverage\n# http://coverage.readthedocs.io/en/latest/config.html\n# -----------------------------------------------------------------------------\n[coverage:run]\nomit =\n */tests/*\n\n[coverage:report]\nfail_under = 0\nshow_missing = true\nskip_covered = true\nexclude_lines =\n # Have to re-enable the standard pragma\n pragma: no cover\n # Ignore local file testing\n def test():\n if __name__ == .__main__.:\n\n# -----------------------------------------------------------------------------\n# pytest\n# http://doc.pytest.org/en/latest/usage.html\n# -----------------------------------------------------------------------------\n[pytest]\naddopts = -rfew --durations=10\npython_functions = test_*\n```\n\n# Usage\n\n```bash\nusage: ciocheck [-h] [--disable-formatters] [--disable-linters]\n [--disable-tests] [--file-mode {lines,files,all}]\n [--diff-mode {commited,staged,unstaged}] [--branch BRANCH]\n [--check {pep8,pydocstyle,flake8,pylint,pyformat,isort,yapf,autopep8,coverage,pytest} [{pep8,pydocstyle,flake8,pylint,pyformat,isort,yapf,autopep8,coverage,pytest} ...]]\n [--enforce {pep8,pydocstyle,flake8,pylint,pyformat,isort,yapf,autopep8,coverage,pytest} [{pep8,pydocstyle,flake8,pylint,pyformat,isort,yapf,autopep8,coverage,pytest} ...]]\n [--config CONFIG_FILE]\n folders [folders ...]\n\nRun Continuum Analytics test suite.\n\npositional arguments:\n folder Folder to analize. Use from repo root.'\n\noptional arguments:\n --help, -h Show this help message and exit\n\n --disable-formatters, -df Skip all configured formatters\n\n --disable-linters, -dl Skip all configured linters\n\n --disable-tests, -dt Skip running tests\n\n --file-mode, -fm {lines,files,all}\n Define if the tool should run on modified lines of\n files (default), modified files or all files\n\n --diff-mode, -dm {commited,staged,unstaged}\n Define diff mode. Default mode is commited.\n\n --branch, -b BRANCH Define branch to compare to. Default branch is\n \"origin/master\"\n\n --check, -c {pep8,pydocstyle,flake8,pylint,pyformat,isort,yapf,autopep8,coverage,pytest}\n Select tools to run. Default is \"pep8\"\n\n --enforce, -e {pep8,pydocstyle,flake8,pylint,pyformat,isort,yapf,autopep8,coverage,pytest}\n Select tools to enforce. Enforced tools will fail if a\n result is obtained. Default is none.\n\n --config, -cf CONFIG_FILE Select a config file to use. Default is none.\n\n```\n\nCheck format of imports only in `some_module`.\n\nUse ciocheck from the root of the git repo (for now...).\n\n```bash\n$ ciocheck some_module/\n```", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "ciocheck", "package_url": "https://pypi.org/project/ciocheck/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ciocheck/", "project_urls": { "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/ciocheck/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Continuum IO check/test suite", "version": "0.1.1" }, "last_serial": 2424740, "releases": { "0.1.1": [] }, "urls": [] }