scverse / scverse/scverse-misc

Make `Settings` attributes warn on *assign*, not on *access* (or reset)

Open
#89 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5
Forks
2
Avg merge
11h 10m
Merged PRs (30d)
13

Description

Description of feature

Settings get read internally and assigning them is the user facing API.

Therefore pydantic’s behavior of warning on access (which is also triggered by reset btw.) but not on assignment doesn’t fit and we should change that.

This tripped up @ilan-gold and me in https://github.com/scverse/anndata/pull/2643

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Settings implementation and its pydantic integration, then inspect how attribute access, assignment, and reset currently trigger warnings. Update the behavior so user-facing assignment warns while internal reads and reset do not, and add or adjust tests to verify each case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.