-
Notifications
You must be signed in to change notification settings - Fork 11
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
Eunomia 2.0 Unit Test Notes #42
Comments
Relevant changes are on this branch for now: https://github.com/OHDSI/CohortGenerator/tree/test-eunomia-2 |
An update here - I've bumped up the reference to Eunomia on the |
Did you run check on all reverse dependencies? Here's the code I use to do that for major DatabaseConnector changes: https://github.com/OHDSI/DatabaseConnector/blob/main/extras/PackageMaintenance.R#L119 |
@schuemie - I have not run this reverse dependency check. I must admit I'm unsure what this is doing and how it is useful for testing this type of change? In my mind, I was envisioning that we'd need to set up a pull request per HADES repo that updates the unit tests to make the changes for Eunomia that I described at the start of this issue. I'm curious how the reverse dependency check can help us in this case? |
Why don't we keep the If there was a way to provide a default location for the zip file when |
@ablack3 - going through this issue with the hopes that we can make Eunomia 2.x backwards compatible. Upon review, I had a few thoughts:
|
@anthonysena his suggestion seems like a good idea to me. I have added a PR to show how does can look like. What do you think about this @ablack3 @fdefalco ? |
@ablack3 thanks for merging the PR. I did the reverse dependency check like Martijn suggested and I found an issue. The first package that I tried, CohortMethod, has failing tests with Eunomia v2 but they do work with Eunomia v1. After digging into it, it seems to me that some dates are not correctly in the sqllite database. I made the reprex below, it fails with v2 but works with v1. Any idea what it could be?
These are the reverse dependencies btw
|
Hi @ginberg, The issue is that loading dates into SQLite is not working as expected. V2 of Eunomia dynamically loads the data into a sqlite database when the user requests the data which is different than V1 which simply included a static sqlite file. However when we load dates into SQLite we have to be careful because SQLite does not have a date type. Here is a screenshot showing the moment right before and right after the data is loaded from R to sqlite. As you can see the dates are correct in R but get turned into numbers in sqlite. I've made a possible fix on a new branch call "sqlite_dates". Will you try with that branch? |
@ablack3 your fix looks good to me. Not ideal we have to do this for sqlite, but at least now the dates are the same as previously. I did run the R check for all reverse dependencies and found no problems related to Eunomia using this version. So, it looks to me like we are backwards compatible with this PR. |
I've been working my way back to Eunomia, we had issues in the CommonDataModel package that I'm working on resolving. I have a branch of Eunomia that resolves a number of other issues as my test chain before reverse dependency checking was to test Achilles and DataQualityDashboard which also both failed when using the new Eunomia. Hope to get to this soon. |
Just making an issue here to note any changes made while attempting to update unit tests to use Eunomia 2.0 (currently on the
develop
branch).EUNOMIA_DATA_FOLDER
environment variable so GitHub Actions (GHA) has a place to store the data. Here is some boiler plate code that could go into thetests/testthat/setup.R
file for reference:Vignettes that use Eunomia will also need to set the
EUNOMIA_DATA_FOLDER
environment variable in order for the R CMD check to work properly on GHA.The signature of the function
Eunomia::getConnectionDetails()
has changed. v1.x supported the following signature:v2.x removes the
databaseFile
parameter when callingEunomia::getConnectionDetails()
. The control over thedatabaseFile
parameter is governed by theEUNOMIA_DATA_FOLDER
environment variable. Alternatively, you can make use of theEunomia::getConnectionDetails
function for more fine-grained control over the dataset used, etc.The text was updated successfully, but these errors were encountered: