Allow `cls` to be a string of type class name in `DataStore._is_subclass()`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 253
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
Currently DataStore._is_subclass(type_name, cls) require input argument cls to be an entry class. We also want it to support string of fully qualified name of the entry (e.g., "forte.data.ontology.top.Annotation").
Describe the solution you'd like
Maybe add some type checking for cls and convert it to a class using get_class() when it's a string.
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 in forte/data/data_store.py at DataStore._is_subclass(type_name, cls), then inspect the existing get_class() utility. Support fully qualified entry class names such as "forte.data.ontology.top.Annotation" while preserving class inputs, and verify that both forms produce the expected subclass check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100