Name | pymerlin JSON |
Version |
0.0.9
JSON |
| download |
home_page | None |
Summary | Python mission modeling framework for Aerie |
upload_time | 2024-07-15 17:23:37 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | MIT License Copyright (c) 2021 California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
aerie
discrete event
merlin
simulation
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pymerlin
<!-- start elevator-pitch -->
pymerlin is a discrete event simulation framework, built for use in the [Aerie](https://github.com/NASA-AMMOS/aerie>) ecosystem.
To learn more about Aerie, read the [Aerie Docs](https://nasa-ammos.github.io/aerie-docs).
<!-- end elevator-pitch -->
### TODO:
- [x] Daemon tasks
- [x] More interesting cells and resources
- [x] Conditions on static cells
- [x] Conditions on autonomous cells
- [x] Child tasks
- [ ] Spiceypy
- [ ] JPL time
- [ ] pip-installable models
- [ ] build Aerie-compatible jars and provide docker-compose file with python
- [ ] checkpoint restart
- [ ] Use available port to allow multiple pymerlin programs to run independently
- [ ] Cell expiry
- [ ] Polynomial evolution of cells
- [ ] Value schemas (inferred from python types, maybe?)
- [ ] Garbage collection of cells and effects (perhaps by wrapping integers in Supplier, and using `weakref.finalize`?)
- [ ] Simulation configuration
- [ ] Run with java that isn't simply the "java" executable on the path
## Prerequisites
- python >=3.6.3 (only tested on 3.11 so far...)
- java >=21
Install pymerlin by running `pip install pymerlin`
1. Make a venv `python -m venv venv`
2. Activate the venv `source ./venv/bin/activate`
3. Install requirements `python -m pip install -r requirements.txt`
4. Start jupyter lab `jupyter-lab`
5. When jupyter opens, navigate to `demo/simulation_example.py`
6. Update the path in the first cell to point to your cloned `pymerlin` directory (we should eliminate the need for this
hack)
7. Run all cells
## Architecture
pymerlin is to merlin as pyspark is to spark. This means that pymerlin uses [py4j](https://www.py4j.org/) as a bridge
between a python process and a java process. This allows pymerlin to use the Aerie simulation engine directly, without
having to re-implement it in python.
This means that running `simulate` starts a subprocess using `java -jar /path/to/pymerlin.jar`.
### Approachability over performance
The main tenet of pymerlin is approachability, and its aim is to enable rapid prototyping of models and activities.
While where possible, performance will be considered, it is expected that someone who wants to seriously engineer the
performance of their simulation will port their code to Java - which has the double benefit of removing socket
communication overhead, as well as giving the engineer a single Java process to instrument and analyze, rather than a
hybrid system, which may be more difficult to characterize.
## Building pymerlin.jar
If any changes are made to the java code, rebuild the jar and place it in the correct location as follows:
```shell
cd java
./gradlew assemble
mv pymerlin/build/libs/pymerlin.jar ../pymerlin/_internal/jars
```
The jar lives inside of the `pymerlin` python source directory because that ensures that it will be packaged
(and accessible) in a distribution.
Raw data
{
"_id": null,
"home_page": null,
"name": "pymerlin",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "aerie, discrete event, merlin, simulation",
"author": null,
"author_email": "Matthew Dailis <matthew.l.dailis@jpl.nasa.gov>",
"download_url": "https://files.pythonhosted.org/packages/1b/64/f38885e2fa10755055228db32733878e21a55f769675062f66b37662c253/pymerlin-0.0.9.tar.gz",
"platform": null,
"description": "# pymerlin\n\n<!-- start elevator-pitch -->\npymerlin is a discrete event simulation framework, built for use in the [Aerie](https://github.com/NASA-AMMOS/aerie>) ecosystem.\n\nTo learn more about Aerie, read the [Aerie Docs](https://nasa-ammos.github.io/aerie-docs).\n<!-- end elevator-pitch -->\n\n### TODO:\n\n- [x] Daemon tasks\n- [x] More interesting cells and resources\n- [x] Conditions on static cells\n- [x] Conditions on autonomous cells\n- [x] Child tasks\n- [ ] Spiceypy\n- [ ] JPL time\n- [ ] pip-installable models\n- [ ] build Aerie-compatible jars and provide docker-compose file with python\n- [ ] checkpoint restart\n- [ ] Use available port to allow multiple pymerlin programs to run independently\n- [ ] Cell expiry\n- [ ] Polynomial evolution of cells\n- [ ] Value schemas (inferred from python types, maybe?)\n- [ ] Garbage collection of cells and effects (perhaps by wrapping integers in Supplier, and using `weakref.finalize`?)\n- [ ] Simulation configuration\n- [ ] Run with java that isn't simply the \"java\" executable on the path\n\n## Prerequisites\n\n- python >=3.6.3 (only tested on 3.11 so far...)\n- java >=21\n\nInstall pymerlin by running `pip install pymerlin`\n\n1. Make a venv `python -m venv venv`\n2. Activate the venv `source ./venv/bin/activate`\n3. Install requirements `python -m pip install -r requirements.txt`\n4. Start jupyter lab `jupyter-lab`\n5. When jupyter opens, navigate to `demo/simulation_example.py`\n6. Update the path in the first cell to point to your cloned `pymerlin` directory (we should eliminate the need for this\n hack)\n7. Run all cells\n\n## Architecture\n\npymerlin is to merlin as pyspark is to spark. This means that pymerlin uses [py4j](https://www.py4j.org/) as a bridge\nbetween a python process and a java process. This allows pymerlin to use the Aerie simulation engine directly, without\nhaving to re-implement it in python.\n\nThis means that running `simulate` starts a subprocess using `java -jar /path/to/pymerlin.jar`.\n\n### Approachability over performance\n\nThe main tenet of pymerlin is approachability, and its aim is to enable rapid prototyping of models and activities.\nWhile where possible, performance will be considered, it is expected that someone who wants to seriously engineer the\nperformance of their simulation will port their code to Java - which has the double benefit of removing socket\ncommunication overhead, as well as giving the engineer a single Java process to instrument and analyze, rather than a\nhybrid system, which may be more difficult to characterize.\n\n## Building pymerlin.jar\n\nIf any changes are made to the java code, rebuild the jar and place it in the correct location as follows:\n\n```shell\ncd java\n./gradlew assemble\nmv pymerlin/build/libs/pymerlin.jar ../pymerlin/_internal/jars\n```\n\nThe jar lives inside of the `pymerlin` python source directory because that ensures that it will be packaged\n(and accessible) in a distribution.",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2021 California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Python mission modeling framework for Aerie",
"version": "0.0.9",
"project_urls": {
"Bug Tracker": "https://github.com/mattdailis/pymerlin/issues",
"Changelog": "https://github.com/mattdailis/pymerlin/blob/main/CHANGELOG.md",
"Documentation": "https://mattdailis.github.io/pymerlin",
"Homepage": "https://mattdailis.github.io/pymerlin",
"Repository": "https://github.com/mattdailis/pymerlin"
},
"split_keywords": [
"aerie",
" discrete event",
" merlin",
" simulation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d901ed7eafe09ae28db2619ee0fa8354fee942f6a7f579b63863a0ad4423ced2",
"md5": "d99e4a425e678e8c4355e0487c4f489c",
"sha256": "3f41fa8276508d1f35904872c361a84bbc66b12fed42448755f4ec0b610f1a64"
},
"downloads": -1,
"filename": "pymerlin-0.0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d99e4a425e678e8c4355e0487c4f489c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 22235139,
"upload_time": "2024-07-15T17:23:27",
"upload_time_iso_8601": "2024-07-15T17:23:27.855516Z",
"url": "https://files.pythonhosted.org/packages/d9/01/ed7eafe09ae28db2619ee0fa8354fee942f6a7f579b63863a0ad4423ced2/pymerlin-0.0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1b64f38885e2fa10755055228db32733878e21a55f769675062f66b37662c253",
"md5": "8e0910baa916fca90f385ed145608df6",
"sha256": "59199b125c565d387200c812f894abe5a4b7f5b230252ae62fa4e55dbc2565aa"
},
"downloads": -1,
"filename": "pymerlin-0.0.9.tar.gz",
"has_sig": false,
"md5_digest": "8e0910baa916fca90f385ed145608df6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 22227701,
"upload_time": "2024-07-15T17:23:37",
"upload_time_iso_8601": "2024-07-15T17:23:37.668454Z",
"url": "https://files.pythonhosted.org/packages/1b/64/f38885e2fa10755055228db32733878e21a55f769675062f66b37662c253/pymerlin-0.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-15 17:23:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mattdailis",
"github_project": "pymerlin",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "pymerlin"
}