PyLEMS extension for code traversal
This package is created for code traversal and model's equations and parameters storage. The idea behind it is to
automatically traverse Python code and find the models and its parameters. Then, depending on the found model,
alter its default values with the newly-found parameters. Next, create a PyLEMS model supplementing the new values.
Finally, create the XML file(s) in the specified folder.
Currently supported models
- HindmarshRose
Getting started
Simply fork the project or run the following command:
pip install pylems-py2xml
After that, the steps are pretty straightforward. Run the following:
import pylems_py2xml
pylems_py2xml.main.XML(input_path='examples/50healthy_code.py', output_path='examples')
A couple of arguments to be aware of:
-
input_path: path to Python code that includes models (e.g., HindmarshRose, WongWang)
-
output_path: path to the folder where to store results. By default, everything gets stored in the
examplesfolder. -
units:
-
uid:
-
app:
-
store_numeric:
-
suffix:
You can follow the instructions in this Jupyter notebook
Walk-through
Here is an example taken from examples/50healthy_code.py:
oscilator = models.ReducedSetHindmarshRose(r=[0.006], a=[1.0], b=[3.0], c=[1.0], d=[5.0], s=[4.0], xo=[-1.6], K11=[0.5],
K12=[0.1], K21=[0.15], sigma=[0.3], mu=[2.2],
variables_of_interest=["xi", "alpha"])
Metadata
Release files for pylems-py2xml 1.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylems_py2xml-1.0.10.tar.gz | 17.0 kB | Without provenance | Details for pylems_py2xml-1.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pylems_py2xml-1.0.10-py3-none-any.whl | Python 3 | none | any | Details for pylems_py2xml-1.0.10-py3-none-any.whl |
Total release size: 29.0 kB
Release files / pylems_py2xml-1.0.10.tar.gz
| Download URL | pylems_py2xml-1.0.10.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e3ac5c2a7a3513ed5054ec677893a00d642cfe9e5c828b7250080710eb9ce61
|
|
BLAKE2b-256 checksum How to use checksums |
dbc74fa3d9a5deffee828caa359a085fe418d084f3af7b1e83a4dc8751934b30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.12
|
Release files / pylems_py2xml-1.0.10-py3-none-any.whl
| Download URL | pylems_py2xml-1.0.10-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
234c8f14daea13de3022d5857f4c9adb239c3ce3ef6804a85f847aaf46b6ee57
|
|
BLAKE2b-256 checksum How to use checksums |
3e0979e189718ca9a0bc5cad4355f4a5ca93f2227cec138a55646898959d0e6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.12
|
Security for pylems-py2xml 1.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.