From 0f786d21628a8cade0be0b4d261937ba4a4f0155 Mon Sep 17 00:00:00 2001 From: John Garrett Date: Thu, 16 Sep 2021 15:56:44 -0400 Subject: [PATCH] Bump version to 1.0.9 --- CHANGES.md | 10 ++++++++++ README.md | 9 ++++----- setup.py | 20 ++++++++------------ 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 903d7e0..bbdae68 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,13 @@ +v1.0.9 (16-Sep-2021) +==================== + +- `notebook`: + - make Latex fonts sans-serif +- Fix bug with Latex packages: + - e.g., `\usepackage{amsmath, amssymb, sfmath}` --> `\usepackage{amsmath} \usepackage{amssymb} \usepackage{sfmath}` +- Add `pyproject.toml` file (see PEP 517/518) +- Minor updates to README, including adding more papers to publication list + v1.0.8 (02-Jun-2021) ==================== diff --git a/README.md b/README.md index 64b9da9..8472ce4 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ The easiest way to install SciencePlots is by using `pip`: pip install SciencePlots # to install the latest commit (from GitHub) -pip install git+https://github.com/garrettj403/SciencePlots.git +pip install git+https://github.com/garrettj403/SciencePlots # to clone and then install from a local copy git clone https://github.com/garrettj403/SciencePlots.git @@ -301,13 +301,12 @@ Citing SciencePlots You don't have to cite SciencePlots if you use it but it's nice if you do: @article{SciencePlots, - author = {John D. Garrett and - Hsin-Hsiang Peng}, + author = {John D. Garrett}, title = {{garrettj403/SciencePlots}}, - month = feb, + month = sep, year = 2021, publisher = {Zenodo}, - version = {1.0.7}, + version = {1.0.9}, doi = {10.5281/zenodo.4106649}, url = {http://doi.org/10.5281/zenodo.4106649} } diff --git a/setup.py b/setup.py index 99a111c..a5a6dca 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ """Install SciencePlots. -This will copy the *.mplstyle files into the appropriate directory. +This script (setup.py) will copy the matplotlib styles (*.mplstyle) into the +appropriate directory on your computer (OS dependent). This code is based on a StackOverflow answer: https://stackoverflow.com/questions/31559225/how-to-ship-or-distribute-a-matplotlib-stylesheet @@ -13,27 +14,17 @@ import shutil import matplotlib -import matplotlib.pyplot as plt from setuptools import setup from setuptools.command.install import install -# Get description from README -root = os.path.abspath(os.path.dirname(__file__)) -with open(os.path.join(root, 'README.md'), 'r', encoding='utf-8') as f: - long_description = f.read() - - def install_styles(): - # Find all style files stylefiles = glob.glob('styles/**/*.mplstyle', recursive=True) - # Find stylelib directory (where the *.mplstyle files go) mpl_stylelib_dir = os.path.join(matplotlib.get_configdir(), "stylelib") if not os.path.exists(mpl_stylelib_dir): os.makedirs(mpl_stylelib_dir) - # Copy files over print("Installing styles into", mpl_stylelib_dir) for stylefile in stylefiles: @@ -49,9 +40,14 @@ def __init__(self, *args, **kwargs): atexit.register(install_styles) +# Get description from README +root = os.path.abspath(os.path.dirname(__file__)) +with open(os.path.join(root, 'README.md'), 'r', encoding='utf-8') as f: + long_description = f.read() + setup( name='SciencePlots', - version='1.0.8', + version='1.0.9', author="John Garrett", author_email="garrettj403@gmail.com", description="Format Matplotlib for scientific plotting",