Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-15306

Implement LSST-themed ipynb to HTML conversion for notebook-based report system

    XMLWordPrintable

    Details

      Description

      Implement Jupyter Notebook (ipynb) to HTML conversion for the notebook-based report system (described in https://sqr-023.lsst.io/v/DM-15003). This conversion is built on nbconvert. The main contributions of this ticket are:

      1. Theming of the HTML to look like an LSST document
      2. Integration with the sqre-uservice-nbreport microservice (ideally this is done with a celery task queue)
      3. Upload the HTML and notebook to LSST the Docs.

        Attachments

          Issue Links

            Activity

            Hide
            jsick Jonathan Sick added a comment -

            This release is the first minimum viable product that accepts a notebook and converts it into an HTML report.

            New LsstHtmlReportExporter subclass of nbconvert’s HTMLConverter. This subclass provides some defaults for the HTML converter, and also maintains knowledge of additional assets needed by the build.

            New LsstOutlinePreprocessor subclass of nbconvert’s Preprocessor. This preprocessor analyzes the markdown header structure and creates a tree structure that is added to the resources dictionary under the lsst_outline key. The Jinja HTML templates use this tree to generate a hierarchical table of contents in the sidebar.

            New HTML and CSS theming for the notebooks. The CSS is generated with a Gulp pipeline.

            The POST /reports/<report>/instances/<instance_id>/notebook endpoint triggers a Celery queue task that actually transforms the notebook into HTML and uploads that HTML to LSST the Docs.

            New GET /queue/<id> endpoint for obtaining the status of a processing item in the queue.

            Show
            jsick Jonathan Sick added a comment - This release is the first minimum viable product that accepts a notebook and converts it into an HTML report. New LsstHtmlReportExporter subclass of nbconvert’s HTMLConverter. This subclass provides some defaults for the HTML converter, and also maintains knowledge of additional assets needed by the build. New LsstOutlinePreprocessor subclass of nbconvert’s Preprocessor. This preprocessor analyzes the markdown header structure and creates a tree structure that is added to the resources dictionary under the lsst_outline key. The Jinja HTML templates use this tree to generate a hierarchical table of contents in the sidebar. New HTML and CSS theming for the notebooks. The CSS is generated with a Gulp pipeline. The POST /reports/<report>/instances/<instance_id>/notebook endpoint triggers a Celery queue task that actually transforms the notebook into HTML and uploads that HTML to LSST the Docs. New GET /queue/<id> endpoint for obtaining the status of a processing item in the queue.

              People

              Assignee:
              jsick Jonathan Sick
              Reporter:
              jsick Jonathan Sick
              Watchers:
              Jonathan Sick
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.