scverse / scverse/scverse-misc
Make `Settings` attributes warn on *assign*, not on *access* (or reset)
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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