Skip to content

Commit

Permalink
Merge pull request #65 from bobleesj/recut
Browse files Browse the repository at this point in the history
Recookiecut
  • Loading branch information
sbillinge authored Sep 26, 2024
2 parents 3588bc6 + f9542e7 commit 14a65dc
Show file tree
Hide file tree
Showing 23 changed files with 231 additions and 246 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/check-news-item.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Check for News

on:
pull_request_target:
branches:
- main

jobs:
build:
uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0
with:
project: bg-mpl-stylesheets
43 changes: 0 additions & 43 deletions .github/workflows/docs.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/main.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/matrix-and-codecov-on-merge-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on:
push:
branches:
- main
release:
types:
- prereleased
- published
workflow_dispatch:

jobs:
coverage:
uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
with:
project: bg-mpl-stylesheets
c_extension: false
headless: false
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/publish-docs-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Build and Deploy Docs

on:
release:
types:
- published
workflow_dispatch:

jobs:
docs:
uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
with:
project: bg-mpl-stylesheets
c_extension: false
16 changes: 16 additions & 0 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Tests on PR

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
validate:
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
with:
project: bg-mpl-stylesheets
c_extension: false
headless: false
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ target/

# version information
setup.cfg
/src/bg-mpl-stylesheets/*/version.cfg
/src/bg_mpl_stylesheets/*/version.cfg

# Rever
rever/
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ repos:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: '\.(rst|txt)$'
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
Expand Down
4 changes: 2 additions & 2 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Authors
=======

Billinge Group and community contibutors.
Billinge Group and community contributors.

Contributors
------------

For a list of contributors, visit
https://github.com/bg-mpl-stylesheets/bg-mpl-stylesheets/graphs/contributors
https://github.com/billingegroup/bg-mpl-stylesheets/graphs/contributors
26 changes: 12 additions & 14 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
include AUTHORS.rst
include LICENSE
include README.rst
include requirements.txt

recursive-exclude * __pycache__
recursive-exclude * *.py[co]

recursive-include docs *.rst conf.py Makefile make.bat

include bg_mpl_stylesheets/version.py

# If including data files in the package, add them like:
# include path/to/data_file
graft src
graft tests
graft requirements

include AUTHORS.rst LICENSE*.rst README.rst

# Exclude all bytecode files and __pycache__ directories
global-exclude *.py[cod] # Exclude all .pyc, .pyo, and .pyd files.
global-exclude .DS_Store # Exclude Mac filesystem artifacts.
global-exclude __pycache__ # Exclude Python cache directories.
global-exclude .git* # Exclude git files and directories.
global-exclude .idea # Exclude PyCharm project settings.
46 changes: 25 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
bg-mpl-stylesheets
==================
|Icon| |title|_
===============

.. |title| replace:: bg-mpl-stylesheets
.. _title: https://billingegroup.github.io/bg-mpl-stylesheets

.. |Icon| image:: https://avatars.githubusercontent.com/billingegroup
:target: https://billingegroup.github.io/bg-mpl-stylesheets
:height: 100px

|PyPi| |Forge| |PythonVersion| |PR|

|Codecov| |Black| |Tracking|
|CI| |Codecov| |Black| |Tracking|

.. |Black| image:: https://img.shields.io/badge/code_style-black-black
:target: https://github.com/psf/black

.. |Codecov| image:: https://codecov.io/gh/Billingegroup/bg-mpl-stylesheets/branch/main/graph/badge.svg
:target: https://codecov.io/gh/Billingegroup/bg-mpl-stylesheets
.. |CI| image:: https://github.com/billingegroup/bg-mpl-stylesheets/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg
:target: https://github.com/billingegroup/bg-mpl-stylesheets/actions/workflows/matrix-and-codecov-on-merge-to-main.yml

.. |Codecov| image:: https://codecov.io/gh/billingegroup/bg-mpl-stylesheets/branch/main/graph/badge.svg
:target: https://codecov.io/gh/billingegroup/bg-mpl-stylesheets

.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/bg-mpl-stylesheets
:target: https://anaconda.org/conda-forge/bg-mpl-stylesheets
Expand All @@ -23,11 +33,11 @@ bg-mpl-stylesheets
:target: https://pypi.org/project/bg-mpl-stylesheets/

.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
:target: https://github.com/Billingegroup/bg-mpl-stylesheets/issues
:target: https://github.com/billingegroup/bg-mpl-stylesheets/issues

A package for using Billinge group style files

* bg-mpl-stylesheets is a Python software package that creates a standardized matplotlib figure format. This includes specialized fonts, figure border, color cycle, tick parameters, and more.
* bg-mpl-stylesheets is a Python software package that creates a standardized matplotlib figure format. This includes specialized fonts, figure border, color cycle, tick parameters, and more.

Citation
--------
Expand Down Expand Up @@ -60,16 +70,12 @@ Then, to fully install ``bg-mpl-stylesheets`` in our active environment, run ::

Another option is to use ``pip`` to download and install the latest release from
`Python Package Index <https://pypi.python.org>`_.
To install using ``pip`` into your ``bg-mpl-stylesheets_env`` environment, we will also have to install dependencies ::

pip install -r https://raw.githubusercontent.com/billingegroup/bg-mpl-stylesheets/main/requirements/run.txt

and then install the package ::
To install using ``pip`` into your ``bg-mpl-stylesheets_env`` environment, type ::

pip install bg-mpl-stylesheets

If you prefer to install from sources, after installing the dependencies, obtain the source archive from
`GitHub <https://github.com/Billingegroup/bg-mpl-stylesheets/>`_. Once installed, ``cd`` into your ``bg-mpl-stylesheets`` directory
`GitHub <https://github.com/billingegroup/bg-mpl-stylesheets/>`_. Once installed, ``cd`` into your ``bg-mpl-stylesheets`` directory
and run the following ::

pip install .
Expand All @@ -81,7 +87,7 @@ Usage
By default the package uses LaTeX fonts for mathematical symbols. This feature requires a Latex package on your computer. It is not required for the use of the style-sheet but gives better results for things like angstrom symbols. Matplotlib will look for your installed latex package, for example TeXLive or MikTex. If it can't find a latex package it will look for non-latex font replacements.

To use the stylesheet, near the beginning your python script type ::

from bg_mpl_stylesheets.styles import all_styles
plt.style.use(all_styles["<style-name>"])

Expand Down Expand Up @@ -113,7 +119,7 @@ Not that the ``rcParams`` are global. It can get very confusing if these are upd
import matplotlib.pyplot as plt

@mpl.rc_context({'lines.linewidth': 1, 'axes.linewidth': 0.7, 'xtick.major.size':
0.7, 'xtick.major.width': 0.7, 'xtick.labelsize': 5, 'legend.frameon': False,
0.7, 'xtick.major.width': 0.7, 'xtick.labelsize': 5, 'legend.frameon': False,
'legend.loc': 'best', 'font.size': 5, 'axes.labelsize': 5, 'ytick.left': False,
'ytick.labelleft': False, 'ytick.right': False
})
Expand Down Expand Up @@ -210,7 +216,7 @@ You may select a specific color to plot from `Colors`: ::
# if you know the hex and need the name. E.g., you want to make the plot shown here
for i, hex in enumerate(cycle):
ax.plot(x, y + offset * i, label=Colors(hex).name, color=hex, linestyle="-")

Color list
----------------

Expand Down Expand Up @@ -271,7 +277,7 @@ Support and Contribute

`Diffpy user group <https://groups.google.com/g/diffpy-users>`_ is the discussion forum for general questions and discussions about the use of bg-mpl-stylesheets. Please join the bg-mpl-stylesheets users community by joining the Google group. The bg-mpl-stylesheets project welcomes your expertise and enthusiasm!

If you see a bug or want to request a feature, please `report it as an issue <https://github.com/Billingegroup/bg-mpl-stylesheets/issues>`_ and/or `submit a fix as a PR <https://github.com/Billingegroup/bg-mpl-stylesheets/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.
If you see a bug or want to request a feature, please `report it as an issue <https://github.com/billingegroup/bg-mpl-stylesheets/issues>`_ and/or `submit a fix as a PR <https://github.com/billingegroup/bg-mpl-stylesheets/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.

Feel free to fork the project and contribute. To install bg-mpl-stylesheets
in a development mode, with its sources being directly used by Python
Expand All @@ -294,11 +300,9 @@ trying to commit again.

Improvements and fixes are always appreciated.

Before contribuing, please read our `Code of Conduct <https://github.com/Billingegroup/bg-mpl-stylesheets/blob/main/CODE_OF_CONDUCT.rst>`_.


Before contribuing, please read our `Code of Conduct <https://github.com/billingegroup/bg-mpl-stylesheets/blob/main/CODE_OF_CONDUCT.rst>`_.

Contact
-------

For more information on bg-mpl-stylesheets please email Prof. Simon Billinge at [email protected].
For more information on bg-mpl-stylesheets please visit the project `web-page <https://billingegroup.github.io/>`_ or email Prof. Simon Billinge at [email protected].
Loading

0 comments on commit 14a65dc

Please sign in to comment.