Skip to content

Commit

Permalink
Merge branch 'release/0.3.3' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
morganjwilliams committed Jul 4, 2023
2 parents b9d05d7 + 3dd3cbf commit a9cf8d0
Show file tree
Hide file tree
Showing 174 changed files with 2,345 additions and 1,477 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/docstest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
push:
pull_request:
branches:
- develop
- feature/**
- develop
- feature/**
schedule:
- cron: '0 0 * * 0' # weekly
- cron: "0 0 * * 0" # weekly

jobs:
build:
Expand All @@ -16,24 +16,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9, "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
id: pip-cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "setup.py"
- name: Python Packages Install
run: |
python -m pip install --upgrade pip # upgrade pip
Expand Down
59 changes: 28 additions & 31 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
push:
pull_request:
branches:
- develop
- feature/**
- develop
- feature/**
schedule:
- cron: '0 0 * * 0' # weekly
- cron: "0 0 * * 0" # weekly

jobs:
unit_tests:
Expand All @@ -17,30 +17,26 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7, 3.8, 3.9]
exclude:
# excludes py38 on macOS, which seems to stall currently
- os: macos-latest
python-version: 3.8
- os: macos-latest
python-version: 3.9
python-version: [3.8, 3.9, "3.10", "3.11"]
# exclude:
# # excludes py38 on macOS, which seems to stall currently
# - os: macos-latest
# python-version: 3.8
# - os: macos-latest
# python-version: 3.9
# - os: macos-latest
# python-version: "3.10"
# - os: macos-latest
# python-version: "3.11"
# - os: windows-latest
# python-version: "3.11"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
id: pip-cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "setup.py"
- name: Python Packages Install
run: |
python -m pip install --upgrade pip # upgrade pip
Expand Down Expand Up @@ -72,16 +68,17 @@ jobs:
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
run: |
coveralls
coveralls
coveralls:
name: Indicate completion to coveralls.io
needs: unit_tests
if: success() || failure()
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
[![pyrolite Documentation](https://readthedocs.org/projects/pyrolite/badge/?version=develop)](https://pyrolite.readthedocs.io/)
[![pyOpenSci](https://tinyurl.com/y22nb8up)](https://github.com/pyOpenSci/software-review/issues/20)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.02314/status.svg)](https://doi.org/10.21105/joss.02314)
[![License: CSIRO Modified BSD/MIT License](https://img.shields.io/badge/License-CSIRO_BSD/MIT_License-blue.svg?style=flat)](https://github.com/morganjwilliams/pyrolite/blob/master/LICENSE)
[![Try pyrolite on Binder](https://img.shields.io/badge/TryItOutWith-Binder-F5A252.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1olJXmspXmsr1olJXmsrfZ4TuhWn1olL1olJXmsqBi7X1olJXmspZmslbmMhbmsdemsVfl8ZgmsNim8Jpk8F0m7R4m7F5nLB6jbh7jbiDirOEibOGnKaMhq+PnaCVg6qWg6qegKaff6WhnpKofKGtnomxeZy3noG6dZi+n3vCcpPDcpPGn3bLb4/Mb47UbIrVa4rYoGjdaIbeaIXhoWHmZYHobXvpcHjqdHXreHLroVrsfG/uhGnuh2bwj2Hxk17yl1vzmljzm1j0nlX1olL3AJXWAAAAbXRSTlMAEBAQHx8gICAuLjAwMDw9PUBAQEpQUFBXV1hgYGBkcHBwcXl8gICAgoiIkJCQlJicnJ2goKCmqK+wsLC4usDAwMjP0NDQ1NbW3Nzg4ODi5+3v8PDw8/T09PX29vb39/f5+fr7+/z8/Pz9/v7+zczCxgAABC5JREFUeAHN1ul3k0UUBvCb1CTVpmpaitAGSLSpSuKCLWpbTKNJFGlcSMAFF63iUmRccNG6gLbuxkXU66JAUef/9LSpmXnyLr3T5AO/rzl5zj137p136B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2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/morganjwilliams/pyrolite/develop?filepath=docs%2Fnotebooks%2F)
[![License: CSIRO Modified BSD/MIT License](https://img.shields.io/badge/License-CSIRO_BSD/MIT_License-blue.svg?style=flat)](https://github.com/morganjwilliams/pyrolite/blob/main/LICENSE)
[![Try pyrolite on Binder](https://img.shields.io/badge/TryItOutWith-Binder-F5A252.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1olJXmspXmsr1olJXmsrfZ4TuhWn1olL1olJXmsqBi7X1olJXmspZmslbmMhbmsdemsVfl8ZgmsNim8Jpk8F0m7R4m7F5nLB6jbh7jbiDirOEibOGnKaMhq+PnaCVg6qWg6qegKaff6WhnpKofKGtnomxeZy3noG6dZi+n3vCcpPDcpPGn3bLb4/Mb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tm7ifhMlTGPyCAs7RFRhn47JnlcB9RM5T97ASuZXIcVNuUDIndpDbdsfrqsOppeXl5Y+XVKdjFCTh+zGaVuj0d9zy05PPK3QzBamxdwtTCrzyg/2Rvf2EstUjordGwa/kx9mSJLr8mLLtCW8HHGJc2R5hS219IiF6PnTusOqcMl57gm0Z8kanKMAQg0qSyuZfn7zItsbGyO9QlnxY0eCuD1XL2ys/MsrQhltE7Ug0uFOzufJFE2PxBo/YAx8XPPdDwWN0MrDRYIZF0mSMKCNHgaIVFoBbNoLJ7tEQDKxGF0kcLQimojCZopv0OkNOyWCCg9XMVAi7ARJzQdM2QUh0gmBozjc3Skg6dSBRqDGYSUOu66Zg+I2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/morganjwilliams/pyrolite/develop?labpath=docs%2Fnotebooks%2F)
[![Chat on Gitter](https://img.shields.io/gitter/room/pyrolite/community.svg)](https://gitter.im/pyrolite/community/)


pyrolite is a set of tools for making the most of your geochemical data.

The python package includes functions to work with compositional data, to transform
Expand Down Expand Up @@ -62,11 +63,11 @@ If you use pyrolite extensively for your research, citation of the software woul
## Development & Build Status

[![Formatted with Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![Code Quality](https://api.codacy.com/project/badge/Grade/fd9912a3faae43bf84a47e3da685d84c)](https://www.codacy.com/manual/morganjwilliams/pyrolite?utm_source=github.com&utm_medium=referral&utm_content=morganjwilliams/pyrolite&utm_campaign=Badge_Grade)
[![Code Quality](https://api.codacy.com/project/badge/Grade/fd9912a3faae43bf84a47e3da685d84c)](https://app.codacy.com/gh/morganjwilliams/pyrolite/dashboard?utm_source=github.com&utm_medium=referral&utm_content=morganjwilliams/pyrolite&utm_campaign=Badge_Grade)

| **master** | **develop** |
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| [![Unit Tests on Master](https://github.com/morganjwilliams/pyrolite/workflows/Unittest/badge.svg?branch=master)](https://github.com/morganjwilliams/pyrolite/actions?query=workflow:Unittest+branch:master) | [![Unit Tests on Develop](https://github.com/morganjwilliams/pyrolite/workflows/Unittest/badge.svg?branch=develop)](https://github.com/morganjwilliams/pyrolite/actions?query=workflow:Unittest+branch:develop) |
| [![Coverage Status](https://coveralls.io/repos/github/morganjwilliams/pyrolite/badge.svg?branch=master)](https://coveralls.io/github/morganjwilliams/pyrolite?branch=master) | [![Coverage Status](https://coveralls.io/repos/github/morganjwilliams/pyrolite/badge.svg?branch=develop)](https://coveralls.io/github/morganjwilliams/pyrolite?branch=develop) |
| [![Unit Tests on Master](https://github.com/morganjwilliams/pyrolite/workflows/Unittest/badge.svg?branch=main)](https://github.com/morganjwilliams/pyrolite/actions?query=workflow:Unittest+branch:main) | [![Unit Tests on Develop](https://github.com/morganjwilliams/pyrolite/workflows/Unittest/badge.svg?branch=develop)](https://github.com/morganjwilliams/pyrolite/actions?query=workflow:Unittest+branch:develop) |
| [![Coverage Status](https://coveralls.io/repos/github/morganjwilliams/pyrolite/badge.svg?branch=main)](https://coveralls.io/github/morganjwilliams/pyrolite?branch=main) | [![Coverage Status](https://coveralls.io/repos/github/morganjwilliams/pyrolite/badge.svg?branch=develop)](https://coveralls.io/github/morganjwilliams/pyrolite?branch=develop) |

**Maintainer**: Morgan Williams (morgan.williams _at_ csiro.au)
2 changes: 1 addition & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- defaults

dependencies:
- python=3.7
- python=3.10
- pip
- matplotlib
- scipy>=1.2
Expand Down
29 changes: 28 additions & 1 deletion docs/source/_patch/_sphinx_gallery_patch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
from sphinx_gallery import gen_rst

from .sphinx_gallery_binder import alt_gen_binder_rst
from .sphinx_gallery_gen_rst import _save_rst_example
from .sphinx_gallery_scrapers import alt_matplotlib_scraper

# modify single image arrangement
gen_rst.SINGLE_IMAGE = """
.. image:: /%s
:class: sphx-glr-single-img
:width: 80 %
:align: center
"""
# remove the 'go to the end' part of the binder/download note
gen_rst.EXAMPLE_HEADER = """
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "{0}"
.. LINE NUMBERS ARE GIVEN BELOW.
.. only:: html
.. note::
:class: sphx-glr-download-link-note
.. rst-class:: sphx-glr-example-title
.. _sphx_glr_{1}:
"""
14 changes: 9 additions & 5 deletions docs/source/_patch/sphinx_gallery_binder.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from sphinx_gallery import binder
from sphinx_gallery import interactive_example


def alt_gen_binder_rst(
fpath, binder_conf, gallery_conf, img="https://mybinder.org/badge_logo.svg"
):
"""Generate the RST + link for the Binder badge.
"""
Generate the RST + link for the Binder badge.
Parameters
----------
fpath: str
Expand All @@ -25,11 +28,12 @@ def alt_gen_binder_rst(
rst : str
The reStructuredText for the Binder badge that links to this file.
"""
binder_conf = binder.check_binder_conf(binder_conf)
binder_url = binder.gen_binder_url(fpath, binder_conf, gallery_conf)
binder_conf = interactive_example.check_binder_conf(binder_conf)
binder_url = interactive_example.gen_binder_url(fpath, binder_conf, gallery_conf)
rst = (
"\n" ".. image:: {0}\n" " :target: {1}\n" " :alt: Launch Binder\n"
).format(img, binder_url)
return rst

binder.gen_binder_rst = alt_gen_binder_rst

interactive_example.gen_binder_rst = alt_gen_binder_rst
106 changes: 0 additions & 106 deletions docs/source/_patch/sphinx_gallery_gen_rst.py

This file was deleted.

5 changes: 4 additions & 1 deletion docs/source/_patch/sphinx_gallery_scrapers.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import re
from pathlib import Path

import matplotlib
import matplotlib.pyplot as plt
from matplotlib import _pylab_helpers
from sphinx_gallery import scrapers

from pyrolite.util.plot import save_figure

from sphinx_gallery import scrapers

def alt_matplotlib_scraper(block, block_vars, gallery_conf, **kwargs):
"""Patched matplotlib scraper which won't close figures.
Expand Down Expand Up @@ -49,4 +51,5 @@ def alt_matplotlib_scraper(block, block_vars, gallery_conf, **kwargs):

return scrapers.figure_rst(image_paths, gallery_conf["src_dir"])


scrapers._scraper_dict.update(dict(altmatplot=alt_matplotlib_scraper))
Loading

0 comments on commit a9cf8d0

Please sign in to comment.