Skip to content

Commit df64b62

Browse files
authored
Merge pull request #88 from mvdbeek/fix_tests
Fix tests
2 parents 599bcba + a8b26fa commit df64b62

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

gxformat2/abstract.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def from_dict(workflow_dict: dict, subworkflow=False):
3232
normalized_workflow = NormalizedWorkflow(workflow_dict)
3333
workflow_dict = normalized_workflow.normalized_workflow_dict
3434

35-
requirements = {} # type: Dict[str, Any]
36-
abstract_dict = {
35+
requirements: Dict[str, Any] = {}
36+
abstract_dict: Dict[str, Any] = {
3737
'class': 'Workflow',
38-
} # type: Dict[str, Any]
38+
}
3939
for attr in ('doc', 'label'):
4040
value = workflow_dict.get(attr)
4141
if value:

gxformat2/converter.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
import os
88
import sys
99
import uuid
10-
from collections import OrderedDict
11-
from typing import Dict, Optional
10+
from typing import Any, Dict, Optional
1211

1312
from ._labels import Labels
1413
from .model import (
@@ -129,7 +128,7 @@ def python_to_workflow(as_python, galaxy_interface, workflow_directory=None, imp
129128
if conversion_context.import_options.deduplicate_subworkflows:
130129
# TODO: import only required workflows...
131130
# TODO: dag sort these...
132-
subworkflows = OrderedDict()
131+
subworkflows = {}
133132
for graph_id, subworkflow_content in conversion_context.graph_ids.items():
134133
if graph_id == "main":
135134
continue
@@ -194,7 +193,7 @@ def _python_to_workflow(as_python, conversion_context):
194193

195194
if isinstance(steps, list):
196195
_append_step_id_to_step_list_elements(steps)
197-
steps_as_dict = OrderedDict()
196+
steps_as_dict: Dict[str, Any] = {}
198197
for i, step in enumerate(steps):
199198
steps_as_dict[str(i)] = step
200199
if "label" in step:
@@ -577,8 +576,8 @@ class ConversionContext(BaseConversionContext):
577576
def __init__(self, galaxy_interface, workflow_directory, import_options: Optional[ImportOptions] = None):
578577
super().__init__()
579578
self.import_options = import_options or ImportOptions()
580-
self.graph_ids = OrderedDict() # type: Dict
581-
self.graph_id_subworkflow_conversion_contexts = {} # type: Dict
579+
self.graph_ids: Dict[str, Any] = {}
580+
self.graph_id_subworkflow_conversion_contexts: Dict[str, Any] = {}
582581
self.workflow_directory = workflow_directory
583582
self.galaxy_interface = galaxy_interface
584583

tox.ini

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# TODO: implement doc linting
22
[tox]
3-
envlist = py{36,37,38,39}-lint, py36-lintdocstrings, py36-lintreadme, py{36,37,38,39}-mypy, py{36,37,38,39}-unit
3+
envlist = py{37,38,39,310,311}-lint, py37-lintdocstrings, py37-lintreadme, py{37,38,39,310,311}-mypy, py{37,38,39,310,311}-unit
44
source_dir = gxformat2
55
test_dir = tests
66

77
[gh-actions]
88
python =
9-
3.6: py36-unit, py36-mypy, py36-lint, py36-lintdocs, py36-lintdocstrings
10-
3.7: py37-unit, py37-mypy
9+
3.7: py37-unit, py37-mypy, py37-lint, py37-lintdocs, py37-lintdocstrings
1110
3.8: py38-unit, py38-mypy
12-
3.9: py39-unit, py39-mypy, py39-lint, py39-lintdocs
11+
3.9: py39-unit, py39-mypy
12+
3.10: py310-unit, py310-mypy
13+
3.11: py311-unit, py311-mypy, py311-lint, py311-lintdocs
1314

1415
[testenv]
1516
commands =

0 commit comments

Comments
 (0)