Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address repo-review comments #264

Open
dcherian opened this issue Sep 27, 2023 · 0 comments
Open

Address repo-review comments #264

dcherian opened this issue Sep 27, 2023 · 0 comments

Comments

@dcherian
Copy link
Collaborator

dcherian commented Sep 27, 2023

General

  • Detected build backend: setuptools.build_meta
  • Detected license(s): Apache Software License
?NameDescription
PY007 Supports an easy task runner (nox or tox)

Projects must have a noxfile.py or tox.ini to encourage new contributors.

PyProject

?NameDescription
PP304 Sets the log level in pytest

log_cli_level should be set. This will allow logs to be displayed on failures.

[tool.pytest.ini_options]
log_cli_level = "INFO"
PP305 Specifies xfail_strict

xfail_strict should be set. You can manually specify if a check should be strict when setting each xfail.

[tool.pytest.ini_options]
xfail_strict = true
PP306 Specifies strict config

--strict-config should be in addopts = [...]. This forces an error if a config setting is misspelled.

[tool.pytest.ini_options]
addops = ["-ra", "--strict-config", "--strict-markers"]
PP307 Specifies strict markers

--strict-markers should be in addopts = [...]. This forces all markers to be specified in config, avoiding misspellings.

[tool.pytest.ini_options]
addops = ["-ra", "--strict-config", "--strict-markers"]
PP308 Specifies useful pytest summary

-ra should be in addopts = [...] (print summary of all fails/errors).

[tool.pytest.ini_options]
addops = ["-ra", "--strict-config", "--strict-markers"]
PP309 Filter warnings specified

filterwarnings must be set (probably to at least ["error"]). Python will hide important warnings otherwise, like deprecations.

[tool.pytest.ini_options]
filterwarnings = ["error"]

Pre-commit

?NameDescription
PC111 Uses blacken-docs

Must have https://github.com/adamchainz/blacken-docs repo in .pre-commit-config.yaml

PC140 Uses mypy

Must have https://github.com/pre-commit/mirrors-mypy repo in .pre-commit-config.yaml

PC170 Uses PyGrep hooks (only needed if RST present)

Must have https://github.com/pre-commit/pygrep-hooks repo in .pre-commit-config.yaml

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
MY101 MyPy strict mode

Must have strict in the mypy config. MyPy is best with strict or nearly strict configuration. If you are happy with the strictness of your settings already, ignore this check or set strict = false explicitly.

[tool.mypy]
strict = true

Ruff

?NameDescription
RF101 Bugbear must be selected

Must select the flake8-bugbear B checks. Recommended:

[tool.ruff]
select = [
  "B",  # flake8-bugbear
]
dcherian added a commit that referenced this issue Oct 4, 2023
dcherian added a commit that referenced this issue Oct 11, 2023
* repo-review comments

xref #264

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update pyproject.toml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant