Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger Widget Panel #2872

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/actions/setup_env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ runs:
environment-name: tardis
cache-environment: true
cache-downloads: true

- run: |
micromamba install panel watchfiles
micromamba install -c pyviz nbsite
shell: bash
7 changes: 7 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"nbsphinx",
"numpydoc",
"recommonmark",
"nbsite.pyodide" # for Panel
]

bibtex_bibfiles = ["tardis.bib"]
Expand Down Expand Up @@ -346,6 +347,12 @@
("using/gui/index.rst", "using/visualization/index.rst"),
]

# -- Panel Pydiode Settings --------------------------------------------------

nbsite_pyodide_conf = {
"PYODIDE_URL": "https://cdn.jsdelivr.net/pyodide/v0.26.3/full/pyodide.js"
}


# -- Sphinx hook-ins ---------------------------------------------------------

Expand Down
57 changes: 54 additions & 3 deletions docs/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
"metadata": {},
"outputs": [],
"source": [
"from tardis import run_tardis"
"from tardis import run_tardis\n",
"from tardis.io.logger import logger_widget"
]
},
{
Expand All @@ -107,6 +108,18 @@
"</div>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"# Uncommend below line to see live logs from the widget\n",
"# logger_widget"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -121,7 +134,16 @@
]
},
{
"attachments": {},
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Only required when building documentation\n",
"logger_widget.embed()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -198,7 +220,36 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.12.4"
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
}
},
"nbformat": 4,
Expand Down
1 change: 1 addition & 0 deletions tardis/io/logger/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""
Managing the logging output.
"""
from tardis.io.logger.logger import logger_widget
82 changes: 0 additions & 82 deletions tardis/io/logger/colored_logger.py

This file was deleted.

Loading
Loading