Skip to content

Reorganize ndi_common into src/ndi package structure#16

Merged
stevevanhooser merged 1 commit into
mainfrom
claude/debug-dataset-download-HfaEz
Mar 11, 2026
Merged

Reorganize ndi_common into src/ndi package structure#16
stevevanhooser merged 1 commit into
mainfrom
claude/debug-dataset-download-HfaEz

Conversation

@stevevanhooser

Copy link
Copy Markdown
Contributor

Summary

This PR reorganizes the ndi_common directory to be located within the src/ndi package structure (src/ndi/ndi_common) instead of at the repository root. This change aligns the package layout with modern Python packaging standards and improves the project structure.

Key Changes

  • Moved ndi_common directory: Relocated from repository root to src/ndi/ndi_common
  • Updated NDI root discovery logic: Simplified _find_ndi_root() in src/ndi/common/__init__.py to correctly locate the NDI root directory relative to the new package structure
    • Changed from searching multiple possible locations to a single, direct path calculation
    • Updated path traversal: src/ndi/common/__init__.pycommonndi (package root)
    • Removed unnecessary fallback logic for multiple possible paths
  • Updated build configuration:
    • Modified MANIFEST.in to reference files in the new src/ndi/ndi_common location
    • Updated pyproject.toml to remove explicit inclusion of /ndi_common from the root (now included via /src)

Implementation Details

  • The _find_ndi_root() method now uses Path(__file__).parent.parent to navigate from src/ndi/common/__init__.py directly to the src/ndi package directory
  • Validation checks for the existence of ndi_common/database_documents to confirm the correct location has been found
  • All 400+ files in ndi_common (database documents, schemas, controlled vocabularies, example datasets, etc.) have been moved to their new location while maintaining the internal directory structure

https://claude.ai/code/session_01NGmmNwo8UuRLbeuwEDGuDZ

The ndi_common directory (containing database_documents, schema_documents,
and other shared resources) was at the repo root, outside the wheel build
target of src/ndi/. This meant pip-installed copies of NDI could not find
document definitions at runtime, causing a ValueError in
PathConstants._find_ndi_root().

- Move ndi_common/ to src/ndi/ndi_common/
- Simplify _find_ndi_root() to look for ndi_common as a sibling inside
  the ndi package directory (parent.parent from common/__init__.py)
- Update MANIFEST.in and pyproject.toml sdist includes

https://claude.ai/code/session_01NGmmNwo8UuRLbeuwEDGuDZ
@stevevanhooser stevevanhooser merged commit 15581c1 into main Mar 11, 2026
4 checks passed
@stevevanhooser stevevanhooser deleted the claude/debug-dataset-download-HfaEz branch March 11, 2026 19:32
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.

2 participants