-
Notifications
You must be signed in to change notification settings - Fork 0
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
Eur db release #198
Eur db release #198
Conversation
@liniiiiii how did you create the empty database? the one mentioned in your command:
|
Hi @i-be-snek , thanks for the key comment, now the readme and the db file are updated, pls have a look, thanks! |
I'm picking this up now :D big thanks. |
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.
There are several things that need changing in this PR.
(1) the convert_to_EUR_yearly_avg
function contains a larger number of surplus variables. The year and month and so on is used to determine the rate... but that function takes these variables in then never uses them except to log an error. That function needs to be re-written. I think the only thing you want to check, really, is that the year is 2024. If convert_to_EUR_yearly_avg
really is only for the rate of 2024, then you need to make that explicit in its name... otherwise, it sounds like a function that gives you a choice or functionality of converting to EUR buy the yearly average rate but that is not true in this case.
(2) Since the aforementioned function does not assert that the year is 2024 (and not NaN, because many of those rows have no year since they were not convertable to USD), so it needs to be fixed and re-run.
(3) the naming of several functions is not great:
- The function
USD_to_EUR
borrows heavily fromnormalize_row_USD
yet its naming style diverges from the norm. This is bad for future developers because it's confusing naming. - The database name itself is confusing. It needs to follow our semantic versioning style (https://semver.org/). The database name hence needs to change from
impactdb.v1.2.dg_filled_EUR.db
toimpactdb.v1.3.dg_filled.db
. It's the same database with a "minor" change. In the README, both releases cannot be the LATEST. That's a tag reserved for the latest release only. You can say both releases are usable depending on which currency you prefer, but it cannot be called LATEST.
(4) There are no logs for the failed insertions. You need to find the insertion logs (usually they land in a directory called tmp
, maybe you need to create it if it doesn't exist) and these need to end up in the correct directory in releases/
@i-be-snek , I updated the pr following your suggestions, could you help to review it as soon as you are available, thanks! |
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.
@liniiiiii I have not checked everything but could readily see some issues. Could you please take a look at the comments on the code that I just posted and provide some clarifications/modifications?
releases/README.md
Outdated
@@ -18,8 +18,8 @@ | |||
|
|||
| [releases/impactdb.v1.0.dg_filled.db](releases/impactdb.v1.0.dg_filled.db) | A **post-processed** database after applying a final layer of post-processing, excluding the handling of currencies and inflation adjustment (has missing validation rules) | | |||
| [releases/impactdb.v1.1.dg_filled.db](releases/impactdb.v1.1.dg_filled.db) | A **post-processed** database after applying a final layer of post-processing, including the handling of currencies and inflation adjustment. In this release, end years of events are nullable. | | |||
| [releases/impactdb.v1.2.dg_filled.db](releases/impactdb.v1.1.dg_filled.db) **LATEST** | A **post-processed** database that improves on [releases/impactdb.v1.1.dg_filled.db](releases/impactdb.v1.1.dg_filled.db) by removing events that have no L1/L2/L3 impacts (ie. all impact data in L1 is NULL) | | |||
| [releases/impactdb.v1.2.dg_filled_EUR.db](releases/impactdb.v1.1.dg_filled.db) **LATEST** | A **post-processed** database that convert 2024 USD to 2024 EUR on [releases/impactdb.v1.2.dg_filled.db](releases/impactdb.v1.1.dg_filled.db) by using a constant conversion rate in 2024 | | |||
| [releases/impactdb.v1.2.dg_filled.db](releases/impactdb.v1.1.dg_filled.db) **Lastest 2024 USD version** | A **post-processed** database that improves on [releases/impactdb.v1.1.dg_filled.db](releases/impactdb.v1.1.dg_filled.db) by removing events that have no L1/L2/L3 impacts (ie. all impact data in L1 is NULL), most currencies are converted to USD in the database and inflated to 2024 value. | |
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.
Did you mean "LATEST 2024 USD version"? "lastest" is not a valid word.
Also, this still takes you to releases/impactdb.v1.1.dg_filled.db
. This isn' the right release, is it?
@i-be-snek , I update the changes, if it's ok, we can make a release regarding to our V1, thanks! |
@liniiiiii Sorry but there are some outstanding issues still in the PR. Hope you could bear with me a bit here
I think this is much better and removing the word "latest" is much clearer because the files we have now are for 2024 only! Since none of the suggested changes modify the code in any way, I don't think it's necessary to re-run the conversion. |
Thanks for the suggestions, I think they are clear and useful for the users, I updated them! |
@i-be-snek , could you help me with this pr,
I run this and get the EUR output,
But when I run the inserting, I got error below, the L2 and L3 inserting process is failed. But I check the structure for this insert_full_run, the output is in the same structure, so I'm a bit confused about this error, thanks!
command:
error: