tts-html-utils 0.5.4__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 (106) hide show
  1. tts_html_utils-0.5.4/.gitignore +180 -0
  2. tts_html_utils-0.5.4/PKG-INFO +72 -0
  3. tts_html_utils-0.5.4/README.md +48 -0
  4. tts_html_utils-0.5.4/ci/sphinx_ignore_tags.txt +24 -0
  5. tts_html_utils-0.5.4/docs/.nojekyll +0 -0
  6. tts_html_utils-0.5.4/docs/_static/bugfix.css +12 -0
  7. tts_html_utils-0.5.4/docs/base.rst +5 -0
  8. tts_html_utils-0.5.4/docs/compiler.rst +5 -0
  9. tts_html_utils-0.5.4/docs/conf.py +71 -0
  10. tts_html_utils-0.5.4/docs/index.rst +34 -0
  11. tts_html_utils-0.5.4/docs/list.rst +5 -0
  12. tts_html_utils-0.5.4/docs/misc.rst +5 -0
  13. tts_html_utils-0.5.4/docs/navigation.rst +5 -0
  14. tts_html_utils-0.5.4/docs/plot.rst +5 -0
  15. tts_html_utils-0.5.4/docs/table.rst +5 -0
  16. tts_html_utils-0.5.4/docs/text.rst +5 -0
  17. tts_html_utils-0.5.4/examples/README.md +44 -0
  18. tts_html_utils-0.5.4/examples/debug_html_output.py +33 -0
  19. tts_html_utils-0.5.4/examples/demo.ipynb +270 -0
  20. tts_html_utils-0.5.4/examples/full_demo.html +1000 -0
  21. tts_html_utils-0.5.4/examples/nested_pane_containers_demo.html +862 -0
  22. tts_html_utils-0.5.4/examples/nested_pane_containers_demo.ipynb +180 -0
  23. tts_html_utils-0.5.4/examples/nested_pane_containers_demo.py +137 -0
  24. tts_html_utils-0.5.4/examples/power_table_demo.html +764 -0
  25. tts_html_utils-0.5.4/examples/power_table_demo.py +302 -0
  26. tts_html_utils-0.5.4/license.md +14 -0
  27. tts_html_utils-0.5.4/pyproject.toml +53 -0
  28. tts_html_utils-0.5.4/setup.cfg +4 -0
  29. tts_html_utils-0.5.4/setup.py +7 -0
  30. tts_html_utils-0.5.4/src/tts_html_utils/__init__.py +0 -0
  31. tts_html_utils-0.5.4/src/tts_html_utils/core/__init__.py +0 -0
  32. tts_html_utils-0.5.4/src/tts_html_utils/core/compiler.py +215 -0
  33. tts_html_utils-0.5.4/src/tts_html_utils/core/components/__init__.py +6 -0
  34. tts_html_utils-0.5.4/src/tts_html_utils/core/components/base.py +300 -0
  35. tts_html_utils-0.5.4/src/tts_html_utils/core/components/favicon.py +17 -0
  36. tts_html_utils-0.5.4/src/tts_html_utils/core/components/flexbox.py +133 -0
  37. tts_html_utils-0.5.4/src/tts_html_utils/core/components/list.py +168 -0
  38. tts_html_utils-0.5.4/src/tts_html_utils/core/components/misc.py +237 -0
  39. tts_html_utils-0.5.4/src/tts_html_utils/core/components/navigation.py +55 -0
  40. tts_html_utils-0.5.4/src/tts_html_utils/core/components/plot.py +166 -0
  41. tts_html_utils-0.5.4/src/tts_html_utils/core/components/structure.py +159 -0
  42. tts_html_utils-0.5.4/src/tts_html_utils/core/components/table.py +392 -0
  43. tts_html_utils-0.5.4/src/tts_html_utils/core/components/text.py +105 -0
  44. tts_html_utils-0.5.4/src/tts_html_utils/css/gantt_chart/gantt_chart.css +330 -0
  45. tts_html_utils-0.5.4/src/tts_html_utils/css/pane_container/pane_container.css +8 -0
  46. tts_html_utils-0.5.4/src/tts_html_utils/django/__init__.py +0 -0
  47. tts_html_utils-0.5.4/src/tts_html_utils/django/forms/__init__.py +0 -0
  48. tts_html_utils-0.5.4/src/tts_html_utils/django/forms/time_range_form.py +56 -0
  49. tts_html_utils-0.5.4/src/tts_html_utils/django/tables/__init__.py +0 -0
  50. tts_html_utils-0.5.4/src/tts_html_utils/django/tables/filter_table.py +201 -0
  51. tts_html_utils-0.5.4/src/tts_html_utils/django/templates/filter_table/filter_table.html +39 -0
  52. tts_html_utils-0.5.4/src/tts_html_utils/django/templates/filter_table/filter_table_rows.html +22 -0
  53. tts_html_utils-0.5.4/src/tts_html_utils/django/templates/filter_table/javascript.html +108 -0
  54. tts_html_utils-0.5.4/src/tts_html_utils/django/templates/filter_table/pagination.html +18 -0
  55. tts_html_utils-0.5.4/src/tts_html_utils/gantt_chart/gantt_chart.py +167 -0
  56. tts_html_utils-0.5.4/src/tts_html_utils/javascript/filter_table/django_html_filter_table.js +85 -0
  57. tts_html_utils-0.5.4/src/tts_html_utils/javascript/filter_table/django_html_table_sort.js +78 -0
  58. tts_html_utils-0.5.4/src/tts_html_utils/javascript/filter_table/show_hide_details.js +24 -0
  59. tts_html_utils-0.5.4/src/tts_html_utils/javascript/filter_table/static_html_filter_table.js +72 -0
  60. tts_html_utils-0.5.4/src/tts_html_utils/javascript/filter_table/static_html_table_sort.js +122 -0
  61. tts_html_utils-0.5.4/src/tts_html_utils/javascript/gantt_chart/gantt_chart.js +908 -0
  62. tts_html_utils-0.5.4/src/tts_html_utils/javascript/pane_container/pane_container.js +141 -0
  63. tts_html_utils-0.5.4/src/tts_html_utils/javascript/pane_container.js +43 -0
  64. tts_html_utils-0.5.4/src/tts_html_utils/javascript/plotlyv1.58.5.js +62 -0
  65. tts_html_utils-0.5.4/src/tts_html_utils/javascript/visdiff_tables/hide_columns_without_mismatch.js +35 -0
  66. tts_html_utils-0.5.4/src/tts_html_utils/javascript/visdiff_tables/row_height_match.js +55 -0
  67. tts_html_utils-0.5.4/src/tts_html_utils/javascript/visdiff_tables/scroll_sync.js +29 -0
  68. tts_html_utils-0.5.4/src/tts_html_utils/jupyter/__init__.py +0 -0
  69. tts_html_utils-0.5.4/src/tts_html_utils/jupyter/grid.py +465 -0
  70. tts_html_utils-0.5.4/src/tts_html_utils/resource.py +225 -0
  71. tts_html_utils-0.5.4/src/tts_html_utils/resources/css/navbar.css +39 -0
  72. tts_html_utils-0.5.4/src/tts_html_utils/resources/html_templates/full_report.html +56 -0
  73. tts_html_utils-0.5.4/src/tts_html_utils/resources/html_templates/generic.html +2 -0
  74. tts_html_utils-0.5.4/src/tts_html_utils/resources/html_templates/generic_singleton.html +2 -0
  75. tts_html_utils-0.5.4/src/tts_html_utils/resources/html_templates/helpers.html +31 -0
  76. tts_html_utils-0.5.4/src/tts_html_utils/resources/html_templates/plotly_config.html +6 -0
  77. tts_html_utils-0.5.4/src/tts_html_utils/resources/html_templates/script_general.html +3 -0
  78. tts_html_utils-0.5.4/src/tts_html_utils/resources/html_templates/table.html +21 -0
  79. tts_html_utils-0.5.4/src/tts_html_utils/resources/html_templates/test.html +4 -0
  80. tts_html_utils-0.5.4/src/tts_html_utils/resources/img/favicon.png +0 -0
  81. tts_html_utils-0.5.4/src/tts_html_utils/resources/report_base.css +474 -0
  82. tts_html_utils-0.5.4/src/tts_html_utils/resources/rule_result_table.css +40 -0
  83. tts_html_utils-0.5.4/src/tts_html_utils/resources/rule_summary.css +79 -0
  84. tts_html_utils-0.5.4/src/tts_html_utils/resources/scripts/collapsible.js +40 -0
  85. tts_html_utils-0.5.4/src/tts_html_utils/resources/scripts/link_functions.js +13 -0
  86. tts_html_utils-0.5.4/src/tts_html_utils/resources/scripts/open_tab_function.js +29 -0
  87. tts_html_utils-0.5.4/src/tts_html_utils/resources/scripts/resize_bodyheight.js +7 -0
  88. tts_html_utils-0.5.4/src/tts_html_utils/resources/scripts/sorttable.js +489 -0
  89. tts_html_utils-0.5.4/src/tts_html_utils/resources/scripts/sticky_headers.js +11 -0
  90. tts_html_utils-0.5.4/src/tts_html_utils/test/__init__.py +0 -0
  91. tts_html_utils-0.5.4/src/tts_html_utils/test/test_base.py +110 -0
  92. tts_html_utils-0.5.4/src/tts_html_utils/test/test_compiler.py +227 -0
  93. tts_html_utils-0.5.4/src/tts_html_utils/test/test_list.py +127 -0
  94. tts_html_utils-0.5.4/src/tts_html_utils/test/test_misc.py +145 -0
  95. tts_html_utils-0.5.4/src/tts_html_utils/test/test_navigation.py +59 -0
  96. tts_html_utils-0.5.4/src/tts_html_utils/test/test_plot.py +150 -0
  97. tts_html_utils-0.5.4/src/tts_html_utils/test/test_resource.py +133 -0
  98. tts_html_utils-0.5.4/src/tts_html_utils/test/test_structure.py +176 -0
  99. tts_html_utils-0.5.4/src/tts_html_utils/test/test_table.py +256 -0
  100. tts_html_utils-0.5.4/src/tts_html_utils/test/test_text.py +62 -0
  101. tts_html_utils-0.5.4/src/tts_html_utils/visdiff/visdiff.py +98 -0
  102. tts_html_utils-0.5.4/src/tts_html_utils.egg-info/PKG-INFO +72 -0
  103. tts_html_utils-0.5.4/src/tts_html_utils.egg-info/SOURCES.txt +104 -0
  104. tts_html_utils-0.5.4/src/tts_html_utils.egg-info/dependency_links.txt +1 -0
  105. tts_html_utils-0.5.4/src/tts_html_utils.egg-info/requires.txt +9 -0
  106. tts_html_utils-0.5.4/src/tts_html_utils.egg-info/top_level.txt +1 -0
@@ -0,0 +1,180 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
159
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
+ #.idea/
161
+
162
+ env
163
+ venv
164
+
165
+ # IDEs and editors
166
+ .idea/
167
+ .vscode/
168
+ *.sublime-project
169
+ *.sublime-workspace
170
+
171
+ # Jupyter notebooks
172
+ .ipynb_checkpoints/
173
+
174
+ # Jupyter lab workspace
175
+ .jupyter/
176
+
177
+ # Miscellaneous
178
+ .DS_Store
179
+ Thumbs.db
180
+ ._*
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.4
2
+ Name: tts-html-utils
3
+ Version: 0.5.4
4
+ Summary: Utilities for simplifying HTML generation.
5
+ Author: muszynsk
6
+ Author-email: muszynsk <matt.muszynski@jpl.nasa.gov>
7
+ License: Apache-2.0
8
+ Project-URL: Homepage, https://github.com/NASA-JPL-Teamtools-Studio/html_utils
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Requires-Python: >=3.6
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: beautifulsoup4
14
+ Requires-Dist: datetime
15
+ Requires-Dist: django
16
+ Requires-Dist: jinja2
17
+ Requires-Dist: numpy
18
+ Requires-Dist: pandas
19
+ Requires-Dist: plotly
20
+ Requires-Dist: pytest
21
+ Requires-Dist: tts-utilities<1.0.0,>=0.2.1
22
+ Dynamic: author
23
+ Dynamic: requires-python
24
+
25
+ # HTML Utilities
26
+
27
+ ![Project logo](https://github.com/NASA-JPL-Teamtools-Studio/teamtools-documentation/blob/main/docs/images/tts_image_artifacts/html_utils.png)
28
+
29
+ ## About Teamtools Studio
30
+
31
+ HTML Utilities is part of JPL's Teamtools Studio (TTS).
32
+
33
+ TTS is an effort originated in JPL's Planning and Execution section to centralize shared repositories across missions. This benefits JPL by reducing cost through reducing duplicated code, collaborating across missions, and unifying standards for development and design across JPL.
34
+
35
+ Although Planning and Execution is primarily concerned with flight operations, the TTS suite has been generalized and atomized to the point where many of these tools are applicable during other mission phases and even in non-spaceflight contexts. Through our work flying space missions, we hope to provide tools to the open source community that have utility in data analysis or planning for any complex system where failure is not an option.
36
+
37
+ For more infomation on how to contribute, and how these libraries form a complete ecosystem for high reliability data analysis, see the [Full TTS Documentation](https://nasa-jpl-teamtools-studio.github.io//teamtools-documentation/).
38
+
39
+ ## What is HTML Utilities?
40
+
41
+ ### Overview
42
+
43
+ HTML Utilities is what it says on the tin. While there are many HTML generating Pyhton libraries, the Teamtools Studio
44
+ team noticed that many do not match the patterns expected by purely Python developers, resulting in many difficult to
45
+ maintain HTML reporting tools.
46
+
47
+ This library is intended to be much more Pyhtonic and provide the ability to create somewhat sophisticated HTML reports
48
+ with little specific web design knowledge. There is also some JavaScript embedded in some entities to enable a light level
49
+ of interactivity needed for this work.
50
+
51
+ This library uses components that look and feel more or less like Plotly Dash, but is not meant to necessarily be as
52
+ sophisticated as that library, and unlike Plotly Dash, it is meant to be used as a standalone HTML report generation tool.
53
+
54
+ While it certainly can be--and indeed is--used as a component in web applications, its primary use case is to create
55
+ components to be incorporated into HTML-friendly applications like Confluence, or to just make custom reports as HTML files
56
+ that can be easily shared via email or attaching to other reporting and project management tools like Jira.
57
+
58
+ ### Projects Currently Supported
59
+
60
+ * Europa Clipper
61
+ * Mars 2020/Perseverance
62
+ * Mars Sample Return/Sample Retrieval Lander
63
+ * Mars Science Laboratory/Curiosity
64
+ * Mars Reconnaisance Orbiter
65
+ * NISAR
66
+ * Orbiting Carbon Observatory 2 (OCO-2)
67
+
68
+ ## Architecture
69
+
70
+ ### TTS dependencies
71
+
72
+ * TTS Utilities
@@ -0,0 +1,48 @@
1
+ # HTML Utilities
2
+
3
+ ![Project logo](https://github.com/NASA-JPL-Teamtools-Studio/teamtools-documentation/blob/main/docs/images/tts_image_artifacts/html_utils.png)
4
+
5
+ ## About Teamtools Studio
6
+
7
+ HTML Utilities is part of JPL's Teamtools Studio (TTS).
8
+
9
+ TTS is an effort originated in JPL's Planning and Execution section to centralize shared repositories across missions. This benefits JPL by reducing cost through reducing duplicated code, collaborating across missions, and unifying standards for development and design across JPL.
10
+
11
+ Although Planning and Execution is primarily concerned with flight operations, the TTS suite has been generalized and atomized to the point where many of these tools are applicable during other mission phases and even in non-spaceflight contexts. Through our work flying space missions, we hope to provide tools to the open source community that have utility in data analysis or planning for any complex system where failure is not an option.
12
+
13
+ For more infomation on how to contribute, and how these libraries form a complete ecosystem for high reliability data analysis, see the [Full TTS Documentation](https://nasa-jpl-teamtools-studio.github.io//teamtools-documentation/).
14
+
15
+ ## What is HTML Utilities?
16
+
17
+ ### Overview
18
+
19
+ HTML Utilities is what it says on the tin. While there are many HTML generating Pyhton libraries, the Teamtools Studio
20
+ team noticed that many do not match the patterns expected by purely Python developers, resulting in many difficult to
21
+ maintain HTML reporting tools.
22
+
23
+ This library is intended to be much more Pyhtonic and provide the ability to create somewhat sophisticated HTML reports
24
+ with little specific web design knowledge. There is also some JavaScript embedded in some entities to enable a light level
25
+ of interactivity needed for this work.
26
+
27
+ This library uses components that look and feel more or less like Plotly Dash, but is not meant to necessarily be as
28
+ sophisticated as that library, and unlike Plotly Dash, it is meant to be used as a standalone HTML report generation tool.
29
+
30
+ While it certainly can be--and indeed is--used as a component in web applications, its primary use case is to create
31
+ components to be incorporated into HTML-friendly applications like Confluence, or to just make custom reports as HTML files
32
+ that can be easily shared via email or attaching to other reporting and project management tools like Jira.
33
+
34
+ ### Projects Currently Supported
35
+
36
+ * Europa Clipper
37
+ * Mars 2020/Perseverance
38
+ * Mars Sample Return/Sample Retrieval Lander
39
+ * Mars Science Laboratory/Curiosity
40
+ * Mars Reconnaisance Orbiter
41
+ * NISAR
42
+ * Orbiting Carbon Observatory 2 (OCO-2)
43
+
44
+ ## Architecture
45
+
46
+ ### TTS dependencies
47
+
48
+ * TTS Utilities
@@ -0,0 +1,24 @@
1
+ #When tts-build-sphinx-docs runs, it will collect all tags and branches and attempt to build
2
+ #docs for each in the gh-pages branch. This is a config file that allows developers to
3
+ #specifically exclude any branches or tags they need. Each line is the name of a tag or
4
+ #branch.
5
+ #
6
+ #This file makes no attemtpt to tell whether a line is a tag or a branch as TTS assumes that
7
+ #the naming conventions will always be different, and that tags should be tied to releases,
8
+ #so they should always have semvar names, whereas branches should be more descriptive using
9
+ #typical agile branch naming conventions.
10
+ #
11
+ #The most typical use case is to exclude tags that were created before you added the docs
12
+ #prerequisites, or to exclude the gh-pages branch itself since no code is expected to live
13
+ #there. All TTS repos are expected to have a gh-pages branch, but it is expected that it
14
+ #will always be managed by tts-build-sphinx-docs. You do not need to manually create
15
+ #a gh-pages branch because tts-build-sphinx-docs will create one if it does not exist.
16
+ #
17
+ #tts-build-sphinx-docs will also always remove all files from gh-pages and rebuild all docs
18
+ #from scratch
19
+ # Ignore all 0.x versions
20
+ 0\..*
21
+ # Ignore v0.1.x and v0.2.x specifically
22
+ v0\.[1-2]\..*
23
+ # Ignore temporary feature branches
24
+ gh-pages
File without changes
@@ -0,0 +1,12 @@
1
+ /*
2
+ Resolves a bug where the text in the header
3
+ "[package name] [package version] documentation"
4
+ was getting stacked up on top of itself when the variable portions were too long. Something with floats
5
+ and elements not taking up the whole width of their contents.
6
+
7
+ Needed to add it because setuptools-scm version names can be very long, especially for versions that
8
+ are build off of a commit with no tag
9
+ */
10
+ .navbar-header-items__start {
11
+ width: auto;
12
+ }
@@ -0,0 +1,5 @@
1
+ Base
2
+ ===============
3
+
4
+ .. automodule:: html_utils.core.components.base
5
+ :members:
@@ -0,0 +1,5 @@
1
+ Compiler
2
+ ===============
3
+
4
+ .. automodule:: html_utils.core.compiler
5
+ :members:
@@ -0,0 +1,71 @@
1
+ # TTS-specifc add ons
2
+ from pathlib import Path
3
+ from datetime import datetime
4
+ from setuptools_scm import get_version
5
+ import toml
6
+
7
+ # Configuration file for the Sphinx documentation builder.
8
+ #
9
+ # This file only contains a selection of the most common options. For a full
10
+ # list see the documentation:
11
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
12
+
13
+ # -- Path setup --------------------------------------------------------------
14
+
15
+ # If extensions (or modules to document with autodoc) are in another directory,
16
+ # add these directories to sys.path here. If the directory is relative to the
17
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
18
+ #
19
+
20
+ import os
21
+ import sys
22
+ import importlib.metadata
23
+ sys.path.insert(0, os.path.abspath('..'))
24
+
25
+ # -- Project information -----------------------------------------------------
26
+
27
+ pyproject = toml.load(Path(__file__).parent.parent.joinpath("pyproject.toml"))
28
+ project = pyproject["project"]["name"]
29
+ release = get_version(root='..', relative_to=__file__)
30
+ version = '.'.join(release.split('.')[:2])
31
+
32
+ copyright = f"{datetime.now().strftime('%Y')} JPL"
33
+ author = 'JPL Teamtools Studio'
34
+
35
+
36
+ # -- General configuration ---------------------------------------------------
37
+
38
+ # Add any Sphinx extension module names here, as strings. They can be
39
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
40
+ # ones.
41
+ extensions = ['sphinx.ext.autodoc']
42
+
43
+ # Add any paths that contain templates here, relative to this directory.
44
+ templates_path = ['_templates']
45
+
46
+ # List of patterns, relative to source directory, that match files and
47
+ # directories to ignore when looking for source files.
48
+ # This pattern also affects html_static_path and html_extra_path.
49
+ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
50
+
51
+ # The master toctree document.
52
+ master_doc = 'index'
53
+
54
+ pygments_style = 'sphinx'
55
+ # html_theme = 'nature'
56
+ # html_theme = 'sphinx_material'
57
+ html_theme = 'pydata_sphinx_theme'
58
+
59
+ # -- Options for HTML output -------------------------------------------------
60
+
61
+ # The theme to use for HTML and HTML Help pages. See the documentation for
62
+ # a list of builtin themes.
63
+ #
64
+
65
+ # Add any paths that contain custom static files (such as style sheets) here,
66
+ # relative to this directory. They are copied after the builtin static files,
67
+ # so a file named "default.css" will overwrite the builtin "default.css".
68
+ html_static_path = ['_static']
69
+ html_css_files = ['bugfix.css']
70
+ html_copy_source = False
71
+ html_show_sourcelink = False
@@ -0,0 +1,34 @@
1
+ Welcome to the HTML Utils documentation!
2
+ =============================================================
3
+
4
+ .. toctree::
5
+ :maxdepth: 2
6
+ :caption: Base Classes:
7
+
8
+ base
9
+
10
+ .. toctree::
11
+ :maxdepth: 2
12
+ :caption: Superstructure Elements:
13
+
14
+ compiler
15
+
16
+ .. toctree::
17
+ :maxdepth: 2
18
+ :caption: HTML Elements:
19
+
20
+ list
21
+ misc
22
+ navigation
23
+ plot
24
+ table
25
+ text
26
+
27
+
28
+
29
+ Indices and tables
30
+ ==================
31
+
32
+ * :ref:`genindex`
33
+ * :ref:`modindex`
34
+ * :ref:`search`
@@ -0,0 +1,5 @@
1
+ List
2
+ ===============
3
+
4
+ .. automodule:: html_utils.core.components.list
5
+ :members:
@@ -0,0 +1,5 @@
1
+ Misc
2
+ ===============
3
+
4
+ .. automodule:: html_utils.core.components.misc
5
+ :members:
@@ -0,0 +1,5 @@
1
+ Navigation
2
+ ===============
3
+
4
+ .. automodule:: html_utils.core.components.navigation
5
+ :members:
@@ -0,0 +1,5 @@
1
+ Plot
2
+ ===============
3
+
4
+ .. automodule:: html_utils.core.components.plot
5
+ :members:
@@ -0,0 +1,5 @@
1
+ Table
2
+ ===============
3
+
4
+ .. automodule:: html_utils.core.components.table
5
+ :members:
@@ -0,0 +1,5 @@
1
+ Plot
2
+ ===============
3
+
4
+ .. automodule:: html_utils.core.components.text
5
+ :members:
@@ -0,0 +1,44 @@
1
+ # HTML Utils Demos
2
+
3
+ This directory contains demonstrations of various components and features of the `html_utils` package.
4
+
5
+ ## Available Demos
6
+
7
+ ### Nested Pane Containers
8
+
9
+ The nested pane containers demo shows how to create pane containers that are nested inside other pane containers, with each container maintaining its own independent tabs and state.
10
+
11
+ - **Python Script**: `nested_pane_containers_demo.py`
12
+ - **Jupyter Notebook**: `nested_pane_containers_demo.ipynb`
13
+ - **Output HTML**: `nested_pane_containers_demo.html` (generated when you run the script)
14
+
15
+ To run the Python script demo:
16
+
17
+ ```bash
18
+ cd /path/to/html_utils/demo
19
+ python nested_pane_containers_demo.py
20
+ ```
21
+
22
+ This will generate an HTML file and print its location. Open this file in a web browser to see the demo.
23
+
24
+ To run the Jupyter notebook demo:
25
+
26
+ ```bash
27
+ cd /path/to/html_utils/demo
28
+ jupyter notebook nested_pane_containers_demo.ipynb
29
+ ```
30
+
31
+ ## Key Features Demonstrated
32
+
33
+ 1. **Custom IDs**: How to provide custom IDs for pane containers
34
+ 2. **Auto-generated IDs**: How containers generate unique IDs when none are provided
35
+ 3. **Nesting**: How to nest one pane container inside another
36
+ 4. **Independent State**: How each container maintains its own tab state
37
+
38
+ ## Adding New Demos
39
+
40
+ When adding new demos to this directory, please follow these guidelines:
41
+
42
+ 1. Create both a Python script and a Jupyter notebook version if possible
43
+ 2. Include detailed comments and explanations
44
+ 3. Update this README with information about your demo
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ """
5
+ Debug script to print the exact HTML output of a PaneContainer
6
+ """
7
+
8
+ import sys
9
+ from pathlib import Path
10
+ sys.path.insert(0, str(Path(__file__).parent.parent.parent))
11
+
12
+ from tts_html_utils.core.components.structure import PaneContainer
13
+ from tts_html_utils.core.components.misc import Div
14
+
15
+ def main():
16
+ """Print the exact HTML output of a PaneContainer"""
17
+ pc = PaneContainer(id='pane-container-a')
18
+ pc.add_pane("Content A", "My Tab")
19
+ pc.add_pane("Content B", "Other Tab")
20
+
21
+ html = pc.render()
22
+
23
+ print("\nExact HTML output:")
24
+ print("=================")
25
+ print(html)
26
+ print("\nHTML output with line breaks for readability:")
27
+ print("===========================================")
28
+ # Add line breaks for readability
29
+ html_readable = html.replace("><", ">\n<")
30
+ print(html_readable)
31
+
32
+ if __name__ == "__main__":
33
+ main()