feat: move scanpipe settings to local settings.py with lazy resolutio…#2187
feat: move scanpipe settings to local settings.py with lazy resolutio…#2187tdruez wants to merge 5 commits into
Conversation
…n and SCANPIPE dict override Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
|
Some notes when using this branch of scio in purldb:
|
…canpipe pipes Signed-off-by: tdruez <tdruez@aboutcode.org>
Dependency on taggit removed in #2189
Ive updated the code in ac93c1d so you do not have to defined those in your main settings.
The dependency on
Could you confirm why exact version is running? |
Signed-off-by: tdruez <tdruez@aboutcode.org>
…n and SCANPIPE dict override
Issues
Changes
Move all scanpipe app-level settings out of scancodeio/settings.py into a new scanpipe/settings.py module. This makes scanpipe usable as a standalone library in other Django apps without requiring the host to copy dozens of settings.
The new module exposes a single scanpipe_settings object that resolves each value lazily in order: SCANPIPE dict in Django settings, then the SCANCODEIO_ environment variable, then the built-in default. Tests use override_settings(SCANPIPE={"KEY": value}) instead of flat SCANCODEIO_KEY overrides, which works automatically via Django's setting_changed signal.
scancodeio/settings.py now only contains infrastructure settings that Django needs at boot time: database, Redis, logging, REST framework configuration.