Renamed base parser class and creds
This commit is contained in:
parent
620a6a820f
commit
b52be1a89c
@ -1,5 +1,5 @@
|
||||
REFETCH_PERIOD_H=6
|
||||
POSTGRES_USER=rosseti
|
||||
POSTGRES_PASSWORD=rosseti
|
||||
POSTGRES_DB=rosseti
|
||||
POSTGRES_USER=lenenergo
|
||||
POSTGRES_PASSWORD=lenenergo
|
||||
POSTGRES_DB=lenenergo
|
||||
POSTGRES_HOST=db
|
@ -12,11 +12,11 @@ from .preprocess import (
|
||||
preprocess_df,
|
||||
preprocess_read_df,
|
||||
)
|
||||
from .rosseti import RossetiParser
|
||||
from .lenenergo import LenenergoParser
|
||||
from .util import pipeline
|
||||
|
||||
__all__ = (
|
||||
"RossetiParser",
|
||||
"LenenergoParser",
|
||||
"split_addresses",
|
||||
"get_building_id",
|
||||
"fetch_builing_ids",
|
||||
|
@ -1,16 +1,16 @@
|
||||
from typing import Optional
|
||||
|
||||
from . import (
|
||||
RossetiParser,
|
||||
LenenergoParser,
|
||||
concurrent_fetch_builing_ids,
|
||||
preprocess_df,
|
||||
split_addresses,
|
||||
)
|
||||
|
||||
|
||||
def pipeline(parser: Optional[RossetiParser] = None) -> RossetiParser:
|
||||
def pipeline(parser: Optional[LenenergoParser] = None) -> LenenergoParser:
|
||||
if parser is None:
|
||||
parser = RossetiParser()
|
||||
parser = LenenergoParser()
|
||||
|
||||
print(parser)
|
||||
|
||||
|
@ -2,8 +2,8 @@ import os
|
||||
|
||||
REFETCH_PERIOD_H = int(os.environ.get("REFETCH_PERIOD_H", "4"))
|
||||
|
||||
POSTGRES_USER = os.environ.get("POSTGRES_USER", "rosseti")
|
||||
POSTGRES_PASSWORD = os.environ.get("POSTGRES_PASSWORD", "rosseti")
|
||||
POSTGRES_DB = os.environ.get("POSTGRES_DB", "rosseti")
|
||||
POSTGRES_USER = os.environ.get("POSTGRES_USER", "lenenegro")
|
||||
POSTGRES_PASSWORD = os.environ.get("POSTGRES_PASSWORD", "lenenegro")
|
||||
POSTGRES_DB = os.environ.get("POSTGRES_DB", "lenenegro")
|
||||
POSTGRES_HOST = os.environ.get("POSTGRES_HOST", "localhost")
|
||||
POSTGRES_PORT = int(os.environ.get("POSTGRES_PORT", "5432"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user