Skip to content

Conversation

@daklauss
Copy link
Member

@daklauss daklauss commented Jun 4, 2025

Added the basic configuration for CADET-RDM similar to Process.

Also added a dev dependency group that additionaly installs ruff, docs and testing.

Summary of the linting rules:
I decided for following linting rules:
E, F, W, D, ANN

E and W are typical PycodeStyle rules like using tab and or mixed with withespace, whitespaces between operator and so on.

F are pyflake rules, checking for imports, f strings, unused imports and so on.

D are a set of docstring rules. Docstrings will be enforced for all public classes functions and methods and packages with the only exeption beeing modules. Excluded are D100, D212, D203. We enforce an descriptive imperative sentence at the start of every docstring. Module docstring are excluded because there are problems with sphinx used docstrings that do not fit the standard rules. So you need to exclude the docstring from ruff checking by using #noqa.

ANN is enforced type checking for pretty much any public and private function and method. Rules ANN401 is excluded because there are many cases where Type Any is more convenient to use. Maybe we can inlude this one at a later time.

For all test Files the Docstring and Annotation Rules are disabled. as well as E731 and E402 (module import not at top and some lambda assignments).

As for now the ruff pipeline should fail but not block even when creating an error. If you use pre-commit you won't be able to push if the ruff checks fail so until the linting rules are satisfied as far as i understand. So the github action to check linting is there to check wheter the developer actualy uses pre commit :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants