Skip to content

IMPR: src layout #1267

Closed
Closed

Description

@d-v-b

Improvement Request

Move source code under the src prefix. I.e., instead of the source code being stored in datajoint , the source code would be stored in src/datajoint.

This is consistent with current best practices for python packaging because it ensures that tests do not accidentally pull in resources other than the built version of the software being tested.

Activity

  1. added
    enhancementIndicates new improvements
    triageIndicates issues, pull requests, or discussions need to be reviewed for the first time
    on Aug 28, 2025
  2. removed
    triageIndicates issues, pull requests, or discussions need to be reviewed for the first time
    on Aug 28, 2025
  3. github-actions commented on Oct 13, 2025

    @github-actions

    This issue is stale because it has been open for 45 days with no activity.

  4. added
    staleIndicates issues, pull requests, or discussions are inactive
    on Oct 13, 2025
  5. removed
    staleIndicates issues, pull requests, or discussions are inactive
    on Oct 16, 2025
  6. github-actions commented on Dec 1, 2025

    @github-actions

    This issue is stale because it has been open for 45 days with no activity.

  7. added
    staleIndicates issues, pull requests, or discussions are inactive
    on Dec 1, 2025
  8. removed
    staleIndicates issues, pull requests, or discussions are inactive
    on Dec 20, 2025
  9. dimitri-yatsenko commented on Jan 8, 2026

    @dimitri-yatsenko
    Member

    Resolved in DataJoint 2.0

    The source code has been moved to the src layout as requested.

    Current Structure

    datajoint-python/
    ├── src/
    │   └── datajoint/        # All source code
    │       ├── __init__.py
    │       ├── table.py
    │       ├── expression.py
    │       └── ...
    ├── tests/                 # Tests are separate from source
    │   ├── unit/
    │   └── integration/
    └── pyproject.toml
    

    pyproject.toml Configuration

    [tool.setuptools]
    packages = ["datajoint"]
    package-dir = {"" = "src"}

    This follows Python packaging best practices and ensures tests run against the installed package, not the local source directory.

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

Metadata

Metadata

Assignees

Labels

enhancementIndicates new improvements

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions