Skip to content

Commit

Permalink
refactor: rename err_markdown to err_as_html (#99)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Jun 14, 2023
1 parent 07f2951 commit 5f42525
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
project = "repo-review"
copyright = "2022, Henry Schreiner"
author = "Henry Schreiner"
release = importlib.metadata.version("repo-review").split("+")[0]
version = ".".join(release.split(".")[:2])
version = importlib.metadata.version("repo-review").split("+")[0]
release = version

extensions = [
"myst_parser",
Expand Down
2 changes: 1 addition & 1 deletion docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ rather than the framework (repo-review).

## GitHub Actions

```
```yaml
- uses: scientific-python/repo-review@<version>
with:
plugins: sp-repo-review
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ docs = [
[project.urls]
Changelog = "https://github.com/scientific-python/repo-review/releases"
Demo = "https://scientific-python.github.io/repo-review"
Documentation = "https://repo-review.readthedocs.io/"
Homepage = "https://repo-review.readthedocs.io/"
Documentation = "https://repo-review.readthedocs.io"
Homepage = "https://repo-review.readthedocs.io"
Source = "https://github.com/scientific-python/repo-review"

[project.scripts]
Expand Down
15 changes: 11 additions & 4 deletions src/repo_review/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import graphlib
import textwrap
import typing
import warnings
from collections.abc import Mapping, Set
from typing import Any, TypeVar

Expand Down Expand Up @@ -58,6 +59,13 @@ class Result:
url: str = "" #: An optional URL (empty string if missing)

def err_markdown(self) -> str:
"""
DEPRECATED: use err_as_html instead.
"""
warnings.warn("Use err_as_html instead", FutureWarning, stacklevel=2)
return self.err_as_html()

def err_as_html(self) -> str:
"""
Produces HTML from the error message, assuming it is in markdown.
"""
Expand Down Expand Up @@ -134,10 +142,9 @@ def process(
"""
Process the package and return a dictionary of results.
:param root: The Path(like) to the repository to process
:param ignore: A list of checks to ignore
:param root: The Traversable to the repository to process.
:param select: A list of checks to select. All checks selected if empty.
:param ignore: A list of checks to ignore.
:param subdir: The path to the package in the subdirectory, if not at the
root of the repository.
Expand Down

0 comments on commit 5f42525

Please sign in to comment.