Skip to content

Conversation

@Noaman-Akhtar
Copy link
Contributor

Description

  • Created a centralized config_paths.py module with helper functions for config file paths
  • Updated 6 existing files to use the new centralized path functions instead of hardcoded paths
  • All config files now respect the CONFIG_DATADIR environment variable (already set in docker-compose.yml)
  • Maintains backward compatibility when CONFIG_DATADIR is not set

This PR fixes #3302

Notes for Reviewers

  • This builds on the work from PR Allow default config to be read from a file #3314 which introduced CONFIG_DATADIR
  • Files changed:
    • augur/application/config_paths.py (NEW)
    • augur/application/db/engine.py
    • augur/application/cli/init.py
    • augur/application/cli/db.py
    • augur/tasks/git/util/facade_worker/facade_worker/config.py
    • augur/api/view/init.py
    • scripts/install/wizard.py
  • When CONFIG_DATADIR is set (e.g., /config in Docker), config files are read from that directory
  • When not set, defaults to current directory for backward compatibility

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Noaman-Akhtar <akhtarnoaman@gmail.com>
Signed-off-by: Noaman-Akhtar <akhtarnoaman@gmail.com>
@Noaman-Akhtar
Copy link
Contributor Author

The remaining pylint errors (undefined-variable in db.py and unused imports in wizard.py) are pre-existing issues in the codebase, not introduced by this PR. Happy to fix them if you'd like, or they can be addressed in a separate PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Store config files in the same place

1 participant