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

List/add default units of a Platform #384

Open
khaeru opened this issue Nov 18, 2020 · 0 comments
Open

List/add default units of a Platform #384

khaeru opened this issue Nov 18, 2020 · 0 comments
Labels
enh New features & functionality

Comments

@khaeru
Copy link
Member

khaeru commented Nov 18, 2020

Related to iiasa/message_ix#254.

The Java code under JDBCBackend pre-populates every Platform with the following units:

-
%
cases
G$
GW
GWa
kg
kg/kWa
km
MW
MWa
t
T$
tC
tCO2
USD
USD/GWa
USD/kg
USD/km
USD/kWa
USD/tC
USD/tCO2
y

This happens at the SQL schema level; see https://github.com/iiasa/ixmp_source/blob/4f96133a8ad152aa6aadf9436ab7bb3010f0c0de/src/main/resources/db/migration/hsql/V1__hsql_base_version.sql#L418-L443

This list should be:

  • Reproduced in the (open source) Python code and API. It seems like altering earlier versions of the SQL schema is not possible or advisable.
  • Applied to all new Platforms, even if they don't use JDBCBackend.
  • Cleaned of values such as "-" or "%" that are not parseable by pint, nor SI units.
@khaeru khaeru added the enh New features & functionality label Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enh New features & functionality
Projects
None yet
Development

No branches or pull requests

1 participant