Skip to content

Commit

Permalink
Merge pull request #88 from mvdbeek/fix_tests
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
mvdbeek authored Jan 12, 2023
2 parents 599bcba + a8b26fa commit df64b62
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions gxformat2/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def from_dict(workflow_dict: dict, subworkflow=False):
normalized_workflow = NormalizedWorkflow(workflow_dict)
workflow_dict = normalized_workflow.normalized_workflow_dict

requirements = {} # type: Dict[str, Any]
abstract_dict = {
requirements: Dict[str, Any] = {}
abstract_dict: Dict[str, Any] = {
'class': 'Workflow',
} # type: Dict[str, Any]
}
for attr in ('doc', 'label'):
value = workflow_dict.get(attr)
if value:
Expand Down
11 changes: 5 additions & 6 deletions gxformat2/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import os
import sys
import uuid
from collections import OrderedDict
from typing import Dict, Optional
from typing import Any, Dict, Optional

from ._labels import Labels
from .model import (
Expand Down Expand Up @@ -129,7 +128,7 @@ def python_to_workflow(as_python, galaxy_interface, workflow_directory=None, imp
if conversion_context.import_options.deduplicate_subworkflows:
# TODO: import only required workflows...
# TODO: dag sort these...
subworkflows = OrderedDict()
subworkflows = {}
for graph_id, subworkflow_content in conversion_context.graph_ids.items():
if graph_id == "main":
continue
Expand Down Expand Up @@ -194,7 +193,7 @@ def _python_to_workflow(as_python, conversion_context):

if isinstance(steps, list):
_append_step_id_to_step_list_elements(steps)
steps_as_dict = OrderedDict()
steps_as_dict: Dict[str, Any] = {}
for i, step in enumerate(steps):
steps_as_dict[str(i)] = step
if "label" in step:
Expand Down Expand Up @@ -577,8 +576,8 @@ class ConversionContext(BaseConversionContext):
def __init__(self, galaxy_interface, workflow_directory, import_options: Optional[ImportOptions] = None):
super().__init__()
self.import_options = import_options or ImportOptions()
self.graph_ids = OrderedDict() # type: Dict
self.graph_id_subworkflow_conversion_contexts = {} # type: Dict
self.graph_ids: Dict[str, Any] = {}
self.graph_id_subworkflow_conversion_contexts: Dict[str, Any] = {}
self.workflow_directory = workflow_directory
self.galaxy_interface = galaxy_interface

Expand Down
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# TODO: implement doc linting
[tox]
envlist = py{36,37,38,39}-lint, py36-lintdocstrings, py36-lintreadme, py{36,37,38,39}-mypy, py{36,37,38,39}-unit
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
source_dir = gxformat2
test_dir = tests

[gh-actions]
python =
3.6: py36-unit, py36-mypy, py36-lint, py36-lintdocs, py36-lintdocstrings
3.7: py37-unit, py37-mypy
3.7: py37-unit, py37-mypy, py37-lint, py37-lintdocs, py37-lintdocstrings
3.8: py38-unit, py38-mypy
3.9: py39-unit, py39-mypy, py39-lint, py39-lintdocs
3.9: py39-unit, py39-mypy
3.10: py310-unit, py310-mypy
3.11: py311-unit, py311-mypy, py311-lint, py311-lintdocs

[testenv]
commands =
Expand Down

0 comments on commit df64b62

Please # to comment.