Skip to content

Unconventional src.babel_validation import path makes the library hard to use standalone #88

Description

@gaurav

Problem

pyproject.toml installs the package as src so all imports read from src.babel_validation.X import Y. This means:

  • If someone runs pip install babel-validation (or if this ever moves to a proper package), all import paths break.
  • The import style is unusual — standard src-layout convention installs the package as babel_validation directly.
[tool.hatch.build.targets.wheel]
packages = ["src"]  # ← installs as src.babel_validation, not babel_validation

Suggested Fix

Change packages = ["src/babel_validation"] (or use package-dir to remap) and update all imports from from src.babel_validation.X import Y to from babel_validation.X import Y. This is a significant rename that touches every file in src/ and tests/.

Why it was deferred

Identified during PR #67 review. Changing the import style in that PR would have been too large a scope change. Keeping as a follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions