ni / ni/nimi-python

Repeated capability tip in docstring should not depend on method's parameter metadata

Open
#1,342 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Python
Stars
128
Forks
110
Avg merge
5d 14h
Merged PRs (30d)
10

Description

Description of issue

Currently, Repeated capability tip is generated in docstring based on whether method contains channel-related parameters or presence of repeated_capability_type in parameter metadata or 'channel_based': True in attribute metadata.

Certain, fancy functions (e.g. get_site_pass_fail) don't deal with the repeated capability directly, but rather call other methods that deal with it. In these cases, it's not accurate for the method metadata to include rep-cap based parameter, but including it is the only way to generate the rep cap tip in docstring. We need to figure out a solution to decouple these two things.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading build/helper/metadata_add_all.py at the channel-related parameter logic, then inspect src/nidigital/templates/session.py/fancy_get_site_pass_fail.py.mako and the generated docstring behavior. Trace how the repeated capability tip is selected and define a way for methods such as get_site_pass_fail to receive the tip without artificial parameter metadata; done means the tip remains accurate for these fancy functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.