Skip to content

Commit

Permalink
chore: prepare release 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
faradox committed Feb 28, 2024
1 parent 78ba963 commit 86d822f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 17 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,25 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- insertion marker -->
## [0.2.1](https://github.com/okio-ai/nendo/releases/tag/0.2.1) - 2024-02-28

<small>[Compare with 0.2.0](https://github.com/okio-ai/nendo/compare/0.2.0...0.2.1)</small>

### Bug Fixes

- add_tracks should return a list of tracks (#19) ([78ba963](https://github.com/okio-ai/nendo/commit/78ba963e35453409e6a02c53438d8fc433a96a02) by Aaron Abebe).
- skip_duplicate doesn't respect user_id ([741babc](https://github.com/okio-ai/nendo/commit/741babc905d3fe2096baaa21d2193625799ce50a) by Felix Lorenz).

## [0.2.0](https://github.com/okio-ai/nendo/releases/tag/0.2.0) - 2024-02-19

### Features

- Added the first extension for the Nendo Library: The `NendoLibraryVectorExtension` is a mix-in class that can be used by implementations of the Nendo Library to add support for saving and retrieving embedding vectors.
- Added a new class `NendoEmbedding` that represents an embedding of a `NendoTrack` and stores the vector together with the ID of the track from which it was computed, the text representation of the track that was used to compute the embedding, as well as the embedding plugin's name and version that were used to compute the embedding.
- Added a new subclass of the `NendoPlugin` called `EmbeddingPlugin` that accepts either a `NendoTrack`, a `NendoCollection`, a `signal` and a `text`, or only a `text` and computes corresponding `NendoEmbedding`(s), depending on whether a single object or a `NendoCollection` was provided. It also determines whether the currently used `NendoLibrary` implementation uses the `NendoLibraryVectorExtension` and, if so, saves the computed embeddings directly to the library.
- Fixed a problem with the way dictionaries (like `NendoTrack.meta` and `NendoTrack.resource`) were stored in the Nendo Library which resulted in them being stored as JSON strings instead of JSON dictionaries. **This means that upgrading Nendo will break any apps that use libraries that were created with previous versions of nendo.** Please make sure you understand the implications and either flush your DB or convert it to match the new data model.
- Added a new subclass of the `NendoPlugin` called `EmbeddingPlugin` that accepts either a `NendoTrack`, a `NendoCollection`, a `signal` and a `text`, or only a `text` and computes corresponding `NendoEmbedding`(s), depending on whether a single object or a `NendoCollection` was provided. It also determines whether the currently used `NendoLibrary` implementation uses the `NendoLibraryVectorExtension` and, if so, saves the computed embeddings directly to the library.
- Added the global configuration variable `replace_plugin_data`, that specifies whether new plugin data will overwrite existing plugin data for the specific plugin name and version used to generate the data.
- Reworked the way relationships between tracks are managed. Previously, Nendo would create bidirectional relationships, which caused problems with the retrieval of related tracks, especially when using paging (i.e. `offset` and `limit`). The new approach is to only store relationships _from_ a derivative track _to_ the original track from which it was derived. Accordingly, all functions for retrieving related tracks accept a new parameter, `direction: str`, which can assume either one of the values `"to"`, `"from"` and `"both"` and will change their retrieval behavior accordingly. Also, the method names for some methods were changed to reflect the new semantics more accurrately: `NendoTrack.has_relationship_to()` was replaced by `NendoTrack.has_related_track(direction=...)`. `collection.has_relationship_to()` was replaced by `collection.has_related_collection()`.
- Added a new shortcut function `NendoTrack.relate_to_track()` that creates a relationship of the specified `relationship_type` and with the specified metadata from the given track _to_ another track.
- Fixed a bug where the length of a `NendoTrack` would not be correctly determined if the track had a mono signal.
- Two new shortcut functions `NendoTrack.refresh()` and `collection.refresh()` were added that retrieve the latest version of the given object as it exists in the Nendo Library, effectively allowing to quickly pull the latest changes to an object from the database.
- The `NendoTrack.get_plugin_data()` methods signature was extended to allow for filtering a track's plugin data also by `plugin_version` and `user_id` in addition to the existing filters.
- Adjusted the `add_track()` function:
Expand All @@ -37,6 +46,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Changed the signature of the `NendoLibrary.add_plugin_data()` function to make specifying of the `plugin_version` optional. If none is given, version will be inferred from the currently registered version of the plugin.
- Extended the signature of the `NendoLibrary.filter_collections()` function by the `collection_types` parameter to also allow for filtering by a list of collection types.
- Added the `NendoLibrary.library_size()` and `NendoLirary.collection_size()` functions to get the number of tracks in the library per user and the number of tracks in a collection, respectively.

### Bug Fixes

- Fixed a problem with the way dictionaries (like `NendoTrack.meta` and `NendoTrack.resource`) were stored in the Nendo Library which resulted in them being stored as JSON strings instead of JSON dictionaries. **This means that upgrading Nendo will break any apps that use libraries that were created with previous versions of nendo.** Please make sure you understand the implications and either flush your DB or convert it to match the new data model.
- Fixed a bug where the length of a `NendoTrack` would not be correctly determined if the track had a mono signal.
- A bunch of small bugfixes, too many to mention them all here.

<small>[Compare with 0.1.3](https://github.com/okio-ai/nendo/compare/0.1.3...0.2.0)</small>
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nendo"
version = "0.1.3"
version = "0.2.1"
authors = [
"Okio Team <[email protected]>",
]
Expand Down

0 comments on commit 86d822f

Please sign in to comment.