Skip to content

Commit

Permalink
Release 0.3.0 (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefmolin authored Feb 17, 2025
1 parent bd9bc78 commit 4b1de7b
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ In this example, we morphed the built-in panda `Dataset` into the star `Shape`.
Data Morph is intended to be used as a teaching tool to illustrate the importance of data visualization. Here are some potential classroom activities for instructors:

- **Statistics Focus**: Have students pick one of the [built-in datasets](https://stefaniemolin.com/data-morph/stable/api/data_morph.data.loader.html#data_morph.data.loader.DataLoader), and morph it into all available [target shapes](https://stefaniemolin.com/data-morph/stable/api/data_morph.shapes.factory.html#data_morph.shapes.factory.ShapeFactory). Ask students to comment on which transformations worked best and why.
- **Creativity Focus**: Have students [create a new dataset](https://stefaniemolin.com/data-morph/dev/tutorials/custom-datasets.html) (*e.g.*, your school logo or something that the student designs), and morph that into multiple [target shapes](https://stefaniemolin.com/data-morph/stable/api/data_morph.shapes.factory.html#data_morph.shapes.factory.ShapeFactory). Ask students to comment on which transformations worked best and why.
- **Math and Coding Focus**: Have students [create a custom shape](https://stefaniemolin.com/data-morph/dev/tutorials/shape-creation.html) by inheriting from `LineCollection` or `PointCollection`, and try morphing a couple of the [built-in datasets](https://stefaniemolin.com/data-morph/stable/api/data_morph.data.loader.html#data_morph.data.loader.DataLoader) into that shape. Ask students to explain how they chose to calculate the shape, and comment on which transformations worked best and why.
- **Creativity Focus**: Have students [create a new dataset](https://stefaniemolin.com/data-morph/stable/tutorials/custom-datasets.html) (*e.g.*, your school logo or something that the student designs), and morph that into multiple [target shapes](https://stefaniemolin.com/data-morph/stable/api/data_morph.shapes.factory.html#data_morph.shapes.factory.ShapeFactory). Ask students to comment on which transformations worked best and why.
- **Math and Coding Focus**: Have students [create a custom shape](https://stefaniemolin.com/data-morph/stable/tutorials/shape-creation.html) by inheriting from `LineCollection` or `PointCollection`, and try morphing a couple of the [built-in datasets](https://stefaniemolin.com/data-morph/stable/api/data_morph.data.loader.html#data_morph.data.loader.DataLoader) into that shape. Ask students to explain how they chose to calculate the shape, and comment on which transformations worked best and why.

If you end up using Data Morph in your classroom, I would love to hear about it. Please [send me a message](https://stefaniemolin.com/contact/) detailing how you used it and how it went.

Expand Down
12 changes: 6 additions & 6 deletions docs/_static/switcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"url": "https://stefaniemolin.com/data-morph/0.1/"
},
{
"name": "0.2 (stable)",
"version": "stable",
"url": "https://stefaniemolin.com/data-morph/stable/"
"name": "0.2",
"version": "0.2",
"url": "https://stefaniemolin.com/data-morph/0.2/"
},
{
"name": "0.3 (dev)",
"version": "dev",
"url": "https://stefaniemolin.com/data-morph/dev/"
"name": "0.3 (stable)",
"version": "stable",
"url": "https://stefaniemolin.com/data-morph/stable/"
}
]
90 changes: 90 additions & 0 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,96 @@
Release Notes
=============

0.3.0 (February 17, 2025)
-------------------------

What's New
^^^^^^^^^^

CLI
~~~
* Added ``--workers`` option to the CLI for running multiple morphs in parallel.
* Renamed ``--ramp-in`` and ``--ramp-out`` as ``--ease-in`` and ``--ease-out``.
* Added ``--ease`` option to the CLI, which is shorthand for ``--ease-in --ease-out``.

Documentation
~~~~~~~~~~~~~
* Added :doc:`tutorials/index` page to the documentation.
* Added :doc:`tutorials/shape-creation` tutorial.
* Added section to the documentation with ideas of how to use :ref:`classroom ideas`.
* Updated contribution instructions in :doc:`tutorials/custom-datasets` tutorial.
* Included reference to `article on the creation of Data Morph
<https://stefaniemolin.com/articles/data-science/introducing-data-morph/>`_
in the documentation header.
* Included reference to `Data Morph: A Cautionary Tale of Summary Statistics
<https://stefaniemolin.com/data-morph-talk/>`_
(conference talk) in the documentation header.
* Added `contributing guidelines <https://github.com/stefmolin/data-morph/blob/main/CONTRIBUTING.md>`_
and `code of conduct <https://github.com/stefmolin/data-morph/blob/main/CODE_OF_CONDUCT.md>`_.
* Configured canonical URL.

Morphing
~~~~~~~~
* Reworked GIF creation logic to write only one PNG for distinct frames in the
animation and use frequency counts to determine frame duration for speed
improvements and less I/O.
* Added three new datasets: soccer, pi, and gorilla. See the :class:`.DataLoader` for visuals.
* Added four new shapes: :class:`.Club`, :class:`.FigureEight`, :class:`.Spade`,
and :class:`.Spiral`.
* Refactored some shape logic to use more ``numpy`` for speed improvements.
* Added ``center`` property to :class:`.Interval` and :class:`.BoundingBox` to simplify shape calculations.
* Made it possible to unpack the bounds from the :class:`.BoundingBox`.
* Switched from ``tqdm`` to progress bars powered by ``rich``.
* Renamed the ``ramp_in`` and ``ramp_out`` arguments to :meth:`.DataMorpher.morph`
as ``ease_in`` and ``ease_out``.
* Added :meth:`.Shape.get_name` method and :attr:`.Shape.name` attribute to replace
``__str__()`` shape naming logic, which removed some redundancies in
:class:`.ShapeFactory`.
* Refactored the shape code into separate modules per shape.
* Renamed ``get_values()`` as :func:`.get_summary_statistics`.
* Improved variable names in several spots for more readable code.

Plotting
~~~~~~~~
* Added ``show_bounds`` parameter to :meth:`.Dataset.plot` to visualize the automatically-calculated bounds.
* Added ``title`` parameter to :meth:`.Dataset.plot` with default showing the name and number of points.
* Switched from using Matplotlib's ``tight_layout()`` to constrained layout.
* Added :func:`.style_context` context manager for plotting in a Data Morph style.
* Added test suite for :mod:`.plotting.style` module.
* Changed plot layouts for :meth:`.DataLoader.plot` and :meth:`.ShapeFactory.plot_available_shapes`.
* Adjusted grid of datasets in the documentation to use tighter plot bounds.

Tooling
~~~~~~~
* Added new GitHub Actions workflow to run Data Morph on new/altered datasets, shapes,
or core logic.
* Switched to trusted publishing on PyPI via GitHub Actions.
* Added PR and issue templates.
* Added ``pytest-xdist`` to dev dependencies and reworked the test suite to make it faster.
* Switched from ``black`` to ``ruff`` formatting in pre-commit setup and included additional rulesets.
* Added ``pyproject-fmt`` pre-commit hook.
* Refactored shape tests.

Bug Fixes
^^^^^^^^^
* Addressed compatibility issues with ``numpy>=2.0.0``.
* Assorted performance and code quality improvements after running additional
``ruff`` rules.
* Fixed some incorrect return types.

Dependency Updates
^^^^^^^^^^^^^^^^^^
* Replaced ``tqdm`` dependency with ``rich``.
* Replaced ``pytweening`` dependency with functions in :mod:`.plotting.animation`.
* Replaced ``sphinxarg.ext`` Sphinx extension with ``sphinx_argparse_cli``.
* Changed the minimum Sphinx version to 7.2.6.
* Changed the minimum ``pydata-sphinx-theme`` version to 0.15.3.
* Updated pre-commit hooks to the latest versions.
* Factored out ``scipy`` dependency.
* Updated GitHub Actions workflows for Node 16 deprecation.
* Enabled Dependabot on GitHub Actions and switched to use commit hashes for versioning.
* Updated Python testing matrix to include Python 3.9 through 3.13.

0.2.0 (September 24, 2023)
--------------------------

Expand Down
4 changes: 2 additions & 2 deletions src/data_morph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Morph an input dataset of 2D points into select shapes, while preserving the summary
statistics to a given number of decimal points through simulated annealing. It is intended
to be used as a teaching tool to illustrate the importance of data visualization (see
`Data Morph in the classroom <https://stefaniemolin.com/data-morph/dev/index.html#classroom-ideas>`_
`Data Morph in the classroom <https://stefaniemolin.com/data-morph/stable/index.html#classroom-ideas>`_
for ideas).
Notes
Expand All @@ -28,5 +28,5 @@
and `this slide deck <https://stefaniemolin.com/data-morph-talk/#/>`_.
"""

__version__ = '0.3.0.dev0'
__version__ = '0.3.0'
MAIN_DIR = __name__

0 comments on commit 4b1de7b

Please sign in to comment.