RMI-PACTA / pacta.portfolio.report

pacta.portfolio.report
https://rmi-pacta.github.io/pacta.portfolio.report/
MIT License
1 stars 0 forks source link

get PACTA pkg versions and SHAs from the installed DESCRIPTION files #42

Closed cjyetman closed 9 months ago

cjyetman commented 9 months ago

closes #32

Utilizes the version info and SHA recorded in the DESCRIPTION file of the installed PACTA packages when installed with pak::pak() (instead of the head_hashes environment variable that is no longer used/created).

cjyetman commented 9 months ago

I haven't tested on a Docker image yet either, so I will not merge until I (or someone) has verified that.

cjyetman commented 9 months ago

With all the latest PACTA pkgs and this pkg at this PR branch, and using the latest workflow.tranistion.monitor, this appears to work as expected, so I'm going to merge it.

pak::pak("rmi-pacta/pactaverse", ask = FALSE)
pak::pak("rmi-pacta/pacta.portfolio.report#42", ask = FALSE)

# -------------------------------------------------------------------------

source("web_tool_script_1.R")
source("web_tool_script_2.R")
source("web_tool_script_3.R")

jsonlite::read_json("working_dir/50_Outputs/1234/report/export/environment_info.json", simplifyVector = TRUE)$pacta_pkgs_versions

#>                           Package    Version                                RemoteSha                               GithubSHA1
#> 1             pacta.data.scraping 0.1.0.9000 1b2e1a5d07b8991127edbb2e93c9735af37148f3 1b2e1a5d07b8991127edbb2e93c9735af37148f3
#> 2           pacta.data.validation 0.0.0.9000 5de2045a0dae695577a4a76649f79ddd6c059473 5de2045a0dae695577a4a76649f79ddd6c059473
#> 3         pacta.executive.summary 0.1.1.9000 5b919a981f2e0e479b6180182ca4961a36a9e0db 5b919a981f2e0e479b6180182ca4961a36a9e0db
#> 4          pacta.interactive.plot 0.0.0.9000 728fa00955b19f5230d7d80d8737e652d6ba3778 728fa00955b19f5230d7d80d8737e652d6ba3778
#> 5        pacta.interactive.report 0.4.0.9000 c7ca9884df8fd4efd0b64618ecb8150776a4baf3 c7ca9884df8fd4efd0b64618ecb8150776a4baf3
#> 6        pacta.portfolio.allocate      0.0.2 0d91065cdf73904e2c30e128e3aa0f80ca652192 0d91065cdf73904e2c30e128e3aa0f80ca652192
#> 7           pacta.portfolio.audit 0.0.1.9000 d61345540f83475632336181bb7dd4fd852d5943 d61345540f83475632336181bb7dd4fd852d5943
#> 8          pacta.portfolio.import      0.0.2 13beda3b52afc6e53ff644b1d454001c596dd79b 13beda3b52afc6e53ff644b1d454001c596dd79b
#> 9          pacta.portfolio.report 0.4.1.9000 01ffa2610de129e520f620e4f80f030aed31ec8a 01ffa2610de129e520f620e4f80f030aed31ec8a
#> 10          pacta.portfolio.utils 0.0.2.9000 a08ed4e47ea38abb59bd15a41631cd94393c724a a08ed4e47ea38abb59bd15a41631cd94393c724a
#> 11 pacta.transition.monitor.utils 0.0.0.9000 3e643d60fbdd5ba5d3bf25a7cec34ba1f7bca9c1 3e643d60fbdd5ba5d3bf25a7cec34ba1f7bca9c1