You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the terminology of SDMX: these are 5 different codelists; lists of codes. Some are hierarchical (e.g. ‘node’); others are not. Some have only their short string ID; others also have a name (e.g. ‘node’), description, or annotation.
Currently, the ixmp.backend.base.Backend API has a proliferation of methods, each with slightly different semantics, for dealing with each of these. The proliferation of different types of objects in the data model makes it more costly to develop other, entirely open source Backends as alternatives to JDBCBackend, as targeted in #278
We should:
Simplify the Backend interface (see here) by handling codes and lists of codes in a consistent way. These changes are invisible to the user; they just affect how a Platform talks to a Backend.
At the 2020-03-04 MESSAGE meeting, we discussed that several items in the ixmp data model are actually instances of a common concept. Namely:
Using the terminology of SDMX: these are 5 different codelists; lists of codes. Some are hierarchical (e.g. ‘node’); others are not. Some have only their short string ID; others also have a name (e.g. ‘node’), description, or annotation.
Currently, the
ixmp.backend.base.Backend
API has a proliferation of methods, each with slightly different semantics, for dealing with each of these. The proliferation of different types of objects in the data model makes it more costly to develop other, entirely open source Backends as alternatives to JDBCBackend, as targeted in #278We should:
Add methods:
get_codes(codelist)
set_code(codelist, id, name=None, description=None, **attrs)
delete_code(codelist, id)
Valid values will be:
Delete methods:
get_nodes
,get_timeslices
,get_units
,set_node
,set_timeslice
,set_unit
,add_model_name
,get_model_names
,add_scenario_name
,get_scenario_names
.delete_code(...)
will raise NotImplementedError where the functionality is lacking.codelist
, so that:mp.codelist['region']
is the same asmp.get_regions()
, etc.add_code(...)
with the same signature asBackend.set_code()
.This should be addressed after #264 is completed and merged.
The text was updated successfully, but these errors were encountered: