Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add last_modified and created to settings and workspace API items #99

Merged
merged 5 commits into from
Jul 21, 2020

Conversation

bollwyvl
Copy link
Contributor

@bollwyvl bollwyvl commented Jul 21, 2020

Here's a minimal proposal for adding the fields mentioned in #98 to the various API routes for workspaces and settings.

  • A workspace may or may not have metadata.created or .last_modified, but if it appears, should always be an UTC ISO 8601 datetime.
    • since it gets PUT back, the user could modify the value, and it would be written to disk, but then overwritten when read back out. seems a little odd, but still okay
  • A settings item will always have both created and last_modified, and can be a UTC ISO 8601 datetime, or null in the event that the user hasn't created a settings file (otherwise, there was actually no way to know, as it always returns at least {} in raw).
    • this value is never written to disk

These both use the newly shimmed tz in server, but as this doesn't provide a way to parse UTC ISO strings, the tests now also use what jsonschema would use, strict-rfc3339... and indeed, it, and a few other packages, as runtime dependencies might provide better conformance to the JSON Schema spec.

Longer term... these handlers would probably benefit from some schema, which would go part of the way towards jupyterlab/jupyterlab#6013.

@bollwyvl
Copy link
Contributor Author

haha, no fromisoformat for me, py3.5/3.6!

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose more file metadata about disk-backed content
2 participants