inducer / inducer/relate

Simplify configuration flow

Open
#716 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
435
Forks
124
Avg merge
5h 40m
Merged PRs (30d)
14

Description

One source of unexpected bugs in testing was unpredictable settings files chosen (specifically the special casing for `get_local_test_settings_file` in `manage.py`. One way I have dealt with this in other django programs was to use other packages to organize settings in a more extensible fashion.

Some options (from least to most involved):
* [django-environ](https://pypi.org/project/django-environ/) - Pull configuration from environment variables. This would make testing relate with different DBs etc... a lot simpler, and make it much easier to run from a container without needing to override settings files. This could add the option to distribute a Relate docker image that you could run directly without needing to setup your own python environment or webserver
* [django-split-settings](https://pypi.org/project/django-split-settings/) - Split settings classes up into different files. This would allow pulling large configuration chunks like saml into their own files to make it easier for a new user to setup their server with customization without worrying about parts that don't apply to them.
* [django-customizations](https://pypi.org/project/django-configurations/) - Use class based settings options. A user's configuration could inherit from the base settings, test settings could inherit from a shared testing class, etc...

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with manage.py and its special-cased get_local_test_settings_file path to understand how settings are selected during tests. Compare that flow with the django-environ, django-split-settings, and django-configurations approaches listed in the issue, then establish which approach is wanted. Done should mean predictable test configuration and a clearly defined, easier-to-customize deployment setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, docker, python
Domain
backend, devops, testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.