mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-26 01:26:00 +03:00
[PR #542] [CLOSED] Settings refactor using dynaconf #2724
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#2724
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/542
Author: @cdvv7788
Created: 11/19/2020
Status: ❌ Closed
Base:
master← Head:dynaconf📝 Commits (3)
f485f5dfeat: install dynaconf in the project68689a5feat: Move wget to a module with its own config41b23f6feat: Very rough draft of settings re-structuring for the wget extractor📊 Changes
7 files changed (+69 additions, -37 deletions)
View changed files
📝
.gitignore(+2 -0)📝
archivebox/config.py(+8 -0)📝
archivebox/extractors/wget/__init__.py(+16 -37)➕
archivebox/extractors/wget/config.py(+31 -0)➕
archivebox/extractors/wget/settings.toml(+1 -0)➕
archivebox/settings.toml(+10 -0)📝
setup.py(+1 -0)📄 Description
Summary
Replace the current config structure with a tiered architecture to ease readability and composability of the configurations around the application.
In this case there are several options:
I went with the second option, because it is less traumatic at this point. There are a lot of values that are calculated at runtime, so it is not as easy as dropping some config files and get done with it. If we are still going to require some logic to calculate some
args, at least now we can keep them contained in the config files (mostly). For example, to calculate the version of some binaries, that is done at the upper level. We cannot just inherit it as a plain setting. We could move all of the configurations that require these calculations down to the extractors, but that would make this refactor way bigger.So far, the
wgetextractor seems to work with this new structure. It is now on its own module with its own settings, and the logic dedicated to generate the flags to pass to the command is in the configuration script now. The actual extractor looks simpler now. There are some hardcoded values that will need to be replaced if we decide we want to keep going this way.Changes these areas
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.