Skip to content

Commit

Permalink
fix(test): fixed poor formatting to resolve linting errors (reanahub#720
Browse files Browse the repository at this point in the history
)

Closes reanahub#719
  • Loading branch information
ajclyall committed Jun 30, 2024
1 parent 74d5601 commit dfe69a4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 16 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
The list of contributors in alphabetical order:

- [Adelina Lintuluoto](https://orcid.org/0000-0002-0726-1452)
- [Alastair Lyall] (https://orcid.org/0009-0000-4955-8935)
- [Anton Khodak](https://orcid.org/0000-0003-3263-4553)
- [Audrius Mecionis](https://orcid.org/0000-0002-3759-1663)
- [Camila Diaz](https://orcid.org/0000-0001-5543-797X)
Expand Down
4 changes: 4 additions & 0 deletions docs/cmd_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ Secret management commands:
secrets-add Add secrets from literal string or from file.
secrets-delete Delete user secrets by name.
secrets-list List user secrets.

Workflow run test commands:
test Test workflow execution, based on a given Gherkin file.

12 changes: 10 additions & 2 deletions reana_client/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@
import click
from urllib3 import disable_warnings

from reana_client.cli import workflow, files, ping, secrets, quotas, retention_rules, test
from reana_client.cli import (
workflow,
files,
ping,
secrets,
quotas,
retention_rules,
test,
)
from reana_client.utils import get_api_url

DEBUG_LOG_FORMAT = (
Expand Down Expand Up @@ -45,7 +53,7 @@ class ReanaCLI(click.Group):
files.files_group,
retention_rules.retention_rules_group,
secrets.secrets_group,
test.test_group
test.test_group,
]

def __init__(self, name=None, commands=None, **attrs):
Expand Down
28 changes: 14 additions & 14 deletions reana_client/cli/test.py
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
"""REANA client test commands."""

import click
from reana_client.cli.utils import add_access_token_options, check_connection
from reana_client.validation.utils import (
validate_workflow_name_parameter
)
from reana_client.validation.utils import validate_workflow_name_parameter


@click.group(help="Workflow run test commands")
def test_group():
"""Workflow run test commands"""
"""Workflow run test commands."""


@test_group.command("test")
@click.option(
"-w",
"--workflow",
default="",
callback=validate_workflow_name_parameter,
help="Name of workflow to be tested"
help="Name of workflow to be tested",
)
@click.option(
"-n",
"--test_file",
default="test.feature",
help="Gherkin file for testing properties of a workflow execution"
help="Gherkin file for testing properties of a workflow execution",
)

@click.pass_context
@add_access_token_options
@check_connection
def test(ctx, workflow, test_file, access_token):
"""
r"""
Test workflow execution, based on a given Gherkin file.
The ``test`` command allows for testing of a workflow execution, by assessing whether it meets certain properties specified in a chosen feature file.
The ``test`` command allows for testing of a workflow execution,
by assessing whether it meets certain properties specified in a
chosen feature file.
Example: \n
\t $ reana-client test -w myanalysis -n test_analysis.feature\n
"""
click.echo(f"Checked {workflow} using {test_file}, and everything works!") # to be changed/implemented of course




click.echo(
f"Checked {workflow} using {test_file}, and everything works!"
) # to be changed/implemented of course

0 comments on commit dfe69a4

Please sign in to comment.