Esempio n. 1
0
def init() -> None:
    """
    These are all the init steps required after a db has been initialized
    """
    load_fixtures()
    logger.info("Fixtures loaded")

    import_all_facilities()

    wikidata_join_mapping()
    logger.info("Imported wikidata for stations")

    wikidata_photos()
    logger.info("Imported wikidata photos")

    import_photos_from_fixtures()
    logger.info("Imported photos from wikidata")

    init_osm()
    logger.info("Initialized osm")

    init_stats()
    logger.info("Stats data initialized")

    update_facility_seen_range()
    logger.info("Ran seen range")
Esempio n. 2
0
def init():
    init_opennem(engine)
    logger.info("Db initialized")

    load_fixtures()
    logger.info("Fixtures loaded")

    registry_init()
    logger.info("Registry initialized")
Esempio n. 3
0
def init() -> None:
    load_fixtures()
    logger.info("Fixture loaded")

    registry_init()
    logger.info("Registry initialized")

    opennem_init()
    logger.info("Opennem initialized")

    import_emissions_csv()
    logger.info("Emission data initialized")
Esempio n. 4
0
def init() -> None:
    """
    These are all the init steps required after a db has been initialized
    """
    load_fixtures()
    logger.info("Fixtures loaded")

    registry_init()
    logger.info("Registry initialized")

    opennem_init()
    logger.info("Opennem facilities initialized")

    rooftop_facilities()
    logger.info("Rooftop stations initialized")

    import_emissions_csv()
    logger.info("Emission data initialized")

    init_fueltechs()
    logger.info("Initialized fueltechs")

    import_nem_interconnects()
    logger.info("Initialized interconnectors")

    wikidata_join_mapping()
    logger.info("Imported wikidata for stations")

    wikidata_photos()
    logger.info("Imported wikidata photos")

    import_photos_from_fixtures()
    logger.info("Imported photos from wikidata")

    init_osm()
    logger.info("Initialized osm")

    init_stats()
    logger.info("Stats data initialized")

    update_facility_seen_range()
    logger.info("Ran seen range")
Esempio n. 5
0
def cmd_db_fixturer() -> None:
    load_fixtures()
Esempio n. 6
0
def cmd_db_fixtures() -> None:
    load_fixtures()
    logger.info("Fixtures loaded")
Esempio n. 7
0
def cmd_db_fixturer():
    load_fixtures()
Esempio n. 8
0
def init_db() -> None:
    subprocess.run(["alembic", "upgrade", "head"])
    db_init()
    load_fixtures()
    opennem_import()
    import_facilities()