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 clauses 1–8 of Semantic Versioning.
0.15.2 (Jun 28 2024)
ParamDataFrame
now saves and loads DataFrames to and from Pickle files instead of CSV files.
0.15.1 (Jun 26 2024)
ParamDict
treats dunder names (e.g.__init__
) as attributes, allowing internal Python functionalities to work.
0.15.0 (Jun 21 2024)
- Added
ParamDB.__repr__()
for better debugging.
ParamDB.commit()
now has araw_json
option, allowing a raw JSON string to be committed to the database.- Updated the underlying JSON representation to be more self-describing; see
ParamDB.load()
for the new format specification.
0.14.0 (Jun 18 2024)
- The option
decode_json
inParamDB.load()
was replaced withraw_json
, which allows loading the raw JSON string from the database. - The order of data for
ParamData
objects in the underlying JSON representation was changed; seeParamDB.load()
for the new order.
ParamDBKey.WRAPPER
was removed in favor of encoding these values usingParamDBKey.PARAM
with a class name ofNone
.
0.13.0 (Jun 14 2024)
- The timestamps of non-
ParamData
children are now tracked internally and can be accessed via the new methodParamData.child_last_updated()
. - The class
ParamDBKey
contains the keys used in the JSON representation of a commit.
ParamDict
dot notation now treates names of existing attributes and names of class type annotations as attributes (rather than treating all names beginning with underscores as attributes).- The JSON format of a commit has been changed, as specified in the docstring for
ParamDB.load()
. ParamData.to_dict()
andParamData.from_dict()
have been replaced byParamData.to_json()
andParamData.from_json()
.
- Parameter primitive classes have been replaced by the new timestamp tracking.
0.12.0 (May 8 2024)
- If Pydantic is installed, parameter data classes automatically have Pydantic type validation enabled.
- Parameter primitives classes
ParamInt
,ParamFloat
,ParamBool
,ParamStr
, andParamNone
. - Parameter file classes
ParamFile
andParamDataFrame
.
- All
ParamData
objects now internally track the latest time that they or any of their children were last updated, which is returned byParamData.last_updated
. Param
andStruct
are combined into a single classParamDataclass
.
0.11.0 (Jan 31 2024)
ParamDB.load_commit_entry()
loads a commit entry by ID or the most recent commit.ParamDB.commit_history_with_data()
to retrieve the commit history with data.CommitEntryWithData
to store a commit entry containing data.
ParamDB.commit()
returns aCommitEntry
instead of the commit ID.
ParamDB.latest_commit
is replaced byParamDB.load_commit_entry()
0.10.2 (Dec 5 2023)
- Change supported Python versions from
>=3.9,<3.13
to^3.9
for better compatibility with other Poetry projects and future versions of Python.
0.10.1 (Nov 6 2023)
- Support for Python 3.12
0.10.0 (Aug 30 2023)
- Support for Python 3.9
- Parameter dataclass bases (
Param
andStruct
) no longer setkw_only
to True by default (since this feature does not exist in Python 3.9).
0.9.1 (Aug 9 2023)
- Custom
ParamData
subclasses have an improved error message if extra keyword arguments are passed.
0.9.0 (Jun 29 2023)
ParamDB.path
to retrieve the database path.ParamDB.latest_commit
to retrieve the latest commit entry.
0.8.0 (Jun 9 2023)
- Documentation website moved to Read the Docs.
- Badges for latest PyPI version, license, CI status, Codecov, and docs website build.
0.7.0 (May 19 2023)
ParamDB.commit()
returns the ID of the newly created commit.ParamDB.load()
convertsdatetime
objects to local time regardless of the timezone stored internally in the database.
0.6.0 (May 3 2023)
ParamDB.dispose()
function for cases where it is required to fully clean up the database before the program ends, such as in testing suites.
- Commits get the current time in a way that can be mocked in tests where we want to control the time.
0.5.0 (Apr 11 2023)
datetime
objects (currently used inCommitEntry.timestamp
andParamData.last_updated
) are timezone-aware.- If ParamDB
load_classes
parameter is False,datetime
and AstropyQuantity
objects are not loaded either.
0.4.0 (Mar 28 2023)
- ParamDB
load_classes
parameter can be set to False to load parameter data classes as dictionaries (created to allow ParamView to access data) - Keys for special properties in dictionary representations of parameter data can be imported
- ParamDict returns keys in
__dir__()
so that they are suggested by interactive prompts like IPython.
- ParamDict uses dict_keys, dict_values, and dict_items instead of default KeysView, ValuesView, and ItemsView since they print nicely
0.3.0 (Mar 14 2023)
- Ability to specify start and end indices in
ParamDB.commit_history()
- Support for scalar
astropy.units.Quantity
objects - Parameter dataclass bases (
Param
andStruct
) automatically convert subclasses into dataclasseskw_only
as True by default
ParamDict
can be initialized from keyword arguments in addition to dictionaries
0.2.0 (Mar 8 2023)
- Ability to specify commit ID in
ParamDB.load()
ParamData.parent
andParamData.root
properties- Mixins
ParentType[PT]
andRootType[PT]
to type cast parent and root - Parameter collection classes
ParamList
andParamDict
- Database now ignores dataclass fields where
init
isFalse
CommitNotFoundError
(replaced with built-inIndexError
)- Private
_last_updated
dataclass field in parameter dataclasses
0.1.0 (Feb 24 2023)
- Parameter data base class
ParamData
- Parameter dataclass bases (
Param
andStruct
) - Database class
ParamDB
to store parameters in a SQLite file - Ability to retrieve the commit history as
CommitEntry
objects