Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 02:56
8ae050a

2.0.0 (2023-11-27)

⚠ BREAKING CHANGES

  • the Enums HarmonyLabelsFormat and NotesFormat are losing the formats that are currently not implemented
  • renaming of arguments and properties: grouped_pieces => grouped_units; piece_groups => grouping. This enables future subclasses of MappingGrouper able to flexibly group both pieces and slices, depending on the 'smallest_unit'

Features

  • adds CadenceFormat, CadenceCounter() analyzer and CadenceCounts() result type where .plot_grouper() defaults to .make_pie_chart() (2d56ce1)
  • adds CriterionGrouper() and its first subclass HasCadenceAnnotations() (94290f2)
  • adds method DimcatIndex.filter() (ff8deba)
  • adds new feature CadenceLabels and lets all Feature._format_dataframe() end on the new ._sort_columns() (5873550)
  • adds property Dataset.extractable_features (961532d)
  • adds Result.make_ranking_table() and allows Results.combine_results() to re-combine if the groups are a subset of the columns (4d0f313)
  • adds two new methods to Package, .get_resource() and .replace_resource() (8f74b10)
  • both Dataset and DimcatResource now have a method .apply_steps() that creates a Pipeline and applies it, and .apply_step() that creates a step directly, without turning it into a Pipeline first. DimcatResources no get methods .make_bar_plot(), .make_bubble_plot(), and .make_pie_chart() which follow the same principle as .plot() and .plot_grouped(): Apply the specified PipelineSteps or the default Analyzer and call the respective method on the result. (eef8e1b)
  • enables Result.make_pie_chart() (e156d45)
  • enables two new BassNotesFormat values: SCALE_DEGREE_MAJOR and SCALE_DEGREE_MINOR (d52b8b0)
  • factors out MappingGrouper() from CustomPieceGrouper() (4a1ebf5)
  • feature pass their format arg to super().init(); removes unused format values (to be extended later) and properly integrates NotesFormat and HarmonyLabelsFormat. Also, the Notes feature does not ignore arguments 'merge_ties' and 'weight_grace_notes' anymore but acts on them. (d3daaef)
  • introduces DimcatResource.from_resource_and_dataframe() to copy properties of existing resource but detach the new resource and set a new dataframe (usually a transformation of the previous one) (4ad7a6b)
  • introduces font_size argument to all plotting functions for convenience [saves one to type, e.g., layout=dict(font=dict(size=30)) ] (ecb7817)
  • makes all enum values specified in DimcatConfigs case-insensitive by subclassing Marshmallow's enum field and having 'by_value' default to True. Likewise, get_class() now accepts dtypes in case-insensitive manner (45cb9d0)
  • moves CADENCE_COLORS to dimcat.plotting (cce4f38)
  • Result.combine_results() now returns a new Result object. The creationg of the combined dataframe has been moved to ._combine_results(), which is used by the plotting methods (8251b7a)

Bug Fixes

  • .plot_grouped() shows bar plot when no grouper has been applied (and no grouping level has been requested) or a bubble plot in all other cases. This includes adding the arguments df, x_col, and y_col to Result.make_bubble_plot(). (b37d8fd)
  • adapts mwd notebook to be showing grouped plots (b438d33)
  • adds missing column names (4252ad9)
  • allows any FeatureSpecs for the 'features' argument of the FeatureProcessingStep (i.e., in its Marshmallow schema) (59a5c71)
  • avoids duplicating convenience columns (d91a0d5)
  • colorlover is not an optional dependency anymore (f8b93a0)
  • DcmlAnnotations was missing "chord" column (669be4b)
  • DimcatResource._extract_feature() makes use of all config options (2eda6bf)
  • includes DimcatResource._drop_rows_with_missing_values() (2569c97)
  • pass x_col and y_col to plotting.update_figure_layout() and set any axis called 'piece' to type "categorical" to avoid automatic conversion to dates (a54b66e)
  • removes column name in faceted plots (68bd7a7)
  • replaces segmenting approach of CadenceLabels() (incl. label-to-label durations) with bare occurrences (c326bf2)
  • ResourceTransformation() should not copy the resource's "descriptor_filename" because an existing descriptor might not apply anymore (4982b4d)
  • superclass FeatureProcessingStep should not reject any types if _allowed_features is None (26a506e)
  • type annotations for .get_metadata() (ce1bdfb)
  • when copying or transforming, get kwargs from existing DimcatResource and pass them to the respective constructor (e1c0cda)

Documentation

  • adds more text to Quickstart notebook and adds it to the manual (682a642)
  • moves mwe.md notebook to manual as quick.md (4fdb284)