Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions templates/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ keywords = [
]
license = "BSD-3-Clause"
license-files = ["LICENSE"]
name = "scitools-<PACKAGE_NAME>" #e.g "scitools-iris"
name = "<PACKAGE_NAME>" # e.g "scitools-iris", "cf-units"
requires-python = "<MIN_PYTHON_VERSION>"

[project.urls]
Expand Down Expand Up @@ -117,6 +117,7 @@ checks = [
# -> No Yields section found
"YD01", # Not all docstrings require a "Yields" section.

# TODO: exceptions that still need investigating are below. Might be fixable, or might become permanent (above):
]
exclude = [
'\.__eq__$',
Expand All @@ -126,17 +127,22 @@ exclude = [

[tool.pytest.ini_options] # The list of keys vary by repository
addopts = ["-ra", "-v", "--strict-config", "--strict-markers", "--doctest-modules"] # This addopts list varies by repository
testpaths = "<PATH_TO_MAIN_CODE>" # e.g "cf_units" or "lib/iris"
filterwarnings = ["default"]
log_level = "INFO"
minversion = "6.0"
testpaths = "<PATH_TO_MAIN_CODE>" # e.g "cf_units" or "lib/iris"
xfail_strict = "True"

[tool.repo-review]
# A list of the currently failing repo-review checks, to be fixed later, different for every repository.
# We have agreed that we will permanently ignore the repo-review rules in the first half of this ignore list.
ignore = [
# https://learn.scientific-python.org/development/guides/style/#PC180
# Not possible to run on the hardware used by the majority of our developers. Might change in future!
"PC180", # Uses prettier.
# https://learn.scientific-python.org/development/guides/packaging-simple#PP006
"PP006", # Uses dev dependency group

# TODO: exceptions that still need investigating are below. Might be fixable, or might become permanent (above):
]

[tool.ruff]
Expand All @@ -146,10 +152,8 @@ line-length = 88
preview = false

[tool.ruff.lint]
# We have agreed that we will permanently ignore the ruff rules in this ignore list.
# We have agreed that we will permanently ignore the ruff rules in the first half of this ignore list.
ignore = [
# NOTE: Non-permanent exclusions should be added to the ".ruff.toml" file.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this at length while producing this wiki page:

https://github.com/SciTools/.github/wiki/Linting

We agreed that we preferred to keep everything within pyproject.toml


# flake8-commas (COM)
# https://docs.astral.sh/ruff/rules/#flake8-commas-com
"COM812", # Trailing comma missing.
Expand All @@ -159,6 +163,8 @@ ignore = [
# https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/
# NOTE: This rule may cause conflicts when used with "ruff format".
"ISC001", # Implicitly concatenate string literals on one line.

# TODO: exceptions that still need investigating are below. Might be fixable, or might become permanent (above):
]
preview = false
select = [
Expand Down
Loading