mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #9995 from jmchilton/rule_dsl_packaging
Package rules DSL specification.
This commit is contained in:
@@ -1 +1 @@
|
||||
../../../../lib/galaxy_test/base/data/rules_dsl_spec.yml
|
||||
../../../../lib/galaxy/util/rules_dsl_spec.yml
|
||||
@@ -2,10 +2,16 @@ import abc
|
||||
import itertools
|
||||
import re
|
||||
|
||||
import yaml
|
||||
from pkg_resources import resource_stream
|
||||
|
||||
from galaxy.util import strip_control_characters_nested
|
||||
|
||||
|
||||
def get_rules_specification():
|
||||
return yaml.safe_load(resource_stream(__name__, 'rules_dsl_spec.yml'))
|
||||
|
||||
|
||||
def _ensure_rule_contains_keys(rule, keys):
|
||||
for key, instance_class in keys.items():
|
||||
if key not in rule:
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
# Common test data for rule testing meant to be shared between API and Selenium tests.
|
||||
from pkg_resources import resource_string
|
||||
|
||||
from galaxy.util import unicodify
|
||||
|
||||
RULES_DSL_SPEC_STR = unicodify(resource_string(__name__, "data/rules_dsl_spec.yml"))
|
||||
|
||||
|
||||
def check_example_1(hdca, dataset_populator):
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
include *.rst LICENSE
|
||||
include galaxy/util/docutils_template.txt
|
||||
include galaxy/util/rules_dsl_spec.yml
|
||||
include galaxy/exceptions/error_codes.json
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import yaml
|
||||
|
||||
from galaxy.util import rules_dsl
|
||||
from galaxy_test.base import rules_test_data
|
||||
|
||||
|
||||
def test_rules():
|
||||
for test_case in yaml.safe_load(rules_test_data.RULES_DSL_SPEC_STR):
|
||||
for test_case in rules_dsl.get_rules_specification():
|
||||
rule_set = rules_dsl.RuleSet(test_case)
|
||||
if "initial" in test_case:
|
||||
initial = test_case["initial"]
|
||||
Reference in New Issue
Block a user