コード例 #1
0
ファイル: recompute_all_ex.py プロジェクト: szho42/nidm
def main():
    logger.debug(" create_term_examples")
    create_term_examples.main()
    logger.debug(" create_spm_example")
    create_spm_example.main()
    logger.debug(" create_spm_example_001")
    create_spm_example_001.main()
    logger.debug(" create_spm_example_002")
    create_spm_example_002.main()
    logger.debug(" create_spm_example_003")
    create_spm_example_003.main()
    logger.debug(" create_spm_example_004")
    create_spm_example_004.main()
    logger.debug(" create_spm_example_005")
    create_spm_example_005.main()
    logger.debug(" create_fsl_example")
    create_fsl_example.main()
    logger.debug(" create_fsl_example_001")
    create_fsl_example_001.main()
    logger.debug(" create_fsl_example_002")
    create_fsl_example_002.main()
    logger.debug(" create_fsl_example_003")
    create_fsl_example_003.main()
    logger.debug(" create_minimal_examples")
    create_minimal_examples.main()
コード例 #2
0
ファイル: recompute_all_ex.py プロジェクト: szho42/nidm
def main():
	logger.debug(" create_term_examples")
	create_term_examples.main()
	logger.debug(" create_spm_example")
	create_spm_example.main()
	logger.debug(" create_spm_example_001")
	create_spm_example_001.main()
	logger.debug(" create_spm_example_002")
	create_spm_example_002.main()
	logger.debug(" create_spm_example_003")
	create_spm_example_003.main()
	logger.debug(" create_spm_example_004")
	create_spm_example_004.main()
	logger.debug(" create_spm_example_005")
	create_spm_example_005.main()
	logger.debug(" create_fsl_example")
	create_fsl_example.main()
	logger.debug(" create_fsl_example_001")
	create_fsl_example_001.main()
	logger.debug(" create_fsl_example_002")
	create_fsl_example_002.main()
	logger.debug(" create_fsl_example_003")
	create_fsl_example_003.main()
	logger.debug(" create_minimal_examples")
	create_minimal_examples.main()	
コード例 #3
0
    def test_unit_examples(self):
        # unit_examples = ["Cluster", "ClusterDefinitionCriteria", \
        # "ContrastEstimation", "ContrastMap", "ContrastStandardErrorMap",
        # "ContrastWeights", "Coordinate", "Data", "De" "DesignMatrix"]
        exception_msg = ""
        found_difference = False

        current = dict()
        updated = dict()

        for ex_file in os.listdir(EX_TERMS_DIR):
            if ex_file.endswith(".txt"):
                example_file = os.path.join(EX_TERMS_DIR, ex_file)

                example_fid = open(example_file, "r")
                current[ex_file] = example_fid.read()
                example_fid.close()

        create_term_examples.main()

        for ex_file in current.keys():
            example_file = os.path.join(EX_TERMS_DIR, ex_file)
            
            example_fid = open(example_file, "r")
            updated[ex_file] = example_fid.read()
            example_fid.close()

            example_fid = open(example_file, "w")
            example_fid.write(current[ex_file])
            example_fid.close()

        for ex_file in os.listdir(EX_TERMS_DIR):
            if ex_file.endswith(".txt"):
                found_difference = not (current[ex_file] == updated[ex_file])

                if found_difference:
                    exception_msg = exception_msg+"\n"+\
                        ex_file+" is not up to date with templates. \
Please use nidm/nidm-results/scripts/create_term_examples.py."

        if exception_msg:
            raise Exception(exception_msg)