Skip to content

Commit

Permalink
Bump version to 1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
John Garrett committed Sep 16, 2021
1 parent c552fcf commit 0f786d2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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)
====================

Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
}
20 changes: 8 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand All @@ -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="[email protected]",
description="Format Matplotlib for scientific plotting",
Expand Down

0 comments on commit 0f786d2

Please sign in to comment.