py-pluto 1.1.4__py3-none-any.whl
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.
- pyPLUTO/__init__.py +22 -0
- pyPLUTO/amr.py +745 -0
- pyPLUTO/baseloadmixin.py +258 -0
- pyPLUTO/baseloadstate.py +45 -0
- pyPLUTO/codes/echo_load.py +161 -0
- pyPLUTO/configure.py +261 -0
- pyPLUTO/gui/config.py +174 -0
- pyPLUTO/gui/custom_var.py +435 -0
- pyPLUTO/gui/globals.py +108 -0
- pyPLUTO/gui/main.py +17 -0
- pyPLUTO/gui/main_window.py +177 -0
- pyPLUTO/gui/panels.py +66 -0
- pyPLUTO/gui/utils.py +273 -0
- pyPLUTO/h_pypluto.py +84 -0
- pyPLUTO/image.py +302 -0
- pyPLUTO/imagefuncs/colorbar.py +240 -0
- pyPLUTO/imagefuncs/contour.py +254 -0
- pyPLUTO/imagefuncs/create_axes.py +464 -0
- pyPLUTO/imagefuncs/display.py +306 -0
- pyPLUTO/imagefuncs/figure.py +395 -0
- pyPLUTO/imagefuncs/imagetools.py +487 -0
- pyPLUTO/imagefuncs/interactive.py +403 -0
- pyPLUTO/imagefuncs/legend.py +250 -0
- pyPLUTO/imagefuncs/plot.py +311 -0
- pyPLUTO/imagefuncs/range.py +242 -0
- pyPLUTO/imagefuncs/scatter.py +270 -0
- pyPLUTO/imagefuncs/set_axis.py +497 -0
- pyPLUTO/imagefuncs/streamplot.py +297 -0
- pyPLUTO/imagefuncs/zoom.py +428 -0
- pyPLUTO/imagemixin.py +259 -0
- pyPLUTO/imagestate.py +45 -0
- pyPLUTO/load.py +447 -0
- pyPLUTO/loadfuncs/baseloadtools.py +71 -0
- pyPLUTO/loadfuncs/codeselection.py +48 -0
- pyPLUTO/loadfuncs/defpluto.py +123 -0
- pyPLUTO/loadfuncs/descriptor.py +102 -0
- pyPLUTO/loadfuncs/findfiles.py +182 -0
- pyPLUTO/loadfuncs/findformat.py +245 -0
- pyPLUTO/loadfuncs/initload.py +203 -0
- pyPLUTO/loadfuncs/loadvars.py +227 -0
- pyPLUTO/loadfuncs/offsetdata.py +87 -0
- pyPLUTO/loadfuncs/offsetfluid.py +408 -0
- pyPLUTO/loadfuncs/read_files.py +213 -0
- pyPLUTO/loadfuncs/readdata.py +619 -0
- pyPLUTO/loadfuncs/readdata_old.py +567 -0
- pyPLUTO/loadfuncs/readdefplini.py +101 -0
- pyPLUTO/loadfuncs/readfluid.py +479 -0
- pyPLUTO/loadfuncs/readformat.py +277 -0
- pyPLUTO/loadfuncs/readgridalone.py +224 -0
- pyPLUTO/loadfuncs/readgridfile.py +255 -0
- pyPLUTO/loadfuncs/readgridout.py +451 -0
- pyPLUTO/loadfuncs/readpart.py +419 -0
- pyPLUTO/loadfuncs/readtab.py +105 -0
- pyPLUTO/loadfuncs/write_files.py +283 -0
- pyPLUTO/loadmixin.py +419 -0
- pyPLUTO/loadpart.py +233 -0
- pyPLUTO/loadstate.py +68 -0
- pyPLUTO/newload.py +81 -0
- pyPLUTO/pytools.py +145 -0
- pyPLUTO/toolfuncs/findlines.py +551 -0
- pyPLUTO/toolfuncs/fourier.py +149 -0
- pyPLUTO/toolfuncs/nabla.py +676 -0
- pyPLUTO/toolfuncs/parttools.py +152 -0
- pyPLUTO/toolfuncs/transform.py +638 -0
- pyPLUTO/utils/annotator.py +27 -0
- pyPLUTO/utils/inspector.py +145 -0
- pyPLUTO/utils/make_docstrings.py +3 -0
- py_pluto-1.1.4.dist-info/METADATA +218 -0
- py_pluto-1.1.4.dist-info/RECORD +73 -0
- py_pluto-1.1.4.dist-info/WHEEL +5 -0
- py_pluto-1.1.4.dist-info/entry_points.txt +2 -0
- py_pluto-1.1.4.dist-info/licenses/LICENSE +27 -0
- py_pluto-1.1.4.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"""Inspect kwargs keys from source code."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import ast
|
|
6
|
+
import functools
|
|
7
|
+
import inspect
|
|
8
|
+
import textwrap
|
|
9
|
+
import warnings
|
|
10
|
+
from collections.abc import Callable
|
|
11
|
+
from typing import Any, ParamSpec, TypeVar, overload
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@functools.cache
|
|
15
|
+
def _find_kwargs_keys_from_source(source: str) -> set[str]:
|
|
16
|
+
"""Find kwargs keys from source code.
|
|
17
|
+
|
|
18
|
+
Works through the Abstract Syntax Tree (AST) to identify keys used in
|
|
19
|
+
`kwargs` dictionary accesses, such as `kwargs['key']`, `kwargs.get('key')`,
|
|
20
|
+
or `kwargs.pop('key')`. The results are returned as a set of strings
|
|
21
|
+
representing the keys found in the source code and cached for performance.
|
|
22
|
+
"""
|
|
23
|
+
# Parse the source code into an AST
|
|
24
|
+
tree = ast.parse(source)
|
|
25
|
+
kwargs_keys = set()
|
|
26
|
+
|
|
27
|
+
class KwargsVisitor(ast.NodeVisitor):
|
|
28
|
+
"""Visitor class to traverse the AST and find keys used in kwargs."""
|
|
29
|
+
|
|
30
|
+
def _get_str_from_slice(self, slice_node: ast.AST) -> str | None:
|
|
31
|
+
"""Get string from slice node."""
|
|
32
|
+
if isinstance(slice_node, ast.Constant) and isinstance(
|
|
33
|
+
slice_node.value, str
|
|
34
|
+
):
|
|
35
|
+
return slice_node.value
|
|
36
|
+
return None
|
|
37
|
+
|
|
38
|
+
def visit_Subscript(self, node: ast.Subscript) -> None:
|
|
39
|
+
"""Visit Subscript nodes to find kwargs keys."""
|
|
40
|
+
if isinstance(node.value, ast.Name) and node.value.id == "kwargs":
|
|
41
|
+
key = self._get_str_from_slice(node.slice)
|
|
42
|
+
if key is not None:
|
|
43
|
+
kwargs_keys.add(key)
|
|
44
|
+
self.generic_visit(node)
|
|
45
|
+
|
|
46
|
+
def visit_Call(self, node: ast.Call) -> None:
|
|
47
|
+
"""Visit Call nodes to find kwargs keys."""
|
|
48
|
+
if (
|
|
49
|
+
isinstance(node.func, ast.Attribute)
|
|
50
|
+
and (
|
|
51
|
+
isinstance(node.func.value, ast.Name)
|
|
52
|
+
and node.func.value.id == "kwargs"
|
|
53
|
+
and node.func.attr in {"get", "pop"}
|
|
54
|
+
)
|
|
55
|
+
and (
|
|
56
|
+
node.args
|
|
57
|
+
and isinstance(node.args[0], ast.Constant)
|
|
58
|
+
and isinstance(node.args[0].value, str)
|
|
59
|
+
)
|
|
60
|
+
):
|
|
61
|
+
kwargs_keys.add(node.args[0].value)
|
|
62
|
+
self.generic_visit(node)
|
|
63
|
+
|
|
64
|
+
KwargsVisitor().visit(tree)
|
|
65
|
+
return kwargs_keys
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def find_kwargs_keys(func: Callable[..., Any]) -> set[str]:
|
|
69
|
+
"""Find kwargs keys from source code."""
|
|
70
|
+
source = inspect.getsource(func)
|
|
71
|
+
source = textwrap.dedent(source)
|
|
72
|
+
return _find_kwargs_keys_from_source(source)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# Shared state for tracking across nested calls
|
|
76
|
+
P = ParamSpec("P")
|
|
77
|
+
R = TypeVar("R")
|
|
78
|
+
_kwargs_state: dict[str, set[str]] = {"remaining": set()}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
@overload
|
|
82
|
+
def track_kwargs(func: Callable[P, R]) -> Callable[P, R]: ...
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
@overload
|
|
86
|
+
def track_kwargs(
|
|
87
|
+
*, extra_keys: set[str] | None = None
|
|
88
|
+
) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def track_kwargs(
|
|
92
|
+
func: Callable[P, R] | None = None,
|
|
93
|
+
*,
|
|
94
|
+
extra_keys: set[str] | None = None,
|
|
95
|
+
) -> Callable[P, R] | Callable[[Callable[P, R]], Callable[P, R]]:
|
|
96
|
+
"""Track kwargs keys from source code."""
|
|
97
|
+
|
|
98
|
+
def decorator(inner_func: Callable[P, R]) -> Callable[P, R]:
|
|
99
|
+
"""Track kwargs keys from source code."""
|
|
100
|
+
used_keys = find_kwargs_keys(inner_func)
|
|
101
|
+
if extra_keys:
|
|
102
|
+
used_keys |= extra_keys
|
|
103
|
+
|
|
104
|
+
@functools.wraps(inner_func)
|
|
105
|
+
def wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
|
|
106
|
+
"""Track kwargs keys from source code."""
|
|
107
|
+
sig = inspect.signature(inner_func)
|
|
108
|
+
bound = sig.bind(*args, **kwargs)
|
|
109
|
+
bound.apply_defaults()
|
|
110
|
+
check = bound.arguments.get("check", False)
|
|
111
|
+
|
|
112
|
+
# Be robust to "check" passed via kwargs even if not bound.
|
|
113
|
+
if not bool(check) and "check" in kwargs:
|
|
114
|
+
check = kwargs.pop("check", False)
|
|
115
|
+
|
|
116
|
+
if bool(check):
|
|
117
|
+
_kwargs_state["remaining"] = set(kwargs)
|
|
118
|
+
|
|
119
|
+
_kwargs_state["remaining"] -= used_keys
|
|
120
|
+
_kwargs_state["remaining"] -= set(sig.parameters.keys())
|
|
121
|
+
|
|
122
|
+
result = inner_func(*args, **kwargs)
|
|
123
|
+
|
|
124
|
+
func_name = getattr(inner_func, "__name__", repr(inner_func))
|
|
125
|
+
mod_name = getattr(inner_func, "__module__", "<unknown>")
|
|
126
|
+
|
|
127
|
+
remaining = _kwargs_state.get("remaining", set())
|
|
128
|
+
if bool(check) and remaining:
|
|
129
|
+
warnings.warn(
|
|
130
|
+
f"Unused kwargs: {remaining} "
|
|
131
|
+
f"in function {func_name} "
|
|
132
|
+
f"of {mod_name}",
|
|
133
|
+
UserWarning,
|
|
134
|
+
stacklevel=2,
|
|
135
|
+
)
|
|
136
|
+
remaining.clear()
|
|
137
|
+
|
|
138
|
+
return result
|
|
139
|
+
|
|
140
|
+
return wrapper
|
|
141
|
+
|
|
142
|
+
if func is not None and callable(func):
|
|
143
|
+
return decorator(func)
|
|
144
|
+
|
|
145
|
+
return decorator
|
|
@@ -0,0 +1,218 @@
|
|
|
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
|
+
# PyPLUTO: a data analysis Python package for the PLUTO code
|
|
49
|
+
|
|
50
|
+
| Category | Badges |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| Package |  [](https://github.com/GiMattia/PyPLUTO/releases) |
|
|
53
|
+
| Reliability | [](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_windows.yml) [](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_macos.yml) [](https://github.com/GiMattia/PyPLUTO/actions/workflows/test_linux.yml)  |
|
|
54
|
+
| Docs & Community | [](https://www.repostatus.org/#active) [](https://pypluto.readthedocs.io/en/latest/?badge=latest) [](https://discord.gg/YOUR_INVITE) [](https://opensource.org/licenses/BSD-3-Clause) |
|
|
55
|
+
| Citation | [](https://doi.org/10.21105/joss.08448) [](https://doi.org/10.48550/arXiv.2501.09748) [](https://doi.org/10.5281/zenodo.19650848) |
|
|
56
|
+
|
|
57
|
+
<!--  -->
|
|
58
|
+
|
|
59
|
+
PyPLUTO is a Python library which loads and plots the data obtain from the
|
|
60
|
+
PLUTO code simulations.
|
|
61
|
+
The aim of this package is to simplify some non-trivial python routines in order
|
|
62
|
+
to quickly recover effective plots that are suited for scientific publications.
|
|
63
|
+
|
|
64
|
+
The package is designed to be used in both an interactive environment like
|
|
65
|
+
ipython shell or Jupyter notebook and standard Python scripts.
|
|
66
|
+
|
|
67
|
+
The package is structured as follow:
|
|
68
|
+
|
|
69
|
+
- the Load class is used to load the data from the PLUTO simulation fluid files.
|
|
70
|
+
- the LoadPart class is used to load the data from the PLUTO simulation particle files.
|
|
71
|
+
- the Image class is used to visualize the loaded data.
|
|
72
|
+
- additional functions (e.g., to save the images) are included in the package.
|
|
73
|
+
|
|
74
|
+
The package includes a set of examples in the `Examples` directory.
|
|
75
|
+
|
|
76
|
+
The package is tested on Python 3.10 (and newer versions) and with the following dependencies:
|
|
77
|
+
|
|
78
|
+
- `numpy`
|
|
79
|
+
- `matplotlib`
|
|
80
|
+
- `scipy`
|
|
81
|
+
- `pandas`
|
|
82
|
+
- `h5py`
|
|
83
|
+
- `PySide6`
|
|
84
|
+
|
|
85
|
+
The package is provided with a `LICENSE` file which contains the license terms.
|
|
86
|
+
|
|
87
|
+
The package is provided with an extensive documentation in the `Docs` directory.
|
|
88
|
+
|
|
89
|
+
## Installation Instructions
|
|
90
|
+
|
|
91
|
+
To install the PyPLUTO package, you can use the following methods:
|
|
92
|
+
|
|
93
|
+
### Installation with pip
|
|
94
|
+
|
|
95
|
+
The easiest way to install PyPLUTO is through pip. Open your terminal and run the following command:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
pip install ./
|
|
99
|
+
```
|
|
100
|
+
|
|
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).
|
|
103
|
+
|
|
104
|
+
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
|
+
|
|
106
|
+
## Quick Start
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
import pyPLUTO as pp
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Simulations can be loaded by just providing the path to the simulation directory. The last output (if not specific
|
|
113
|
+
file is selected) is automatically found, as well as the available PLUTO file in the selected folder.
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
D = pp.Load()
|
|
117
|
+
print(D)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Relevant simulations attributes (such as the computational grid, the geometry and the variables to load) are found automatically.
|
|
121
|
+
The data can be plotted through the Image class, which acts as a simplified maptlotlib wrapper.
|
|
122
|
+
An example of 1D plot of the density can be:
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
D = pp.Load()
|
|
126
|
+
pp.Image().plot(D.x1, D.rho)
|
|
127
|
+
pp.show()
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
while 2D plots can be created with
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
D = pp.Load()
|
|
134
|
+
pp.Image().display(D.rho, x1=D.x1, x2=D.x2, cpos="right")
|
|
135
|
+
pp.show()
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Examples
|
|
139
|
+
|
|
140
|
+
In order to test PyPLUTO capabilities, even without the PLUTO code, we provide
|
|
141
|
+
an extensive tests suite with all the necessary data.
|
|
142
|
+
In this way, PyPLUTO can be explored without any knowledge of the PLUTO code.
|
|
143
|
+
All the tests are located in the `Examples` directory and are aimed at showing
|
|
144
|
+
how to exploit the package capabilities.
|
|
145
|
+
|
|
146
|
+
## The GUI
|
|
147
|
+
|
|
148
|
+
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.
|
|
150
|
+
To run the GUI after the package installation, one should simply run the command
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
pypluto-gui
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
from the terminal. More details on how to use the GUI can be found in the documentation.
|
|
157
|
+
|
|
158
|
+
## Documentation
|
|
159
|
+
|
|
160
|
+
For more detailed instructions and additional installation options, please refer to the PyPLUTO documentation where you can find comprehensive guides and examples.
|
|
161
|
+
|
|
162
|
+
## Cite This Repository
|
|
163
|
+
|
|
164
|
+
If you use this repository in your research or projects, please consider citing the arxiv paper.
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
@ARTICLE{PyPLUTO2025,
|
|
168
|
+
author = {{Mattia}, Giancarlo and {Crocco}, Daniele and {Melon Fuksman}, David and {Bugli}, Matteo and {Berta}, Vittoria and {Puzzoni}, Eleonora and {Mignone}, Andrea and {Vaidya}, Bhargav},
|
|
169
|
+
title = "{PyPLUTO: a data analysis Python package for the PLUTO code}",
|
|
170
|
+
journal = {arXiv e-prints},
|
|
171
|
+
keywords = {Astrophysics - Instrumentation and Methods for Astrophysics},
|
|
172
|
+
year = 2025,
|
|
173
|
+
month = jan,
|
|
174
|
+
eid = {arXiv:2501.09748},
|
|
175
|
+
pages = {arXiv:2501.09748},
|
|
176
|
+
doi = {10.48550/arXiv.2501.09748},
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
We recommend to put one the following expressions in your manuscript:
|
|
181
|
+
|
|
182
|
+
"The figures presented in this paper were generated using the PyPLUTO package (citation to the paper)"
|
|
183
|
+
|
|
184
|
+
"This research has benefited from the PyPLUTO package for data visualization (citation to the paper)"
|
|
185
|
+
|
|
186
|
+
## Contributing
|
|
187
|
+
|
|
188
|
+
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
|
+
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.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
pyPLUTO/__init__.py,sha256=S-2yNAYbJLAeh70KA8fimIpgY9zmKuiTn_EnUd-rOO0,485
|
|
2
|
+
pyPLUTO/amr.py,sha256=yqgtSDSW3ZCa1GhbDbJq1vI6BUd5vDY37KPiUKZcU6o,23808
|
|
3
|
+
pyPLUTO/baseloadmixin.py,sha256=mz8_UzFhqiFP4ihXe4jDKgzU6je_U2sPsm3rzPiZ7-I,7841
|
|
4
|
+
pyPLUTO/baseloadstate.py,sha256=QZJSHuYF5RCpF7fHvYOA8D7P-LflwNV6rY_uhTY4nrU,1545
|
|
5
|
+
pyPLUTO/configure.py,sha256=Mp-S1S1wIaAMPd969RN3n96Pf00LqPXcllX2GXronfM,8128
|
|
6
|
+
pyPLUTO/h_pypluto.py,sha256=u-JdWJqtf3_U2xMoq8q8E8Md_SXHdWX1xv-7NMbyN_Q,2009
|
|
7
|
+
pyPLUTO/image.py,sha256=xs-2o8MYtFwMDW2B_S0NgES0BBnV2TT3mrlvWUzzSSc,10213
|
|
8
|
+
pyPLUTO/imagemixin.py,sha256=EoHLILGQju7NFH5ocWicb89w9D1Jzt-AIOaVEe7Y50s,7337
|
|
9
|
+
pyPLUTO/imagestate.py,sha256=sMmY0yMtL_s2TkXMe7OszKzVBUh2kvopUyLb-tfpp5w,1650
|
|
10
|
+
pyPLUTO/load.py,sha256=4V4Pt3jmjjJe2QHq-qWO56lxNRyhcu-uqULjwqGb7Lo,16279
|
|
11
|
+
pyPLUTO/loadmixin.py,sha256=R528JWTFH-PwxtYGHEskn0Y3d_aOjNOeRCuqGCJbSOA,12131
|
|
12
|
+
pyPLUTO/loadpart.py,sha256=e0AJ5fsD8YNZDDtf0BAJoa7gVaateJCzSsfy_WkyFAM,8333
|
|
13
|
+
pyPLUTO/loadstate.py,sha256=eBTX8hNkUMQc_oOsJBfVVJcEjKAAlaWtEcAiV_Btkm8,2449
|
|
14
|
+
pyPLUTO/newload.py,sha256=R6andpG0oFjpMnpB-RC3iRuOYvcCoMgfguiBLRxRzbw,2736
|
|
15
|
+
pyPLUTO/pytools.py,sha256=BllTPyUS-htZk4czLm2vGNkZwD7txToEJV9yfmUmBBw,4067
|
|
16
|
+
pyPLUTO/codes/echo_load.py,sha256=JJJjPYItqw32J9LSSC3VAUGeZR6RO-u_vdlHEuIBLtQ,5290
|
|
17
|
+
pyPLUTO/gui/config.py,sha256=BgcXbMIdEPfC-FxCJ8_WGMsngRsVc-yFy2yZnl1G2DM,5575
|
|
18
|
+
pyPLUTO/gui/custom_var.py,sha256=Ya3za9tCBDFINirH5wk51dyB-dhI4gdYMQVO9eOv9pQ,15209
|
|
19
|
+
pyPLUTO/gui/globals.py,sha256=G6AQuf-4F43KARjIAs2DpN3evXBPmWlW6TV7bwatsg8,2213
|
|
20
|
+
pyPLUTO/gui/main.py,sha256=_e6lQuW4UrC7Rhdd8ZXCzWUQtiZ0ySquZSm3KOSIMN8,289
|
|
21
|
+
pyPLUTO/gui/main_window.py,sha256=gWOFgednEC_CtwB-EEOD1oouhoToa_HrJhdVTuu8f9Y,6094
|
|
22
|
+
pyPLUTO/gui/panels.py,sha256=lsoyKpSg12o6GcB8aF1WB_TTJomtMdICH6VjhpQX3zk,1835
|
|
23
|
+
pyPLUTO/gui/utils.py,sha256=zYTy3WJq6Dmib-XNkX6b6Lxo1k2OG0QUH67Xb_bQOGg,8538
|
|
24
|
+
pyPLUTO/imagefuncs/colorbar.py,sha256=HPaz6XltT2qwLG9kHpKzjYEZ0RWhE3MzKP6YkzI-eIA,8393
|
|
25
|
+
pyPLUTO/imagefuncs/contour.py,sha256=spAfwgGv8HFG6nqOEIyp8BHqlXlwlp0vchgPy1bRdSI,10771
|
|
26
|
+
pyPLUTO/imagefuncs/create_axes.py,sha256=1EWy0ZlDrktYZ0dhVE3iMjCwbZCtqT0W4pgAo9QSuRA,15505
|
|
27
|
+
pyPLUTO/imagefuncs/display.py,sha256=Zqlu6Z5a0lrjSq73fYtG9ig_Ib2v2H-L95hjFXhh_gs,13548
|
|
28
|
+
pyPLUTO/imagefuncs/figure.py,sha256=2IOvDI94WmYmet_TPXaVdpCDqC3CA1wXlPkxlrL1qKg,12197
|
|
29
|
+
pyPLUTO/imagefuncs/imagetools.py,sha256=3NR3XESYkzZ-oM5CixqFGmMLccJBc_HRLVVicFTBLB4,15250
|
|
30
|
+
pyPLUTO/imagefuncs/interactive.py,sha256=hDYo1mLYabxktTRRJ2Ybzb5Jyxel_sNmm_xwf3sNbD0,12402
|
|
31
|
+
pyPLUTO/imagefuncs/legend.py,sha256=YBgLYbFLQGskaogzTdQ1UE_Di8qgiwwZaN17HCpnR6Q,9054
|
|
32
|
+
pyPLUTO/imagefuncs/plot.py,sha256=uWbCa4haomrgcXAP2D9Yj-5j9-3un2dDqCekiZ7Ly14,13272
|
|
33
|
+
pyPLUTO/imagefuncs/range.py,sha256=lNQNySMzDhgKRpCWmjLWCZ1LYCJMhrhER5MEX0s16C0,7663
|
|
34
|
+
pyPLUTO/imagefuncs/scatter.py,sha256=zZ7zfCFAWuAUj1H3NxY1_jF-sKqmHj13fdHwW9FdD9g,11231
|
|
35
|
+
pyPLUTO/imagefuncs/set_axis.py,sha256=G4tOiCxJ99dXWpF6H7YtcppH8XBaWeRGxIAbHnarGHc,17418
|
|
36
|
+
pyPLUTO/imagefuncs/streamplot.py,sha256=bYIVzgQXgapx9g0boq9ZWHzn5lE1m8zrzvkEuTBOPLY,12895
|
|
37
|
+
pyPLUTO/imagefuncs/zoom.py,sha256=Wf_zT7-PWC5sICwUPwyU4hDU_IBUtvs3pSHuP0MfiUk,17760
|
|
38
|
+
pyPLUTO/loadfuncs/baseloadtools.py,sha256=IEmH9shJx15SdDN7Ptq9cCS1PiuFw_90V0cWwLi8ohI,2533
|
|
39
|
+
pyPLUTO/loadfuncs/codeselection.py,sha256=SwekBXKL11DGAms7vbjZ_W7-XKdShYhGX3ZB5OcUXXs,1502
|
|
40
|
+
pyPLUTO/loadfuncs/defpluto.py,sha256=Y3cPrTG9HNZAFBduJQgbxkrng6vIyVvd_ddQbvEWpVo,3795
|
|
41
|
+
pyPLUTO/loadfuncs/descriptor.py,sha256=ULK_ltQCofb36mIa75VtR9J-pBxyJ-zYr5dbbv-eA3k,3514
|
|
42
|
+
pyPLUTO/loadfuncs/findfiles.py,sha256=pV8WL9T9Moxu9beUE2ErOb008AjdJ8Hf7m8MWGhroqk,6014
|
|
43
|
+
pyPLUTO/loadfuncs/findformat.py,sha256=BOSyMbH2E3OZi41zbLP6OrvCMTA3AP9rIXjWAAYGx3o,8438
|
|
44
|
+
pyPLUTO/loadfuncs/initload.py,sha256=ztwENR2MWdwc_QEbWxMwsc9EnhCtM_ilahjLl18rtlo,6401
|
|
45
|
+
pyPLUTO/loadfuncs/loadvars.py,sha256=b7k_c3S8iGQeZEGwa0b-bex_Wga428ewUL9CndoANQE,7794
|
|
46
|
+
pyPLUTO/loadfuncs/offsetdata.py,sha256=fcl1kvSkT4wbK4k0kmW4Wgq-SdgxdBwAjyy2IbxQZSE,2904
|
|
47
|
+
pyPLUTO/loadfuncs/offsetfluid.py,sha256=U0XSH7GZcnbiS_pA6YLzBVIV_RCBGK-VhmStVYy1Twc,14459
|
|
48
|
+
pyPLUTO/loadfuncs/read_files.py,sha256=7Zyv8Ls50HmENUYtiMZQqSgaoG6upIWudKMH6etP2eQ,4351
|
|
49
|
+
pyPLUTO/loadfuncs/readdata.py,sha256=G2vZ0LCsyyp1jOqIlwsskIM-9ATDRsr8wbiFPyMiEqQ,20416
|
|
50
|
+
pyPLUTO/loadfuncs/readdata_old.py,sha256=awPWZ2N13YSfQJPWyEXijuXW1HdxDlouEEPXxJvV-X0,18901
|
|
51
|
+
pyPLUTO/loadfuncs/readdefplini.py,sha256=ZtGJ4olhFaH7HhJKE24kRs4gSRYHbOv-8np6DZqmBuk,3474
|
|
52
|
+
pyPLUTO/loadfuncs/readfluid.py,sha256=e_Du2o48oIC0b0cO2ePG0kekNY4wuhWsBYAnYH95CMA,15052
|
|
53
|
+
pyPLUTO/loadfuncs/readformat.py,sha256=PLpPf3Z7QzRQRKI2lQotGddadfa6JnR5_aravL5PjvQ,9052
|
|
54
|
+
pyPLUTO/loadfuncs/readgridalone.py,sha256=r8WIWX1mkUlII_13fhA2N9FNOGdYBe0vL6kgNkshE64,7110
|
|
55
|
+
pyPLUTO/loadfuncs/readgridfile.py,sha256=rxD9FHJXrx5Hw6yYmYMQorEK_ls0INew_mUo03h5t6k,8619
|
|
56
|
+
pyPLUTO/loadfuncs/readgridout.py,sha256=xOUNkhTRnzuHU2kvzkG-GIo1lEhpSL1dyuUuEPtKzzM,14868
|
|
57
|
+
pyPLUTO/loadfuncs/readpart.py,sha256=mONxs1rQMAML8-XbQDCXdQHuABP0X1TsV5HacBF0MxY,13185
|
|
58
|
+
pyPLUTO/loadfuncs/readtab.py,sha256=NQOvCtrDRebj5atlmn1PqMYyYBcJpBN1ObctzihOiM0,3110
|
|
59
|
+
pyPLUTO/loadfuncs/write_files.py,sha256=aI0UAgWqE8M9VzG69ILDT_8FNO1uIzzeaGxcwW9PSqk,7061
|
|
60
|
+
pyPLUTO/toolfuncs/findlines.py,sha256=9k_qNZa3URrxrcjuHH-fglvlTokU4uw3UkZIMki5vJE,17995
|
|
61
|
+
pyPLUTO/toolfuncs/fourier.py,sha256=1Mv9H9iMgEEHWq20eKDFVu94tisQVhNH-J7wCDhQOeQ,4563
|
|
62
|
+
pyPLUTO/toolfuncs/nabla.py,sha256=w5EuKlHvBswlDYc1cMSbbG9Eg2KYhuFaw1k6zJ-XRcU,20778
|
|
63
|
+
pyPLUTO/toolfuncs/parttools.py,sha256=UmukxzUEb43Z_MICKuqBYdYE9s8rA0lTBXbwtgzvHm8,3965
|
|
64
|
+
pyPLUTO/toolfuncs/transform.py,sha256=gt1nCKEd15VbUT8GWJpgZ-a22yN2xhrESjR0n7Hj6sw,18627
|
|
65
|
+
pyPLUTO/utils/annotator.py,sha256=Nq52e0ga2jpOIOh2oYsrIxWOYr3kRtJU7pKUT9S1cXc,526
|
|
66
|
+
pyPLUTO/utils/inspector.py,sha256=K6v4YtbLZN0-cvESprFNgk5XLx1leiBtKoAIUe-eIYw,4800
|
|
67
|
+
pyPLUTO/utils/make_docstrings.py,sha256=ITq4XCHTJCAP08zhBA-yncDxswliVqr_Dr7XcVYVkWs,135
|
|
68
|
+
py_pluto-1.1.4.dist-info/licenses/LICENSE,sha256=Xm43i6sp9QReTQw6o_Ll5c0a_akG_3sHB94HzdhVwkc,1602
|
|
69
|
+
py_pluto-1.1.4.dist-info/METADATA,sha256=0TEM13H-7mv7Y77IMIy5Is5Fhy9XBKo0UENCWQeE7MY,9443
|
|
70
|
+
py_pluto-1.1.4.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
71
|
+
py_pluto-1.1.4.dist-info/entry_points.txt,sha256=p2B0woErx_53x_RHpgZn0CVwziwfSczyJwJl6dRNcCc,54
|
|
72
|
+
py_pluto-1.1.4.dist-info/top_level.txt,sha256=tPqYRJfwqK30muunyDhhsC0QwIigZUEnS0GXkuSdj8A,8
|
|
73
|
+
py_pluto-1.1.4.dist-info/RECORD,,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Copyright (c) 2025 Giancarlo Mattia, Daniele Crocco, David Melon Fuksman, Matteo Bugli, Vittoria Berta, Eleonora Puzzoni, Andrea Mignone, Bhargav Vaidya
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
8
|
+
list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
11
|
+
this list of conditions and the following disclaimer in the documentation
|
|
12
|
+
and/or other materials provided with the distribution.
|
|
13
|
+
|
|
14
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
|
15
|
+
may be used to endorse or promote products derived from this software without
|
|
16
|
+
specific prior written permission.
|
|
17
|
+
|
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
19
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
22
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
23
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
24
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
25
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
26
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pyPLUTO
|