gleplot 6.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gleplot-6.0.0/LICENSE +25 -0
- gleplot-6.0.0/PKG-INFO +138 -0
- gleplot-6.0.0/README.md +95 -0
- gleplot-6.0.0/pyproject.toml +136 -0
- gleplot-6.0.0/setup.cfg +4 -0
- gleplot-6.0.0/src/gleplot/__init__.py +772 -0
- gleplot-6.0.0/src/gleplot/_warn.py +45 -0
- gleplot-6.0.0/src/gleplot/axes.py +10714 -0
- gleplot-6.0.0/src/gleplot/cairo_support.py +232 -0
- gleplot-6.0.0/src/gleplot/colors.py +721 -0
- gleplot-6.0.0/src/gleplot/compiler.py +863 -0
- gleplot-6.0.0/src/gleplot/config.py +491 -0
- gleplot-6.0.0/src/gleplot/dataio.py +1403 -0
- gleplot-6.0.0/src/gleplot/figure.py +5789 -0
- gleplot-6.0.0/src/gleplot/guides.py +172 -0
- gleplot-6.0.0/src/gleplot/markers.py +424 -0
- gleplot-6.0.0/src/gleplot/mathtext.py +679 -0
- gleplot-6.0.0/src/gleplot/palettes.py +243 -0
- gleplot-6.0.0/src/gleplot/parser/__init__.py +83 -0
- gleplot-6.0.0/src/gleplot/parser/expr.py +196 -0
- gleplot-6.0.0/src/gleplot/parser/lexer.py +289 -0
- gleplot-6.0.0/src/gleplot/parser/metadata.py +374 -0
- gleplot-6.0.0/src/gleplot/parser/recognizer.py +12654 -0
- gleplot-6.0.0/src/gleplot/parser/report.py +74 -0
- gleplot-6.0.0/src/gleplot/parser/syntax.py +756 -0
- gleplot-6.0.0/src/gleplot/parser/tables.py +484 -0
- gleplot-6.0.0/src/gleplot/parser/units.py +196 -0
- gleplot-6.0.0/src/gleplot/py.typed +0 -0
- gleplot-6.0.0/src/gleplot/series.py +1609 -0
- gleplot-6.0.0/src/gleplot/sources.py +623 -0
- gleplot-6.0.0/src/gleplot/writer.py +7215 -0
- gleplot-6.0.0/src/gleplot.egg-info/PKG-INFO +138 -0
- gleplot-6.0.0/src/gleplot.egg-info/SOURCES.txt +34 -0
- gleplot-6.0.0/src/gleplot.egg-info/dependency_links.txt +1 -0
- gleplot-6.0.0/src/gleplot.egg-info/requires.txt +21 -0
- gleplot-6.0.0/src/gleplot.egg-info/top_level.txt +1 -0
gleplot-6.0.0/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
GNU GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 2, June 1991
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2026 gleplot contributors
|
|
5
|
+
|
|
6
|
+
This program is free software; you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU General Public License as published by
|
|
8
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
This program is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU General Public License along
|
|
17
|
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
18
|
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
Full GPL-2.0 license text available at:
|
|
23
|
+
https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
24
|
+
|
|
25
|
+
This project may be used under GPL-2.0 or any later version.
|
gleplot-6.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gleplot
|
|
3
|
+
Version: 6.0.0
|
|
4
|
+
Summary: Write standard GLE (Graphics Layout Engine) from Python, with matplotlib-shaped names
|
|
5
|
+
Author: gleplot contributors
|
|
6
|
+
License: GPL-2.0+
|
|
7
|
+
Project-URL: Homepage, https://github.com/benhuddart/gleplot
|
|
8
|
+
Project-URL: Documentation, https://benhuddart.github.io/gleplot
|
|
9
|
+
Project-URL: Repository, https://github.com/benhuddart/gleplot
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/benhuddart/gleplot/issues
|
|
11
|
+
Keywords: plotting,graphics,GLE,scientific-visualization,publication-quality
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: numpy>=1.16.0
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: pytest>=6.0; extra == "dev"
|
|
29
|
+
Requires-Dist: pytest-cov>=2.0; extra == "dev"
|
|
30
|
+
Requires-Dist: black<27,>=26; python_version >= "3.10" and extra == "dev"
|
|
31
|
+
Requires-Dist: isort>=5.12; extra == "dev"
|
|
32
|
+
Requires-Dist: flake8>=6.0; extra == "dev"
|
|
33
|
+
Requires-Dist: mypy<3,>=2.3; python_version >= "3.10" and extra == "dev"
|
|
34
|
+
Requires-Dist: python-semantic-release>=10; extra == "dev"
|
|
35
|
+
Requires-Dist: Pillow>=9.1; extra == "dev"
|
|
36
|
+
Provides-Extra: docs
|
|
37
|
+
Requires-Dist: sphinx>=4.0; extra == "docs"
|
|
38
|
+
Requires-Dist: sphinx-rtd-theme>=1.0; extra == "docs"
|
|
39
|
+
Requires-Dist: myst-parser>=0.18; extra == "docs"
|
|
40
|
+
Requires-Dist: Pillow>=9.1; extra == "docs"
|
|
41
|
+
Provides-Extra: gle
|
|
42
|
+
Dynamic: license-file
|
|
43
|
+
|
|
44
|
+
# gleplot
|
|
45
|
+
|
|
46
|
+
[](https://github.com/BenHuddart/gleplot/actions/workflows/test.yml)
|
|
47
|
+
[](https://benhuddart.github.io/gleplot/)
|
|
48
|
+
[](https://github.com/BenHuddart/gleplot/blob/main/LICENSE)
|
|
49
|
+
|
|
50
|
+
**gleplot** writes standard [GLE](https://glx.sourceforge.io/) (Graphics Layout Engine) scripts from Python, through matplotlib's names where they map cleanly. GLE compiles the script to publication-quality PDF, EPS, SVG, PNG or JPG.
|
|
51
|
+
|
|
52
|
+
<img src="https://benhuddart.github.io/gleplot/_static/gallery/example_combined_errorbars.webp" alt="Measured points with horizontal and vertical error bars, and a dashed y = x² curve through them" width="560">
|
|
53
|
+
|
|
54
|
+
The code that draws it (the gallery's [Combined X+Y Error Bars](https://benhuddart.github.io/gleplot/gallery.html#combined-x-y-error-bars) example):
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
import numpy as np
|
|
58
|
+
import gleplot as glp
|
|
59
|
+
|
|
60
|
+
x = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
|
|
61
|
+
y = np.array([1.8, 4.2, 9.1, 16.3, 24.8])
|
|
62
|
+
xerr = np.array([0.15, 0.20, 0.10, 0.25, 0.18])
|
|
63
|
+
yerr = np.array([0.3, 0.5, 0.6, 0.8, 1.0])
|
|
64
|
+
|
|
65
|
+
fig = glp.figure(figsize=(8, 6))
|
|
66
|
+
ax = fig.add_subplot(111)
|
|
67
|
+
ax.errorbar(x, y, yerr=yerr, xerr=xerr, fmt="o", color="blue", capsize=4,
|
|
68
|
+
label="Measured")
|
|
69
|
+
x_fit = np.linspace(0.5, 5.5, 100)
|
|
70
|
+
ax.plot(x_fit, x_fit**2, color="red", linestyle="--", label="y = x²")
|
|
71
|
+
ax.set_xlabel("x")
|
|
72
|
+
ax.set_ylabel("y")
|
|
73
|
+
ax.set_title("Combined X and Y Error Bars")
|
|
74
|
+
ax.legend()
|
|
75
|
+
|
|
76
|
+
fig.savefig("fit.gle") # the GLE script and its data files; GLE not needed
|
|
77
|
+
fig.savefig("fit.pdf") # compiled by GLE
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Why gleplot
|
|
81
|
+
|
|
82
|
+
- **The output is a script you can read and edit.** `fit.gle` is a short plain-text GLE file, with the data in `.dat` files beside it. Change a label or a colour by hand, and GLE compiles it to vector PDF, EPS or SVG, or to PNG or JPG.
|
|
83
|
+
- **Scripts open again.** `glp.open_gle("fit.gle")` reads a `.gle` file back into a `Figure` you can change from Python and save.
|
|
84
|
+
- **Unrecognised GLE is kept.** When you open a hand-written file, GLE that gleplot does not model is written back in place on save rather than dropped, and each place it had to keep raw GLE or guess is recorded as a note ([opening GLE files](https://benhuddart.github.io/gleplot/guides/OPENING_GLE_FILES.html)).
|
|
85
|
+
- **GLE is optional for writing.** Saving `.gle` works without GLE installed; you need GLE only to compile.
|
|
86
|
+
|
|
87
|
+
## Install
|
|
88
|
+
|
|
89
|
+
gleplot needs Python 3.9 or later and numpy. Install it from PyPI:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pip install gleplot
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
For the latest development version, install from GitHub with `pip install git+https://github.com/BenHuddart/gleplot.git`.
|
|
96
|
+
|
|
97
|
+
To compile figures, install **GLE 4.3+** from the [GLE releases](https://github.com/vlabella/GLE/releases/latest) and check it with `gle -info`. GLE's include library (`gleinc`) is required too; the release packages ship it, and [GLE's include library](https://benhuddart.github.io/gleplot/getting_started.html#gle-s-include-library) covers a GLE built from source. The [getting started guide](https://benhuddart.github.io/gleplot/getting_started.html) covers Ghostscript, LaTeX and `gle -finddeps`.
|
|
98
|
+
|
|
99
|
+
To work on gleplot itself, use an editable install with the development tools, as described in [CONTRIBUTING.md](https://github.com/BenHuddart/gleplot/blob/main/CONTRIBUTING.md):
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
git clone https://github.com/BenHuddart/gleplot.git
|
|
103
|
+
cd gleplot
|
|
104
|
+
pip install -e ".[dev]"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## What it can plot
|
|
108
|
+
|
|
109
|
+
- Lines, scatter, bars, steps, stems and histograms ([plot types](https://benhuddart.github.io/gleplot/guides/PLOT_TYPES.html))
|
|
110
|
+
- [Error bars](https://benhuddart.github.io/gleplot/gallery.html#combined-x-y-error-bars), symmetric or asymmetric, in x and y
|
|
111
|
+
- [Fills between curves](https://benhuddart.github.io/gleplot/gallery.html#fill-between)
|
|
112
|
+
- [Heatmaps](https://benhuddart.github.io/gleplot/gallery.html#heatmap-imshow) and [contours](https://benhuddart.github.io/gleplot/gallery.html#phase-diagram-tripcolor-tricontour) with colour bars
|
|
113
|
+
- [Subplots](https://benhuddart.github.io/gleplot/gallery.html#x2-subplot-grid) and [shared axes](https://benhuddart.github.io/gleplot/gallery.html#shared-x-axis-stacked)
|
|
114
|
+
- [Log scales](https://benhuddart.github.io/gleplot/gallery.html#log-scale), [secondary axes](https://benhuddart.github.io/gleplot/gallery.html#secondary-y-axis) and [polar plots](https://benhuddart.github.io/gleplot/gallery.html#polar-plot)
|
|
115
|
+
- [Reference lines and shaded spans](https://benhuddart.github.io/gleplot/guides/REFERENCE_LINES_AND_SPANS.html), [text and arrows](https://benhuddart.github.io/gleplot/gallery.html#text-annotations)
|
|
116
|
+
- [Series read from existing data files](https://benhuddart.github.io/gleplot/guides/FILE_BASED_SERIES.html)
|
|
117
|
+
|
|
118
|
+
The [gallery](https://benhuddart.github.io/gleplot/gallery.html) shows every example with its code.
|
|
119
|
+
|
|
120
|
+
## Coming from matplotlib
|
|
121
|
+
|
|
122
|
+
`figure`, `subplots`, `plot`, `scatter`, `errorbar`, `savefig` and the other matplotlib names take matplotlib's arguments. Where GLE cannot do what a keyword asks, gleplot accepts it and warns; the [matplotlib migration guide](https://benhuddart.github.io/gleplot/guides/MATPLOTLIB_MIGRATION.html) lists each difference. gleplot does not emulate what GLE cannot draw, so there is no pie chart, box plot or broken axis.
|
|
123
|
+
|
|
124
|
+
## Upgrading from gleplot 5
|
|
125
|
+
|
|
126
|
+
gleplot 6 removes those features, raises on a bad argument when the call is made, and draws with matplotlib's colour cycle and bars without an outline. [Migrating from gleplot 5 to 6](https://benhuddart.github.io/gleplot/guides/MIGRATING_TO_6.html) lists each change and what to use instead.
|
|
127
|
+
|
|
128
|
+
## Documentation
|
|
129
|
+
|
|
130
|
+
The [documentation site](https://benhuddart.github.io/gleplot/) has the user guides and the API reference.
|
|
131
|
+
|
|
132
|
+
## Contributing
|
|
133
|
+
|
|
134
|
+
See [CONTRIBUTING.md](https://github.com/BenHuddart/gleplot/blob/main/CONTRIBUTING.md). Questions and feature requests go to [GitHub issues](https://github.com/BenHuddart/gleplot/issues).
|
|
135
|
+
|
|
136
|
+
## License
|
|
137
|
+
|
|
138
|
+
gleplot is licensed under the [GPL-2.0 or later](https://github.com/BenHuddart/gleplot/blob/main/LICENSE).
|
gleplot-6.0.0/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# gleplot
|
|
2
|
+
|
|
3
|
+
[](https://github.com/BenHuddart/gleplot/actions/workflows/test.yml)
|
|
4
|
+
[](https://benhuddart.github.io/gleplot/)
|
|
5
|
+
[](https://github.com/BenHuddart/gleplot/blob/main/LICENSE)
|
|
6
|
+
|
|
7
|
+
**gleplot** writes standard [GLE](https://glx.sourceforge.io/) (Graphics Layout Engine) scripts from Python, through matplotlib's names where they map cleanly. GLE compiles the script to publication-quality PDF, EPS, SVG, PNG or JPG.
|
|
8
|
+
|
|
9
|
+
<img src="https://benhuddart.github.io/gleplot/_static/gallery/example_combined_errorbars.webp" alt="Measured points with horizontal and vertical error bars, and a dashed y = x² curve through them" width="560">
|
|
10
|
+
|
|
11
|
+
The code that draws it (the gallery's [Combined X+Y Error Bars](https://benhuddart.github.io/gleplot/gallery.html#combined-x-y-error-bars) example):
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
import numpy as np
|
|
15
|
+
import gleplot as glp
|
|
16
|
+
|
|
17
|
+
x = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
|
|
18
|
+
y = np.array([1.8, 4.2, 9.1, 16.3, 24.8])
|
|
19
|
+
xerr = np.array([0.15, 0.20, 0.10, 0.25, 0.18])
|
|
20
|
+
yerr = np.array([0.3, 0.5, 0.6, 0.8, 1.0])
|
|
21
|
+
|
|
22
|
+
fig = glp.figure(figsize=(8, 6))
|
|
23
|
+
ax = fig.add_subplot(111)
|
|
24
|
+
ax.errorbar(x, y, yerr=yerr, xerr=xerr, fmt="o", color="blue", capsize=4,
|
|
25
|
+
label="Measured")
|
|
26
|
+
x_fit = np.linspace(0.5, 5.5, 100)
|
|
27
|
+
ax.plot(x_fit, x_fit**2, color="red", linestyle="--", label="y = x²")
|
|
28
|
+
ax.set_xlabel("x")
|
|
29
|
+
ax.set_ylabel("y")
|
|
30
|
+
ax.set_title("Combined X and Y Error Bars")
|
|
31
|
+
ax.legend()
|
|
32
|
+
|
|
33
|
+
fig.savefig("fit.gle") # the GLE script and its data files; GLE not needed
|
|
34
|
+
fig.savefig("fit.pdf") # compiled by GLE
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Why gleplot
|
|
38
|
+
|
|
39
|
+
- **The output is a script you can read and edit.** `fit.gle` is a short plain-text GLE file, with the data in `.dat` files beside it. Change a label or a colour by hand, and GLE compiles it to vector PDF, EPS or SVG, or to PNG or JPG.
|
|
40
|
+
- **Scripts open again.** `glp.open_gle("fit.gle")` reads a `.gle` file back into a `Figure` you can change from Python and save.
|
|
41
|
+
- **Unrecognised GLE is kept.** When you open a hand-written file, GLE that gleplot does not model is written back in place on save rather than dropped, and each place it had to keep raw GLE or guess is recorded as a note ([opening GLE files](https://benhuddart.github.io/gleplot/guides/OPENING_GLE_FILES.html)).
|
|
42
|
+
- **GLE is optional for writing.** Saving `.gle` works without GLE installed; you need GLE only to compile.
|
|
43
|
+
|
|
44
|
+
## Install
|
|
45
|
+
|
|
46
|
+
gleplot needs Python 3.9 or later and numpy. Install it from PyPI:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install gleplot
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For the latest development version, install from GitHub with `pip install git+https://github.com/BenHuddart/gleplot.git`.
|
|
53
|
+
|
|
54
|
+
To compile figures, install **GLE 4.3+** from the [GLE releases](https://github.com/vlabella/GLE/releases/latest) and check it with `gle -info`. GLE's include library (`gleinc`) is required too; the release packages ship it, and [GLE's include library](https://benhuddart.github.io/gleplot/getting_started.html#gle-s-include-library) covers a GLE built from source. The [getting started guide](https://benhuddart.github.io/gleplot/getting_started.html) covers Ghostscript, LaTeX and `gle -finddeps`.
|
|
55
|
+
|
|
56
|
+
To work on gleplot itself, use an editable install with the development tools, as described in [CONTRIBUTING.md](https://github.com/BenHuddart/gleplot/blob/main/CONTRIBUTING.md):
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git clone https://github.com/BenHuddart/gleplot.git
|
|
60
|
+
cd gleplot
|
|
61
|
+
pip install -e ".[dev]"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## What it can plot
|
|
65
|
+
|
|
66
|
+
- Lines, scatter, bars, steps, stems and histograms ([plot types](https://benhuddart.github.io/gleplot/guides/PLOT_TYPES.html))
|
|
67
|
+
- [Error bars](https://benhuddart.github.io/gleplot/gallery.html#combined-x-y-error-bars), symmetric or asymmetric, in x and y
|
|
68
|
+
- [Fills between curves](https://benhuddart.github.io/gleplot/gallery.html#fill-between)
|
|
69
|
+
- [Heatmaps](https://benhuddart.github.io/gleplot/gallery.html#heatmap-imshow) and [contours](https://benhuddart.github.io/gleplot/gallery.html#phase-diagram-tripcolor-tricontour) with colour bars
|
|
70
|
+
- [Subplots](https://benhuddart.github.io/gleplot/gallery.html#x2-subplot-grid) and [shared axes](https://benhuddart.github.io/gleplot/gallery.html#shared-x-axis-stacked)
|
|
71
|
+
- [Log scales](https://benhuddart.github.io/gleplot/gallery.html#log-scale), [secondary axes](https://benhuddart.github.io/gleplot/gallery.html#secondary-y-axis) and [polar plots](https://benhuddart.github.io/gleplot/gallery.html#polar-plot)
|
|
72
|
+
- [Reference lines and shaded spans](https://benhuddart.github.io/gleplot/guides/REFERENCE_LINES_AND_SPANS.html), [text and arrows](https://benhuddart.github.io/gleplot/gallery.html#text-annotations)
|
|
73
|
+
- [Series read from existing data files](https://benhuddart.github.io/gleplot/guides/FILE_BASED_SERIES.html)
|
|
74
|
+
|
|
75
|
+
The [gallery](https://benhuddart.github.io/gleplot/gallery.html) shows every example with its code.
|
|
76
|
+
|
|
77
|
+
## Coming from matplotlib
|
|
78
|
+
|
|
79
|
+
`figure`, `subplots`, `plot`, `scatter`, `errorbar`, `savefig` and the other matplotlib names take matplotlib's arguments. Where GLE cannot do what a keyword asks, gleplot accepts it and warns; the [matplotlib migration guide](https://benhuddart.github.io/gleplot/guides/MATPLOTLIB_MIGRATION.html) lists each difference. gleplot does not emulate what GLE cannot draw, so there is no pie chart, box plot or broken axis.
|
|
80
|
+
|
|
81
|
+
## Upgrading from gleplot 5
|
|
82
|
+
|
|
83
|
+
gleplot 6 removes those features, raises on a bad argument when the call is made, and draws with matplotlib's colour cycle and bars without an outline. [Migrating from gleplot 5 to 6](https://benhuddart.github.io/gleplot/guides/MIGRATING_TO_6.html) lists each change and what to use instead.
|
|
84
|
+
|
|
85
|
+
## Documentation
|
|
86
|
+
|
|
87
|
+
The [documentation site](https://benhuddart.github.io/gleplot/) has the user guides and the API reference.
|
|
88
|
+
|
|
89
|
+
## Contributing
|
|
90
|
+
|
|
91
|
+
See [CONTRIBUTING.md](https://github.com/BenHuddart/gleplot/blob/main/CONTRIBUTING.md). Questions and feature requests go to [GitHub issues](https://github.com/BenHuddart/gleplot/issues).
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
gleplot is licensed under the [GPL-2.0 or later](https://github.com/BenHuddart/gleplot/blob/main/LICENSE).
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=45", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "gleplot"
|
|
7
|
+
version = "6.0.0"
|
|
8
|
+
description = "Write standard GLE (Graphics Layout Engine) from Python, with matplotlib-shaped names"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = {text = "GPL-2.0+"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "gleplot contributors"},
|
|
14
|
+
]
|
|
15
|
+
keywords = ["plotting", "graphics", "GLE", "scientific-visualization", "publication-quality"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 5 - Production/Stable",
|
|
18
|
+
"Intended Audience :: Science/Research",
|
|
19
|
+
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.9",
|
|
22
|
+
"Programming Language :: Python :: 3.10",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Programming Language :: Python :: 3.14",
|
|
27
|
+
"Topic :: Scientific/Engineering :: Visualization",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
dependencies = [
|
|
31
|
+
"numpy>=1.16.0",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[project.optional-dependencies]
|
|
35
|
+
dev = [
|
|
36
|
+
"pytest>=6.0",
|
|
37
|
+
"pytest-cov>=2.0",
|
|
38
|
+
# Formatter output differs between black majors, so CI and local runs
|
|
39
|
+
# must agree on one. Black 26 needs Python 3.10+; lint runs on 3.12.
|
|
40
|
+
"black>=26,<27; python_version >= '3.10'",
|
|
41
|
+
"isort>=5.12",
|
|
42
|
+
"flake8>=6.0",
|
|
43
|
+
# Like black, pinned to one major: a new mypy can report new errors, and
|
|
44
|
+
# the lint job gates on a clean run. mypy 2 needs Python 3.10+.
|
|
45
|
+
"mypy>=2.3,<3; python_version >= '3.10'",
|
|
46
|
+
"python-semantic-release>=10",
|
|
47
|
+
# Raster ink measurement in integration and parser tests.
|
|
48
|
+
"Pillow>=9.1",
|
|
49
|
+
]
|
|
50
|
+
docs = [
|
|
51
|
+
"sphinx>=4.0",
|
|
52
|
+
"sphinx-rtd-theme>=1.0",
|
|
53
|
+
"myst-parser>=0.18",
|
|
54
|
+
# docs/prepare_gallery.py converts the gallery images; conf.py sizes them.
|
|
55
|
+
"Pillow>=9.1",
|
|
56
|
+
]
|
|
57
|
+
gle = [
|
|
58
|
+
# GLE must be installed separately from system package manager
|
|
59
|
+
# macOS: brew install gle
|
|
60
|
+
# Linux: apt-get install gle (or yum/dnf)
|
|
61
|
+
]
|
|
62
|
+
[project.urls]
|
|
63
|
+
Homepage = "https://github.com/benhuddart/gleplot"
|
|
64
|
+
Documentation = "https://benhuddart.github.io/gleplot"
|
|
65
|
+
Repository = "https://github.com/benhuddart/gleplot"
|
|
66
|
+
"Bug Tracker" = "https://github.com/benhuddart/gleplot/issues"
|
|
67
|
+
|
|
68
|
+
[tool.setuptools]
|
|
69
|
+
package-dir = {"" = "src"}
|
|
70
|
+
|
|
71
|
+
# Discover every subpackage under src/gleplot automatically. The previous
|
|
72
|
+
# explicit list silently omitted gleplot.parser (imported by the core __init__,
|
|
73
|
+
# axes, figure, and writer modules), which broke non-editable installs.
|
|
74
|
+
[tool.setuptools.packages.find]
|
|
75
|
+
where = ["src"]
|
|
76
|
+
|
|
77
|
+
[tool.setuptools.package-data]
|
|
78
|
+
# PEP 561 marker; mypy runs in the CI lint job.
|
|
79
|
+
"gleplot" = ["py.typed"]
|
|
80
|
+
|
|
81
|
+
[tool.black]
|
|
82
|
+
line-length = 88
|
|
83
|
+
target-version = ['py39', 'py310', 'py311', 'py312']
|
|
84
|
+
include = '\.pyi?$'
|
|
85
|
+
|
|
86
|
+
[tool.isort]
|
|
87
|
+
profile = "black"
|
|
88
|
+
line_length = 88
|
|
89
|
+
|
|
90
|
+
[tool.mypy]
|
|
91
|
+
# No python_version pin: current numpy stubs use syntax mypy rejects when
|
|
92
|
+
# asked to check as 3.9. Runtime support for 3.9 is covered by the test matrix.
|
|
93
|
+
# Series and data sources are dict subclasses, so most accessors return Any
|
|
94
|
+
# by design; warning on that would mean a cast at every read.
|
|
95
|
+
warn_return_any = false
|
|
96
|
+
warn_unused_configs = true
|
|
97
|
+
disallow_untyped_defs = false
|
|
98
|
+
|
|
99
|
+
[[tool.mypy.overrides]]
|
|
100
|
+
# Optional at runtime (Figure.view in notebooks); not a dependency.
|
|
101
|
+
module = ["IPython.*"]
|
|
102
|
+
ignore_missing_imports = true
|
|
103
|
+
|
|
104
|
+
[tool.pytest.ini_options]
|
|
105
|
+
testpaths = ["tests"]
|
|
106
|
+
python_files = ["test_*.py"]
|
|
107
|
+
addopts = "-v --tb=short"
|
|
108
|
+
markers = [
|
|
109
|
+
"gle: needs the external GLE binary; asserts on compiled output",
|
|
110
|
+
]
|
|
111
|
+
|
|
112
|
+
[tool.semantic_release]
|
|
113
|
+
version_toml = ["pyproject.toml:project.version"]
|
|
114
|
+
version_variables = ["src/gleplot/__init__.py:__version__"]
|
|
115
|
+
build_command = "pip install build && python -m build"
|
|
116
|
+
commit_message = "chore: release version {version}"
|
|
117
|
+
|
|
118
|
+
[tool.semantic_release.changelog]
|
|
119
|
+
mode = "update"
|
|
120
|
+
exclude_commit_patterns = []
|
|
121
|
+
|
|
122
|
+
[tool.semantic_release.changelog.default_templates]
|
|
123
|
+
changelog_file = "docs/CHANGELOG.md"
|
|
124
|
+
|
|
125
|
+
[tool.semantic_release.publish]
|
|
126
|
+
upload_to_vcs_release = false
|
|
127
|
+
|
|
128
|
+
[tool.semantic_release.branches.main]
|
|
129
|
+
match = "(main|master)"
|
|
130
|
+
prerelease_token = "rc"
|
|
131
|
+
prerelease = false
|
|
132
|
+
|
|
133
|
+
[tool.semantic_release.commit_parser_options]
|
|
134
|
+
allowed_tags = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"]
|
|
135
|
+
minor_tags = ["feat"]
|
|
136
|
+
patch_tags = ["fix", "perf"]
|
gleplot-6.0.0/setup.cfg
ADDED