rappture2web 0.1.0__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 (69) hide show
  1. rappture2web-0.1.0/PKG-INFO +93 -0
  2. rappture2web-0.1.0/README +32 -0
  3. rappture2web-0.1.0/README.md +65 -0
  4. rappture2web-0.1.0/pyproject.toml +50 -0
  5. rappture2web-0.1.0/rappture2web/__init__.py +5 -0
  6. rappture2web-0.1.0/rappture2web/_version.py +1 -0
  7. rappture2web-0.1.0/rappture2web/app.py +488 -0
  8. rappture2web-0.1.0/rappture2web/cli.py +87 -0
  9. rappture2web-0.1.0/rappture2web/encoding.py +67 -0
  10. rappture2web-0.1.0/rappture2web/rp_library.py +900 -0
  11. rappture2web-0.1.0/rappture2web/simulator.py +374 -0
  12. rappture2web-0.1.0/rappture2web/static/css/rappture.css +968 -0
  13. rappture2web-0.1.0/rappture2web/static/js/OrbitControls.0.128.0.js +1045 -0
  14. rappture2web-0.1.0/rappture2web/static/js/africa_110m.json +1 -0
  15. rappture2web-0.1.0/rappture2web/static/js/africa_50m.json +1 -0
  16. rappture2web-0.1.0/rappture2web/static/js/antarctica_110m.json +1 -0
  17. rappture2web-0.1.0/rappture2web/static/js/antarctica_50m.json +1 -0
  18. rappture2web-0.1.0/rappture2web/static/js/asia_110m.json +1 -0
  19. rappture2web-0.1.0/rappture2web/static/js/asia_50m.json +1 -0
  20. rappture2web-0.1.0/rappture2web/static/js/europe_110m.json +1 -0
  21. rappture2web-0.1.0/rappture2web/static/js/europe_50m.json +1 -0
  22. rappture2web-0.1.0/rappture2web/static/js/north-america_110m.json +1 -0
  23. rappture2web-0.1.0/rappture2web/static/js/north-america_50m.json +1 -0
  24. rappture2web-0.1.0/rappture2web/static/js/oceania_110m.json +1 -0
  25. rappture2web-0.1.0/rappture2web/static/js/oceania_50m.json +1 -0
  26. rappture2web-0.1.0/rappture2web/static/js/plotly-3.4.0.min.js +3882 -0
  27. rappture2web-0.1.0/rappture2web/static/js/rappture.js +1874 -0
  28. rappture2web-0.1.0/rappture2web/static/js/rp-renderer-curve.js +498 -0
  29. rappture2web-0.1.0/rappture2web/static/js/rp-renderer-field-3d.js +223 -0
  30. rappture2web-0.1.0/rappture2web/static/js/rp-renderer-field-unstructured.js +208 -0
  31. rappture2web-0.1.0/rappture2web/static/js/rp-renderer-field-vector.js +817 -0
  32. rappture2web-0.1.0/rappture2web/static/js/rp-renderer-field-vtk.js +266 -0
  33. rappture2web-0.1.0/rappture2web/static/js/rp-renderer-field.js +554 -0
  34. rappture2web-0.1.0/rappture2web/static/js/rp-renderer-mapviewer.js +294 -0
  35. rappture2web-0.1.0/rappture2web/static/js/rp-renderer-sequence.js +303 -0
  36. rappture2web-0.1.0/rappture2web/static/js/rp-renderer-table.js +372 -0
  37. rappture2web-0.1.0/rappture2web/static/js/rp-renderers-simple.js +256 -0
  38. rappture2web-0.1.0/rappture2web/static/js/rp-utils.js +499 -0
  39. rappture2web-0.1.0/rappture2web/static/js/south-america_110m.json +1 -0
  40. rappture2web-0.1.0/rappture2web/static/js/south-america_50m.json +1 -0
  41. rappture2web-0.1.0/rappture2web/static/js/three.0.128.0.min.js +6 -0
  42. rappture2web-0.1.0/rappture2web/static/js/usa_110m.json +1 -0
  43. rappture2web-0.1.0/rappture2web/static/js/usa_50m.json +1 -0
  44. rappture2web-0.1.0/rappture2web/static/js/world_110m.json +1 -0
  45. rappture2web-0.1.0/rappture2web/static/js/world_50m.json +1 -0
  46. rappture2web-0.1.0/rappture2web/templates/base.html +36 -0
  47. rappture2web-0.1.0/rappture2web/templates/tool.html +85 -0
  48. rappture2web-0.1.0/rappture2web/templates/widgets/boolean.html +10 -0
  49. rappture2web-0.1.0/rappture2web/templates/widgets/choice.html +23 -0
  50. rappture2web-0.1.0/rappture2web/templates/widgets/group.html +60 -0
  51. rappture2web-0.1.0/rappture2web/templates/widgets/image.html +14 -0
  52. rappture2web-0.1.0/rappture2web/templates/widgets/integer.html +27 -0
  53. rappture2web-0.1.0/rappture2web/templates/widgets/loader.html +42 -0
  54. rappture2web-0.1.0/rappture2web/templates/widgets/multichoice.html +21 -0
  55. rappture2web-0.1.0/rappture2web/templates/widgets/note.html +14 -0
  56. rappture2web-0.1.0/rappture2web/templates/widgets/number.html +51 -0
  57. rappture2web-0.1.0/rappture2web/templates/widgets/periodicelement.html +36 -0
  58. rappture2web-0.1.0/rappture2web/templates/widgets/phase.html +10 -0
  59. rappture2web-0.1.0/rappture2web/templates/widgets/separator.html +1 -0
  60. rappture2web-0.1.0/rappture2web/templates/widgets/string.html +30 -0
  61. rappture2web-0.1.0/rappture2web/xml_parser.py +1214 -0
  62. rappture2web-0.1.0/rappture2web.egg-info/PKG-INFO +93 -0
  63. rappture2web-0.1.0/rappture2web.egg-info/SOURCES.txt +67 -0
  64. rappture2web-0.1.0/rappture2web.egg-info/dependency_links.txt +1 -0
  65. rappture2web-0.1.0/rappture2web.egg-info/entry_points.txt +2 -0
  66. rappture2web-0.1.0/rappture2web.egg-info/requires.txt +9 -0
  67. rappture2web-0.1.0/rappture2web.egg-info/top_level.txt +1 -0
  68. rappture2web-0.1.0/setup.cfg +4 -0
  69. rappture2web-0.1.0/setup.py +67 -0
@@ -0,0 +1,93 @@
1
+ Metadata-Version: 2.4
2
+ Name: rappture2web
3
+ Version: 0.1.0
4
+ Summary: Web-based Rappture tool interface - renders XML tool definitions as interactive web applications
5
+ License-Expression: MIT
6
+ Classifier: Development Status :: 3 - Alpha
7
+ Classifier: Intended Audience :: Science/Research
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.7
10
+ Classifier: Programming Language :: Python :: 3.8
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Scientific/Engineering :: Visualization
16
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
17
+ Requires-Python: >=3.7
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: fastapi>=0.100.0
20
+ Requires-Dist: uvicorn[standard]>=0.20.0
21
+ Requires-Dist: jinja2>=3.1.0
22
+ Requires-Dist: python-multipart>=0.0.6
23
+ Requires-Dist: lxml>=4.9.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=7.0; extra == "dev"
26
+ Requires-Dist: httpx>=0.24.0; extra == "dev"
27
+ Dynamic: requires-python
28
+
29
+ # rappture2web
30
+
31
+ **rappture2web** turns [Rappture](https://nanohub.org/infrastructure/rappture/) tool XML definitions into interactive web applications — no desktop GUI required.
32
+
33
+ It reads a `tool.xml` file, renders the input form in a browser, runs the simulation backend, and displays the output visualizations (curves, fields, tables, maps, and more) in real time over WebSocket.
34
+
35
+ ## Features
36
+
37
+ - Drop-in replacement for the classic Rappture Python library (`rp_library`)
38
+ - Supports all common Rappture output types: `curve`, `histogram`, `field` (2D/3D/VTK/vector), `table`, `sequence`, `image`, `string`, `number`, `log`, `mapviewer`
39
+ - Interactive control panels: theme toggle, download (SVG/PNG/JSON), zoom, colorscale, legend position
40
+ - Compare mode: overlay multiple simulation runs on the same plot
41
+ - All JavaScript dependencies are bundled (Plotly 3.4, Three.js 0.128) — no CDN required
42
+
43
+ ## Installation
44
+
45
+ ```bash
46
+ pip install rappture2web
47
+ ```
48
+
49
+ ## Quick start
50
+
51
+ ```bash
52
+ # Run an existing Rappture tool
53
+ rappture2web /path/to/tool/
54
+
55
+ # Or specify the tool.xml directly
56
+ rappture2web /path/to/tool/tool.xml
57
+ ```
58
+
59
+ Then open `http://localhost:8000` in your browser.
60
+
61
+ ## Tool script compatibility
62
+
63
+ Tool scripts require only a one-line change — replace the Rappture import:
64
+
65
+ ```python
66
+ # Before
67
+ import Rappture
68
+ rx = Rappture.PyXml(sys.argv[1])
69
+
70
+ # After
71
+ import rappture2web.rp_library as Rappture
72
+ rx = Rappture.PyXml(sys.argv[1])
73
+ ```
74
+
75
+ All `rx['input.(id).current'].value` reads and `rx['output.curve(f).component.xy'] = data` writes work unchanged.
76
+
77
+ ## Supported output types
78
+
79
+ | Type | Description |
80
+ |------|-------------|
81
+ | `curve` | XY line plots with legend, zoom, download |
82
+ | `histogram` | Bar histogram |
83
+ | `field` | 2D heatmap, 3D scalar volume, VTK structured points, unstructured mesh, vector/flow |
84
+ | `table` | Data tables |
85
+ | `sequence` | Animated frame sequences |
86
+ | `image` | PNG/JPEG images |
87
+ | `mapviewer` | Geographic maps (scatter, choropleth, heatmap layers) |
88
+ | `string`, `number`, `integer`, `boolean` | Scalar outputs |
89
+ | `log` | Simulation log output |
90
+
91
+ ## License
92
+
93
+ MIT
@@ -0,0 +1,32 @@
1
+
2
+ ======================================================================
3
+ R A P P T U R E - rapid application infrastructure
4
+ ======================================================================
5
+
6
+ Rappture is the Rapid APPlication infrastrucTURE, a toolkit for
7
+ building scientific applications with a minimum of fuss and bother.
8
+
9
+ It was developed by the Network for Computational Nanotechnology
10
+ (NCN), an NSF-funded project creating cyberinfrastructure in support
11
+ of a science gateway for nanotechnology simulation.
12
+
13
+ See the following web site for an overview and documentation:
14
+ http://www.rappture.org
15
+
16
+ ----------------------------------------------------------------------
17
+
18
+ Rappture is a freely available, open source package. You can
19
+ do virtually anything you like with it, such as modifying it,
20
+ redistributing it, and selling it either in whole or in part.
21
+ But you can't prevent anyone else from doing the same, and you
22
+ must keep all copyright notices intact, so the ownership and
23
+ authorship is clear.
24
+
25
+ See the file "license.terms" for complete information.
26
+
27
+ ----------------------------------------------------------------------
28
+
29
+ Developed by Michael McLennan, George Howlett, and Derrick Kearney.
30
+ Special thanks to Ben Rafferty for Java bindings and the Rappture
31
+ tester, and Ben Haley for Ruby bindings.
32
+
@@ -0,0 +1,65 @@
1
+ # rappture2web
2
+
3
+ **rappture2web** turns [Rappture](https://nanohub.org/infrastructure/rappture/) tool XML definitions into interactive web applications — no desktop GUI required.
4
+
5
+ It reads a `tool.xml` file, renders the input form in a browser, runs the simulation backend, and displays the output visualizations (curves, fields, tables, maps, and more) in real time over WebSocket.
6
+
7
+ ## Features
8
+
9
+ - Drop-in replacement for the classic Rappture Python library (`rp_library`)
10
+ - Supports all common Rappture output types: `curve`, `histogram`, `field` (2D/3D/VTK/vector), `table`, `sequence`, `image`, `string`, `number`, `log`, `mapviewer`
11
+ - Interactive control panels: theme toggle, download (SVG/PNG/JSON), zoom, colorscale, legend position
12
+ - Compare mode: overlay multiple simulation runs on the same plot
13
+ - All JavaScript dependencies are bundled (Plotly 3.4, Three.js 0.128) — no CDN required
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pip install rappture2web
19
+ ```
20
+
21
+ ## Quick start
22
+
23
+ ```bash
24
+ # Run an existing Rappture tool
25
+ rappture2web /path/to/tool/
26
+
27
+ # Or specify the tool.xml directly
28
+ rappture2web /path/to/tool/tool.xml
29
+ ```
30
+
31
+ Then open `http://localhost:8000` in your browser.
32
+
33
+ ## Tool script compatibility
34
+
35
+ Tool scripts require only a one-line change — replace the Rappture import:
36
+
37
+ ```python
38
+ # Before
39
+ import Rappture
40
+ rx = Rappture.PyXml(sys.argv[1])
41
+
42
+ # After
43
+ import rappture2web.rp_library as Rappture
44
+ rx = Rappture.PyXml(sys.argv[1])
45
+ ```
46
+
47
+ All `rx['input.(id).current'].value` reads and `rx['output.curve(f).component.xy'] = data` writes work unchanged.
48
+
49
+ ## Supported output types
50
+
51
+ | Type | Description |
52
+ |------|-------------|
53
+ | `curve` | XY line plots with legend, zoom, download |
54
+ | `histogram` | Bar histogram |
55
+ | `field` | 2D heatmap, 3D scalar volume, VTK structured points, unstructured mesh, vector/flow |
56
+ | `table` | Data tables |
57
+ | `sequence` | Animated frame sequences |
58
+ | `image` | PNG/JPEG images |
59
+ | `mapviewer` | Geographic maps (scatter, choropleth, heatmap layers) |
60
+ | `string`, `number`, `integer`, `boolean` | Scalar outputs |
61
+ | `log` | Simulation log output |
62
+
63
+ ## License
64
+
65
+ MIT
@@ -0,0 +1,50 @@
1
+ [build-system]
2
+ requires = ["setuptools>=42.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "rappture2web"
7
+ dynamic = ["version"]
8
+ description = "Web-based Rappture tool interface - renders XML tool definitions as interactive web applications"
9
+ readme = {file = "README.md", content-type = "text/markdown"}
10
+ license = "MIT"
11
+ requires-python = ">=3.7"
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Intended Audience :: Science/Research",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.7",
17
+ "Programming Language :: Python :: 3.8",
18
+ "Programming Language :: Python :: 3.9",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Topic :: Scientific/Engineering :: Visualization",
23
+ "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
24
+ ]
25
+ dependencies = [
26
+ "fastapi>=0.100.0",
27
+ "uvicorn[standard]>=0.20.0",
28
+ "jinja2>=3.1.0",
29
+ "python-multipart>=0.0.6",
30
+ "lxml>=4.9.0",
31
+ ]
32
+
33
+ [project.optional-dependencies]
34
+ dev = [
35
+ "pytest>=7.0",
36
+ "httpx>=0.24.0",
37
+ ]
38
+
39
+ [project.scripts]
40
+ rappture2web = "rappture2web.cli:main"
41
+
42
+ [tool.setuptools.dynamic]
43
+ version = {attr = "rappture2web._version.__version__"}
44
+
45
+ [tool.setuptools.packages.find]
46
+ where = ["."]
47
+ include = ["rappture2web*"]
48
+
49
+ [tool.setuptools.package-data]
50
+ rappture2web = ["templates/**/*.html", "static/**/*"]
@@ -0,0 +1,5 @@
1
+ """Rappture2Web: Web-based Rappture tool interface."""
2
+
3
+ from rappture2web._version import __version__
4
+
5
+ __all__ = ["__version__"]
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"