Пример #1
0
def test_small():

    out_dir = os.path.join(TEST_DATA_DIR,
                           'return/enigma50by30/return/RDP_Classifier_output')
    Var.out_allRank_flpth = os.path.join(out_dir, 'out_allRank.tsv')
    Var.report_dir = os.path.join(run_dir, 'report_enigma50by30')
    os.mkdir(Var.report_dir)
    Var.params = Params(dict(**req, conf=0.8))

    report.HTMLReportWriter(cmd_l=['test,', 'test,', 'small']).write()
Пример #2
0
def test_dummy(i, conf):
    out_dir = os.path.join(TEST_DATA_DIR,
                           'return/dummy10by8/return/RDP_Classifier_output')
    Var.out_allRank_flpth = os.path.join(out_dir, 'out_allRank.tsv')
    Var.report_dir = os.path.join(run_dir, 'report_dummy10by8_conf%g' % conf)
    os.mkdir(Var.report_dir)
    Var.params = Params(dict(
        **req,
        conf=conf,
    ))

    report.HTMLReportWriter(
        cmd_l=['test,', 'test,', 'dummy10by8',
               'conf=%g' % conf]).write()
Пример #3
0
def test_small_linspace():

    out_dir = os.path.join(TEST_DATA_DIR,
                           'return/enigma50by30/return/RDP_Classifier_output')
    Var.out_allRank_flpth = os.path.join(out_dir, 'out_allRank.tsv')
    for i, conf in enumerate(np.linspace(0, 1, 11)):
        Var.report_dir = os.path.join(run_dir,
                                      'report_enigma50by30_conf%g' % conf)
        os.mkdir(Var.report_dir)
        Var.params = Params(dict(**req, conf=conf))

        report.HTMLReportWriter(
            cmd_l=['test,', 'test,', 'small',
                   'conf=%g' % conf]).write()
Пример #4
0
def test_tiny(i):
    out_dir = os.path.join(TEST_DATA_DIR,
                           'return/dummyTiny/return/RDP_Classifier_output')
    Var.out_allRank_flpth = os.path.join(out_dir, 'out_allRank%d.tsv' % i)
    Var.report_dir = os.path.join(run_dir, 'report_dummyTiny_%d' % i)
    os.mkdir(Var.report_dir)
    Var.params = Params(dict(
        **req,
        conf=0.55555,
    ))

    with open(Var.out_allRank_flpth) as fh:
        allRank_lines = fh.readlines()

    report.HTMLReportWriter(cmd_l=['test,', 'test,', 'dummyTiny',
                                   'i=%d' % i] + allRank_lines).write()
Пример #5
0
def test_large():
    '''
    Globals used:
    report_dir, report_template_flpth
    out_allRank_flpth
    params
    '''

    out_dir = os.path.join(
        TEST_DATA_DIR, 'return/enigma17770by511/return/RDP_Classifier_output/')
    Var.out_allRank_flpth = os.path.join(out_dir, 'out_allRank.tsv')
    Var.report_dir = os.path.join(RUN_DIR, 'report_enigma17770by511')
    os.mkdir(Var.report_dir)
    Var.params = Params(dict(**req, conf=0.7777))

    report.HTMLReportWriter(cmd_l=['test,', 'test,', 'large'] * 10).write()