RMI-PACTA / pactaCore

Tools to Calculate Climate Targets for Equity and Corporate Bond Portfolios
Other
0 stars 1 forks source link

Ship pacta's source in inst/ #44

Closed maurolepore closed 3 years ago

maurolepore commented 3 years ago

This PR allows users to run pactaCore without cloning the source code. Instead we now ship it inside inst/ and call it from a light-weight package, which root is clean.

Eventually we could move code from inst/ into back to the package.

This PR allows a workflow where the user installs pactaCore, then run this single function:

pactaCore::pacta_core(
  output = "~/git/pacta/output",
  input = "~/git/pacta/input",
  data = "~/git/pacta/pacta-data"
)

If working from the parent of the required directories, then the call simplifies to pactaCore::pacta_core().

For users who prefer to specify those paths in an .env file the call becomes pactaCore::pacta_core_with_env().

README for details.

--

With this interface it is simple to build a widget (shiny gadget) for the user to provide the required paths either from R of from a shiny server running docker and R.