"""Bioconductor run git transition code.

This module assembles the classes for the SVN --> Git transition
can be run in a sequential manner.

It runs the following aspects fo the Bioconductor transition.

Note: Update the SVN dump

1. Run Bioconductor Software package transition
2. Run Bioconductor Experiment Data package transition
3. Run Workflow package transition
4. Run Manifest file transition
5. Run Rapid update of master (trunk) and RELEASE_3_5 branches on
   software packages

Manual tasks which need to be done:
1. Copy over bare repos to repositories/packages
2. Copy manifest bare git repo to repositories/admin
"""

import src.run_transition as rt
import src.svn_dump_update as sdu
import logging
import time
logging.basicConfig(filename='transition.log',
                    format='%(levelname)s %(asctime)s %(message)s',
                    level=logging.DEBUG)


def svn_dump_update(config_file):
    sdu.svn_root_update(config_file)
    sdu.svn_experiment_root_update(config_file)
    return


def run(config_file):
    rt.run_software_transition(config_file, new_svn_dump=True)
    rt.run_experiment_data_transition(config_file, new_svn_dump=True)
    rt.run_workflow_transition(config_file, new_svn_dump=True)
    rt.run_manifest_transition(config_file, new_svn_dump=True)
    return


if __name__ == '__main__':
    start_time = time.time()
    config_file = "./settings.ini"
    svn_dump_update(config_file)
    run(config_file)
# TODO: Run updates after dump update
    svn_dump_update(config_file)
    rt.run_updates(config_file)
    logging.info("--- %s seconds ---" % (time.time() - start_time))

[((26, 0, 28, 40), 'logging.basicConfig', 'logging.basicConfig', (), '', False, 'import logging\n'), ((32, 4, 32, 36), 'src.svn_dump_update.svn_root_update', 'sdu.svn_root_update', ({(32, 24, 32, 35): 'config_file'}, {}), '(config_file)', True, 'import src.svn_dump_update as sdu\n'), ((33, 4, 33, 47), 'src.svn_dump_update.svn_experiment_root_update', 'sdu.svn_experiment_root_update', ({(33, 35, 33, 46): 'config_file'}, {}), '(config_file)', True, 'import src.svn_dump_update as sdu\n'), ((38, 4, 38, 62), 'src.run_transition.run_software_transition', 'rt.run_software_transition', (), '', True, 'import src.run_transition as rt\n'), ((39, 4, 39, 69), 'src.run_transition.run_experiment_data_transition', 'rt.run_experiment_data_transition', (), '', True, 'import src.run_transition as rt\n'), ((40, 4, 40, 62), 'src.run_transition.run_workflow_transition', 'rt.run_workflow_transition', (), '', True, 'import src.run_transition as rt\n'), ((41, 4, 41, 62), 'src.run_transition.run_manifest_transition', 'rt.run_manifest_transition', (), '', True, 'import src.run_transition as rt\n'), ((46, 17, 46, 28), 'time.time', 'time.time', ({}, {}), '()', False, 'import time\n'), ((52, 4, 52, 31), 'src.run_transition.run_updates', 'rt.run_updates', ({(52, 19, 52, 30): 'config_file'}, {}), '(config_file)', True, 'import src.run_transition as rt\n'), ((53, 41, 53, 52), 'time.time', 'time.time', ({}, {}), '()', False, 'import time\n')]