diff --git a/.gitignore b/.gitignore index 2b67e22..d06d632 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ !.github !.gitlab-ci.yml !.readthedocs.yaml -!.flake8 # Byte / compiled / optimized *.py[cod] diff --git a/pyproject.toml b/pyproject.toml index 8d3b473..5682476 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,8 +30,14 @@ Issues = "https://github.com/ewoks-kit/ewoksgalaxy/issues" Changelog = "https://github.com/ewoks-kit/ewoksgalaxy/blob/main/CHANGELOG.md" [project.optional-dependencies] -test = ["pytest >=7", "ewoks"] -dev = ["ewoksgalaxy[test]", "ruff"] +test = [ + "pytest >=7", + "ewoks" +] +dev = [ + "ewoksgalaxy[test]", + "ruff>=0.16.0" +] doc = [ "ewoksgalaxy[test]", "sphinx >=4.5", @@ -56,15 +62,24 @@ namespaces = false omit = ["*/tests/*"] [tool.ruff.lint] -select = ["E", "F", "I", "S"] -ignore = ["E203", "E501", "E701"] +select = [ + "E", # pycodestyle errors + "F", # pyflakes + "I", # isort + "S", # flake8-bandit +] +ignore = [ + "E501", # line too long +] [tool.ruff.lint.per-file-ignores] -# Ignore `S101` (assert used violations) in all test files -"*/test_*.py" = ["S101", "S603"] +"*/test_*.py" = [ + "S101" # allow asserts +] [tool.ruff.lint.isort] force-single-line = true +known-first-party = ["ewoksgalaxy"] [project.entry-points."ewoks.engines"] "gxwf" = "ewoksgalaxy.engine:GalaxyWorkflowEngine" diff --git a/src/ewoksgalaxy/tests/test_engine.py b/src/ewoksgalaxy/tests/test_engine.py index bc35f28..c61cb08 100644 --- a/src/ewoksgalaxy/tests/test_engine.py +++ b/src/ewoksgalaxy/tests/test_engine.py @@ -10,7 +10,7 @@ def test_convert(ewoks_workflow: dict, tmpdir: Path): json.dump(ewoks_workflow, f) output_path = tmpdir / "workflow.yaml" - subprocess.run( + subprocess.run( # noqa: S603 [ sys.executable, "-m", @@ -25,7 +25,7 @@ def test_convert(ewoks_workflow: dict, tmpdir: Path): ) assert output_path.exists() - subprocess.run( + subprocess.run( # noqa: S603 [sys.executable, "-m", "gxformat2.lint", str(output_path)], check=True, )