scverse / scverse/scverse-misc
Allow per-package configuration of `category`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5
- Forks
- 2
- Avg merge
- 11h 10m
- Merged PRs (30d)
- 13
Description
Description of feature
One idea I had: the default of FutureWarning across the board is good for our usual use case (=libraries that are usually used directly and not by other libraries), but it’s inconvenient to override, as you’d want to override it on a (toplevel import or distribution) package level.
I wonder if we could introduce a new default for the category args. If we at any point introduce a non-declarative API that raises a warning, we could also use that to set the default skip_file_prefixes.
E.g. directly in the body of the function, this would get the caller module name: inspect.getmodule(inspect.stack()[1].frame).__name__
The only issue would be if anyone wraps our decorator, as that would mean the call site is wherever the wrapper is defined.
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 decorator that accepts the category argument and review how warning defaults are currently selected. Investigate the proposed package-level configuration and the interaction with skip_file_prefixes, including wrapped decorators. Done means the configuration behavior and caller-resolution edge cases are specified and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100