Skip to content

feat: Enable more flexible Secret root dir behavior.#6

Merged
DanCardin merged 1 commit intomainfrom
dc/flexible-secret
Sep 29, 2025
Merged

feat: Enable more flexible Secret root dir behavior.#6
DanCardin merged 1 commit intomainfrom
dc/flexible-secret

Conversation

@DanCardin
Copy link
Copy Markdown
Owner

#5

@rafalkrupinski
Copy link
Copy Markdown

hi, any chance to marge it?

@DanCardin
Copy link
Copy Markdown
Owner Author

i definitely forgot about this, sorry! I can take at rebasing and making sure the strat makes sense tomorrow morning hopefully

@DanCardin
Copy link
Copy Markdown
Owner Author

loader = Secret.load_with(dir="whatever")
# or 
loader = Secret.load_with(dir=("whatever", "else"))

load_settings(Settings, extra_loaders=loader)

would be the interface this pr lands on.

extra_loaders= being an extension/override of previously loaded default loaders (or loaders= replacing it entirely).

If you could test the PR before I merge, that'd be ideal. to make sure it addresses the OP

@DanCardin DanCardin marked this pull request as ready for review September 26, 2025 17:07
@rafalkrupinski
Copy link
Copy Markdown

rafalkrupinski commented Sep 28, 2025

How come no test uses loaders or extra_loaders args of load_settings? Is there some magic in tests? missed it, I was still on main branch :D

@rafalkrupinski
Copy link
Copy Markdown

Looks great, seems working 👍

@rafalkrupinski
Copy link
Copy Markdown

BTW, it's easier to review changes when changing the code and moving it between files is done in separate commits

@DanCardin DanCardin merged commit 20aab89 into main Sep 29, 2025
12 checks passed
@DanCardin DanCardin deleted the dc/flexible-secret branch September 29, 2025 18:29
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.

2 participants