Skip to content

Commit

Permalink
Update from flake8 to ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
timtroendle committed May 1, 2024
1 parent 290c051 commit 2d86ecb
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 11 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017-2022 Tim Tröndle
Copyright (c) 2017-2024 Tim Tröndle

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The generated repository will have the following structure:
├── tests <- Automatic tests of the source code go in here.
│ └── test_model.py <- Demo file.
├── .editorconfig <- Editor agnostic configuration settings.
├── .flake8 <- Linting settings for flake8.
├── .ruff <- Linter and formatter settings for ruff.
├── .gitignore
├── environment.yaml <- A file to create an environment to execute your project in.
├── LICENSE.md <- MIT license description
Expand All @@ -87,7 +87,7 @@ The generated repository will have the following structure:
```
├── envs
│ └── shell.yaml <- An environment for shell rules.
├── profiles <- Snakemake profiles.
├── profiles
│ └── cluster <- Cluster Snakemake profile folder.
│ └── config.yaml <- Cluster Snakemake profile.
├── rules
Expand Down
1 change: 0 additions & 1 deletion cluster/{{cookiecutter.project_short_name}}/.flake8

This file was deleted.

1 change: 1 addition & 0 deletions cluster/{{cookiecutter.project_short_name}}/.ruff.toml
5 changes: 0 additions & 5 deletions default/{{cookiecutter.project_short_name}}/.flake8

This file was deleted.

36 changes: 36 additions & 0 deletions default/{{cookiecutter.project_short_name}}/.ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
line-length = 88
preview = true # required to activate many pycodestyle errors and warnings as of 2024-05-01
builtins = ["snakemake"]

[format]
quote-style = "double"
indent-style = "space"
docstring-code-format = false
line-ending = "auto"

[lint]
select = [
# pycodestyle errors
"E",
# pycodestyle warnings
"W",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
]
ignore = [
# here and below, rules are redundant with formatter, see
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"E501",
"W191",
"E111",
"E114",
"E117",
]
2 changes: 1 addition & 1 deletion default/{{cookiecutter.project_short_name}}/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ configfile: "config/default.yaml"
include: "./rules/sync.smk"
localrules: all, report, clean
{%- endif %}
min_version("7.8")
min_version("8.10")

{% if cookiecutter._add_cluster_infrastructure == True -%}
onstart:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ channels:
- bioconda
dependencies:
- python=3.11
- flake8=3.8.3
- snakemake-minimal=8.10.7

0 comments on commit 2d86ecb

Please sign in to comment.