-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using ruff rule to enforce the existence of docstrings in public func…
…tions (#1062) Co-authored-by: Paul Adkisson <[email protected]>
- Loading branch information
1 parent
d35b364
commit ab37a4e
Showing
9 changed files
with
163 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,15 @@ version = "0.6.2" | |
description = "Convert data from proprietary formats to NWB format." | ||
readme = "README.md" | ||
authors = [ | ||
{name = "Cody Baker"}, | ||
{name = "Szonja Weigl"}, | ||
{name = "Heberto Mayorquin"}, | ||
{name = "Paul Adkisson"}, | ||
{name = "Luiz Tauffer"}, | ||
{name = "Ben Dichter", email = "[email protected]"} | ||
{ name = "Cody Baker" }, | ||
{ name = "Szonja Weigl" }, | ||
{ name = "Heberto Mayorquin" }, | ||
{ name = "Paul Adkisson" }, | ||
{ name = "Luiz Tauffer" }, | ||
{ name = "Ben Dichter", email = "[email protected]" }, | ||
] | ||
urls = { "Homepage" = "https://github.com/catalystneuro/neuroconv" } | ||
license = {file = "license.txt"} | ||
license = { file = "license.txt" } | ||
keywords = ["nwb"] | ||
classifiers = [ | ||
"Intended Audience :: Science/Research", | ||
|
@@ -91,14 +91,10 @@ neuroconv = "neuroconv.tools.yaml_conversion_specification._yaml_conversion_spec | |
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
addopts = "-ra --doctest-glob='*.rst'" | ||
testpaths = [ | ||
"docs/conversion_examples_gallery/", | ||
"tests" | ||
] | ||
testpaths = ["docs/conversion_examples_gallery/", "tests"] | ||
doctest_optionflags = "ELLIPSIS" | ||
|
||
|
||
|
||
[tool.black] | ||
line-length = 120 | ||
target-version = ['py38', 'py39', 'py310'] | ||
|
@@ -121,17 +117,23 @@ extend-exclude = ''' | |
''' | ||
|
||
|
||
|
||
[tool.ruff] | ||
|
||
[tool.ruff.lint] | ||
select = ["F401", "I", "D101"] # TODO: eventually, expand to other 'F' linting | ||
select = [ | ||
"F401", # Unused import | ||
"I", # All isort rules | ||
"D101", # Missing docstring in public class | ||
"D103", # Missing docstring in public function | ||
] | ||
fixable = ["ALL"] | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"**__init__.py" = ["F401", "I"] | ||
"tests/**" = ["D"] # We are not enforcing docstrings in tests | ||
"tests/**" = ["D"] # We are not enforcing docstrings in tests | ||
"src/neuroconv/tools/testing/data_interface_mixins.py" = ["D"] # We are not enforcing docstrings in the interface mixings | ||
"docs/conf.py" = ["D"] # We are not enforcing docstrings in the conf.py file | ||
"docs/conversion_examples_gallery/conftest.py" = ["D"] # We are not enforcing docstrings in the conversion examples | ||
|
||
[tool.ruff.lint.isort] | ||
relative-imports-order = "closest-to-furthest" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters