Skip to content

Conversation

@dimitri-yatsenko
Copy link
Member

@dimitri-yatsenko dimitri-yatsenko commented Jan 9, 2026

Summary

This PR adds documentation for deferred schema activation and removes migrated tutorials from the archive.

New Documentation

Added How-To Guide: Deferred Schema Activation (docs/src/how-to/deferred-schema-activation.md):

  • When to use deferred activation (reusable modules, testing, multi-environment deployment)
  • Defining tables without immediate database connection
  • is_activated() check and activate() method usage
  • Examples for environment-based activation and test fixtures
  • Restrictions and edge cases

Archive Cleanup

Removed docs/src/archive/tutorials/ directory:

  • dj-top.ipynb - migrated to datajoint-docs
  • json.ipynb - migrated to datajoint-docs

Configuration Updates

  • Added datajoint.json and .secrets/ to .gitignore for local database credentials
  • Updated docs/mkdocs.yaml with How-To Guides navigation section

Test Plan

  • How-to guide reviewed against src/datajoint/schemas.py implementation
  • mkdocs build succeeds with new navigation

🤖 Generated with Claude Code

dimitri-yatsenko and others added 4 commits January 9, 2026 09:09
- Remove unused RowList and PrimaryKeyList type aliases
- Change list to list[Any] in Restriction type
- Use TYPE_CHECKING instead of 'if False:' for conditional import
- Remove redundant isinstance check in is_remote_url (type annotation guarantees str)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The from_json method can pass None for timestamp when it's missing
from the data, so the type annotation should be datetime | None.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Implements unified URL handling for all storage backends including local files:

- Add URL_PROTOCOLS tuple including file://
- Add is_url() to check if path is a URL
- Add normalize_to_url() to convert local paths to file:// URLs
- Add parse_url() to parse any URL into protocol and path
- Add StorageBackend.get_url() to return full URLs for any backend
- Add comprehensive unit tests for URL functions

This enables consistent internal representation across all storage types,
aligning with fsspec's unified approach to filesystems.

Closes #1326

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Update dj-top.ipynb and json.ipynb for 2.0 API changes:
  - Replace fetch("KEY") with keys()
  - Replace fetch(as_dict=True) with to_dicts()
  - Replace fetch(column) with to_arrays(column)
- Add schema cleanup at start of tutorials for re-runnability
- Add datajoint.json and .secrets/ to .gitignore for local config
- Add deferred schema activation how-to guide
- Update mkdocs.yaml with How-To Guides section

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@github-actions github-actions bot added enhancement Indicates new improvements documentation Issues related to documentation labels Jan 9, 2026
- dj-top.ipynb → datajoint-docs 04-queries.ipynb (dj.Top section)
- json.ipynb → datajoint-docs advanced/json-type.ipynb

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@dimitri-yatsenko
Copy link
Member Author

Closing without merge. This PR had several mistakes and the important functionality was re-implemented in #1328.

@dimitri-yatsenko dimitri-yatsenko deleted the docs-2.0-migration branch January 10, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Issues related to documentation enhancement Indicates new improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants