Updated documentation for the upcoming data release#294
Merged
Conversation
This reverts commit 8ccb49b.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refreshes SkyLLH’s documentation and tutorial notebooks for the upcoming IceCube public data release, reorganizing the Sphinx site structure and adding task-focused examples/tutorials while making small docstring/code robustness tweaks in core utilities.
Changes:
- Reworked Sphinx docs structure (new landing pages, tutorials index, FAQ formatting, API reference entry) and added/updated example & tutorial notebooks.
- Updated packaging/docs tooling (new Sphinx extensions in
pyproject.toml/conf.py, Makefile parallel build option, pre-commit formatting for Jupyter). - Improved dataset post-transfer archive extraction behavior by logging/removing corrupted archives on extraction errors.
Reviewed changes
Copilot reviewed 41 out of 47 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| skyllh/core/signal_generator.py | Docstring formatting tweak to render examples as literal blocks. |
| skyllh/core/interpolate.py | Docstring formatting for **kwargs. |
| skyllh/core/dataset.py | Adds extraction error handling/logging and archive cleanup for post-transfer unarchiving. |
| skyllh/core/background_generation.py | Docstring list formatting cleanup. |
| skyllh/analyses/i3/publicdata_ps/utils.py | Docstring spacing improvement. |
| skyllh/analyses/i3/publicdata_ps/time_integrated_ps.py | Docstring indentation fix for deprecated option note. |
| skyllh/analyses/i3/publicdata_ps/time_integrated_ps_function_energy_spectrum.py | Docstring indentation fix for deprecated option note. |
| skyllh/analyses/i3/publicdata_ps/time_dependent_ps.py | Docstring indentation fix for deprecated option note. |
| README.md | Adds “Quick links”, clarifies install instructions and Python requirement. |
| pyproject.toml | Adds Sphinx extension deps to docs extra. |
| doc/sphinx/tutorials/sensitivity_study.ipynb | New tutorial on sensitivity/discovery potential workflow. |
| doc/sphinx/tutorials/publicdata_ps_timedep.ipynb | Removes outdated time-dependent tutorial notebook. |
| doc/sphinx/tutorials/publicdata_ps_14yr.ipynb | Removes temporary/check notebook. |
| doc/sphinx/tutorials/index.rst | Replaces/expands tutorials landing page and toctree. |
| doc/sphinx/tutorials/getting_started.ipynb | Removes older “getting started” notebook. |
| doc/sphinx/tutorials/fitting_a_source.ipynb | New steady point-source fitting tutorial (IceTracks-DR2). |
| doc/sphinx/tutorials/dataset_collections.ipynb | New tutorial introducing dataset collections and selection. |
| doc/sphinx/notes.rst | Fixes wording/formatting in docstring notes. |
| doc/sphinx/Makefile | Enables parallel Sphinx builds and copies user_manual.pdf into build output. |
| doc/sphinx/installation.rst | Rewrites install page (pip/uv/conda tabs, extras, i3skyllh note). |
| doc/sphinx/index.rst | Updates main docs landing page structure and navigation. |
| doc/sphinx/faq/signal_generator.ipynb | Removes old FAQ notebook in favor of inline dropdown. |
| doc/sphinx/faq/index.rst | Converts FAQ to a dropdown-based page with embedded content. |
| doc/sphinx/examples/timepdf.ipynb | Cleans up example notebook formatting/markdown cells and outputs. |
| doc/sphinx/examples/scrambling.ipynb | Adds new data scrambling example notebook. |
| doc/sphinx/examples/multiproc.ipynb | Adds new multiprocessing example notebook. |
| doc/sphinx/examples/index.rst | Adds new examples to the examples toctree. |
| doc/sphinx/dev_docs/unit_tests.rst | Expands unit test docs (pytest runner usage, structure, examples). |
| doc/sphinx/dev_docs/logging.ipynb | Minor formatting cleanup in logging dev doc notebook. |
| doc/sphinx/contributing.rst | Adds contributing guide (issues, PRs, tutorials, style). |
| doc/sphinx/conf.py | Enables new Sphinx extensions and sets copybutton/theme nav options. |
| doc/sphinx/concepts/source_definition.ipynb | Removes autoreload cell/empty code cell from concept notebook. |
| doc/sphinx/concepts/pdf.ipynb | Removes autoreload cell from concept notebook. |
| doc/sphinx/concepts/parameters.ipynb | Removes autoreload cell from concept notebook. |
| doc/sphinx/concepts/index.rst | Fixes spelling/grammar. |
| doc/sphinx/concepts/flux_definition.ipynb | Removes autoreload cell and fixes wording (right-ascension). |
| doc/sphinx/api_reference.rst | Adds an API reference entry point for the Sphinx toctree. |
| .pre-commit-config.yaml | Runs Ruff hooks on Jupyter notebooks as well. |
| .gitignore | Ignores .DS_Store. |
| .github/workflows/documentation.yml | Builds docs on documentation branch too. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+765
to
+772
| try: | ||
| if filename_lower.endswith('.zip'): | ||
| with zipfile.ZipFile(archive_path) as zf: | ||
| zf.extractall(dst_path) | ||
| elif filename_lower.endswith(('.tar.gz', '.tgz', '.tar.bz2', '.tar.xz')): | ||
| with tarfile.open(archive_path) as tf: | ||
| tf.extractall(dst_path) | ||
| else: |
Collaborator
There was a problem hiding this comment.
We trust the dataset sources
Comment on lines
+774
to
+780
| except (zipfile.BadZipFile, tarfile.ReadError, tarfile.StreamError) as err: | ||
| logger = get_logger(f'{__name__}.post_transfer_unarchive') | ||
| logger.warning( | ||
| f'Failed to extract archive file "{archive_path}"! The file might be corrupted and will be removed. Error message: {err!s}' | ||
| ) | ||
| os.remove(archive_path) | ||
| raise err |
| # Build html documentation for each branch separately. | ||
| html-multiversion: | ||
| sphinx-multiversion "$(SOURCEDIR)" "$(BUILDDIR)" | ||
| sphinx-multiversion "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) |
Collaborator
There was a problem hiding this comment.
It does accept it and speeds up documentation builds where multiple cpus are available
Comment on lines
+47
to
+54
| { | ||
| "data": { | ||
| "text/plain": [ | ||
| "{'IceTracks-DR1': <module 'skyllh.datasets.i3.PublicData_10y_ps' from '/Users/tomas/projects/skyllh_development/skyllh/skyllh/datasets/i3/PublicData_10y_ps.py'>,\n", | ||
| " 'IceTracks-DR2': <module 'skyllh.datasets.i3.PublicData_14y_ps' from '/Users/tomas/projects/skyllh_development/skyllh/skyllh/datasets/i3/PublicData_14y_ps.py'>,\n", | ||
| " 'IceTracks-DR1_wMC': <module 'skyllh.datasets.i3.PublicData_10y_ps_wMC' from '/Users/tomas/projects/skyllh_development/skyllh/skyllh/datasets/i3/PublicData_10y_ps_wMC.py'>,\n", | ||
| " 'TestData': <module 'skyllh.datasets.i3.TestData' from '/Users/tomas/projects/skyllh_development/skyllh/skyllh/datasets/i3/TestData.py'>}" | ||
| ] |
Comment on lines
+72
to
+103
| "outputs": [ | ||
| { | ||
| "data": { | ||
| "text/plain": [ | ||
| "{'multiproc': {'ncpu': None},\n", | ||
| " 'logging': {'log_level': 'INFO',\n", | ||
| " 'log_format': '%(asctime)s %(processName)s %(name)s %(levelname)s: %(message)s',\n", | ||
| " 'enable_tracing': False},\n", | ||
| " 'project': {'working_directory': '.'},\n", | ||
| " 'repository': {'base_path': '/Users/tomas/.cache/skyllh',\n", | ||
| " 'download_from_origin': True},\n", | ||
| " 'units': {'internal': {'angle': Unit(\"rad\"),\n", | ||
| " 'energy': Unit(\"GeV\"),\n", | ||
| " 'length': Unit(\"cm\"),\n", | ||
| " 'time': Unit(\"s\")},\n", | ||
| " 'defaults': {'fluxes': {'angle': Unit(\"rad\"),\n", | ||
| " 'energy': Unit(\"GeV\"),\n", | ||
| " 'length': Unit(\"cm\"),\n", | ||
| " 'time': Unit(\"s\")}}},\n", | ||
| " 'datafields': {'run': 4,\n", | ||
| " 'ra': 4,\n", | ||
| " 'dec': 4,\n", | ||
| " 'ang_err': 4,\n", | ||
| " 'time': 4,\n", | ||
| " 'log_energy': 4,\n", | ||
| " 'true_ra': 8,\n", | ||
| " 'true_dec': 8,\n", | ||
| " 'true_energy': 8,\n", | ||
| " 'mcweight': 8},\n", | ||
| " 'caching': {'pdf': {'MultiDimGridPDF': False}}}" | ||
| ] | ||
| }, |
| The tutorials below walk through common SkyLLH analysis tasks using IceCube public data. | ||
| They progress from a basic steady-state point-source fit to more specialised techniques. | ||
|
|
||
| The tutorials support both the `10-year <https://doi.org/10.7910/DVN/VKL316>`_ (IceTracks-DR1) and the `14-year <https://doi.org/10.7910/DVN/MMIIZA>`_ (IceTracks-DR2) IceCube public point-source datasets. They are automatically downloaded from `dataverse.harvard.edu <https://dataverse.harvard.edu/dataverse/icecube>`_ to a local cache directory (``~/.skyllh/cache``). To use custom dataset locations, set the ``cfg['repository']['base_path']`` to the desired path. |
Comment on lines
+210
to
+227
| { | ||
| "cell_type": "markdown", | ||
| "id": "e8921c82", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "The datasets are automatically downloaded from [dataverse.harvard.edu](https://dataverse.harvard.edu/dataverse/icecube) to a local cache directory (`~/.skyllh/cache`) on first run. To use a custom dataset location, set `cfg['repository']['base_path']` to the desired path." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "raw", | ||
| "id": "d6a539f5", | ||
| "metadata": { | ||
| "raw_mimetype": "text/restructuredtext" | ||
| }, | ||
| "source": [ | ||
| ".. note::\n", | ||
| " IceTracks-DR2 is a pretty heavy dataset (~5GB) and it might take a while to initialize the analysis when it has to be downloaded for the first time. Be patient, and the next time it will be loaded from `~/.skyllh/cache` :)" | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Smaller, task-focused notebooks :)
Before merging: