Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TDD Guard project root path should be relative or configurable via environment variable #68

@MPietrala

Description

@MPietrala

Description:

The tdd-guard-pytest library currently requires a hardcoded absolute path for the project root in pyproject.toml:

[tool.pytest.ini_options]
tdd_guard_project_root = "/absolute/path/to/project"

Problem:
This makes projects using TDD Guard non-portable across different developers' machines and deployment environments. Anyone cloning a repository with TDD Guard will need to manually update this path to match their local setup.

Proposed Solutions:

  1. Support relative paths (preferred):

    [tool.pytest.ini_options]
    tdd_guard_project_root = "../"

    Allow relative paths from the location of pyproject.toml

  2. Environment variable support:

    [tool.pytest.ini_options]
    tdd_guard_project_root = "${TDD_GUARD_PROJECT_ROOT:../}"

    With fallback to relative path if env var not set

  3. Auto-detection:
    Automatically detect project root by finding .git directory, pyproject.toml, or other marker files

Expected Behavior:
TDD Guard should work out of the box for any developer who clones a repository without requiring manual configuration changes to absolute paths.

Current Impact:

  • Blocks new developers from running tests immediately after clone
  • Creates merge conflicts when different developers update the path
  • Breaks CI/CD if build environments use different paths
  • Makes sharing TDD Guard configurations impossible without manual edits

Environment:

  • tdd-guard-pytest version: 0.1.2
  • Python version: 3.10+
  • Operating System: Linux (but affects all platforms)

Additional Context:
This issue affects any team trying to adopt TDD Guard in a collaborative development environment. The current design assumes single-developer usage with fixed filesystem layouts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions