Skip to content

Feature/GitHub action py linting (#2)#13

Closed
thoroc wants to merge 0 commit intoeasydiffusion:mainfrom
thoroc:main
Closed

Feature/GitHub action py linting (#2)#13
thoroc wants to merge 0 commit intoeasydiffusion:mainfrom
thoroc:main

Conversation

@thoroc
Copy link
Contributor

@thoroc thoroc commented Feb 14, 2023

Re-opened PR following rebase of the branch.

What

The meat of the changes are really in the .github/workflow/py-lint.yml. All the python file have been modified either by runnning locally the following:

  • black tests scripts sdkit examples --line-length 120 --include="\.py"
  • isort tests scripts sdkit examples --profile black
  • autoflake --in-place --remove-all-unused-imports --remove-unused-variables --recursive .

or following the recommendation of:

flake8 tests scripts sdkit examples --max-line-length 120 --extend-ignore=E203,E402,E501,E722,W391 --per-file-ignores=__init__.py:F401

Why

To get some code formatting standardisation.

Introducing a python linting & formatting stage using black, isort, flake8 and autoflake. On new PR the workflow will run through those tool to check the formatting and linting of the code. black, isort and autoflake should autoformat/lint the code and flake8 will conduct additional code formatting checks.

datefmt="%X"
)

from .file_utils import (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have these imports been deleted?

@@ -1,17 +0,0 @@
from .model_loader import (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this file been deleted? It's intended to create the API under sdkit.models.

@thoroc thoroc closed this Feb 14, 2023
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