All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Alternative filter now filters entities, metadata, alternatives and scenarios.
- The
codename
field and related stuff has been removed fromDatabaseMapping
.
Dropped support for Python 3.8. Spine-Database-API now requires Python 3.9 or later, up to 3.12.
commit_session()
now raisesNothingToCommit
when there is nothing to commit. Previously, it would raiseSpineDBAPIException
.
- Fixed a bug in scenario filter
spine_io
now usesgamsapi
module instead ofgdxcc
. GAMS version 42 or later is required for.gdx
import/export functionality.
- Fixed issues with removing committed items, then adding new items with the same unique key.
- parameter_type table was added to the database. It defines valid value types for a parameter definition. The types are not currently enforced.
- display_mode and entity_class_display_mode tables were added to the database. They define available display modes and how each class should be displayed under each mode. This is for visualization purposes only.
- DB server version was bumped from 7 to 8 due to the changes below.
- Scalar parameters (float, string, boolean) now have a proper type in
parameter_definition
,parameter_value
andlist_value
tables. Previously, the type was left unspecified (None
). Consequently,to_database()
always returns a valid type string unless the value isNone
. Breaking: A type must now be always supplied tofrom_database()
explicitly. A new migration script adds missing type information to existing databases.
- It is now possible to omit
name
foradd_entity_class_item()
ifdimension_name_list
is supplied instead. The name of the class is then automatically generated from the dimensions. - It is now possible to omit
name
foradd_entity_item()
ifelement_name_list
is supplied instead. The name of the entity is then automatically generated from the dimensions.
- The server default of
active_by_default
is nowTrue
.
ScenarioActiveFlag
import and export mappings have been removed. While the flag column is still in the database schema, it is not used anywhere, nor is it accessible e.g. in Toolbox.
This is the first release where we keep a Spine-Database-API specific changelog.
The database structure has changed quite a bit. Large parts of the API have been rewritten or replaced by new systems. We are still keeping many old entry points for backwards compatibility, but those functions and methods are pending deprecation.
- Python 3.12 is now supported.
- Objects and relationships have been replaced by entities. Zero-dimensional entities correspond to objects while multidimensional entities to relationships.
- Entity alternatives control the visibility of entities. This replaces previous tools, features and methods.
- Support for superclasses. It is now possible to set a superclass for an entity class. The class then inherits parameter definitions from its superclass.
- Tools, features and methods have been removed.