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

Some docstring convention for Reporting Variables #41

Open
Loisel opened this issue May 7, 2021 · 1 comment
Open

Some docstring convention for Reporting Variables #41

Loisel opened this issue May 7, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@Loisel
Copy link
Contributor

Loisel commented May 7, 2021

It would be great to have some inline documentation of reported variables, that can be read via script for output creation. Something along the lines:

...
#§ Liquid fuels from Biomass required in the transport sector
    setNames((dimSums(mselect(vm_demFeSector,all_enty1=c("fepet","fedie"),all_enty="seliqbio",emi_sectors="trans")  ,dim=3,na.rm=T)), "FE|Transport|Liquids|+|Biomass (EJ/yr)"),
...

In this case, the explanation is trivial, but it is not for some (especially emission) variables. This

  • makes the documentation of changes easier for the developer, who changes the definition while he changes the code
  • can be checked when reviewing PRs
  • can be used with, e.g., the IAMC template which requires a definition of the variables
  • optionally one could also add some trustlevel of the variable (e.g., low for prices), which is also required by the IAMC template and useful in general when communicating output.

Some people I consider this relevant for @Renato-Rodrigues @LaviniaBaumstark @fschreyer

@Loisel Loisel added the enhancement New feature or request label May 7, 2021
@Loisel Loisel assigned fschreyer and unassigned fschreyer May 7, 2021
@Renato-Rodrigues
Copy link
Member

Renato-Rodrigues commented May 7, 2021

I agree, but I think that any solution should be done in a way that this description is also easily saved in a variables metadata file.
csv variables metadata file example:

variable;unit;description
FE|Transport|Liquids|+|Biomass";"EJ/yr";Liquid fuels from Biomass required in the transport sector

I would guess the RSE group is the most competent one to discuss and define what is the best way to add support for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants