Skip to content

Clean up settings#774

Open
AdrianSosic wants to merge 2 commits intomainfrom
refactor/settings
Open

Clean up settings#774
AdrianSosic wants to merge 2 commits intomainfrom
refactor/settings

Conversation

@AdrianSosic
Copy link
Copy Markdown
Collaborator

Applies two minor changes:

  • Bumps attrs to latest release, which allows to undo the alias workaround
  • Moves the factory function to the global scope (which I noticed is possible while working on the first point) to improve readability

@AdrianSosic AdrianSosic self-assigned this Mar 31, 2026
@AdrianSosic AdrianSosic marked this pull request as ready for review March 31, 2026 11:04
Copilot AI review requested due to automatic review settings March 31, 2026 11:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the project’s settings initialization to take advantage of a newer attrs release, removing a previous workaround around Attribute.alias handling and simplifying the default-factory logic used for environment-driven settings.

Changes:

  • Bump runtime dependency on attrs to >=26.1.0 (and update lockfile accordingly).
  • Refactor the per-field default factory builder into a module-level helper and remove the prior alias fallback workaround.
  • Align deprecation messaging / env-var translation to use fld.alias directly.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
uv.lock Locks attrs to 26.1.0 and updates the dev metadata constraint accordingly.
pyproject.toml Raises the minimum supported attrs version to >=26.1.0.
baybe/settings.py Moves the default-factory builder to global scope and relies on Attribute.alias directly for env var naming and deprecation guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Scienfitz Scienfitz added this to the 0.15.0 milestone Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants