From 56311e7b4bfeb6ddd3f85997b3b83b3595cf33c2 Mon Sep 17 00:00:00 2001 From: Kip Hart <41959581+kip-hart@users.noreply.github.com> Date: Thu, 13 May 2021 14:40:22 -0400 Subject: [PATCH] CLI plot default hotfix (#38) --- CHANGELOG.rst | 10 +++++++++- LICENSE.rst | 2 +- docs/source/conf.py | 2 +- src/microstructpy/__init__.py | 2 +- src/microstructpy/cli.py | 10 +++++----- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8059227a..f7587d71 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,13 @@ 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`_. +`1.4.8`_ - 2021-05-13 +-------------------------- +Fixed +''''''' +- Default behavior of ``cli.plot_*`` functions when ``plot_files`` is not + specified. + `1.4.7`_ - 2021-02-07 -------------------------- Changed @@ -218,7 +225,8 @@ Added .. LINKS -.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.7...HEAD +.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.8...HEAD +.. _`1.4.8`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.7...v1.4.8 .. _`1.4.7`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.6...v1.4.7 .. _`1.4.6`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.5...v1.4.6 .. _`1.4.5`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.4...v1.4.5 diff --git a/LICENSE.rst b/LICENSE.rst index f90281c3..865ffecd 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019-2020 Georgia Tech Research Corporation +Copyright (c) 2019-2021 Georgia Tech Research Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/docs/source/conf.py b/docs/source/conf.py index c17f578c..7397de15 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -25,7 +25,7 @@ # -- Project information ----------------------------------------------------- project = 'MicroStructPy' -copyright = '2019-2020, Georgia Tech Research Corporation' +copyright = '2019-2021, Georgia Tech Research Corporation' author = 'Kenneth Hart' # The short X.Y version diff --git a/src/microstructpy/__init__.py b/src/microstructpy/__init__.py index 178dfafc..ddec490c 100644 --- a/src/microstructpy/__init__.py +++ b/src/microstructpy/__init__.py @@ -4,4 +4,4 @@ import microstructpy.seeding import microstructpy.verification -__version__ = '1.4.7' +__version__ = '1.4.8' diff --git a/src/microstructpy/cli.py b/src/microstructpy/cli.py index bd491d78..9d684b38 100644 --- a/src/microstructpy/cli.py +++ b/src/microstructpy/cli.py @@ -645,7 +645,7 @@ def plot_seeds(seeds, phases, domain, plot_files=[], plot_axes=True, for more details. domain (from :mod:`microstructpy.geometry`): Domain geometry. plot_files (list): *(optional)* List of files to save the output plot. - Defaults to saving the plot to ``polymesh.png``. + Defaults to saving the plot to ``seeds.png``. plot_axes (bool): *(optional)* Flag to turn the axes on or off. True shows the axes, False removes them. Defaults to True. color_by (str): *(optional)* {'material' | 'seed number' | @@ -660,7 +660,7 @@ def plot_seeds(seeds, phases, domain, plot_files=[], plot_axes=True, """ if not plot_files: - return + plot_files = ['seeds.png'] phase_names = [] given_names = False @@ -778,7 +778,7 @@ def plot_poly(pmesh, phases, plot_files=['polymesh.png'], plot_axes=True, """ if not plot_files: - return + plot_files = ['polymesh.png'] n_dim = len(pmesh.points[0]) @@ -897,7 +897,7 @@ def plot_tri(tmesh, phases, seeds, pmesh, plot_files=[], plot_axes=True, seeds (SeedList): List of seed geometries. pmesh (PolyMesh): Polygonal mesh from which ``tmesh`` was generated. plot_files (list): *(optional)* List of files to save the output plot. - Defaults to saving the plot to ``polymesh.png``. + Defaults to saving the plot to ``trimesh.png``. plot_axes (bool): *(optional)* Flag to turn the axes on or off. True shows the axes, False removes them. Defaults to True. color_by (str): *(optional)* {'material' | 'seed number' | @@ -912,7 +912,7 @@ def plot_tri(tmesh, phases, seeds, pmesh, plot_files=[], plot_axes=True, """ if not plot_files: - return + plot_files = ['trimesh.png'] n_dim = len(tmesh.points[0])