Skip to content
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

output scripts load not-needed libraries #43

Closed
alexkoberle opened this issue Dec 7, 2018 · 6 comments
Closed

output scripts load not-needed libraries #43

alexkoberle opened this issue Dec 7, 2018 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@alexkoberle
Copy link
Contributor

I noticed some of the output scripts load libraries that are not required and actually failed to load causing an error. For example, the LandusePlots.R script throws error when it attempts to load the libraries moinput and mrvalidation. By commenting them out, I was able to make the script run successfully and produce output. It seems these library calls were added during development and were not deleted (moinput is even called twice). Since these are not available to non-PIK users, they should be removed if not required.

It would be easy to go through all the output scripts and simply check if the libraries called upon are all required or are just left over from development.

@abhimishr abhimishr self-assigned this Dec 7, 2018
@abhimishr
Copy link
Member

Hey Alex,

Thank you for opening this issue. I will be committing a bug fix soon with cleaned scripts.

Additionally, can you confirm if the LandusePlots.R script worked as expected when you commented out the non-public libraries? (Just see if the actually generated some maps). I found that the script uses our luplot package which is not public yet and was causing the error.

@alexkoberle
Copy link
Contributor Author

alexkoberle commented Dec 10, 2018 via email

@abhimishr
Copy link
Member

abhimishr commented Dec 10, 2018

Hey Alex,

Can you instead remove all the libraries from the script and load just the following libraries?

library(magpie4)
library(magpiesets)
library(lusweave)
library(magclass)

@alexkoberle
Copy link
Contributor Author

alexkoberle commented Dec 10, 2018 via email

dklein-pik added a commit that referenced this issue Dec 10, 2018
@abhimishr abhimishr added the bug Something isn't working label Dec 10, 2018
@abhimishr
Copy link
Member

Hey Alex,

The luplot::plotmap2 dependency in LandusePlots.R could also be fixed by installing luplot from our repo. See here.

options(repos = c(CRAN = "@cran@", pik = "https://rse.pik-potsdam.de/r/packages"))

The cleanup is now part of the developer branch and the scripts available for post processing should now work as expected. I'll close issue #43 for now.

@alexkoberle
Copy link
Contributor Author

alexkoberle commented Dec 11, 2018 via email

tscheypidi pushed a commit that referenced this issue Jul 3, 2020
tscheypidi pushed a commit that referenced this issue Mar 10, 2021
flohump pushed a commit that referenced this issue Jul 4, 2022
flohump pushed a commit to flohump/magpie that referenced this issue Mar 17, 2023
add FE|Buildings subcategories to NGFS template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants