-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* MNT: migrate setup.py -> setup.cfg * MNT: migrate setup.cfg -> pyproject.toml * MNT: drop setup.py * MNT: add dev comment * MNT: drop support for EOL Python versions 3.6 and 3.7 * MNT: fixup codespell check * MNT: enable dependabot * MNT: migrate linting and formatting to pre-commit + ruff * STY: autofixes (ruff) * MNT: add .git-blame-ignore-revs * MNT: upgrade GHA * MNT: temporarily deactivate cross-plateform CI * MNT: exclude new dev-only files in MANIFEST.in * TST: add color to pytest output in CI * TST: fix utility tests * STY: manually fix remaining ruff violations * STY: fix EOF * STY: apply ruff-format * STY: fix trailing whitespaces * MNT: fix bandit pre-commit hook * MNT: prettify yaml files * MNT: fixup codespell pre-commit hook * MNT: temporarily disable safety check * DEP: bump minimal requirements on matplotlib 3.5 and numpy 1.17.3 * API: remove deprecated colormap alias (heat -> torch) * DEP: drop dependency on e13tools (broken on Python 3.12) * MNT: fix deprecation warnings from matplotlib * DEP: test against matplotlib/viscm instead of fork * BUG: fix a future warning from numpy (avoid iterating over scalar array) * TST: treat warnings as errors * MNT: drop support for Python 3.8 * STY: upgrade to Python 3.9 syntax * TST: add explicit support for Python 3.10 to 3.12 * TST: drop support for Windows x86 (32 bits arch) * TST: re-enable tests on Windows and MacOS * MNT: cleanup unused requirement * MNT: bump minimal requirement for numpy * BUG: fix compatibility with matplotlib 3.5 * ENH: delay expensive imports * TST: filter a deprecation warning that we do not control * TST: test against minimal env * MNT: stop linting with flake8 (ruff is already doing the job) * TST: simplify pytest runs * TST: separate publication-related tasks from normal tests * REL: prepare release 1.7.0
- Loading branch information
1 parent
1e76ef9
commit c19cfde
Showing
180 changed files
with
21,911 additions
and
21,399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
codecov: | ||
notify: | ||
require_ci_to_pass: yes | ||
notify: | ||
require_ci_to_pass: yes | ||
|
||
coverage: | ||
round: nearest | ||
precision: 2 | ||
status: | ||
project: | ||
default: | ||
target: 99% | ||
patch: | ||
default: | ||
target: 95% | ||
changes: yes | ||
round: nearest | ||
precision: 2 | ||
status: | ||
project: | ||
default: | ||
target: 99% | ||
patch: | ||
default: | ||
target: 95% | ||
changes: yes | ||
|
||
comment: | ||
require_changes: yes | ||
require_changes: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ruff auto fixing lints | ||
a010823543c72d4a92ed9994d690366ca5e02018 | ||
|
||
# ruff-format | ||
1a885e2c1cc0c7808c0fc589a49465a61f31f2f0 | ||
|
||
# EOF autofix | ||
a71a91b1c588d84bf1ab4cb3003a987b3c253f05 | ||
|
||
# trailing whitespace autofix | ||
bd2ceff52a3a310e7bb31faaa85f75b24ef60a36 | ||
|
||
# prettify yaml files | ||
9cbafca68712562e3e03b4023b11942cb6858050 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: / | ||
target-branch: develop | ||
schedule: | ||
interval: monthly | ||
|
||
- package-ecosystem: github-actions | ||
directory: /.github/workflows | ||
target-branch: develop | ||
schedule: | ||
interval: monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
ci: | ||
autofix_prs: false | ||
autoupdate_schedule: quarterly | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: no-commit-to-branch | ||
- id: debug-statements | ||
- id: check-merge-conflict | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-toml | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.3 | ||
hooks: | ||
- id: ruff-format | ||
- id: ruff | ||
args: [--fix] | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.4 | ||
hooks: | ||
- id: codespell | ||
args: [--ignore-words-list, 'mutch, ore'] | ||
|
||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.6 | ||
hooks: | ||
- id: bandit | ||
# B101 is assert statements | ||
args: [--recursive, --skip, B101, .] | ||
|
||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.11.0 | ||
hooks: | ||
- id: pretty-format-yaml | ||
args: [--autofix, --indent, '2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import numpy as np | ||
from matplotlib.legend_handler import HandlerBase | ||
|
||
|
||
# Define legend handler class for artists that use colormaps | ||
class _HandlerColorPolyCollection(HandlerBase): | ||
# Override create_artists to create an AxesImage resembling a colormap | ||
def create_artists( | ||
self, legend, artist, xdescent, ydescent, width, height, fontsize, trans | ||
): | ||
from matplotlib.image import AxesImage | ||
|
||
# Obtain the Axes object of this legend | ||
ax = legend.axes | ||
|
||
# Obtain the colormap of the artist | ||
cmap = artist.cmap | ||
|
||
# Create an AxesImage to contain the colormap with proper dimensions | ||
image = AxesImage( | ||
ax, cmap=cmap, transform=trans, extent=[xdescent, width, ydescent, height] | ||
) | ||
|
||
# Set the data of the image | ||
image.set_data(np.arange(cmap.N)[np.newaxis, ...]) | ||
|
||
# Return the AxesImage object | ||
return [image] |
Oops, something went wrong.