amor71 / LiuAlgoTrader

Framework for algorithmic trading
MIT License
784 stars 129 forks source link

Rename this here and in `setup_db` #393

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago

Rename this here and in setup_db

https://github.com/amor71/LiuAlgoTrader/blob/4ce10fbf59f407763e399e4a0b7bc1a40038d3f4/liualgotrader/scripts/liu.py#L109


    print("files loaded successfully.")
    print(f"running docker-compose from within {db_location}:")
    _extracted_from_setup_db_69(db_location, " && docker-compose up -d")
    if restore_sample_db:
        print("waiting for database to complete setup. 2 minutes")
        time.sleep(120)
        print("restoring sample database")
        _extracted_from_setup_db_69(
            db_location,
            " && docker exec -i pg-docker psql -q -U liu -W liu liu < liu_dump.sql",
        )
    print()
    print("check deployment using `\psql -h localhost -p 5400 -U liu`")

# TODO Rename this here and in `setup_db`
def _extracted_from_setup_db_69(db_location, arg1):
    to_run = f"cd {db_location}{arg1}"
    print("> ", to_run)
    os.system(to_run)

def setup_samples(
    samples_location: str, user: str, passwd: str, db: str
) -> None:
    try:
        _extracted_from_setup_samples_5(samples_location, user, passwd, db)
    except Exception as e:
        print(f"Something went wrong:{e}")
        print(

94e1c20a07ce5a496a58a6105e5ba9b70494e699

github-actions[bot] commented 1 year ago

Stale issue message