Skip to content

config homogenization #323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 6, 2025
Merged

config homogenization #323

merged 6 commits into from
Mar 6, 2025

Conversation

kylebarron
Copy link
Member

@kylebarron kylebarron commented Mar 6, 2025

API question: should there be multiple accepted values for each config value?

Today, you can pass region, aws_region, REGION or AWS_REGION to the config parameter (or as kwargs) and it all works the same (because the underlying Rust library allows all of these variants).

But I'm thinking that reading code where one person uses region, another uses aws_region, and another uses AWS_REGION is kinda confusing.

After all, the zen of python says:

There should be one—and preferably only one—obvious way to do it.

This PR makes the docs much simpler to reason about as well, as there are much fewer options.

The main remaining question is whether we should error on other (now undocumented variants) at runtime, or let it slide. For now, this PR does not yet error for those at runtime.

  • Update s3 config docs from s3 builder docstrings (same for google)
  • update env var supported names for s3 and google.

@@ -29,326 +26,52 @@ class AzureConfig(TypedDict, total=False):
```
"""

azure_storage_account_name: str
storage_account_name: str
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does feel a lot more natural (no azure_* prefix) 👍🏼

@kylebarron kylebarron merged commit 0f5b7fd into main Mar 6, 2025
4 checks passed
@kylebarron kylebarron deleted the kyle/config-homogenization branch March 6, 2025 19:39
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