Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
locked: false

- name: Run Ruff
run: pixi run lint
run: pixi run qc

################################################################################################
# Semantic-Release: Run semantic-release to automate versioning and publishing
Expand Down
74 changes: 35 additions & 39 deletions config/ruff.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,46 @@
cache-dir = "~/.cache/ruff"

# iteratively adding files to the include list
include = [
# "src/readii/loaders.py",
# "src/readii/feature_extraction.py"
"src/readii/loaders.py",
"src/readii/feature_extraction.py",
"src/readii/negative_controls_refactor/**/*.py",
"src/readii/io/**/*.py",
]


# extend-exclude is used to exclude directories from the flake8 checks
extend-exclude = [
"docs/*",
"tests/*",
".pixi/",
"src/readii/image_processing.py",
"src/readii/metadata.py",
"src/readii/negative_controls.py",
"src/readii/pipeline.py",]
"src/readii/pipeline.py",
]

# Same as Black.
line-length = 100


[lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.

# [lint] # commented for now, will iterate on this later
# select = [
# "E",
# "F",
# "W", # flake8
# "C", # mccabe
# # "N", # pep8-naming
# "ANN", # flake8-annotations
# "BLE", # flake8-blind-except
# "B", # flake8-bugbear
# "A", # flake8-builtins
# # "G", # flake8-logging-format
# "ERA", # eradicate
# "RUF", # Ruff-specific rules
# "TCH", # flake8-type-checking
# ]
# ignore = ["ANN101"]


select = [
###########################################################################
Expand Down Expand Up @@ -65,6 +84,9 @@ select = [
# Provide clear and explanatory error messages
# https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
"EM",
# Check for McCabe complexity
# https://docs.astral.sh/ruff/rules/complex-structure/
"C",

###########################################################################
# STANDARDS & STYLE
Expand All @@ -83,13 +105,14 @@ select = [

# Pydocstyle
# https://docs.astral.sh/ruff/rules/#pydocstyle-d
# "D",
"D",
]

# Readii uses a lot of camelcase so ignoring pep-8 conventions.
# https://docs.astral.sh/ruff/rules/#pep8-naming-n
# "N",

ignore = [
# allow self to not need type annotations
"ANN101",
# Allow too many arguments for functions
"PLR0913",
# Public Module Docstrings
Expand All @@ -103,7 +126,6 @@ ignore = [
known-first-party = ["readii"]
force-wrap-aliases = true
combine-as-imports = true
lines-after-imports = 1
relative-imports-order = "closest-to-furthest"

[lint.mccabe]
Expand All @@ -120,33 +142,7 @@ convention = "numpy"


[format]

quote-style = "double"
indent-style = "tab"
docstring-code-format = true
docstring-code-line-length = 20


# [lint] # commented for now, will iterate on this later
# select = [
# "E",
# "F",
# "W", # flake8
# "C", # mccabe
# "I", # isort
# "D", # pydocstyle
# # "N", # pep8-naming
# "ANN", # flake8-annotations
# "BLE", # flake8-blind-except
# "B", # flake8-bugbear
# "A", # flake8-builtins
# # "G", # flake8-logging-format
# "ERA", # eradicate
# "RUF", # Ruff-specific rules
# "TCH", # flake8-type-checking
# ]
# ignore = ["ANN101"]

# Readii uses a lot of camelcase so ignoring pep-8 conventions.
# https://docs.astral.sh/ruff/rules/#pep8-naming-n
# "N",
Loading