py-pluto 1.1.4__tar.gz → 1.1.5__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.
Files changed (80) hide show
  1. py_pluto-1.1.4/README.md → py_pluto-1.1.5/PKG-INFO +40 -43
  2. py_pluto-1.1.4/PKG-INFO → py_pluto-1.1.5/README.md +18 -90
  3. {py_pluto-1.1.4 → py_pluto-1.1.5}/pyproject.toml +99 -29
  4. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/__init__.py +7 -1
  5. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/baseloadmixin.py +12 -12
  6. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/baseloadstate.py +1 -1
  7. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/configure.py +6 -2
  8. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/gui/config.py +51 -14
  9. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/gui/main.py +1 -1
  10. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/h_pypluto.py +4 -1
  11. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/legend.py +4 -2
  12. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/load.py +2 -2
  13. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/descriptor.py +4 -4
  14. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/findfiles.py +2 -2
  15. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/findformat.py +5 -5
  16. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/loadvars.py +1 -1
  17. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/offsetdata.py +1 -1
  18. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/offsetfluid.py +1 -1
  19. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/readdata.py +5 -5
  20. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/readdata_old.py +5 -5
  21. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/readfluid.py +5 -5
  22. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/readformat.py +4 -4
  23. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/readgridout.py +3 -3
  24. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/readpart.py +1 -1
  25. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/write_files.py +5 -5
  26. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadpart.py +4 -4
  27. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/utils/annotator.py +6 -2
  28. py_pluto-1.1.5/src/pyPLUTO/utils/make_docstrings.py +146 -0
  29. py_pluto-1.1.5/src/pyPLUTO/utils/pypluto_function_parameters.json +2954 -0
  30. py_pluto-1.1.4/pyPLUTO/utils/make_docstrings.py +0 -3
  31. py_pluto-1.1.4/py_pluto.egg-info/PKG-INFO +0 -218
  32. py_pluto-1.1.4/py_pluto.egg-info/SOURCES.txt +0 -76
  33. py_pluto-1.1.4/py_pluto.egg-info/dependency_links.txt +0 -1
  34. py_pluto-1.1.4/py_pluto.egg-info/entry_points.txt +0 -2
  35. py_pluto-1.1.4/py_pluto.egg-info/requires.txt +0 -41
  36. py_pluto-1.1.4/py_pluto.egg-info/top_level.txt +0 -1
  37. py_pluto-1.1.4/setup.cfg +0 -4
  38. {py_pluto-1.1.4 → py_pluto-1.1.5}/LICENSE +0 -0
  39. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/amr.py +0 -0
  40. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/codes/echo_load.py +0 -0
  41. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/gui/custom_var.py +0 -0
  42. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/gui/globals.py +0 -0
  43. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/gui/main_window.py +0 -0
  44. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/gui/panels.py +0 -0
  45. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/gui/utils.py +0 -0
  46. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/image.py +0 -0
  47. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/colorbar.py +0 -0
  48. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/contour.py +0 -0
  49. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/create_axes.py +0 -0
  50. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/display.py +0 -0
  51. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/figure.py +0 -0
  52. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/imagetools.py +0 -0
  53. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/interactive.py +0 -0
  54. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/plot.py +0 -0
  55. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/range.py +0 -0
  56. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/scatter.py +0 -0
  57. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/set_axis.py +0 -0
  58. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/streamplot.py +0 -0
  59. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagefuncs/zoom.py +0 -0
  60. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagemixin.py +0 -0
  61. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/imagestate.py +0 -0
  62. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/baseloadtools.py +0 -0
  63. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/codeselection.py +0 -0
  64. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/defpluto.py +0 -0
  65. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/initload.py +0 -0
  66. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/read_files.py +0 -0
  67. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/readdefplini.py +0 -0
  68. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/readgridalone.py +0 -0
  69. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/readgridfile.py +0 -0
  70. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadfuncs/readtab.py +0 -0
  71. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadmixin.py +0 -0
  72. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/loadstate.py +0 -0
  73. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/newload.py +0 -0
  74. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/pytools.py +0 -0
  75. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/toolfuncs/findlines.py +0 -0
  76. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/toolfuncs/fourier.py +0 -0
  77. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/toolfuncs/nabla.py +0 -0
  78. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/toolfuncs/parttools.py +0 -0
  79. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/toolfuncs/transform.py +0 -0
  80. {py_pluto-1.1.4 → py_pluto-1.1.5/src}/pyPLUTO/utils/inspector.py +0 -0
@@ -1,14 +1,34 @@
1
+ Metadata-Version: 2.4
2
+ Name: py-pluto
3
+ Version: 1.1.5
4
+ Summary: PyPLUTO: Plotting routines for PLUTO
5
+ Author: D. Crocco, D. Melon Fuksman, M. Bugli, V. Berta, E. Puzzoni, A. Mignone, B. Vaidya
6
+ Author-email: "G. Mattia" <mattia@mpia.de>
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: contourpy>=1.2.1
11
+ Requires-Dist: numpy>=2.0.0
12
+ Requires-Dist: matplotlib>=3.8.4
13
+ Requires-Dist: scipy>=1.13.0
14
+ Requires-Dist: numexpr>=2.10.0
15
+ Requires-Dist: pandas>=2.2.2
16
+ Requires-Dist: h5py>=3.11.0
17
+ Requires-Dist: inifix>=5.1.0
18
+ Requires-Dist: PySide6 ; extra == "gui"
19
+ Requires-Dist: pastamarkers ; extra == "pasta"
20
+ Provides-Extra: gui
21
+ Provides-Extra: pasta
22
+
1
23
  # PyPLUTO: a data analysis Python package for the PLUTO code
2
24
 
3
25
  | Category | Badges |
4
26
  | --- | --- |
5
- | Package | ![Python Versions](https://img.shields.io/badge/Python-3.12%20%7C%203.13%20%7C%203.14-3776AB.svg?style=flat&logo=python&logoColor=white) [![GitHub release](https://img.shields.io/github/v/release/GiMattia/PyPLUTO?include_prereleases&label=Release)](https://github.com/GiMattia/PyPLUTO/releases) |
27
+ | Package | ![Python Versions](https://img.shields.io/badge/Python-3.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-3776AB.svg?style=flat&logo=python&logoColor=white) [![PyPI version](https://img.shields.io/pypi/v/py-pluto)](https://pypi.org/project/py-pluto/) |
6
28
  | Reliability | [![Windows Tests](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_windows.yml/badge.svg)](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_windows.yml) [![MacOS Tests](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_macos.yml/badge.svg)](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_macos.yml) [![Linux Tests](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_linux.yml/badge.svg)](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_linux.yml) ![Coverage Report](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/GiMattia/384b1f3a3a3b74cdbd65c4e3dce0632f/raw/pytest-coverage-comment__main.json) |
7
- | Docs & Community | [![Project Status: Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![Documentation](https://readthedocs.org/projects/pypluto/badge/?version=latest)](https://pypluto.readthedocs.io/en/latest/?badge=latest) [![Discord](https://img.shields.io/discord/YOUR_SERVER_ID?logo=discord&label=Discord)](https://discord.gg/YOUR_INVITE) [![License: BSD-3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) |
29
+ | Docs & Community | [![Project Status: Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![Documentation](https://readthedocs.org/projects/pypluto/badge/?version=latest)](https://pypluto.readthedocs.io/en/latest/?badge=latest) [![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord&logoColor=white)](https://discord.gg/63A3sM9UtX) [![License: BSD-3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) |
8
30
  | Citation | [![DOI](https://joss.theoj.org/papers/10.21105/joss.08448/status.svg)](https://doi.org/10.21105/joss.08448) [![Arxiv](https://img.shields.io/badge/arXiv-2501.09748-8F1515?style=flat&logo=arxiv&logoColor=red)](https://doi.org/10.48550/arXiv.2501.09748) [![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.19650848.svg)](https://doi.org/10.5281/zenodo.19650848) |
9
31
 
10
- <!-- ![PyPI](https://img.shields.io/pypi/v/PyPLUTO) -->
11
-
12
32
  PyPLUTO is a Python library which loads and plots the data obtain from the
13
33
  PLUTO code simulations.
14
34
  The aim of this package is to simplify some non-trivial python routines in order
@@ -22,17 +42,20 @@ The package is structured as follow:
22
42
  - the Load class is used to load the data from the PLUTO simulation fluid files.
23
43
  - the LoadPart class is used to load the data from the PLUTO simulation particle files.
24
44
  - the Image class is used to visualize the loaded data.
25
- - additional functions (e.g., to save the images) are included in the package.
45
+ - the GUI subpackage allows for a quic interactive script-free visualization.
46
+ - additional functions (e.g., to show the images) are included in the package.
26
47
 
27
48
  The package includes a set of examples in the `Examples` directory.
28
49
 
29
- The package is tested on Python 3.10 (and newer versions) and with the following dependencies:
50
+ The package is tested on Python 3.13 (and newer versions) and with the following dependencies:
30
51
 
31
52
  - `numpy`
53
+ - `contourpy`
32
54
  - `matplotlib`
55
+ - `numexpr`
33
56
  - `scipy`
34
- - `pandas`
35
57
  - `h5py`
58
+ - `inifix`
36
59
  - `PySide6`
37
60
 
38
61
  The package is provided with a `LICENSE` file which contains the license terms.
@@ -43,16 +66,18 @@ The package is provided with an extensive documentation in the `Docs` directory.
43
66
 
44
67
  To install the PyPLUTO package, you can use the following methods:
45
68
 
46
- ### Installation with pip
47
-
48
- The easiest way to install PyPLUTO is through pip. Open your terminal and run the following command:
69
+ The easiest way to install PyPLUTO is through uv. Open your terminal and run the following command:
49
70
 
50
71
  ```bash
51
- pip install ./
72
+ uv add py-pluto
52
73
  ```
53
74
 
54
- Ensure that you are using Python 3.10 or newer, as the package is compatible from this version onwards.
55
- Installation through pipenv or uv is also possible (see the documentation).
75
+ Ensure that you are using Python 3.12 or newer, as the package is compatible from this version onwards.
76
+ Installation through pip is also possible through the command:
77
+
78
+ ```bash
79
+ pip install py-pluto
80
+ ```
56
81
 
57
82
  This method allows installation in a non-editable mode, and it is recommended to use a virtual environment to avoid conflicts with other packages.
58
83
 
@@ -99,7 +124,7 @@ how to exploit the package capabilities.
99
124
  ## The GUI
100
125
 
101
126
  A Graphical User Interface has been implemented in order to simplify and enhance the visualization and analysis of simulation data.
102
- The GUI is built with PyQt6 and allows users to load and visualize 1D and 2D fluid data (or slices) from PLUTO simulations.
127
+ The GUI is built with PySide6 and allows users to load and visualize 1D and 2D fluid data (or slices) from PLUTO simulations.
103
128
  To run the GUI after the package installation, one should simply run the command
104
129
 
105
130
  ```bash
@@ -140,32 +165,4 @@ We recommend to put one the following expressions in your manuscript:
140
165
 
141
166
  If you have any questions, suggestions or find a bug, feel free to open an issue or fork the repository and create a pull request.
142
167
  Any contribution aimed at helping the PLUTO code community to have better plots with less efforts will be greatly appreciated.
143
- If you want to contribute to PyPLUTO please be sure to install it in the developer mode, through the command:
144
-
145
- ```bash
146
- pip install -r requirements_dev.txt
147
- ```
148
-
149
- ### Rules for Contributing
150
-
151
- We use pre-commit to ensure that the code is consistent with the code guidelines, through uv, ruff, pyrefly and ty.
152
- You can either link the pre-commit to the repository through the command
153
-
154
- ```bash
155
- pre-commit install
156
- ```
157
-
158
- or by enforcing the guide styles manually through the command
159
-
160
- ```bash
161
- pre-commit run --all-files
162
- ```
163
-
164
- Before opening a pull request,there is the possibility to run a deeper series of checks, including tests with coverage, pylint check, docstring coverage and so through the command
165
-
166
- ```bash
167
- pre-commit run --all-files --hook-stage manual
168
- ```
169
-
170
- If one or more tests do not pass the automatic code checks anforced through github actions will not allow the pull request to pass, so is higly recommended to run the full pre-commit before every pull request.
171
- For any question or enquiry, please contact one of the administrators.
168
+ If you want to contribute to PyPLUTO please follow the instruction present in the CONTRIBUTING.md file.
@@ -1,61 +1,12 @@
1
- Metadata-Version: 2.4
2
- Name: py-pluto
3
- Version: 1.1.4
4
- Summary: PyPLUTO: Plotting routines for PLUTO
5
- Author: D. Crocco, D. Melon Fuksman, M. Bugli, V. Berta, E. Puzzoni, A. Mignone, B. Vaidya
6
- Author-email: "G. Mattia" <mattia@mpia.de>
7
- License: BSD-3-Clause
8
- Requires-Python: >=3.12
9
- Description-Content-Type: text/markdown
10
- License-File: LICENSE
11
- Requires-Dist: contourpy
12
- Requires-Dist: numpy
13
- Requires-Dist: matplotlib
14
- Requires-Dist: scipy
15
- Requires-Dist: numexpr
16
- Requires-Dist: pandas
17
- Requires-Dist: h5py
18
- Requires-Dist: inifix>=5.1.0
19
- Provides-Extra: extras
20
- Requires-Dist: PySide6; extra == "extras"
21
- Provides-Extra: docs
22
- Requires-Dist: sphinx; extra == "docs"
23
- Requires-Dist: sphinx-automodapi; extra == "docs"
24
- Requires-Dist: numpydoc; extra == "docs"
25
- Provides-Extra: test
26
- Requires-Dist: pytest; extra == "test"
27
- Requires-Dist: pytest-doctestplus; extra == "test"
28
- Requires-Dist: coverage; extra == "test"
29
- Requires-Dist: pytest-cov; extra == "test"
30
- Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
31
- Provides-Extra: dev
32
- Requires-Dist: uv; extra == "dev"
33
- Requires-Dist: pandas-stubs; extra == "dev"
34
- Requires-Dist: h5py-stubs; extra == "dev"
35
- Requires-Dist: pre-commit; extra == "dev"
36
- Requires-Dist: pyright; extra == "dev"
37
- Requires-Dist: pyrefly; extra == "dev"
38
- Requires-Dist: ruff; extra == "dev"
39
- Requires-Dist: ty>=0.0.17; extra == "dev"
40
- Requires-Dist: radon; extra == "dev"
41
- Requires-Dist: pydata-sphinx-theme; extra == "dev"
42
- Provides-Extra: notebook
43
- Requires-Dist: ipython; extra == "notebook"
44
- Provides-Extra: pasta
45
- Requires-Dist: pastamarkers; extra == "pasta"
46
- Dynamic: license-file
47
-
48
1
  # PyPLUTO: a data analysis Python package for the PLUTO code
49
2
 
50
3
  | Category | Badges |
51
4
  | --- | --- |
52
- | Package | ![Python Versions](https://img.shields.io/badge/Python-3.12%20%7C%203.13%20%7C%203.14-3776AB.svg?style=flat&logo=python&logoColor=white) [![GitHub release](https://img.shields.io/github/v/release/GiMattia/PyPLUTO?include_prereleases&label=Release)](https://github.com/GiMattia/PyPLUTO/releases) |
5
+ | Package | ![Python Versions](https://img.shields.io/badge/Python-3.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-3776AB.svg?style=flat&logo=python&logoColor=white) [![PyPI version](https://img.shields.io/pypi/v/py-pluto)](https://pypi.org/project/py-pluto/) |
53
6
  | Reliability | [![Windows Tests](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_windows.yml/badge.svg)](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_windows.yml) [![MacOS Tests](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_macos.yml/badge.svg)](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_macos.yml) [![Linux Tests](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_linux.yml/badge.svg)](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_linux.yml) ![Coverage Report](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/GiMattia/384b1f3a3a3b74cdbd65c4e3dce0632f/raw/pytest-coverage-comment__main.json) |
54
- | Docs & Community | [![Project Status: Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![Documentation](https://readthedocs.org/projects/pypluto/badge/?version=latest)](https://pypluto.readthedocs.io/en/latest/?badge=latest) [![Discord](https://img.shields.io/discord/YOUR_SERVER_ID?logo=discord&label=Discord)](https://discord.gg/YOUR_INVITE) [![License: BSD-3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) |
7
+ | Docs & Community | [![Project Status: Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![Documentation](https://readthedocs.org/projects/pypluto/badge/?version=latest)](https://pypluto.readthedocs.io/en/latest/?badge=latest) [![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord&logoColor=white)](https://discord.gg/63A3sM9UtX) [![License: BSD-3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) |
55
8
  | Citation | [![DOI](https://joss.theoj.org/papers/10.21105/joss.08448/status.svg)](https://doi.org/10.21105/joss.08448) [![Arxiv](https://img.shields.io/badge/arXiv-2501.09748-8F1515?style=flat&logo=arxiv&logoColor=red)](https://doi.org/10.48550/arXiv.2501.09748) [![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.19650848.svg)](https://doi.org/10.5281/zenodo.19650848) |
56
9
 
57
- <!-- ![PyPI](https://img.shields.io/pypi/v/PyPLUTO) -->
58
-
59
10
  PyPLUTO is a Python library which loads and plots the data obtain from the
60
11
  PLUTO code simulations.
61
12
  The aim of this package is to simplify some non-trivial python routines in order
@@ -69,17 +20,20 @@ The package is structured as follow:
69
20
  - the Load class is used to load the data from the PLUTO simulation fluid files.
70
21
  - the LoadPart class is used to load the data from the PLUTO simulation particle files.
71
22
  - the Image class is used to visualize the loaded data.
72
- - additional functions (e.g., to save the images) are included in the package.
23
+ - the GUI subpackage allows for a quic interactive script-free visualization.
24
+ - additional functions (e.g., to show the images) are included in the package.
73
25
 
74
26
  The package includes a set of examples in the `Examples` directory.
75
27
 
76
- The package is tested on Python 3.10 (and newer versions) and with the following dependencies:
28
+ The package is tested on Python 3.13 (and newer versions) and with the following dependencies:
77
29
 
78
30
  - `numpy`
31
+ - `contourpy`
79
32
  - `matplotlib`
33
+ - `numexpr`
80
34
  - `scipy`
81
- - `pandas`
82
35
  - `h5py`
36
+ - `inifix`
83
37
  - `PySide6`
84
38
 
85
39
  The package is provided with a `LICENSE` file which contains the license terms.
@@ -90,16 +44,18 @@ The package is provided with an extensive documentation in the `Docs` directory.
90
44
 
91
45
  To install the PyPLUTO package, you can use the following methods:
92
46
 
93
- ### Installation with pip
94
-
95
- The easiest way to install PyPLUTO is through pip. Open your terminal and run the following command:
47
+ The easiest way to install PyPLUTO is through uv. Open your terminal and run the following command:
96
48
 
97
49
  ```bash
98
- pip install ./
50
+ uv add py-pluto
99
51
  ```
100
52
 
101
- Ensure that you are using Python 3.10 or newer, as the package is compatible from this version onwards.
102
- Installation through pipenv or uv is also possible (see the documentation).
53
+ Ensure that you are using Python 3.12 or newer, as the package is compatible from this version onwards.
54
+ Installation through pip is also possible through the command:
55
+
56
+ ```bash
57
+ pip install py-pluto
58
+ ```
103
59
 
104
60
  This method allows installation in a non-editable mode, and it is recommended to use a virtual environment to avoid conflicts with other packages.
105
61
 
@@ -146,7 +102,7 @@ how to exploit the package capabilities.
146
102
  ## The GUI
147
103
 
148
104
  A Graphical User Interface has been implemented in order to simplify and enhance the visualization and analysis of simulation data.
149
- The GUI is built with PyQt6 and allows users to load and visualize 1D and 2D fluid data (or slices) from PLUTO simulations.
105
+ The GUI is built with PySide6 and allows users to load and visualize 1D and 2D fluid data (or slices) from PLUTO simulations.
150
106
  To run the GUI after the package installation, one should simply run the command
151
107
 
152
108
  ```bash
@@ -187,32 +143,4 @@ We recommend to put one the following expressions in your manuscript:
187
143
 
188
144
  If you have any questions, suggestions or find a bug, feel free to open an issue or fork the repository and create a pull request.
189
145
  Any contribution aimed at helping the PLUTO code community to have better plots with less efforts will be greatly appreciated.
190
- If you want to contribute to PyPLUTO please be sure to install it in the developer mode, through the command:
191
-
192
- ```bash
193
- pip install -r requirements_dev.txt
194
- ```
195
-
196
- ### Rules for Contributing
197
-
198
- We use pre-commit to ensure that the code is consistent with the code guidelines, through uv, ruff, pyrefly and ty.
199
- You can either link the pre-commit to the repository through the command
200
-
201
- ```bash
202
- pre-commit install
203
- ```
204
-
205
- or by enforcing the guide styles manually through the command
206
-
207
- ```bash
208
- pre-commit run --all-files
209
- ```
210
-
211
- Before opening a pull request,there is the possibility to run a deeper series of checks, including tests with coverage, pylint check, docstring coverage and so through the command
212
-
213
- ```bash
214
- pre-commit run --all-files --hook-stage manual
215
- ```
216
-
217
- If one or more tests do not pass the automatic code checks anforced through github actions will not allow the pull request to pass, so is higly recommended to run the full pre-commit before every pull request.
218
- For any question or enquiry, please contact one of the administrators.
146
+ If you want to contribute to PyPLUTO please follow the instruction present in the CONTRIBUTING.md file.
@@ -1,13 +1,13 @@
1
1
  [build-system]
2
- requires = ["setuptools>=82.0.1"]
3
- build-backend = "setuptools.build_meta"
2
+ requires = ["flit_core >=3.11,<4"]
3
+ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "py-pluto"
7
- version = "1.1.4"
7
+ dynamic = ["version"]
8
8
  description = "PyPLUTO: Plotting routines for PLUTO"
9
9
  readme = "README.md"
10
- requires-python = ">=3.12"
10
+ requires-python = ">=3.11"
11
11
  license = { text = "BSD-3-Clause" }
12
12
  authors = [
13
13
  { name = "G. Mattia", email = "mattia@mpia.de" },
@@ -20,31 +20,36 @@ authors = [
20
20
  { name = "B. Vaidya" }
21
21
  ]
22
22
  dependencies = [
23
- "contourpy",
24
- "numpy",
25
- "matplotlib",
26
- "scipy",
27
- "numexpr",
28
- "pandas",
29
- "h5py",
23
+ "contourpy>=1.2.1",
24
+ "numpy>=2.0.0",
25
+ "matplotlib>=3.8.4",
26
+ "scipy>=1.13.0",
27
+ "numexpr>=2.10.0",
28
+ "pandas>=2.2.2",
29
+ "h5py>=3.11.0",
30
30
  "inifix>=5.1.0",
31
31
  ]
32
32
 
33
33
  [project.optional-dependencies]
34
- extras = [
34
+ gui = [
35
35
  "PySide6",
36
36
  ]
37
37
 
38
+ pasta = [
39
+ "pastamarkers"
40
+ ]
41
+
42
+ [dependency-groups]
38
43
  docs = [
39
- "sphinx",
40
- "sphinx-automodapi",
41
- "numpydoc"
44
+ "sphinx>=9.0.0",
45
+ "sphinx-automodapi>=0.20.0",
46
+ "numpydoc>=1.0.0"
42
47
  ]
43
48
  test = [
44
- "pytest",
45
- "pytest-doctestplus",
46
- "coverage",
47
- "pytest-cov",
49
+ "pytest>=9.0.0",
50
+ "pytest-doctestplus>=1.5.0",
51
+ "coverage>=7.3.0",
52
+ "pytest-cov>=7.0.0",
48
53
  "pytest-xdist>=3.8.0",
49
54
  ]
50
55
  dev = [
@@ -61,21 +66,34 @@ dev = [
61
66
  ]
62
67
 
63
68
  notebook = [
64
- "ipython",
69
+ "ipython>=9.0.0",
65
70
  ]
66
71
 
67
- pasta = [
68
- "pastamarkers"
72
+ dev-test = [
73
+ { include-group = "dev" },
74
+ { include-group = "test" },
69
75
  ]
70
76
 
71
- [tool.setuptools.packages.find]
72
- include = ["pyPLUTO*"]
77
+ dev-docs = [
78
+ { include-group = "dev" },
79
+ { include-group = "docs" },
80
+ ]
81
+
82
+ local-dev = [
83
+ { include-group = "dev" },
84
+ { include-group = "test" },
85
+ { include-group = "docs" },
86
+ { include-group = "notebook" },
87
+ ]
73
88
 
74
89
  [project.scripts]
75
90
  pypluto-gui = "pyPLUTO.gui.main:main"
76
91
 
92
+ [tool.flit.module]
93
+ name = "pyPLUTO"
94
+
77
95
  [tool.coverage.run]
78
- source = ["pyPLUTO"]
96
+ source = ["src"]
79
97
  branch = true
80
98
 
81
99
  [tool.coverage.report]
@@ -83,7 +101,7 @@ omit = [
83
101
  "*/Tests/*",
84
102
  "*/Docs/*",
85
103
  "*/.venv/*",
86
- "*/site-packages/*"
104
+ "*/site-packages/*",
87
105
  ]
88
106
  exclude_lines = [
89
107
  "pragma: no cover",
@@ -95,7 +113,7 @@ exclude_lines = [
95
113
  ]
96
114
 
97
115
  [tool.ruff]
98
- target-version = "py312"
116
+ target-version = "py311"
99
117
  line-length = 80
100
118
  respect-gitignore = true
101
119
  fix = true
@@ -136,15 +154,67 @@ quote-style = "double"
136
154
  indent-style = "space"
137
155
  line-ending = "auto"
138
156
 
157
+ [tool.uv]
158
+ no-build-package = [
159
+ # mandatory deps
160
+ "contourpy",
161
+ "coverage",
162
+ "h5py",
163
+ "kiwisolver",
164
+ "matplotlib",
165
+ "numexpr",
166
+ "numpy",
167
+ "pandas",
168
+ "pillow",
169
+ "scipy",
170
+
171
+ # dev deps
172
+ "ruff",
173
+ "pre-commit",
174
+
175
+
176
+ # transitive deps
177
+ "decorator",
178
+ "docutils",
179
+ "markupsafe",
180
+ "jinja2",
181
+ "setuptools",
182
+ "simplejson",
183
+ ]
184
+ constraint-dependencies = [
185
+ "jsonschema>=0.3",
186
+ "pillow>=10.0.0",
187
+ ]
188
+
139
189
  [tool.pixi.workspace]
140
190
  channels = ["conda-forge"]
141
191
  platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
142
192
 
143
193
  [tool.pixi.dependencies]
144
- python = "3.12.*"
194
+ python = "3.11.*"
145
195
 
146
196
  [tool.pixi.pypi-dependencies]
147
197
  py-pluto = { path = ".", editable = true }
148
198
 
199
+ [tool.pixi.feature.gui.pypi-dependencies]
200
+ py-pluto = { path = ".", editable = true, extras = ["gui"] }
201
+
202
+ [tool.pixi.feature.pasta.pypi-dependencies]
203
+ py-pluto = { path = ".", editable = true, extras = ["pasta"] }
204
+
205
+ [tool.pixi.feature.full.pypi-dependencies]
206
+ py-pluto = { path = ".", editable = true, extras = ["gui", "pasta"] }
207
+
149
208
  [tool.pixi.environments]
150
- all = { features = ["test", "dev", "docs", "notebook", "extras", "pasta"] }
209
+ default = { features = [] }
210
+ gui = { features = ["gui"] }
211
+ pasta = { features = ["pasta"] }
212
+ full = { features = ["full"] }
213
+
214
+ dev = { features = ["dev"] }
215
+ test = { features = ["test"] }
216
+ docs = { features = ["docs"] }
217
+ notebook = { features = ["notebook"] }
218
+ dev-test = { features = ["dev", "test"] }
219
+ dev-docs = { features = ["dev", "docs"] }
220
+ local-dev = { features = ["dev", "test", "docs", "notebook"] }
@@ -8,7 +8,13 @@ from pyPLUTO.newload import Load
8
8
  from pyPLUTO.pytools import find_example, ring, savefig, show
9
9
 
10
10
  # Define the version and additional environment variables
11
- Configure()
11
+ __version__ = "1.1.5"
12
+
13
+ colorerr: bool = True
14
+ colorwarn: bool = True
15
+ greet: bool = True
16
+
17
+ Configure(__version__, colorerr, colorwarn, greet)
12
18
 
13
19
  __all__ = [
14
20
  "Image",
@@ -1,7 +1,7 @@
1
1
  """Mixin class for base load functionality."""
2
2
 
3
3
  from pathlib import Path
4
- from typing import Any, TypeVar
4
+ from typing import Any, Generic, TypeVar
5
5
 
6
6
  from numpy.typing import NDArray
7
7
 
@@ -10,7 +10,7 @@ from pyPLUTO.baseloadstate import BaseLoadState
10
10
  S = TypeVar("S", bound=BaseLoadState)
11
11
 
12
12
 
13
- class BaseLoadMixin[S: BaseLoadState]:
13
+ class BaseLoadMixin(Generic[S]):
14
14
  """Mixin class that provides base functionality for load state."""
15
15
 
16
16
  # pylint: disable=too-many-public-methods
@@ -77,6 +77,16 @@ class BaseLoadMixin[S: BaseLoadState]:
77
77
  """Set the d_vars attribute of the load state."""
78
78
  self.state.d_vars = value
79
79
 
80
+ @property
81
+ def datatype(self) -> str:
82
+ """Get the datatype attribute of the load state."""
83
+ return self.state.datatype
84
+
85
+ @datatype.setter
86
+ def datatype(self, value: str) -> None:
87
+ """Set the datatype attribute of the load state."""
88
+ self.state.datatype = value
89
+
80
90
  @property
81
91
  def endian(self) -> str | None:
82
92
  """Get the endian attribute of the load state."""
@@ -97,16 +107,6 @@ class BaseLoadMixin[S: BaseLoadState]:
97
107
  """Set the filepath attribute of the load state."""
98
108
  self.state.filepath = value
99
109
 
100
- @property
101
- def format(self) -> str:
102
- """Get the format attribute of the load state."""
103
- return self.state.format
104
-
105
- @format.setter
106
- def format(self, value: str) -> None:
107
- """Set the format attribute of the load state."""
108
- self.state.format = value
109
-
110
110
  @property
111
111
  def infogrid(self) -> bool:
112
112
  """Get the infogrid attribute of the load state."""
@@ -25,9 +25,9 @@ class BaseLoadState:
25
25
  code: str = "gPLUTO"
26
26
  d_info: dict[str, Any] = field(init=False)
27
27
  d_vars: dict[str, Any] = field(default_factory=dict)
28
+ datatype: str = "Unknown"
28
29
  endian: str | None = None
29
30
  filepath: Path = field(init=False)
30
- format: str = "Unknown"
31
31
  infogrid: bool = True
32
32
  lennout: int = field(init=False)
33
33
  lennoutlist: int = field(init=False)
@@ -26,7 +26,11 @@ class Configure:
26
26
  greeted = False
27
27
 
28
28
  def __init__(
29
- self, colorerr: bool = True, colorwarn: bool = True, greet: bool = True
29
+ self,
30
+ version: str = "Unknown",
31
+ colorerr: bool = True,
32
+ colorwarn: bool = True,
33
+ greet: bool = True,
30
34
  ) -> None:
31
35
  """Initialize the Configure class.
32
36
 
@@ -44,7 +48,7 @@ class Configure:
44
48
  - None
45
49
 
46
50
  """
47
- self.version: str = "1.1.1"
51
+ self.version: str = version
48
52
  self.colorerr: bool = colorerr
49
53
  self.colorwarn: bool = colorwarn
50
54
  self.session: str = self._find_session()