Skip to content

Commit 9c6558b

Browse files
authoredJan 24, 2025··
Merge pull request #7 from semuconsulting/RC-1.0.14
Rc 1.0.14
2 parents 93751fa + 2debf66 commit 9c6558b

File tree

8 files changed

+42
-77
lines changed

8 files changed

+42
-77
lines changed
 

‎.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"python.testing.pytestEnabled": true,
33
"python.testing.unittestEnabled": false,
44
"python.formatting.provider": "black",
5-
"python.defaultInterpreterPath": "/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12",
5+
"python.defaultInterpreterPath": "python3",
66
"editor.formatOnSave": true,
77
"modulename": "pymandel",
88
"distname": "pymandel",

‎README.md

+1-21
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ the Python 3 scripts (bin) and site_packages directories are included in your PA
8383

8484
### Dependencies
8585

86-
PyMandel is compatible with Python >=3.9 <=3.12. **NB:** PyMandel does not currently support Python 3.13 due to the dependent `numba` library.
86+
PyMandel is compatible with Python 3.9 - 3.13.
8787

8888
On Windows and MacOS, pip, tkinter and the necessary imaging libraries are generally packaged with Python. On some Linux distributions like Ubuntu 18+ and Raspberry Pi OS, they may need to be installed separately, e.g.:
8989

@@ -152,26 +152,6 @@ Icon=/home/user/.local/lib/python3.11/site-packages/pygpsclient/resources/pymand
152152
Exec=/home/user/.local/bin/pymandel
153153
```
154154

155-
### 2. Manual installation
156-
157-
The following Python libraries are required (these will be installed automatically if using pip to install PyMandel):
158-
159-
```shell
160-
python3 -m pip install --upgrade numba numpy Pillow
161-
```
162-
163-
To install PyMandel manually, download and unzip this repository and type:
164-
165-
```shell
166-
python3 -m /path_to_folder/foldername/pymandel
167-
```
168-
169-
e.g. if you downloaded and unzipped to a folder named `PyMandel-1.0.12`, type:
170-
171-
```shell
172-
python3 -m /path_to_folder/PyMandel-1.0.12/pymandel
173-
```
174-
175155
### Performance Optimisations
176156

177157
The application makes use of [Numba](http://numba.pydata.org/) just in time (jit) compilation, caching and parallelisation techniques, in conjunction with Numpy image arrays, to dramatically improve calculation and rendering times relative to standard Python, particularly on multi-core CPUs.

‎RELEASE_NOTES.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# PyMandel Release Notes
22

3+
### RELEASE 1.0.14
4+
5+
CHANGES:
6+
7+
1. Support for Python 3.13 added - numba>=0.61 now supports 3.13
8+
39
### RELEASE 1.0.13
410

511
CHANGES:

‎pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ classifiers = [
3333
"Programming Language :: Python :: 3.10",
3434
"Programming Language :: Python :: 3.11",
3535
"Programming Language :: Python :: 3.12",
36+
"Programming Language :: Python :: 3.13",
3637
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
3738
"Topic :: Multimedia :: Graphics",
3839
"Topic :: Scientific/Engineering :: Mathematics",

‎src/colormaps/make_colormap.py

+27-29
Original file line numberDiff line numberDiff line change
@@ -48,37 +48,35 @@ def make_colormap(**kwargs):
4848
print(f"Invalid image mode {mode} - must be RGB or RGBA")
4949

5050
levels = int(kwargs.get("levels", image.width))
51-
if levels > image.width:
52-
levels = image.width
51+
levels = min(levels, image.width)
5352
outfile = kwargs.get("output", mapname + str(levels) + "_colormap.py")
5453

55-
file = open(outfile, "a", encoding="utf-8")
56-
file.write("from numpy import array\n\n")
57-
file.write(
58-
"#****************************************************************************************\n"
59-
f"# {str(levels)}-level colormap created by make_colormap utility from file {infile}\n"
60-
"#****************************************************************************************\n"
61-
)
62-
file.write(mapname + " = array([ \\\n")
63-
64-
for x_axis in range(levels):
65-
pix = int(x_axis * image.width / levels)
66-
if x_axis == levels - 1:
67-
end = "]])\n"
68-
elif x_axis % 4 == 3:
69-
end = "],\n"
70-
else:
71-
end = "],"
72-
if mode == "RGBA":
73-
red, grn, blu, alpha = image.getpixel((pix, 0))
74-
else:
75-
red, grn, blu = image.getpixel((pix, 0))
76-
file.write("[" + str(red) + "," + str(grn) + "," + str(blu) + end)
77-
78-
image.close()
79-
file.close()
80-
81-
print(str(levels) + "-level colormap file " + outfile + " created")
54+
with open(outfile, "a", encoding="utf-8") as file:
55+
file.write("from numpy import array\n\n")
56+
file.write(
57+
"#****************************************************************************************\n"
58+
f"# {str(levels)}-level colormap created by make_colormap utility from file {infile}\n"
59+
"#****************************************************************************************\n"
60+
)
61+
file.write(mapname + " = array([ \\\n")
62+
63+
for x_axis in range(levels):
64+
pix = int(x_axis * image.width / levels)
65+
if x_axis == levels - 1:
66+
end = "]])\n"
67+
elif x_axis % 4 == 3:
68+
end = "],\n"
69+
else:
70+
end = "],"
71+
if mode == "RGBA":
72+
red, grn, blu, alpha = image.getpixel((pix, 0))
73+
else:
74+
red, grn, blu = image.getpixel((pix, 0))
75+
file.write("[" + str(red) + "," + str(grn) + "," + str(blu) + end)
76+
77+
image.close()
78+
79+
print(str(levels) + "-level colormap file " + outfile + " created")
8280

8381

8482
def main():

‎src/pymandel.egg-info/PKG-INFO

+4-23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Metadata-Version: 2.1
1+
Metadata-Version: 2.2
22
Name: pymandel
3-
Version: 1.0.13
3+
Version: 1.0.14
44
Summary: Fractal generation GUI application
55
Author-email: semuadmin <semuadmin@semuconsulting.com>
66
Maintainer-email: semuadmin <semuadmin@semuconsulting.com>
@@ -696,6 +696,7 @@ Classifier: Programming Language :: Python :: 3.9
696696
Classifier: Programming Language :: Python :: 3.10
697697
Classifier: Programming Language :: Python :: 3.11
698698
Classifier: Programming Language :: Python :: 3.12
699+
Classifier: Programming Language :: Python :: 3.13
699700
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
700701
Classifier: Topic :: Multimedia :: Graphics
701702
Classifier: Topic :: Scientific/Engineering :: Mathematics
@@ -806,7 +807,7 @@ the Python 3 scripts (bin) and site_packages directories are included in your PA
806807

807808
### Dependencies
808809

809-
PyMandel is compatible with Python >=3.9 <=3.12. **NB:** PyMandel does not currently support Python 3.13 due to the dependent `numba` library.
810+
PyMandel is compatible with Python 3.9 - 3.13.
810811

811812
On Windows and MacOS, pip, tkinter and the necessary imaging libraries are generally packaged with Python. On some Linux distributions like Ubuntu 18+ and Raspberry Pi OS, they may need to be installed separately, e.g.:
812813

@@ -875,26 +876,6 @@ Icon=/home/user/.local/lib/python3.11/site-packages/pygpsclient/resources/pymand
875876
Exec=/home/user/.local/bin/pymandel
876877
```
877878

878-
### 2. Manual installation
879-
880-
The following Python libraries are required (these will be installed automatically if using pip to install PyMandel):
881-
882-
```shell
883-
python3 -m pip install --upgrade numba numpy Pillow
884-
```
885-
886-
To install PyMandel manually, download and unzip this repository and type:
887-
888-
```shell
889-
python3 -m /path_to_folder/foldername/pymandel
890-
```
891-
892-
e.g. if you downloaded and unzipped to a folder named `PyMandel-1.0.12`, type:
893-
894-
```shell
895-
python3 -m /path_to_folder/PyMandel-1.0.12/pymandel
896-
```
897-
898879
### Performance Optimisations
899880

900881
The application makes use of [Numba](http://numba.pydata.org/) just in time (jit) compilation, caching and parallelisation techniques, in conjunction with Numpy image arrays, to dramatically improve calculation and rendering times relative to standard Python, particularly on multi-core CPUs.

‎src/pymandel/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Version for PyMandel Application.
33
"""
44

5-
__version__ = "1.0.13"
5+
__version__ = "1.0.14"

‎src/pymandel/mandelcli.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ def __init__(self, **kwargs):
7878
self._theme = kwargs.get("theme", "Default")
7979
self._shift = int(kwargs.get("shift", 0))
8080
self._startframe = int(kwargs.get("startframe", 1))
81-
if self._startframe > self._frames:
82-
self._startframe = self._frames
81+
self._startframe = min(self._startframe, self._frames)
8382
self._zoom = float(kwargs.get("zoom", 0.75))
8483
self._startzoom = float(
8584
kwargs.get(

0 commit comments

Comments
 (0)
Please sign in to comment.