APIs allow repeated capabilities to access attributes and methods that don't support them
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 128
- Forks
- 110
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 10
Description
Description of issue
As of nimi-python 1.4.7, the way repeated capabilities work is thus:
- When a
_RepeatedCapabilitiesobject, such asSession.channels, is accessed, it returns a_SessionBaseobject with_SessionBase.repeated_capabilityupdated, based on what's passed to index operator[]. - When setting an attribute or calling a method using a repeated capability,
_SessionBase.repeated_capabilityis passed to the method or SetAttribute method.
_SessionBase is one big collection of properties and methods that support repeated capabilities, with no distinction of which repeated capabilities are supported. As an example, the nifgen API will allow a user to set an attribute that supports the data_marker repeated capability with the script_trigger repeated capability. Because we allow this, the user may be puzzled when they get back an error.
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 reading the _RepeatedCapabilities and _SessionBase behavior described in the issue, using Session.channels and the nifgen data_marker and script_trigger examples as entry points. Determine how supported repeated capabilities are associated with attributes and methods, and consider the work done when unsupported combinations are rejected before producing a confusing API error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100