Skip to content

Releases: lsst-sqre/times-square

0.23.0

12 Jun 16:39
5190b29

Choose a tag to compare

Backwards-incompatible changes

  • The dayobs parameter format now creates an int value in the notebook rather than a string. For example, mydate = 20250115 instead of mydate = '20250115'. This is a better match for the DayObs metadata standard described in SITCOMTN-032.

    Any early adopters of the dayobs format will need to update their notebooks. Also consider using the new dayobs-date format instead.

New features

  • Added a new dayobs-date parameter format. This is similar to the original dayobs format in the use of the UTC-12 timezone, but expects dates in the YYYY-MM-DD format and assigns the parameters as datetime.date values in the notebook. Although this is not the standard usage of dayobs, it should be useful for many applications because the ISO 8601 string format is more readable and the datetime.date type is more convenient to use in Python code. dayobs-date works with dynamic defaults like dayobs and standard date formats.

What's Changed

Full Changelog: 0.22.0...0.23.0

0.22.0

05 Jun 21:57
087ec38

Choose a tag to compare

Backwards-incompatible changes

  • This release requires a database schema migration to 747a655bacf6.

New features

  • Pages can now be scheduled to run automatically. This is useful for preparing reports and creating dashboards on a regular basis. Scheduled page runs use the page's default parameter values, and replace any pre-cached results. Scheduling works great in combination with dynamic defaults for date parameters, which allows you to compute a notebook for a specific day, while still keeping historical results.

    Schedules are set up in the notebook's YAML sidecar file with the schedule and schedule_enabled keys. An example of a schedule that runs every day at 08:00 UTC:

    schedule:
      - freq: "daily"
        hour: 8
        minute: 0
    schedule_enabled: true

    A more sophisticated schedule that runs on the last day of every month at 23:59 UTC:

    schedule:
      - freq: "monthly"
        day: -1
        hour: 23
        minute: 59
    schedule_enabled: true

    More scheduling options are available that can accommodate almost any imaginable cadence.
    See the documentation for details.

What's Changed

Full Changelog: 0.21.1...0.22.0

0.21.1

30 May 18:32
2aaa325

Choose a tag to compare

Bug fixes

  • The dynamic_default date syntax for a relative number of weeks/months/years from the current date didn't work in the 0.21.0 release. We fixed that feature and changed the syntax to use w, m, and y for weeks, months, and years, respectively. This syntax is similar to how relative numbers of days are treated (for example, +5d for 5 days from now). Some examples:

    • dynamic_default: 1w for one week from now
    • dynamic_default: -2m for two months ago
    • dynamic_default: 3y for three years from now

    The promised syntax of dynamic_default: +1week from the 0.21.0 release is no longer supported. The week_end / week_start syntax still uses the full words rather than the first letter abbreviations.

What's Changed

Full Changelog: 0.21.0...0.21.1

0.21.0

29 May 18:41
2e1e6a8

Choose a tag to compare

New features

  • The new dayobs parameter type adds native support for Rubin Observatory's dayobs date format. The dayobs is a string, YYYYMMDD, corresponding to the date in the UTC-12 timezone. This convention is useful because it is a unique identifier for each observing night on Cerro Pachón, and it is used in the Rubin Observatory's data products. To use dayobs, create a parameter of type string with a format field set to dayobs.

    Note that the date format is different from dayobs in that it uses the ISO 8601 date format (YYYY-MM-DD) and is in the UTC timezone.

  • Date and dayobs parameters can now take a dynamic_default value, which causes the default value of that parameter to be a date relative to the date when the page is viewed. To use a dynamic default in a date parameter in a notebook's sidecar YAML file, replace the default field with dynamic_default. The dynamic default can be:

    • "today"
    • "yesterday"
    • "tomorrow"
    • A relative number of days earlier (e.g., "-5d" for 5 days ago) or later (e.g., "+3d" for 3 days in the future)
    • A relative number of weeks (e.g. "-2week" for 2 weeks ago), months (e.g. "+1month" for 1 month in the future), or years (e.g. "-1year" for 1 year ago)
    • The first day of the week/month/year ("week_start", "month_start", "year_start"), or a number of periods into the past or future (e.g., "-1week_start" for the start of previous week, "+1month_start" for the start of next month).
    • The last day of the week/month/year ("week_end", "month_end", "year_end"), or a number of periods into the past or future (e.g., "-1week_end" for the end of previous week, "+1month_end" for the end of next month).

Bug fixes

  • When an invalid ipynb file is added to a GitHub Check Run, Times Square now catches the error and reports it as a failure in the check run.

What's Changed

Full Changelog: 0.20.1...0.21.0

0.20.1

22 May 18:54
358ab5d

Choose a tag to compare

Bug fixes

  • In the times-square nbstripout command, commit to the database on each page migration. Without this, the migration failed when migrating large numbers of notebooks (~2000+).

What's Changed

Full Changelog: 0.20.0...0.20.1

0.20.0

22 May 16:25
921c683

Choose a tag to compare

New features

  • Times Square now pre-processes notebooks with nbstripout. This has two benefits:

    1. Nbstripout removes the kernelspec metadata from notebooks, which can cause issues when a notebook is made with a different kernel than the one that Times Square uses for notebook execution in the Rubin Science Platform. All notebooks now run under the lsst kernel.

    2. Nbstripout removes outputs from the notebooks, in cases where outputs are committed to their Git repository. This improves the performance for storing and transferring notebooks in the system.

    Although Times Square now uses nbstripout internally, it is still a good idea for authors to run nbstripout as a pre-commit hook in their own repositories to improve their own development processes.

  • The times-square nbstripout CLI command provides a way to migrate existing notebooks to the new stripped format by running nbstripout on all notebooks in the database.

Bug fixes

What's Changed

Full Changelog: 0.19.0...0.20.0

0.19.0

15 May 18:59
81d7f7c

Choose a tag to compare

Backwards-incompatible changes

  • This release requires a Alembic database migration (new Alembic revision is c617718eaf6b).

New features

  • Improved reporting of notebook execution errors in GitHub check runs.

    • Uncaught exceptions in the notebook now result in a failure of the GitHub check run. The exception message is included in the check run output.

    • For timeouts, we now distinguish between notebook execution timeouts and GitHub check run timeouts.

    • For internal noteburst errors, we now show the full exception class to help with debugging.

  • The notebook execution time is now reported in the GitHub check run output. This will help you understand what notebooks may be approaching their timeout limit.

  • Notebook execution timeouts are now configurable per notebook. In a notebook's sidecar file, set the timeout under the 'timeout' field. This value can be an integer or float (seconds), or a string with a time interval (e.g., '5m', '1h'). It not set or left to null, the default timeout is used (which is the previous behavior). Use this setting to decrease the timeout for notebooks that are known to run fast, or to attempt to increase the timeout for notebooks that are known to run slow. Notebooks still cannot exceed the timeout in the Noteburst service configuration.

Other changes

  • Adopt uv's dependency-groups and uv.lock for dependency management. This replaces the previous use of pip-tools compile to generate requirement/main.txt and dev.txt files of pinned dependencies.

What's Changed

Full Changelog: 0.18.1...0.19.0

0.18.1

06 Mar 16:33
e153941

Choose a tag to compare

Bug fixes

  • Fix date and datetime parameter support by adding the "format" key to the Pydantic model of the sidecar settings file for pages in GitHub.

What's Changed

  • DM-48923: Add "format" key to NotebookSidecarFile schema by @jonathansick in #96

Full Changelog: 0.18.0...0.18.1

0.18.0

06 Mar 16:32
69dd27b

Choose a tag to compare

Backwards-incompatible changes

  • Redis cache keys for page instance HTML models and noteburst job records use a new format based on the URL query string of page instances and display settings. Existing cached data will be ignored, but the new times-square migrate-html-cache command is available to migrate cached HTML pages in the old key format to the new one based on URL query strings.

  • The Jinja context for rendering templated Markdown cells now uses the native Python types rather than the string representation. This provides more flexibility for template authors to use these values in their templates. For example, a date parameter is a datetime.date object rather than a string. A boolean parameter is a bool rather than a string.

New features

  • Parameters can now have date and date-time JSON schema formats. In a notebook, these parameters are rendered as datetime.date and datetime.datetime objects, respectively.

  • Improved reliability of constructing URL query strings in the API by using the new PageParameterSchema classes in conjunction with the PageInstanceId class and NbHtmlKey classes.

  • A new times-square migrate-html-cache command is available to migrate cached HTML pages in the old key format to the new one based on URL query strings.

Bug fixes

  • Fix getting date_deleted from the pages database table.

Other changes

  • Update to Python 3.13
  • Adopt uv in the Docker image
  • New internal API for page parameters. Each parameter type is now backed by a subclass of PageParameterSchema. These types implement methods for casting to Python types, creating JSON-compatible values, query-string compatible values, and listing any Python imports needed to instantiate the native Python type.
  • Refactored interface models to the "storage" layer where possible, including the models for settings files in GitHub repositories and models for the GitHub API. This helps clarify the internal domain from external interfaces.

0.17.0

06 Feb 17:32
0.17.0
a958bd6

Choose a tag to compare

New features

  • GET /v1/github/rendered/{display_path} that returns a rendered GitHub-backed notebook template. This route provides the same functionality as GET /v1/pages/{page}/rendered, but finds the page based on its GitHub URL path. This is an additional path, all existing functionality, including the existing template rendering path, remains unchanged.

    We need to deploy Times Square to environments where some users should not have permissions to execute notebooks, but they should have permissions to render notebook templates for certain GitHub-based notebooks. This will let us configure that access via methods that apply permissions based on URL paths.

What's Changed

Full Changelog: 0.16.0...0.17.0