insightsengineering / teal.modules.clinical

Provides teal modules for the standard clinical trials outputs
https://insightsengineering.github.io/teal.modules.clinical/
Other
32 stars 17 forks source link

Deprecated: new_qenv() #999

Open npaszty opened 7 months ago

npaszty commented 7 months ago

What happened?

module "Report previewer" server function takes no data so "datanames" will be ignored
Warning: `new_qenv()` was deprecated in teal.code 0.5.0.
ℹ Please use `qenv()` instead.
ℹ The deprecated feature was likely used in the teal.modules.clinical package.
  Please report the issue at <https://github.com/insightsengineering/teal.modules.clinical/issues>.
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.

sessionInfo()

> sessionInfo()
R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.2.2  tools_4.2.2     rstudioapi_0.14 renv_0.16.0

Relevant log output

No response

Code of Conduct

Contribution Guidelines

Security Policy

chlebowa commented 7 months ago

That's not quite enough information, @npaszty. What version of tmc are you using? Your sessionInfo suggests a vanilla session. Can you provide the application code?

npaszty commented 7 months ago

of course. apologies. here is some context too.

we are moving apps off BEE and onto Apollo or OCEAN depending on the need. This specific app we are testing locally on Apollo. The app works but just sharing the issue per console instructions.

we are also moving away from manually managing custom libraries to initializing renv

Here is the top of the renv.lock file.

  "R": {
    "Version": "4.2.2",
    "Repositories": [
      {
        "Name": "NEST_latest",
        "URL": "https://packages.roche.com/Non-Validated/latest"
      },
      {
        "Name": "CRANMirror",
        "URL": "https://packages.roche.com/CRAN/latest"
      },
      {
        "Name": "RSPM",
        "URL": "https://packages.roche.com/CRAN/latest"
      }
    ]
  },

The list of teal* packages from the packages tab. Note that we are using teal.data 0.3.0 instead of 0.4.0 image

If you really would like to see the app.R then I can share that but it's quite long and we've been running it for years without issue so this issue is just cropping up because of the move to Apollo and using different versions of the teal packages.

chlebowa commented 7 months ago

All right. We are in the midle of releasing core teal packages to CRAN. teal.data was just published, actually :champagne: :partying_face: teal.slice and teal will soon follow (this coming February).

Your app code should be updated to accommodate a major refactor. You can get some migration pointers here and in vignettes. If you are using your won modules, have a look here.

Let me know if this helps or whether you need more information.

npaszty commented 7 months ago

thanks @chlebowa

address errors as they arise but for now was just reporting the issue given instruction in console. thanks for the references and the heads up about the coming refactoring. will open an issue in our repo to keep on the radar especially since we have other apps for which we built mostly custom modules still using the teal framework though.

chlebowa commented 7 months ago

OK then. If you find you can't afford to properly rebuild modules, you can use teal::as_tdata as a temporary measure.

npaszty commented 7 months ago

not sure what you mean by properly rebuild modules. we aren't building modules just using out of the box TMC like tm_variable_browser(), tm_data_table() and tm_t_summary().

chlebowa commented 7 months ago

we built mostly custom modules

Sorry if I misunderstood.

npaszty commented 7 months ago

we have other apps where we have a lot of custom modules but the one that is being migrated and triggered this note to console is using TMC out of the box.

chlebowa commented 7 months ago

Now I get it :+1:

donyunardi commented 5 months ago

@npaszty, we have completed the release of all teal frameworks and modules to adhere to our latest teal version. Could you please try installing all the packages again?

There will be breaking changes, and here is the guide to migrate your app.

Since your app uses tmc out of the box, you probably only need to update your data argument in teal::init.