Skip to content

Commit

Permalink
Merge pull request #491 from UIUCLibrary/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
henryborchers authored Dec 6, 2023
2 parents 0e79b7a + 57757f3 commit ede4657
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ keywords = ['GUI']
readme = { file= "README.rst", content-type="text/x-rst" }

[project.urls]
project = "http://www.library.illinois.edu/dccdocs/speedwagon"
project = "https://www.library.illinois.edu/dccdocs/speedwagon"
download = "https://github.com/UIUCLibrary/Speedwagon/releases"

[project.optional-dependencies]
Expand Down
7 changes: 5 additions & 2 deletions speedwagon/frontend/qtwidgets/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,15 @@ def name(self) -> Optional[str]:
class AbsWorkflowItemData(abc.ABC): # pylint: disable=too-few-public-methods
"""Abstract base class for workflow item data."""

def data(
def data( # noqa: B027
self,
workflow: Type[speedwagon.Workflow],
role: Union[int, QtCore.Qt.ItemDataRole],
) -> Any:
"""Get the data from workflow."""
"""Get the data from workflow.
By default, this method is a no-op unless overridden.
"""


WorkflowClassRole = cast(int, QtCore.Qt.ItemDataRole.UserRole) + 1
Expand Down
25 changes: 20 additions & 5 deletions speedwagon/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,19 @@ def discover_task_metadata(
"""

def completion_task(
def completion_task( # noqa: B027
self, task_builder: TaskBuilder, results, **user_args
) -> None:
"""Last task after Job is completed."""
"""Last task after Job is completed.
def initial_task(self, task_builder: TaskBuilder, **user_args) -> None:
By default, this method is a no-op unless overridden.
"""

def initial_task( # noqa: B027
self,
task_builder: TaskBuilder,
**user_args
) -> None:
"""Create a task to run before the main tasks start.
The initial task is run prior to the get_additional_info method.
Expand All @@ -82,9 +89,15 @@ def initial_task(self, task_builder: TaskBuilder, **user_args) -> None:
In general, prefer :py:meth:`discover_task_metadata` if you don't
need a user's interaction.
By default, this method is a no-op unless overridden.
"""

def create_new_task(self, task_builder: TaskBuilder, **job_args) -> None:
def create_new_task( # noqa: B027
self,
task_builder: TaskBuilder,
**job_args
) -> None:
"""Add a new task to be accomplished when the workflow is started.
Use the task_builder parameter's add_subtask method to include a
Expand All @@ -100,9 +113,10 @@ def create_new_task(self, task_builder: TaskBuilder, **job_args) -> None:
task_builder.add_subtask(
subtask=MakeYamlTask(package_id, source, title_page))
By default, this method is a no-op unless overridden.
"""

@classmethod
@classmethod # noqa: B027
def generate_report(
cls, results: List[Result], **user_args
) -> Optional[str]:
Expand All @@ -123,6 +137,7 @@ def generate_report(
return '\\n'.join(report_lines)
By default, this method is a no-op and returns None unless overridden.
"""

# pylint: disable=unused-argument
Expand Down
14 changes: 10 additions & 4 deletions speedwagon/runner_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,17 @@ def status(self, text: str) -> None:
def log(self, text: str, level: int = logging.INFO) -> None:
"""Log information."""

def start(self) -> None:
"""Start."""
def start(self) -> None: # noqa: B027
"""Start.
By default, this is a no-op
"""

def refresh(self) -> None:
"""Refresh."""
def refresh(self) -> None: # noqa: B027
"""Refresh.
By default, this is a no-op
"""

@abc.abstractmethod
def cancelling_complete(self) -> None:
Expand Down
7 changes: 5 additions & 2 deletions speedwagon/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,11 @@ class AbsStarter(metaclass=abc.ABCMeta):
def run(self) -> int:
pass

def initialize(self) -> None:
"""Initialize startup routine."""
def initialize(self) -> None: # noqa: B027
"""Initialize startup routine.
By default, this is a no-op
"""


class SingleWorkflowJSON(AbsStarter):
Expand Down

0 comments on commit ede4657

Please sign in to comment.