@@ -74,3 +74,36 @@ packages = ["viscy"]
74
74
[tool .setuptools_scm ]
75
75
write_to = " viscy/_version.py"
76
76
77
+ [tool .ruff ]
78
+ line-length = 88
79
+ src = [" viscy" , " tests" ]
80
+ extend-include = [" *.ipynb" ]
81
+ target-version = " py311"
82
+ # Exclude the following for now. Later on we should check every Python file.
83
+ extend-exclude = [" viscy/scripts/*" , " applications/*" , " examples/*" ]
84
+
85
+ [tool .ruff .format ]
86
+ quote-style = " double"
87
+ indent-style = " space"
88
+ docstring-code-format = true
89
+ docstring-code-line-length = " dynamic"
90
+
91
+ [tool .ruff .lint ]
92
+ select = [
93
+ " D" , # pydocstyle
94
+ " I" , # isort
95
+ ]
96
+ ignore = [
97
+ " D100" , # Missing docstring in public module
98
+ " D104" , # Missing docstring in public package
99
+ " D105" , # __magic__ methods are often self-explanatory, allow missing docstrings
100
+ " D107" , # Missing docstring in __init__
101
+ # Disable one in each pair of mutually incompatible rules
102
+ " D203" , # We don’t want a blank line before a class docstring
103
+ " D213" , # <> We want docstrings to start immediately after the opening triple quote
104
+ " D400" , # first line should end with a period [Bug: doesn’t work with single-line docstrings]
105
+ " D401" , # First line should be in imperative mood; try rephrasing
106
+ ]
107
+ per-file-ignores."*/__init__.py" = [" F401" ]
108
+ per-file-ignores."tests/*" = [" D" ]
109
+ pydocstyle.convention = " numpy"
0 commit comments