|
| 1 | +[build-system] |
| 2 | +requires = ["hatchling"] |
| 3 | +build-backend = "hatchling.build" |
| 4 | + |
| 5 | + |
| 6 | +[project] |
| 7 | +name = "sp_repo_review" |
| 8 | +authors = [ |
| 9 | + { name = "Henry Schreiner", email = "henryfs@princeton.edu" }, |
| 10 | +] |
| 11 | +license = { file = "LICENSE" } |
| 12 | +description = "Review repos for compliance to the Scientific-Python development guidelines" |
| 13 | +readme = "README.md" |
| 14 | +requires-python = ">=3.10" |
| 15 | +classifiers = [ |
| 16 | + "License :: OSI Approved :: BSD License", |
| 17 | + "Topic :: Scientific/Engineering", |
| 18 | + "Intended Audience :: Science/Research", |
| 19 | + "Intended Audience :: Developers", |
| 20 | + "Operating System :: OS Independent", |
| 21 | + "License :: OSI Approved :: BSD License", |
| 22 | + "Programming Language :: Python", |
| 23 | + "Programming Language :: Python :: 3", |
| 24 | + "Programming Language :: Python :: 3.10", |
| 25 | + "Programming Language :: Python :: 3.11", |
| 26 | + "Programming Language :: Python :: 3.12", |
| 27 | + "Development Status :: 4 - Beta", |
| 28 | +] |
| 29 | +dynamic = ["version"] |
| 30 | +dependencies = [ |
| 31 | + "pyyaml", |
| 32 | + "repo-review", |
| 33 | +] |
| 34 | + |
| 35 | +[project.optional-dependencies] |
| 36 | +cli = [ |
| 37 | + "click>=8", |
| 38 | + "rich>=12.2", |
| 39 | +] |
| 40 | +test = [ |
| 41 | + "pytest >=7", |
| 42 | +] |
| 43 | +dev = [ |
| 44 | + "pytest >=7", |
| 45 | +] |
| 46 | + |
| 47 | +[project.urls] |
| 48 | +homepage = "https://github.com/scientific-python/cookie" |
| 49 | +webpage = "https://scientific-python.github.io/cookie" |
| 50 | + |
| 51 | +[project.scripts] |
| 52 | +sp-repo-review = "repo_review.__main__:main" |
| 53 | + |
| 54 | +[project.entry-points."repo_review.checks"] |
| 55 | +general = "sp_repo_review.checks.general:repo_review_checks" |
| 56 | +pyproject = "sp_repo_review.checks.pyproject:repo_review_checks" |
| 57 | +precommit = "sp_repo_review.checks.precommit:repo_review_checks" |
| 58 | +ruff = "sp_repo_review.checks.ruff:repo_review_checks" |
| 59 | +mypy = "sp_repo_review.checks.mypy:repo_review_checks" |
| 60 | +github = "sp_repo_review.checks.github:repo_review_checks" |
| 61 | + |
| 62 | +[project.entry-points."repo_review.fixtures"] |
| 63 | +workflows = "sp_repo_review.checks.github:workflows" |
| 64 | +dependabot = "sp_repo_review.checks.github:dependabot" |
| 65 | +precommit = "sp_repo_review.checks.precommit:precommit" |
| 66 | + |
| 67 | +[project.entry-points."repo_review.families"] |
| 68 | +scikit-hep = "sp_repo_review.families:get_familes" |
| 69 | + |
| 70 | +[tool.hatch] |
| 71 | +version.path = "src/sp_repo_review/__init__.py" |
| 72 | + |
| 73 | + |
| 74 | +[tool.pytest.ini_options] |
| 75 | +minversion = "7.0" |
| 76 | +addopts = ["-ra", "--strict-markers", "--strict-config"] |
| 77 | +xfail_strict = true |
| 78 | +log_cli_level = "INFO" |
| 79 | +filterwarnings = [ |
| 80 | + 'error', |
| 81 | + 'ignore:(ast.Str|Attribute s|ast.NameConstant|ast.Num) is deprecated:DeprecationWarning:_pytest', |
| 82 | +] |
| 83 | +norecursedirs = ['{{cookiecutter.project_name}}'] |
| 84 | +testpaths = ["tests"] |
| 85 | + |
| 86 | + |
| 87 | +[tool.mypy] |
| 88 | +files = ["src", "web", "tests"] |
| 89 | +python_version = "3.10" |
| 90 | +warn_unused_configs = true |
| 91 | +strict = true |
| 92 | +show_error_codes = true |
| 93 | +enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] |
| 94 | +warn_unreachable = true |
| 95 | +disallow_untyped_defs = false |
| 96 | + |
| 97 | +[[tool.mypy.overrides]] |
| 98 | +module = "sp_repo_review.*" |
| 99 | +disallow_untyped_defs = true |
| 100 | + |
| 101 | +[tool.pylint] |
| 102 | +master.py-version = "3.10" |
| 103 | +master.ignore-paths= ["src/sp_repo_review/_version.py"] |
| 104 | +reports.output-format = "colorized" |
| 105 | +similarities.ignore-imports = "yes" |
| 106 | +messages_control.disable = [ |
| 107 | + "design", |
| 108 | + "fixme", |
| 109 | + "line-too-long", |
| 110 | + "wrong-import-position", |
| 111 | + "redefined-builtin", |
| 112 | + "missing-module-docstring", |
| 113 | + "missing-class-docstring", |
| 114 | + "missing-function-docstring", |
| 115 | + "invalid-name", |
| 116 | + "redefined-outer-name", |
| 117 | + "no-member", # better handled by mypy, etc. |
| 118 | +] |
| 119 | + |
| 120 | + |
| 121 | +[tool.ruff] |
| 122 | +select = [ |
| 123 | + "E", "F", "W", # flake8 |
| 124 | + "B", "B904", # flake8-bugbear |
| 125 | + "I", # isort |
| 126 | + "ARG", # flake8-unused-arguments |
| 127 | + "C4", # flake8-comprehensions |
| 128 | + "EM", # flake8-errmsg |
| 129 | + "ICN", # flake8-import-conventions |
| 130 | + "ISC", # flake8-implicit-str-concat |
| 131 | + "PGH", # pygrep-hooks |
| 132 | + "PIE", # flake8-pie |
| 133 | + "PL", # pylint |
| 134 | + "PT", # flake8-pytest-style |
| 135 | + "PTH", # flake8-use-pathlib |
| 136 | + "RET", # flake8-return |
| 137 | + "RUF", # Ruff-specific |
| 138 | + "SIM", # flake8-simplify |
| 139 | + "TID251", # flake8-tidy-imports.banned-api |
| 140 | + "T20", # flake8-print |
| 141 | + "UP", # pyupgrade |
| 142 | + "YTT", # flake8-2020 |
| 143 | +] |
| 144 | +extend-ignore = [ |
| 145 | + "PLR", # Design related pylint codes |
| 146 | + "E501", # Line too long |
| 147 | + "PT004", # Incorrect check, usefixtures is the correct way to do this |
| 148 | +] |
| 149 | +target-version = "py310" |
| 150 | +src = ["src"] |
| 151 | +unfixable = [ |
| 152 | + "T20", # Removes print statements |
| 153 | + "F841", # Removes unused variables |
| 154 | +] |
| 155 | +exclude = [] |
| 156 | +flake8-unused-arguments.ignore-variadic-names = true |
| 157 | + |
| 158 | +[tool.ruff.flake8-tidy-imports.banned-api] |
| 159 | +"typing.Callable".msg = "Use collections.abc.Callable instead." |
| 160 | +"typing.Iterator".msg = "Use collections.abc.Iterator instead." |
| 161 | +"typing.Mapping".msg = "Use collections.abc.Mapping instead." |
| 162 | +"typing.Sequence".msg = "Use collections.abc.Sequence instead." |
| 163 | +"typing.Set".msg = "Use collections.abc.Set instead." |
| 164 | +"importlib.abc".msg = "Use sp_repo_review._compat.importlib.resources.abc instead." |
| 165 | +"importlib.resources.abc".msg = "Use sp_repo_review._compat.importlib.resources.abc instead." |
| 166 | + |
| 167 | +[tool.ruff.per-file-ignores] |
| 168 | +"src/sp_repo_review/_compat/**.py" = ["TID251"] |
0 commit comments