Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphene/graphql-core v3 upgrade #6478

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conda-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies:
- ansimarkup >=1.0.0
- async-timeout>=3.0.0
- colorama >=0.4,<1.0
- graphene >=2.1,<3
- graphene >=3.4.3,<4
- graphviz # for static graphing
# Note: can't pin jinja2 any higher than this until we give up on Cylc 7 back-compat
- jinja2 >=3.0,<3.1
Expand Down
16 changes: 8 additions & 8 deletions cylc/flow/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@
)
import cylc.flow.flags
from cylc.flow.log_level import log_level_to_verbosity
from cylc.flow.network.schema import WorkflowStopMode
from cylc.flow.parsec.exceptions import ParsecError
from cylc.flow.task_id import TaskID
from cylc.flow.workflow_status import RunMode, StopMode

from metomi.isodatetime.parsers import TimePointParser

if TYPE_CHECKING:
from enum import Enum
from cylc.flow.scheduler import Scheduler

# define a type for command implementations
Expand Down Expand Up @@ -165,7 +165,7 @@ async def set_prereqs_and_outputs(
@_command('stop')
async def stop(
schd: 'Scheduler',
mode: Union[str, 'StopMode'],
mode: Union[str, 'Enum'],
cycle_point: Optional[str] = None,
# NOTE clock_time YYYY/MM/DD-HH:mm back-compat removed
clock_time: Optional[str] = None,
Expand Down Expand Up @@ -203,10 +203,10 @@ async def stop(
schd._update_workflow_state()
else:
# immediate shutdown
with suppress(KeyError):
# By default, mode from mutation is a name from the
# WorkflowStopMode graphene.Enum, but we need the value
mode = WorkflowStopMode[mode] # type: ignore[misc]
with suppress(AttributeError):
# By default, mode from mutation is a WorkflowStopMode
# graphene.Enum, but we need the value
mode = mode.value # type: ignore
try:
mode = StopMode(mode)
except ValueError:
Expand Down Expand Up @@ -298,10 +298,10 @@ async def pause(schd: 'Scheduler'):


@_command('set_verbosity')
async def set_verbosity(schd: 'Scheduler', level: Union[int, str]):
async def set_verbosity(schd: 'Scheduler', level: 'Enum'):
"""Set workflow verbosity."""
try:
lvl = int(level)
lvl = int(level.value)
LOG.setLevel(lvl)
except (TypeError, ValueError) as exc:
raise CommandFailedError(exc) from None
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/flow_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

def add_flow_opts(parser):
parser.add_option(
"--flow", action="append", dest="flow", metavar="FLOW",
"--flow", action="append", dest="flow", metavar="FLOW", default=[],
help=f'Assign new tasks to all active flows ("{FLOW_ALL}");'
f' no flow ("{FLOW_NONE}"); a new flow ("{FLOW_NEW}");'
f' or a specific flow (e.g. "2"). The default is "{FLOW_ALL}".'
Expand Down
Loading
Loading