-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: parse with url to parse using xlsx file #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ZolotarevAlexandr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything's fine, I marked couple of things that should be corrected (nothing too big), but overall everything works
src/cleaning/parse_cleaning_html.py
Outdated
|
|
||
| from src.logging_ import logger | ||
|
|
||
| # TODO: Rework to work with xlsx instead (better to def parse(dfs: dict[str, pd.DataFrame]) -> dict[str, list[date]])... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You implemented it, so better to remove that todo
src/cleaning/parse_cleaning_html.py
Outdated
| days = df.iloc[2::2, :] | ||
| # drop first, second and days rows | ||
| df = df.drop(df.index[[0, 1, *range(2, len(df), 2)]]) | ||
| # flatten days |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments are a bit excessive (like that one). But it's nice that there are comments in the first place
src/cleaning/parse_cleaning_html.py
Outdated
|
|
||
| # TODO: Rework to work with xlsx instead (better to def parse(dfs: dict[str, pd.DataFrame]) -> dict[str, list[date]])... | ||
|
|
||
| def process_dataframe(df, entries): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have type hints for function arguments and return values, add them for that one
src/cleaning/parser.py
Outdated
| """ | ||
|
|
||
| # TODO: Use parse_cleaning_html.py instead | ||
| logger.warning("Not implemented") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it is now)
src/cleaning/parser.py
Outdated
| # rdate=dates, | ||
| # ) | ||
| # ) | ||
| spreadsheet_id = "1xXnyinI1sNQ3ZKTPlKlqJKt4685oCz2R2LzlgEUztKs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such things better to keep in config file
Description of changes