Skip to content

Commit

Permalink
docs: improve install suggestions (#149)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Oct 20, 2023
1 parent ce7e303 commit 8af6298
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 19 deletions.
38 changes: 23 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,40 @@ mean this rule is followed, red x’s mean the rule is not. A yellow warning sig
means that the check was skipped because a previous required check failed. Four
output formats are supported; `rich`, `svg`, `html`, and `json`.

`sp-repo-review` provides checks based on the
[Scientific-Python Development Guide][] at [scientific-python/cookie][]. A live
WebAssembly demo using [sp-repo-review][] is
[here][repo-review-demo].
## Plugins

These are some known plugins. Feel free to request your plugin be added to this
list.

- [sp-repo-review][]: Checks based on the [Scientific-Python Development Guide][] at [scientific-python/cookie][].
- [validate-pyproject][]: Adds a check to validate pyproject sections, also supports plugins.

`repo-review` itself also acts as a plugin for [validate-pyproject][], allowing
you to validate the `[tool.repo-review]` section of your `pyproject.toml`.

A live WebAssembly demo using [sp-repo-review][] and [validate-pyproject][] is
[available here][repo-review-demo].

## Running repo-review

Repo-review supports running multiple ways:

- [From the command line][cli] on a local folder (or multiple folders)
- [From the command line][cli] on a local folder (or multiple folders).
- From the command line on a remote repository on GitHub (`gh:org/repo@branch`)
- [From WebAssembly][webapp] in [Pyodide][] (example in `docs/index.html`)
- [From pre-commit][intro-pre-commit] (see caveats there)
- [From GitHub Actions][intro-github-actions]
- [From Python][programmatic-usage]

When installing, make sure you also install at least one plugin, as
`repo-review` has no integrated checks. If you are using the command line
interface, make sure you include the `cli` extra (`repo-review[cli]`). Some
plugins, like `sp-repo-review`, support running directly, such as:

```bash
pipx run sp-repo-review[cli] <args>
```

If the root of a package is not the repository root, pass `--package-dir a/b/c`.

## Configuration
Expand Down Expand Up @@ -110,16 +128,6 @@ Checks are organized by [Families][]. A plugin can customize the display name,
change the sort order, and add an optional (dynamic) description. Like the other
collection functions, the family entry-point also supports fixtures.

## Plugins

Feel free to request your plugin be added to this list.

- [sp-repo-review][]: Checks based on the [Scientific-Python Development Guide][].
- [validate-pyproject][]: Adds a check to validate pyproject sections, also supports plugins.

`repo-review` itself also acts as a plugin for [validate-pyproject][], allowing
you to validate the `[tool.repo-review]` section of your `pyproject.toml`.

## Links

This project inspired [Try-PyHF](https://kratsg.github.io/try-pyhf/), an
Expand Down
21 changes: 17 additions & 4 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,28 @@ want to run a single plugin that depends on repo-review, then the easiest way
to use it is:

```bash
pipx run sp-repo-review .
pipx run <plugin-name>[cli] .
```

This uses [pipx][] (pip for executables) to download the plugin and all of it's
dependencies (including repo-review itself) into a temporary virtual
environment (cached for a week), then runs it.
environment (cached for a week), then runs it. For example:

Any other way you like installing things works too, including `pipx install`
and `pip install`.
```bash
pipx run sp-repo-review[cli] .
```

You can also use pipx install:

```bash
pipx install repo-review[cli]
pipx inject repo-review <plugin(s)>
repo-review .
```

Any other way you like installing things works too, including `pip install`.
Remember the `[cli]` extra if you are using the command line
interface.

Plugins are also encouraged to support pre-commit and GitHub Actions.

Expand Down

0 comments on commit 8af6298

Please sign in to comment.