Releases: lsst-sqre/times-square
0.23.0
Backwards-incompatible changes
-
The
dayobsparameter format now creates an int value in the notebook rather than a string. For example,mydate = 20250115instead ofmydate = '20250115'. This is a better match for the DayObs metadata standard described in SITCOMTN-032.Any early adopters of the
dayobsformat will need to update their notebooks. Also consider using the newdayobs-dateformat instead.
New features
- Added a new
dayobs-dateparameter format. This is similar to the originaldayobsformat in the use of the UTC-12 timezone, but expects dates in theYYYY-MM-DDformat and assigns the parameters asdatetime.datevalues in the notebook. Although this is not the standard usage ofdayobs, it should be useful for many applications because the ISO 8601 string format is more readable and thedatetime.datetype is more convenient to use in Python code.dayobs-dateworks with dynamic defaults likedayobsand standarddateformats.
What's Changed
- Bump python from 3.13.3-slim-bookworm to 3.13.4-slim-bookworm by @dependabot in #109
- DM-51345: Update DayObs parameter formats by @jonathansick in #110
Full Changelog: 0.22.0...0.23.0
0.22.0
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
scheduleandschedule_enabledkeys. 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
- DM-51103: Implement scheduled page runs by @jonathansick in #108
Full Changelog: 0.21.1...0.22.0
0.21.1
Bug fixes
-
The
dynamic_defaultdate 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 usew,m, andyfor weeks, months, and years, respectively. This syntax is similar to how relative numbers of days are treated (for example,+5dfor 5 days from now). Some examples:dynamic_default: 1wfor one week from nowdynamic_default: -2mfor two months agodynamic_default: 3yfor three years from now
The promised syntax of
dynamic_default: +1weekfrom the 0.21.0 release is no longer supported. Theweek_end/week_startsyntax still uses the full words rather than the first letter abbreviations.
What's Changed
- Add a prompt template for updating dependencies by @jonathansick in #106
- DM-51083: Fix handling of relative days/weeks/years by @jonathansick in #107
Full Changelog: 0.21.0...0.21.1
0.21.0
New features
-
The new
dayobsparameter type adds native support for Rubin Observatory'sdayobsdate format. Thedayobsis 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 usedayobs, create a parameter of typestringwith a format field set todayobs.Note that the
dateformat is different fromdayobsin that it uses the ISO 8601 date format (YYYY-MM-DD) and is in the UTC timezone. -
Date and
dayobsparameters can now take adynamic_defaultvalue, 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 thedefaultfield withdynamic_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
- Add link to Grafana dashboard for usdf-prod by @jonathansick in #103
- DM-51083: Implement relative defaults for date parameters by @jonathansick in #104
Full Changelog: 0.20.1...0.21.0
0.20.1
Bug fixes
- In the
times-square nbstripoutcommand, commit to the database on each page migration. Without this, the migration failed when migrating large numbers of notebooks (~2000+).
What's Changed
- DM-51015: Commit database while running nbstripout by @jonathansick in #102
Full Changelog: 0.20.0...0.20.1
0.20.0
New features
-
Times Square now pre-processes notebooks with nbstripout. This has two benefits:
-
Nbstripout removes the
kernelspecmetadata 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 thelsstkernel. -
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 nbstripoutCLI command provides a way to migrate existing notebooks to the new stripped format by runningnbstripouton all notebooks in the database.
Bug fixes
- Fixed the capitalization of the
lsstkernel name. Previously it wasLSST, which is the display name, but not the kernel name. This is relevant now that Noteburst uses the specified kernel name to run notebooks.
What's Changed
- Add monitoring dashboard and logging links by @jonathansick in #100
- DM-51015: Add nbstripout for notebook output stripping by @jonathansick in #101
Full Changelog: 0.19.0...0.20.0
0.19.0
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
- DM-46313: Adopt uv dependency groups and lockfile by @jonathansick in #97
- Bump astral-sh/setup-uv from 5 to 6 by @dependabot in #99
- DM-46313: Improve GitHub PR check run reporting by @jonathansick in #98
Full Changelog: 0.18.1...0.19.0
0.18.1
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
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-cachecommand 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.dateobject rather than a string. A boolean parameter is aboolrather than a string.
New features
-
Parameters can now have
dateanddate-timeJSON schema formats. In a notebook, these parameters are rendered asdatetime.dateanddatetime.datetimeobjects, respectively. -
Improved reliability of constructing URL query strings in the API by using the new
PageParameterSchemaclasses in conjunction with thePageInstanceIdclass andNbHtmlKeyclasses. -
A new
times-square migrate-html-cachecommand 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_deletedfrom 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
New features
-
GET /v1/github/rendered/{display_path}that returns a rendered GitHub-backed notebook template. This route provides the same functionality asGET /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