From cf51f9fbab05d3c218bc58793a5ce1f5ca8f78ee Mon Sep 17 00:00:00 2001 From: Andreas Florath Date: Fri, 23 Mar 2012 15:29:53 +0000 Subject: [PATCH] Fixed testcase and some small other things --- doc/Config1.json | 2 +- rmtoo/lib/Output.py | 4 ++-- rmtoo/lib/RequirementSet.py | 2 +- rmtoo/lib/TestCase.py | 4 ++-- rmtoo/lib/analytics/DescWords.py | 11 ++++++++++- rmtoo/outputs/latex2.py | 2 +- rmtoo/outputs/prios.py | 2 +- rmtoo/outputs/stats_burndown1.py | 2 +- rmtoo/outputs/stats_sprint_burndown1.py | 2 +- 9 files changed, 20 insertions(+), 11 deletions(-) diff --git a/doc/Config1.json b/doc/Config1.json index 95769abf..3b5d5d9a 100644 --- a/doc/Config1.json +++ b/doc/Config1.json @@ -50,7 +50,7 @@ "constraints_dirs": [ "rmtoo/collection/constraints" ] } ], [ - "git", { + "ignore:git", { "start_vers": "v21", "end_vers": "v22", "requirements_dirs": [ "doc/requirements" ], diff --git a/rmtoo/lib/Output.py b/rmtoo/lib/Output.py index 622df3b7..5d6554a8 100644 --- a/rmtoo/lib/Output.py +++ b/rmtoo/lib/Output.py @@ -42,7 +42,7 @@ def __create_output_module(self, output_name): def __common_topic_continuum_pre(self, topic_continuum, special): '''Common method used by cmad_ and normal callback.''' - tracer.debug("Called.") + tracer.info("Called.") output_config = topic_continuum.get_output_config() for oconfig_name, oconfig in output_config.iteritems(): @@ -53,7 +53,7 @@ def __common_topic_continuum_pre(self, topic_continuum, special): FuncCall.pcall(output_obj, "init_" + special, self.__cmad_file) topic_continuum.execute(output_obj, special) - tracer.debug("Finished.") + tracer.info("Finished.") def topic_continuum_pre(self, topic_continuum): '''This is called in the TopicsContinuum pre-phase.''' diff --git a/rmtoo/lib/RequirementSet.py b/rmtoo/lib/RequirementSet.py index 6b72e8d5..4ba750a4 100644 --- a/rmtoo/lib/RequirementSet.py +++ b/rmtoo/lib/RequirementSet.py @@ -226,7 +226,7 @@ def __read_one_testcase(self, fileinfo, input_mods, object_cache): if testcase == None: file_content = fileinfo.get_content() testcase = TestCase(file_content, rid, fileinfo.get_filename(), - self, input_mods, self._config) + input_mods, self._config) # Add the requirement to the cache. object_cache.add(vcs_id, "TestCase", testcase) diff --git a/rmtoo/lib/TestCase.py b/rmtoo/lib/TestCase.py index 7849adbe..5aff8505 100644 --- a/rmtoo/lib/TestCase.py +++ b/rmtoo/lib/TestCase.py @@ -13,8 +13,8 @@ class TestCase(BaseRMObject): - def __init__(self, content, rid, file_path, mls, mods, config): + def __init__(self, content, rid, file_path, mods, config): BaseRMObject.__init__(self, InputModuleTypes.testcase, content, - rid, mls, mods, + rid, mods, config, "testcases", file_path) diff --git a/rmtoo/lib/analytics/DescWords.py b/rmtoo/lib/analytics/DescWords.py index 0f8e6a5a..d99183db 100644 --- a/rmtoo/lib/analytics/DescWords.py +++ b/rmtoo/lib/analytics/DescWords.py @@ -81,7 +81,7 @@ def get_lang(config): if def_lang in DescWords.words: return DescWords.words[def_lang] - tracer.warn("Language [%s] not suppurted, using en_GB." % def_lang) + tracer.warn("Language [%s] not supported, using en_GB." % def_lang) return DescWords.words["en_GB"] @staticmethod @@ -100,6 +100,15 @@ def analyse(lname, lwords, text): # Note the result of this test in the requirement itself. return Result('DescWords', lname, level, log) + def topic_continuum_set_sort(self, list_to_sort): + '''Can only handle from the last version.''' + return [list_to_sort[-1]] + + def topic_continuum_sort(self, vcs_commit_ids, topic_sets): + '''Because graph2 can only one topic continuum, + the latest (newest) is used.''' + return [ topic_sets[vcs_commit_ids[-1].get_commit()] ] + def requirement_set_sort(self, list_to_sort): '''Sort by id.''' return sorted(list_to_sort, key=lambda r: r.id) diff --git a/rmtoo/outputs/latex2.py b/rmtoo/outputs/latex2.py index 0d5abe29..5812d371 100644 --- a/rmtoo/outputs/latex2.py +++ b/rmtoo/outputs/latex2.py @@ -33,7 +33,7 @@ class latex2(StdOutputParams, ExecutorTopicContinuum, CreateMakeDependencies): def __init__(self, oconfig): '''Create a graph output object.''' - tracer.debug("Called.") + tracer.info("Called.") StdOutputParams.__init__(self, oconfig) CreateMakeDependencies.__init__(self) self.__ce3set = None diff --git a/rmtoo/outputs/prios.py b/rmtoo/outputs/prios.py index caa61c79..721f38f0 100644 --- a/rmtoo/outputs/prios.py +++ b/rmtoo/outputs/prios.py @@ -35,7 +35,7 @@ class prios(StdOutputParams, ExecutorTopicContinuum, CreateMakeDependencies): def __init__(self, oconfig): '''Create a prios output object.''' - tracer.debug("Called.") + tracer.info("Called.") StdOutputParams.__init__(self, oconfig) CreateMakeDependencies.__init__(self) diff --git a/rmtoo/outputs/stats_burndown1.py b/rmtoo/outputs/stats_burndown1.py index 167149ae..c1863bc2 100644 --- a/rmtoo/outputs/stats_burndown1.py +++ b/rmtoo/outputs/stats_burndown1.py @@ -21,7 +21,7 @@ class stats_burndown1(StdOutputParams, ExecutorTopicContinuum, def __init__(self, oconfig): '''Create a graph output object.''' - tracer.debug("Called.") + tracer.info("Called.") StdOutputParams.__init__(self, oconfig) CreateMakeDependencies.__init__(self) diff --git a/rmtoo/outputs/stats_sprint_burndown1.py b/rmtoo/outputs/stats_sprint_burndown1.py index b2a489f9..a8bd11e6 100644 --- a/rmtoo/outputs/stats_sprint_burndown1.py +++ b/rmtoo/outputs/stats_sprint_burndown1.py @@ -20,7 +20,7 @@ class stats_sprint_burndown1(StdOutputParams, ExecutorTopicContinuum, def __init__(self, oconfig): '''Create a graph output object.''' - tracer.debug("Called.") + tracer.info("Called.") StdOutputParams.__init__(self, oconfig) CreateMakeDependencies.__init__(self)