Skip to content

Commit

Permalink
chore: clean up pre-commit update job a little (#316)
Browse files Browse the repository at this point in the history
* chore: bump versions in webapp

Signed-off-by: Henry Schreiner <[email protected]>

* chore: simplify pc update

Signed-off-by: Henry Schreiner <[email protected]>

* Apply suggestions from code review

---------

Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Nov 17, 2023
1 parent 914008d commit acb5611
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ repos:
- types-PyYAML

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
rev: "v3.1.0"
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
Expand Down
6 changes: 3 additions & 3 deletions docs/_includes/interactive_repo_review.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<App
header={false}
deps={[
"sp-repo-review==2023.10.27",
"repo-review==0.10.0",
"sp-repo-review==2023.11.17",
"repo-review==0.10.1",
"validate-pyproject==0.15",
"scikit-build-core==0.6.0",
"scikit-build-core==0.6.1",
"cibuildwheel==2.16.2",
]}
/>,
Expand Down
12 changes: 6 additions & 6 deletions docs/assets/js/webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ function Results(props) {
result.state === false
? "error.main"
: result.state === true
? "text.primary"
: "info.main";
? "text.primary"
: "info.main";
const details =
result.state === false ? (
<span dangerouslySetInnerHTML={{ __html: result.err_msg }} />
Expand All @@ -75,15 +75,15 @@ function Results(props) {
result.state === false
? "error"
: result.state === true
? "success"
: "info";
? "success"
: "info";
const icon = (
<MaterialUI.Icon color={color}>
{result.state === false
? "report"
: result.state === true
? "check_box"
: "info"}
? "check_box"
: "info"}
</MaterialUI.Icon>
);

Expand Down
6 changes: 3 additions & 3 deletions docs/pages/guides/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ use the manual stage, it's opt-in instead of automatic.

```yaml
- repo: https://github.com/hadialqattan/pycln
rev: "v2.3.0"
rev: "v2.4.0"
hooks:
- id: pycln
args: [--all]
Expand Down Expand Up @@ -741,7 +741,7 @@ following pre-commit config:

```yaml
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v17.0.4"
rev: "v17.0.5"
hooks:
- id: clang-format
types_or: [c++, c, cuda]
Expand Down Expand Up @@ -770,7 +770,7 @@ number of different file types. An example of usage:

```yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
rev: "v3.1.0"
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
Expand Down
10 changes: 3 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,11 @@ def pc_bump(session: nox.Session) -> None:

for proj, (old_version, space) in old_versions.items():
if proj not in versions:
versions[proj] = session.run("lastversion", proj, silent=True).strip()
versions[proj] = session.run(
"lastversion", "--at=github", "--format=tag", proj, silent=True
).strip()
new_version = versions[proj]

if old_version.lstrip("v") == new_version:
continue

if old_version.startswith("v"):
new_version = f"v{new_version}"

before = PC_REPL_LINE.format(proj, old_version, space)
after = PC_REPL_LINE.format(proj, new_version, space)

Expand Down
4 changes: 2 additions & 2 deletions {{cookiecutter.project_name}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
rev: "v3.1.0"
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
Expand All @@ -63,7 +63,7 @@ repos:
{%- if cookiecutter.backend in ["pybind11", "skbuild", "mesonpy"] %}

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v17.0.4"
rev: "v17.0.5"
hooks:
- id: clang-format
types_or: [c++, c, cuda]
Expand Down

0 comments on commit acb5611

Please sign in to comment.