Commit d98a8494 authored by Powell, Eric's avatar Powell, Eric
Browse files

Project set-up - fixed pathing and dependencies.

parent 1acfa8df
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -140,25 +140,3 @@ class LoadRes(ResEstimateData):
                                           'task_id')
        return

if __name__ == '__main__':
    # Use project title to allow us to tie this to the information in the Feature Weighting Table
    project_title = 'COREII'
    resource_pool_name = 'ITSD'
    # The name of the Resolution Export file
    res_filename = r'/mnt/c/Users/uvp/Downloads/estimate (8).xlsx'
    # Connect to the database holding the estimate information
    pg_connect_string = (F"host='hgis-prj-mgmt', port='5438', dbname='proj_status', "
                         F"user='postgres',password='postgres'")
    # NOTE: Replace with your actual database connection details
    DB_PARAMS = {
        "dbname": "proj_status",
        "user": "postgres",
        "password": "postgres",
        "host": "hgis-prj-mgmt",
        "port": "5438"
    }
    #Load the information
    pg_conn = psycopg2.connect(**DB_PARAMS)
    objLoadRes = LoadRes(project_title, resource_pool_name, res_filename, pg_conn)
    objLoadRes.load()
+1 −12
Original line number Diff line number Diff line
import psycopg2
from psycopg2 import SQL
from ../libraries/db_Loader import LoadRes

# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.


def print_hi(name):
    # Use a breakpoint in the code line below to debug your script.
    print(f'Hi, {name}')  # Press Ctrl+F8 to toggle the breakpoint.
from ..libraries.db_loader import LoadRes


# Press the green button in the gutter to run the script.