Skip to content

Add project discovery - #22

Draft
C-Achard wants to merge 10 commits into
cy/project-layout-nodesfrom
cy/project-discovery
Draft

C-Achard wants to merge 10 commits into
cy/project-layout-nodesfrom
cy/project-discovery

Conversation

@C-Achard

@C-Achard C-Achard commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Read-only observation of a project on disk against the declared layout.
probe_path inspects one path and records filesystem facts (entry kind, symlink target, access errors) without verdicts.

discover_project walks the layout from the project root and returns an ObservedNode tree: each expected node with status, unclaimed entries classified as unknown resources, and unreadable directories with the error.
Symlinked directories are followed; loops are marked unreadable (SymlinkLoop) and not entered.

  • create_symlink_or_skip moves from tests/io/conftest.py to tests/conftest.py, since tests/project uses it too.
  • The observer and symlink tests that run on discovery alone land here; the rest need inspect_project.

@C-Achard
C-Achard added this pull request to stack #18 November 26, 2026 15:06
@C-Achard C-Achard changed the title cy/project discovery Add project discovery Nov 26, 2026
@C-Achard C-Achard added consumer: datajoint Needed by or affects the DataJoint pipeline consumer: deeplabcut Needed by or affects DeepLabCut consumer: napari Needed by or affects napari-deeplabcut validation Discovery, validation, findings and snapshots and removed consumer: deeplabcut Needed by or affects DeepLabCut consumer: napari Needed by or affects napari-deeplabcut consumer: datajoint Needed by or affects the DataJoint pipeline labels Nov 26, 2026
@C-Achard
C-Achard force-pushed the cy/project-discovery branch from 43175a6 to 459a35c Compare November 30, 2026 08:14
@C-Achard
C-Achard force-pushed the cy/project-discovery branch 2 times, most recently from 84f20cb to 51e9d8a Compare November 30, 2026 11:07
- Copy tests/discovery/test_observer.py without test_a_differently_cased_layout_directory_is_one_resource, and tests/discovery/test_symlinks.py without its eight inspection tests; both need inspect_project
Compare symlink targets by file identity rather than path spelling, while checking raw targets against readlink output. Update stat mocks and broken-link assertions accordingly.
Use resolved paths as a fallback for filesystem identity when inode IDs are unavailable, preserving directory cycle detection.
Cover file identity across links and path spellings, error cases, and discovery on filesystems without file IDs.
@C-Achard
C-Achard force-pushed the cy/project-discovery branch from 51e9d8a to ab83f96 Compare November 30, 2026 15:10
@C-Achard
C-Achard removed this pull request from stack #18 November 30, 2026 15:16
@C-Achard
C-Achard added this pull request to stack #42 November 30, 2026 15:16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validation Discovery, validation, findings and snapshots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant