repo-review icon indicating copy to clipboard operation
repo-review copied to clipboard

Ability to run on (list of) github organisations.

Open Carreau opened this issue 8 months ago • 2 comments

I'd like to run this massively, but listing the packages is annoying, have you thought of ability to pass the name (url), or github org, and run on all repos ?

Carreau avatar Apr 02 '25 11:04 Carreau

How would you handle the branches? HEAD would work, I suppose. I've added support for multiple repos at a time, so it should be possible, but most of the time you'd still need to filter the runs at least a little. Something like all-repos would probably what you'd want anyway, where you have some configuration.

Something like this already works:

gh api /orgs/scikit-build/repos --paginate --jq '[.[] | "gh:\(.full_name)@HEAD"][]'
# Pick out the ones that matter
# pipe into xargs or copy-paste:
uvx sp-repo-review[all] --format=html gh:scikit-build/scikit-build@HEAD gh:scikit-build/scikit-build-core@HEAD

Output:

scikit-build/scikit-build

: (4 failed)

General

  • Detected build backend: hatchling.build
  • Detected license(s): MIT License
?NameDescription
PY001 Has a pyproject.toml
PY002 Has a README.(md|rst) file
PY003 Has a LICENSE* file
PY004 Has docs folder
PY005 Has tests folder
PY006 Has pre-commit config
PY007 Supports an easy task runner (nox, tox, pixi, etc.)

PyProject

?NameDescription
PP002 Has a proper build-system table
PP003 Does not list wheel as a build-dep
PP004 Does not upper cap Python requires
⚠️ PP005 Using SPDX project.license should not use deprecated trove classifiers
PP301 Has pytest in pyproject
PP302 Sets a minimum pytest to at least 6
PP303 Sets the test paths
PP304 Sets the log level in pytest
PP305 Specifies xfail_strict
PP306 Specifies strict config
PP307 Specifies strict markers
PP308 Specifies useful pytest summary
PP309 Filter warnings specified

GitHub Actions

?NameDescription
GH100 Has GitHub Actions config
GH101 Has nice names
GH102 Auto-cancel on repeated PRs
GH103 At least one workflow with manual dispatch trigger
GH104 Use unique names for upload-artifact
GH200 Maintained by Dependabot
GH210 Maintains the GitHub action versions with Dependabot
GH211 Do not pin core actions as major versions
GH212 Require GHA update grouping

Pre-commit

?NameDescription
PC100 Has pre-commit-hooks
PC110 Uses black or ruff-format
PC111 Uses blacken-docs
PC140 Uses a type checker
PC160 Uses a spell checker
PC170 Uses PyGrep hooks (only needed if rST present)
PC180 Uses a markdown formatter
Must have one of https://github.com/executablebooks/mdformat, https://github.com/hukkin/mdformat, https://github.com/rbubley/mirrors-prettier in .pre-commit-config.yaml
PC190 Uses Ruff
PC191 Ruff show fixes if fixes enabled
PC901 Custom pre-commit CI message
Should have something like this in .pre-commit-config.yaml:
ci:
  autoupdate_commit_msg: 'chore: update pre-commit hooks'

MyPy

?NameDescription
MY100 Uses MyPy (pyproject config)
MY101 MyPy strict mode
MY102 MyPy show_error_codes deprecated
MY103 MyPy warn unreachable
Must have warn_unreachable (true/false) to pass this check. There are occasionally false positives (often due to platform or Python version static checks), so it's okay to set it to false if you need to. But try it first - it can catch real bugs too.
[tool.mypy]
warn_unreachable = true
MY104 MyPy enables ignore-without-code
MY105 MyPy enables redundant-expr
MY106 MyPy enables truthy-bool

Ruff

?NameDescription
RF001 Has Ruff config
RF002 Target version must be set
⚠️ RF003 src directory doesn't need to be specified anymore (0.6+)
RF101 Bugbear must be selected
RF102 isort must be selected
RF103 pyupgrade must be selected
RF201 Avoid using deprecated config settings
RF202 Use (new) lint config section

Documentation

?NameDescription
RTD100 Uses ReadTheDocs (pyproject config)
RTD101 You have to set the RTD version number to 2
RTD102 You have to set the RTD build image
RTD103 You have to set the RTD python version
RTD104 You have to specify a build configuration now for readthedocs.

Setuptools Config

?NameDescription
⚠️ SCFG001 Avoid deprecated setup.cfg names

Validate-PyProject

Checks [build-system], [project], [tool.black], [tool.cibuildwheel], [tool.hatch], [tool.maturin], [tool.mypy], [tool.pdm], [tool.poe], [tool.poetry], [tool.pyright], [tool.pytest], [tool.repo-review], [tool.ruff], [tool.scikit-build], [tool.setuptools_scm], [tool.taskipy], [tool.tombi], [tool.tox], [tool.uv], [tool.setuptools]

?NameDescription
VPP001 Validate pyproject.toml
Invalid pyproject.toml! Error: tool.pytest.ini_options.log_cli_level must be valid exactly by one definition (0 matches found):
- {type: integer, minimum: 0}
- {type: string, one of: ['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG', 'NOTSET']}
- {type: string, deprecated: True, one of: ['FATAL', 'WARN']}

scikit-build/scikit-build-core

: (all passed)

General

  • Detected build backend: hatchling.build
  • Detected license(s): Apache Software License
?NameDescription
PY001 Has a pyproject.toml
PY002 Has a README.(md|rst) file
PY003 Has a LICENSE* file
PY004 Has docs folder
PY005 Has tests folder
PY006 Has pre-commit config
PY007 Supports an easy task runner (nox, tox, pixi, etc.)

PyProject

?NameDescription
PP002 Has a proper build-system table
PP003 Does not list wheel as a build-dep
PP004 Does not upper cap Python requires
⚠️ PP005 Using SPDX project.license should not use deprecated trove classifiers
PP301 Has pytest in pyproject
PP302 Sets a minimum pytest to at least 6
PP303 Sets the test paths
PP304 Sets the log level in pytest
PP305 Specifies xfail_strict
PP306 Specifies strict config
PP307 Specifies strict markers
PP308 Specifies useful pytest summary
PP309 Filter warnings specified

GitHub Actions

?NameDescription
GH100 Has GitHub Actions config
GH101 Has nice names
GH102 Auto-cancel on repeated PRs
GH103 At least one workflow with manual dispatch trigger
GH104 Use unique names for upload-artifact
GH200 Maintained by Dependabot
GH210 Maintains the GitHub action versions with Dependabot
GH211 Do not pin core actions as major versions
GH212 Require GHA update grouping

Pre-commit

?NameDescription
PC100 Has pre-commit-hooks
PC110 Uses black or ruff-format
PC111 Uses blacken-docs
PC140 Uses a type checker
PC160 Uses a spell checker
PC170 Uses PyGrep hooks (only needed if rST present)
PC180 Uses a markdown formatter
PC190 Uses Ruff
PC191 Ruff show fixes if fixes enabled
PC901 Custom pre-commit CI message

MyPy

?NameDescription
MY100 Uses MyPy (pyproject config)
MY101 MyPy strict mode
MY102 MyPy show_error_codes deprecated
MY103 MyPy warn unreachable
MY104 MyPy enables ignore-without-code
MY105 MyPy enables redundant-expr
MY106 MyPy enables truthy-bool

Ruff

?NameDescription
RF001 Has Ruff config
RF002 Target version must be set
RF003 src directory doesn't need to be specified anymore (0.6+)
RF101 Bugbear must be selected
RF102 isort must be selected
RF103 pyupgrade must be selected
RF201 Avoid using deprecated config settings
RF202 Use (new) lint config section

Documentation

?NameDescription
RTD100 Uses ReadTheDocs (pyproject config)
RTD101 You have to set the RTD version number to 2
RTD102 You have to set the RTD build image
RTD103 You have to set the RTD python version
RTD104 You have to specify a build configuration now for readthedocs.

Setuptools Config

?NameDescription
⚠️ SCFG001 Avoid deprecated setup.cfg names

Validate-PyProject

Checks [build-system], [project], [tool.black], [tool.cibuildwheel], [tool.hatch], [tool.maturin], [tool.mypy], [tool.pdm], [tool.poe], [tool.poetry], [tool.pyright], [tool.pytest], [tool.repo-review], [tool.ruff], [tool.scikit-build], [tool.setuptools_scm], [tool.taskipy], [tool.tombi], [tool.tox], [tool.uv], [tool.setuptools]

?NameDescription
VPP001 Validate pyproject.toml

henryiii avatar May 12 '25 04:05 henryiii

Note to self: if you get a 404, it doesn't print out info, let's add a note to the exception. :)

henryiii avatar May 12 '25 04:05 henryiii