-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
106 lines (93 loc) · 3.35 KB
/
pyproject.toml
File metadata and controls
106 lines (93 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
[project]
name = "heavy-tail"
version = "0.1.0"
description = "Robust estimation of covariance matrices with heavy-tailed data"
authors = [
{ name = "Mohammadjavad Vakili", email = "mohammadjavad.vakili@gmail.com"}
]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"numpy",
"scipy",
]
[project.optional-dependencies]
dev = [
"ruff==0.9.10",
"pre-commit==4.1.0",
]
docs = [
"pdoc3",
"matplotlib",
"nbformat==5.4.0",
"ipython",
"notebook",
"ipywidgets"
]
tests = [
"pytest",
"pytest-cov",
]
[tool.ruff]
[tool.ruff.lint]
# Available rule sets in Ruff:
# A: flake8-builtins - Check for python builtins being used as variables or parameters
# B: flake8-bugbear - Find likely bugs and design problems
# C4: flake8-comprehensions - Helps write better list/set/dict comprehensions
# D: pydocstyle - Check docstring style
# E: pycodestyle errors - PEP 8 style guide
# ERA: eradicate - Find commented out code
# F: pyflakes - Detect logical errors
# I: isort - Sort imports
# N: pep8-naming - Check PEP 8 naming conventions
# PT: flake8-pytest-style - Check pytest best practices
# RUF: Ruff-specific rules
# S: flake8-bandit - Find security issues
# SIM: flake8-simplify - Simplify code
# T10: flake8-debugger - Check for debugger imports and calls
# UP: pyupgrade - Upgrade syntax for newer Python
# W: pycodestyle warnings - PEP 8 style guide warnings
# ANN: flake8-annotations - Type annotation checks
# ARG: flake8-unused-arguments - Unused arguments
# BLE: flake8-blind-except - Check for blind except statements
# COM: flake8-commas - Trailing comma enforcement
# DTZ: flake8-datetimez - Ensure timezone-aware datetime objects
# EM: flake8-errmsg - Check error message strings
# FBT: flake8-boolean-trap - Boolean argument checks
# ICN: flake8-import-conventions - Import convention enforcement
# ISC: flake8-implicit-str-concat - Implicit string concatenation
# NPY: NumPy-specific rules
# PD: pandas-specific rules
# PGH: pygrep-hooks - Grep-based checks
# PIE: flake8-pie - Miscellaneous rules
# PL: Pylint rules
# Q: flake8-quotes - Quotation style enforcement
# RSE: flake8-raise - Raise statement checks
# RET: flake8-return - Return statement checks
# SLF: flake8-self - Check for self references
# TCH: flake8-type-checking - Type checking imports
# TID: flake8-tidy-imports - Import tidying
# TRY: flake8-try-except-raise - Try/except/raise checks
# YTT: flake8-2020 - Python 2020+ compatibility
# Selected rule sets to enforce:
# D: pydocstyle - Check docstring style
# E: pycodestyle errors - PEP 8 style guide
# F: pyflakes - Detect logical errors
# I: isort - Sort imports
# N: pep8-naming - Check PEP 8 naming conventions
# W: pycodestyle warnings - PEP 8 style guide warnings
# UP: pyupgrade - Upgrade syntax for newer Python
select = ["D", "E", "F", "I", "N", "W", "UP", "PD"]
[tool.ruff.lint.pydocstyle]
convention = "numpy" # Use NumPy docstring style
[tool.ruff.format]
# Use double quotes for strings
quote-style = "double"
# Use spaces for indentation
indent-style = "space"
# Automatically detect and use the appropriate line ending
line-ending = "auto"
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S101"] # Allow assert statements in tests
"docs/examples/*.ipynb" = ["N803", "S101"] # Allow non-lowercase variable names (N803)
# and assert statements in notebook files