Exemplo n.º 1
0
def count_where_gisid_assigned(logname):
    logger = MC.setup_logging(logname)
    logger.info("Starting program...")

    pp_workspace = MC.get_preprod_workspace()
    p_workspace = MC.get_prod_workspace()

    pp_dict = CC.count_fcs(pp_workspace, CC.count_fc_gisid_assigned)
    p_dict = CC.count_fcs(p_workspace, CC.count_fc_gisid_assigned)

    CC.write_r2d1_results(logname, logger, pp_dict, p_dict)

    logger.info("Finished program")
Exemplo n.º 2
0
def copy_gps(log_name, source_workspace, target_workspace, state_of_interest):
    logger = MC.setup_logging(log_name)
    logger.info("Starting program...")

    logger.info(state_of_interest)
    logger.info(source_workspace + " --> " + target_workspace)

    MC.arcfm_disable()

    copy_fcs_by_state(logger, source_workspace, target_workspace, state_of_interest)

    MC.arcfm_cleanup()

    MC.send_finished_email(log_name)

    logger.info("Finished program")
Exemplo n.º 3
0
import MigrationCommon as MC
import CheckoutCommon as CC
import Checkout4 as C4


def count_r2d2_lines(state_of_interest):
    pp_workspace = MC.get_r2d2_preprod_workspace(state_of_interest)
    pp_lines = CC.list_lines_fcs(pp_workspace)
    pp_dict = CC.count_list_fcs(pp_lines, C4.count_r2d2_fc_state)

    return pp_dict


#
# start of program
#
if __name__ == "__main__":
    log_name = 'checkout5'
    logger = MC.setup_logging(log_name)
    logger.info("Starting program...")

    CC.write_rd2d2_by_state(log_name, logger, count_r2d2_lines)

    logger.info("Finished program")
Exemplo n.º 4
0
                preprod_final_list.append((curr_pp_gisid, gisid))
                print_tup2(p_fw, curr_pp_gisid, p_item, gisid)
                gisid += 1
                local_count += 1

    logger.info('|'.join(["Total_Matched", str(local_count), str(local_count)]))

    MC.write_gisid_seed(gisid)

    return gisid, local_count


#
# start of program
#
logger = MC.setup_logging('migrate1')
logger.info("Starting program...")

# setting this as it should start with this number for Migration 1
gisid_seed = 70000001  # MC.read_gisid_seed()
MC.write_gisid_seed(gisid_seed)

pp_workspace = MC.get_preprod_workspace()
p_workspace = MC.get_prod_workspace()

pp_final_list = []
p_final_list = []

total_matched_count = 0

with open("results/mig1_results.txt", "w+") as p_f:
Exemplo n.º 5
0
import MigrationCommon as MC


logger = MC.setup_logging('checkout1')
logger.info("Starting program...")

with open("results/mig1_results.txt") as f:
    num_lines = sum(1 for line in f)
logger.info('Results file length: ' + str(num_lines))

gisid_seed = MC.read_gisid_seed()
logger.info('GISID seed value: ' + str(gisid_seed))

logger.info('Difference between: ' + str(gisid_seed - num_lines))

logger.info("Finished program")
import CheckoutCommon as cc


def disable_workspace(local_logger, workspace):
    local_logger.info(workspace)
    for fc in [x for x in cc.list_all_fcs(workspace) if x != 'NISOURCE.GPSFMEJobLog']:
        if arcpy.Exists(fc):
            local_logger.info(fc)
            mc.disable_editor_tracking(workspace, fc)


#
# start of program
#
if __name__ == "__main__":
    logger = mc.setup_logging('disable_et')
    states = ['OH', 'PA', 'VA']

    logger.info("R2D1 GPS feature classes...")
    disable_workspace(logger, mc.get_preprod_workspace_nisource())
    disable_workspace(logger, mc.get_prod_workspace_nisource())

    logger.info("R2D2 GPS feature classes...")
    for state in states:
        logger.info(state)
        disable_workspace(logger, mc.get_r2d2_preprod_workspace_nisource(state))

    logger.info("R2D2 GIS feature classes...")
    for state in states:
        logger.info(state)
        disable_workspace(logger, mc.get_r2d2_prod_workspace_nisource(state))
Exemplo n.º 7
0
    edit.stopEditing(True)
    move_logger.info("Total|" + str(running_total))

    del sCur, iCur

    mc.write_gisid_seed(gisid)

    # time.sleep(10)
    # MC.enable_editor_tracking(target_workspace, fc)


#
# start of program
#
log_name = 'migrate6'
logger = mc.setup_logging(log_name)
logger.info("Starting program...")

mc.arcfm_disable()

states = ["OH", "PA", "VA"]

for gps_state in states:
    p_workspace = mc.get_prod_workspace()
    r2d2_prod = mc.get_r2d2_prod_workspace(gps_state)
    logger.info(p_workspace + "-->" + r2d2_prod)

    move_workarea(logger, p_workspace, r2d2_prod, gps_state)

mc.arcfm_cleanup()
import CheckoutCommon as cc


def enable_workspace(local_logger, workspace):
    local_logger.info(workspace)
    for fc in [x for x in cc.list_all_fcs(workspace) if x != 'NISOURCE.GPSFMEJobLog']:
        if arcpy.Exists(fc):
            local_logger.info(fc)
            mc.enable_editor_tracking(workspace, fc)


#
# start of program
#
if __name__ == "__main__":
    logger = mc.setup_logging('enable_et')
    states = ['OH', 'PA', 'VA']

    logger.info("R2D1 GPS feature classes...")
    enable_workspace(logger, mc.get_preprod_workspace_nisource())
    enable_workspace(logger, mc.get_prod_workspace_nisource())

    logger.info("R2D2 GPS feature classes...")
    for state in states:
        logger.info(state)
        enable_workspace(logger, mc.get_r2d2_preprod_workspace_nisource(state))

    logger.info("R2D2 GIS feature classes...")
    for state in states:
        logger.info(state)
        enable_workspace(logger, mc.get_r2d2_prod_workspace_nisource(state))