Package: pytest-repo-health
pytest-repo-health adapts pytest to run repo health checks as described inedx-repo-health.  Similar to how pytest runs a number of test functions,
pytest-repo-health runs a number of repo check functions.It inspects a code repository and outputs a report with info on whether the repository
follows standards as defined by checks.  It’s
a good complement for acookiecutter; the cookiecutter provides a good
template for starting a repository with current best practices, and pytest-repo-health
helps it keep up with those practices as they evolve over time.Thispytestplugin was generated withCookiecutteralong
with@hackebrot’scookiecutter-pytest-plugintemplate.InstallationFor now, you need to git clone pytest-repo-health from:git@github.com:edx/pytest-repo-health.gitYou can install by runningmake requirementsand thenpip install -e .in a Python 3.5+ virtualenv.UsageOnce installed, use this command to run checks:$ pytest -c <() --noconftest --repo-health --repo-health-path <path to dir with checks> --repo-path <path to repo to check>The -c and –noconftest options are needed to stop pytest from incorrectly reading configuration files in the repo you are checking:-c file: load configuration from `file` instead of trying to locate one of the implicit configuration files. Helpful if invocation dir defines "add-opts" in one of its files.

--noconftest: Don't load any conftest.py files. Helpful in case invocation dir/repository has conftest files that change configurations or cause pytest to run unnecessary code.Other pytest options can be used.  For example,-kis helpful for running a subset of checks.The “all_results” dictionary will be written as YAML to repo_health.yaml.Adding Custom ChecksAny repo can host repo checks. They must be in a directory named “repo_health”.If you would like to add custom checks for your own repo, create a dir named “repo_health” and place
modules with checks inside of it.Checks naming convention:python_functions = “check_*”python_files = “check_*.py”Checks DiscoveryPytest will look for checks in these directories, though it will only successfully run checks in the first place it finds them:
- Dir of pytest invocation(so current dir)
- Dir where pytest-repo-health is installed
- Dir specified by –repo-health-path flag in pytest invocationArgsArguments added by plugin:--repo-health: this arg needs to be present for plugin to do anything

--repo-path <dir path> : the path to dir on which to perform checks. If not preset, checks will be performed on current dir

--repo-health-path <dir path>: path to where checks are located. If not preset, plugin will look for checks in current repo

--output-path <file path> : path to where to save resulting checks report

--repo-health-metadata: if this is present, plugin will collect metadata(docs) from checks. You can give filename after flag(if no filename, it defaults to metadata.yaml)Future improvementsCurrently, the checks do not throw any kind of warning or error if check does not pass.Documenting standard reqs/checks in each check better.Create tests for this plugin(currently, you can run these checks on this repo, but no automated method for it)ContributingContributions are very welcome. Tests can be run withtox, please ensure
the coverage at least stays the same before you submit a pull request.LicenseThe code in this repository is licensed under the Apache Software License 2.0 unless
otherwise noted.Please seeLICENSE.txtfor details.How To ContributeContributions are very welcome.Please readHow To Contributefor details.Even though they were written withedx-platformin mind, the guidelines
should be followed for Open edX code in general.The pull request description template should be automatically applied if you are creating a pull request from GitHub.  Otherwise you
can find it it atPULL_REQUEST_TEMPLATE.mdIssuesThe issue report template should be automatically applied if you are creating an issue on GitHub as well.  Otherwise you
can find it atISSUE_TEMPLATE.mdIf you encounter any problems, pleasefile an issuealong with a detailed description.Reporting Security IssuesPlease do not report security issues in public. Please emailsecurity@edx.org.Getting HelpHave a question about this repository, or about Open edX in general?  Please
refer to thislist of resourcesif you need any assistance.