This repository is a working area for PORIS instrument models. It is meant to be
forked by users who want to keep their own models under version control while
using the pyPORIS toolchain as a submodule.
Models live under models/. Generated products live under output/:
output/py/ generated Python model classes and editable physical companions
output/xml/ XML files loaded by the Java Swing panel
output/ods/ optional spreadsheet products
The current generation flow is centered on Python: GraphML is parsed into a Python PORIS model, and the XML panel file is generated from that Python model. The direct XML-from-parser path is kept only as an optional comparison tool.
- Python 3
- Java, for the Swing-based
AstroPorisPlayer - Python packages from
requirements.txt
Recommended setup:
python -m venv .venv
source .venv/bin/activate
pip install --no-cache-dir -r requirements.txtThe dependency constraints are kept in constraints.txt because some parser
dependencies have had breaking changes.
On Debian/Ubuntu-like systems, a suitable Java installation is:
sudo apt install openjdk-17-jdkAfter cloning or forking the repository, initialize the submodule:
git submodule update --init --recursiveThis populates pyPORIS/ and the bundled AstroPorisPlayer binaries.
Open a generated panel for a single GraphML model:
pyPORIS/porispanel.sh nrt/mainaxisThe model argument is the path below models/, without the .graphml
extension. The command above reads:
models/nrt/mainaxis.graphml
and produces:
output/py/mainaxis/mainaxis/mainaxisPORIS.py
output/xml/nrt/mainaxis.xml
To generate without opening the panel:
pyPORIS/porispanel.sh --no-panel nrt/mainaxisTo also write the ODS spreadsheet product:
pyPORIS/porispanel.sh --ods nrt/mainaxisODS generation is opt-in so normal validation runs do not rewrite spreadsheet products unnecessarily.
For the normal modeling workflows, see:
docs/user-guide.md
That guide covers:
- single-file models
- directory/supramodel models
- XML generation from Python
- optional parser XML comparison
- visual validation of all panels
- generated Python and editable physical code
Single GraphML model:
pyPORIS/porispanel.sh [--ods] [--parser-xml] [--no-panel] <model>Fragmented directory model:
pyPORIS/porispanel_dir.sh [--ods] [--parser-xml] [--no-panel] <model-dir>cosmoSys variants:
pyPORIS/porispanel_csys.sh <model>
pyPORIS/porispanel_dir_csys.sh <model-dir>Open an existing XML directly:
pyPORIS/xmlporispanel.sh output/xml/nrt/mainaxis.xmlGenerate or run the Python physical model:
pyPORIS/doPorisPython.sh nrt/mainaxis
pyPORIS/runPorisModel.sh nrt/mainaxisRun a visual validation pass over all known panels:
pyPORIS/test_porispanels.shClose each AstroPorisPlayer window to continue with the next model.
pyPORIS/ is a git submodule pinned by this repository. To update it manually:
cd pyPORIS
git fetch --all
git checkout main
git pull
cd ..
git add pyPORIS
git commit -m "Update pyPORIS submodule"Toolchain behavior can change over time, so validate the generated products after moving the submodule.
The models/ directory should contain source models only. Generated Python,
XML and ODS products should be kept under output/.
Happy modeling!
cosmoBots.eu