repo-review 0.12.0__tar.gz → 0.12.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {repo_review-0.12.0 → repo_review-0.12.1}/PKG-INFO +1 -1
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/index.html +2 -2
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/webapp.js +9 -5
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/_version.py +2 -2
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/html.py +5 -8
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/processor.py +21 -1
- {repo_review-0.12.0 → repo_review-0.12.1}/.devcontainer/devcontainer.json +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.git_archival.txt +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.gitattributes +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.github/CONTRIBUTING.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.github/ISSUE_TEMPLATE/new-issue.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.github/dependabot.yml +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.github/release.yml +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.github/workflows/cd.yml +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.github/workflows/ci.yml +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.gitignore +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.pre-commit-config.yaml +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.pre-commit-hooks.yaml +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/.readthedocs.yaml +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/LICENSE +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/README.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/action.yml +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/.nojekyll +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/api/repo_review.resources.rst +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/api/repo_review.rst +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/changelog.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/checks.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/cli.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/conf.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/families.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/fixtures.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/index.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/intro.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/plugins.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/programmatic.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/docs/webapp.md +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/pyproject.toml +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/__init__.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/__main__.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/_compat/__init__.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/_compat/importlib/__init__.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/_compat/importlib/resources/__init__.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/_compat/importlib/resources/abc.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/_compat/tomllib.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/_compat/typing.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/_version.pyi +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/checks.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/families.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/fixtures.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/ghpath.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/py.typed +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/resources/__init__.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/resources/repo-review.schema.json +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/schema.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/testing.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/tests/conftest.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/tests/test_checks.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/tests/test_cmd.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/tests/test_depends.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/tests/test_families.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/tests/test_fixtures.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/tests/test_multi.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/tests/test_package.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/tests/test_self.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/tests/test_utilities/pyproject.py +0 -0
- {repo_review-0.12.0 → repo_review-0.12.1}/tests/test_utilities/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: repo_review
|
3
|
-
Version: 0.12.
|
3
|
+
Version: 0.12.1
|
4
4
|
Summary: Framework that can run checks on repos
|
5
5
|
Project-URL: Changelog, https://github.com/scientific-python/repo-review/releases
|
6
6
|
Project-URL: Demo, https://scientific-python.github.io/repo-review
|
@@ -64,9 +64,9 @@
|
|
64
64
|
<App
|
65
65
|
header={true}
|
66
66
|
deps={[
|
67
|
-
"repo-review~=0.
|
67
|
+
"repo-review~=0.12.0",
|
68
68
|
"sp-repo-review==2025.01.22",
|
69
|
-
"validate-pyproject-schema-store==2025.
|
69
|
+
"validate-pyproject-schema-store==2025.02.03",
|
70
70
|
"validate-pyproject[all]~=0.22.0",
|
71
71
|
]}
|
72
72
|
/>,
|
@@ -93,7 +93,7 @@ function Results(props) {
|
|
93
93
|
variant="body2"
|
94
94
|
color="text.disabled"
|
95
95
|
>
|
96
|
-
{
|
96
|
+
{` [skipped] ${result.skip_reason}`}
|
97
97
|
</MaterialUI.Typography>
|
98
98
|
);
|
99
99
|
const msg = (
|
@@ -200,6 +200,7 @@ class App extends React.Component {
|
|
200
200
|
msg: `<p>${DEFAULT_MSG}</p><h4>Packages:</h4> ${deps_str}`,
|
201
201
|
progress: false,
|
202
202
|
err_msg: "",
|
203
|
+
skip_reason: "",
|
203
204
|
url: "",
|
204
205
|
};
|
205
206
|
this.pyodide_promise = prepare_pyodide(props.deps);
|
@@ -231,15 +232,17 @@ class App extends React.Component {
|
|
231
232
|
families_checks = pyodide.runPython(`
|
232
233
|
from repo_review.processor import process, md_as_html
|
233
234
|
from repo_review.ghpath import GHPath
|
235
|
+
from dataclasses import replace
|
234
236
|
|
235
237
|
package = GHPath(repo="${state.repo}", branch="${state.branch}")
|
236
|
-
|
238
|
+
families, checks = process(package)
|
237
239
|
|
238
|
-
for v in
|
240
|
+
for v in families.values():
|
239
241
|
if v.get("description"):
|
240
242
|
v["description"] = md_as_html(v["description"])
|
243
|
+
checks = [replace(v, err_msg=md_as_html(v.err_msg), skip_reason=md_as_html(v.skip_reason)) for v in checks]
|
241
244
|
|
242
|
-
|
245
|
+
(families, checks)
|
243
246
|
`);
|
244
247
|
} catch (e) {
|
245
248
|
if (e.message.includes("KeyError: 'tree'")) {
|
@@ -276,8 +279,9 @@ class App extends React.Component {
|
|
276
279
|
name: val.name.toString(),
|
277
280
|
description: val.description.toString(),
|
278
281
|
state: val.result,
|
279
|
-
err_msg: val.
|
282
|
+
err_msg: val.err_msg.toString(),
|
280
283
|
url: val.url.toString(),
|
284
|
+
skip_reason: val.skip_reason.toString(),
|
281
285
|
});
|
282
286
|
}
|
283
287
|
|
@@ -6,10 +6,8 @@ import io
|
|
6
6
|
import typing
|
7
7
|
from collections.abc import Mapping, Sequence
|
8
8
|
|
9
|
-
import markdown_it
|
10
|
-
|
11
9
|
from .families import Family, get_family_description, get_family_name
|
12
|
-
from .processor import Result
|
10
|
+
from .processor import Result, md_as_html
|
13
11
|
|
14
12
|
if typing.TYPE_CHECKING:
|
15
13
|
from .__main__ import Status
|
@@ -37,16 +35,15 @@ def to_html(
|
|
37
35
|
"""
|
38
36
|
out = io.StringIO()
|
39
37
|
print = functools.partial(builtins.print, file=out)
|
40
|
-
md = markdown_it.MarkdownIt()
|
41
38
|
|
42
39
|
for family in families:
|
43
40
|
family_name = get_family_name(families, family)
|
44
41
|
family_description = get_family_description(families, family)
|
45
|
-
family_results = [r for r in processed if r.family == family]
|
42
|
+
family_results = [r.md_as_html() for r in processed if r.family == family]
|
46
43
|
if family_results or family_description:
|
47
44
|
print(f"<h3>{family_name}</h3>")
|
48
45
|
if family_description:
|
49
|
-
print(
|
46
|
+
print("<p>", md_as_html(family_description), "</p>")
|
50
47
|
if family_results:
|
51
48
|
print("<table>")
|
52
49
|
print(
|
@@ -82,7 +79,7 @@ def to_html(
|
|
82
79
|
if result.skip_reason:
|
83
80
|
description += (
|
84
81
|
f'<br/><span style="color:DarkKhaki;"><b>Skipped:</b> '
|
85
|
-
f"<em>{
|
82
|
+
f"<em>{result.skip_reason}</em></span>"
|
86
83
|
)
|
87
84
|
print(f'<tr style="color: {color};">')
|
88
85
|
print(f'<td><span role="img" aria-label="{result_txt}">{icon}</span></td>')
|
@@ -93,7 +90,7 @@ def to_html(
|
|
93
90
|
print("<td>")
|
94
91
|
print(description)
|
95
92
|
print("<br/>")
|
96
|
-
print(
|
93
|
+
print(result.err_msg)
|
97
94
|
print("</td>")
|
98
95
|
print("</tr>")
|
99
96
|
if family_results:
|
@@ -3,11 +3,12 @@ from __future__ import annotations
|
|
3
3
|
import copy
|
4
4
|
import dataclasses
|
5
5
|
import graphlib
|
6
|
+
import sys
|
6
7
|
import textwrap
|
7
8
|
import typing
|
8
9
|
import warnings
|
9
10
|
from collections.abc import Mapping, Set
|
10
|
-
from typing import Any, TypeVar
|
11
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
11
12
|
|
12
13
|
import markdown_it
|
13
14
|
|
@@ -24,6 +25,12 @@ from .families import Family, collect_families
|
|
24
25
|
from .fixtures import apply_fixtures, collect_fixtures, compute_fixtures, pyproject
|
25
26
|
from .ghpath import EmptyTraversable
|
26
27
|
|
28
|
+
if TYPE_CHECKING:
|
29
|
+
if sys.version_info >= (3, 11):
|
30
|
+
from typing import Self
|
31
|
+
else:
|
32
|
+
from typing_extensions import Self
|
33
|
+
|
27
34
|
__all__ = [
|
28
35
|
"CollectionReturn",
|
29
36
|
"ProcessReturn",
|
@@ -84,9 +91,22 @@ class Result:
|
|
84
91
|
def err_as_html(self) -> str:
|
85
92
|
"""
|
86
93
|
Produces HTML from the error message, assuming it is in markdown.
|
94
|
+
Deprecated, use :meth:`md_as_html` directly instead.
|
87
95
|
"""
|
88
96
|
return md_as_html(self.err_msg)
|
89
97
|
|
98
|
+
def md_as_html(self) -> Self:
|
99
|
+
"""
|
100
|
+
Process fields that are assumed to be markdown.
|
101
|
+
|
102
|
+
.. versionadded:: 0.12.1
|
103
|
+
"""
|
104
|
+
return dataclasses.replace(
|
105
|
+
self,
|
106
|
+
err_msg=md_as_html(self.err_msg),
|
107
|
+
skip_reason=md_as_html(self.skip_reason),
|
108
|
+
)
|
109
|
+
|
90
110
|
|
91
111
|
class ProcessReturn(typing.NamedTuple):
|
92
112
|
"""
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/_compat/importlib/resources/__init__.py
RENAMED
File without changes
|
{repo_review-0.12.0 → repo_review-0.12.1}/src/repo_review/_compat/importlib/resources/abc.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|