Reorganize ndi_common into src/ndi package structure#16
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR reorganizes the
ndi_commondirectory to be located within thesrc/ndipackage 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
src/ndi/ndi_common_find_ndi_root()insrc/ndi/common/__init__.pyto correctly locate the NDI root directory relative to the new package structuresrc/ndi/common/__init__.py→common→ndi(package root)MANIFEST.into reference files in the newsrc/ndi/ndi_commonlocationpyproject.tomlto remove explicit inclusion of/ndi_commonfrom the root (now included via/src)Implementation Details
_find_ndi_root()method now usesPath(__file__).parent.parentto navigate fromsrc/ndi/common/__init__.pydirectly to thesrc/ndipackage directoryndi_common/database_documentsto confirm the correct location has been foundndi_common(database documents, schemas, controlled vocabularies, example datasets, etc.) have been moved to their new location while maintaining the internal directory structurehttps://claude.ai/code/session_01NGmmNwo8UuRLbeuwEDGuDZ