@@ -95,3 +95,62 @@ repository = "https://github.com/vitessce/vitessce-python"
9595
9696[tool .setuptools ]
9797packages = [" vitessce" , " vitessce.data_utils" ]
98+
99+ [tool .ruff ]
100+ line-length = 120
101+ src = [" src" ]
102+ extend-include = [" *.ipynb" ]
103+
104+ [tool .ruff .format ]
105+ docstring-code-format = true
106+
107+ [tool .ruff .lint ]
108+ select = [
109+ " F" , # Errors detected by Pyflakes
110+ " E" , # Error detected by Pycodestyle
111+ " W" , # Warning detected by Pycodestyle
112+ " I" , # isort
113+ " D" , # pydocstyle
114+ " B" , # flake8-bugbear
115+ " TID" , # flake8-tidy-imports
116+ " C4" , # flake8-comprehensions
117+ " BLE" , # flake8-blind-except
118+ " UP" , # pyupgrade
119+ " RUF100" , # Report unused noqa directives
120+ ]
121+ ignore = [
122+ # line too long -> we accept long comment lines; formatter gets rid of long code lines
123+ " E501" ,
124+ # Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
125+ " E731" ,
126+ # allow I, O, l as variable names -> I is the identity matrix
127+ " E741" ,
128+ # Missing docstring in public package
129+ " D104" ,
130+ # Missing docstring in public module
131+ " D100" ,
132+ # Missing docstring in __init__
133+ " D107" ,
134+ # Errors from function calls in argument defaults. These are fine when the result is immutable.
135+ " B008" ,
136+ # __magic__ methods are are often self-explanatory, allow missing docstrings
137+ " D105" ,
138+ # first line should end with a period [Bug: doesn't work with single-line docstrings]
139+ " D400" ,
140+ # First line should be in imperative mood; try rephrasing
141+ " D401" ,
142+ # # Disable one in each pair of mutually incompatible rules
143+ # We don’t want a blank line before a class docstring
144+ " D203" ,
145+ # We want docstrings to start immediately after the opening triple quote
146+ " D213" ,
147+ ]
148+
149+ [tool .ruff .lint .pydocstyle ]
150+ convention = " numpy"
151+
152+ [tool .ruff .lint .per-file-ignores ]
153+ "docs/*" = [" I" ]
154+ "vitessce/constants.py" = [" D" ]
155+ "tests/*" = [" D" ]
156+ "*/__init__.py" = [" F401" ]
0 commit comments