Skip to content

Commit

Permalink
apply precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
bobleesj committed Sep 26, 2024
2 parents 3913957 + ccd107f commit 043ed95
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 27 deletions.
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

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 All @@ -64,7 +64,7 @@ The following creates and activates a new environment named ``bg-mpl-stylesheets
conda activate bg-mpl-stylesheets_env

Then, to fully install ``bg-mpl-stylesheets`` in our active environment, run ::

conda install --file requirements/examples.txt
conda install bg-mpl-stylesheets

Expand All @@ -87,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 @@ -119,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 @@ -216,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 @@ -277,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 Down
1 change: 0 additions & 1 deletion doc/source/api/bg-mpl-stylesheets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@ bg-mpl-stylesheets.colors module
:members:
:undoc-members:
:show-inheritance:

4 changes: 2 additions & 2 deletions doc/source/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ OPEN SOURCE LICENSE AGREEMENT
=============================
BSD 3-Clause License

Copyright (c) 2024, The Trustees of Columbia University in
Copyright (c) 2024, The Trustees of Columbia University in
the City of New York.
All Rights Reserved.
All Rights Reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down
18 changes: 0 additions & 18 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
import json
from pathlib import Path

import pytest


@pytest.fixture
def user_filesystem(tmp_path):
base_dir = Path(tmp_path)
home_dir = base_dir / "home_dir"
home_dir.mkdir(parents=True, exist_ok=True)
cwd_dir = base_dir / "cwd_dir"
cwd_dir.mkdir(parents=True, exist_ok=True)

home_config_data = {"username": "home_username", "email": "home@email.com"}
with open(home_dir / "diffpyconfig.json", "w") as f:
json.dump(home_config_data, f)

yield tmp_path


def create_svg_with_layers():
# Define the SVG content as a string
svg_content = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Expand Down

0 comments on commit 043ed95

Please sign in to comment.