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

Add nbreport issue and other core commands that interact with api.lsst.codes/nbreport

    XMLWordPrintable

    Details

      Description

      This ticket is to add additional commands (beyond nbreport test, DM-15167) to the nbreport command-line application that interact with the api.lsst.codes/nbreport microservice (DM-15199) to reserve instances and upload computed notebooks corresponding to instances.

      According to the plan in https://sqr-023.lsst.io/v/DM-15003 these commands are:

      • nbreport init
      • nbreport render
      • nbreport compute
      • nbreport upload
      • nbreport issue (the all-in-one version of that command)

        Attachments

          Issue Links

            Activity

            Hide
            jsick Jonathan Sick added a comment -

            Released as nbreport 0.6.0:

            • Several new commands were added that make the ``nbreport`` command line client fully functional:
            • ``nbreport register`` command registers a report repo with LSST the Docs so that instances can be published.
            • ``nbreport init`` command initializes a new report instance (by reserving a number with the API server and optionally rendering template variables).
            • ``nbreport compute`` command computes a report instance's notebook.
            • ``nbreport upload`` command uploads a report instance to the API server, which publishes it to LSST the Docs.
            • ``nbreport issue`` command performs the equivalent of ``init``, ``compute``, and ``upload`` in a single step.
            • Key metadata from each instance ``nbreport.yaml`` file is not available as a Jinja template variable, namely: ``handle``, ``title``, ``git_repo``, ``git_repo_subdir``, ``instance_id``, ``instance_handle``.
              These variables aren't part of the ``cookiecutter`` namespace and can't be overridden on the command line.
            • Metadata from ``nbreport.yaml``, as well as the final set of ``cookiecutter`` template variables, are included in the notebook files's metadata.
              This provides a record of how the notebook was constructed, and will be used on the server to both render the notebook page and to provide filtering of notebooks.
            • Refactored code related to reading ``~/.nbreport.yaml`` out of the ``nbreport login`` command and into the ``nbreport.userconfig`` module.
              The main command reads this file and passes data like the authentication token to subcommands.
            • Refactored ``create_instance()`` out of the ``nbreport test`` command and into ``nbreport.processing`` so that multiple subcommands (``init``, ``issue``) can consume it.
            Show
            jsick Jonathan Sick added a comment - Released as nbreport 0.6.0: Several new commands were added that make the ``nbreport`` command line client fully functional: ``nbreport register`` command registers a report repo with LSST the Docs so that instances can be published. ``nbreport init`` command initializes a new report instance (by reserving a number with the API server and optionally rendering template variables). ``nbreport compute`` command computes a report instance's notebook. ``nbreport upload`` command uploads a report instance to the API server, which publishes it to LSST the Docs. ``nbreport issue`` command performs the equivalent of ``init``, ``compute``, and ``upload`` in a single step. Key metadata from each instance ``nbreport.yaml`` file is not available as a Jinja template variable, namely: ``handle``, ``title``, ``git_repo``, ``git_repo_subdir``, ``instance_id``, ``instance_handle``. These variables aren't part of the ``cookiecutter`` namespace and can't be overridden on the command line. Metadata from ``nbreport.yaml``, as well as the final set of ``cookiecutter`` template variables, are included in the notebook files's metadata. This provides a record of how the notebook was constructed, and will be used on the server to both render the notebook page and to provide filtering of notebooks. Refactored code related to reading ``~/.nbreport.yaml`` out of the ``nbreport login`` command and into the ``nbreport.userconfig`` module. The main command reads this file and passes data like the authentication token to subcommands. Refactored ``create_instance()`` out of the ``nbreport test`` command and into ``nbreport.processing`` so that multiple subcommands (``init``, ``issue``) can consume it.

              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.