lenskit/lkpy

View on GitHub
pyproject.toml

Summary

Maintainability
Test Coverage
[tool.coverage.run]
relative_files = "true"

[tool.ruff]
line-length = 100
target-version = "py311"

[tool.ruff.lint]
select = ["E", "F", "I"]
unfixable = ["F401"]
exclude = [".git", "__pycache__", "build", "dist"]

[tool.ruff.lint.per-file-ignores]
# Importing PyTest fixtures triggers F811
"*/tests/*.py" = ["F811", "F401"]

[tool.ruff.lint.isort]
section-order = [
  "future",
  "standard-library",
  "third-party",
  "testing",
  "first-party",
  "local-folder",
]
known-first-party = ["lenskit"]

[tool.ruff.lint.isort.sections]
testing = ["pytest", "hypothesis"]


[tool.pyright]
typeCheckingMode = "basic"
exclude = ["docs/*", ".pixi"]
reportMissingImports = true
reportMissingTypeStubs = false

[tool.pytest.ini_options]
log_level = "INFO"
log_format = "[%(levelname)7s] [%(processName)s] %(name)s %(message)s"
log_cli_format = "[%(levelname)7s] %(asctime)s [%(processName)s] %(name)s %(message)s"
log_file_format = "[%(levelname)7s] %(asctime)s [%(processName)s] %(name)s %(message)s"
log_file_level = "DEBUG"
addopts = "--import-mode=importlib --benchmark-skip"
doctest_plus = true
doctest_subpackage_requires = ["lenskit-hpf/lenskit/* = hpfrec"]
consider_namespace_packages = true
filterwarnings = [
  "ignore:::pyarrow[.*]",
  "ignore:.*matrix subclass.*:PendingDeprecationWarning",
  "ignore:.*np.asscalar.*:DeprecationWarning",
  "ignore:.*deprecated create function*:DeprecationWarning",
  "ignore:.*importing the ABCs*:DeprecationWarning",
  "ignore:.*use_ratings option.*:UserWarning",
  "ignore:.*tensor support is in beta state.*:UserWarning",
]
markers = [
  "eval: mark the test as running the evaluator over custom data",
  "slow: mark the test as taking a larger-than-usual amount of time",
  "realdata: mark the test as using a real data set like ML-20M",
]