Skip to content

BUG : Hardcoded Paths Limit Environment Portability #38

@CodeMaverick-143

Description

@CodeMaverick-143

The codebase contains hardcoded paths that assume a specific environment (likely the original developer's machine or a specific server). This prevents the package from being installed and run successfully on other systems without manual modification.

Image

Suggested Fix

  • Use Platform-Independent Paths: Utilize os.path.expanduser("~") to default to the user's home directory, or use libraries like appdirs or pathlib to determine appropriate application data directories.
  • Environment Variables: Allow these paths to be overridden via environment variables (e.g., SAFAA_MODEL_DIR).
  • Relative Paths: Ensure relative paths are calculated robustly relative to the package installation location, not just the script location.

Versions

OS: All (Issue is cross-platform but specific to the hardcoded path structure)

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