scverse / scverse/scverse-misc
common options for scverse
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5
- Forks
- 2
- Avg merge
- 11h 10m
- Merged PRs (30d)
- 13
Description
To keep the discussion going: The first part (general settings base class) is now implemented, question is how we do the common options. I imagine something like a global settings class that subclasses the new
Settings, let's call itGlobalSettings, and aSCVERSE_GLOBALsentinel value. Using another base class inheriting fromSettings, let's call itPackageSettings, we can check on attribute access if a value is set toSCVERSE_GLOBALand return the global setting in that case, otherwise the actual value. Packages could then subclassPackageSettings.This scheme allows users to change settings for specific packages, but I'm not sure where
GlobalSettingsis supposed to live so user can change global settings as well. Putting it intoscverse-miscfeels weird, since this is mostly a developer-oriented package. So far I can see three options:
- have packages re-export the global settings instance
- make a new package just for this
- add a context manager to
PackageSettingsso users can do something likewith settings.set_global_settings: settings.n_jobs = 42
Originally posted by @ilia-kats in #8
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
No files or tests are named. Start by reviewing the existing Settings implementation and the linked discussion, then compare the proposed GlobalSettings, PackageSettings, sentinel, re-export, new-package, and context-manager options. Done means the project has an agreed design for common and package-specific settings, including where global settings live and how users change them.
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
- 30/100