ni / ni/nimi-python

Spurious "Referenced value not in API" text is getting added to documentation

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

Nobody has claimed this yet.

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

Description

Description of issue

Spurious text:

One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.

is getting added to documentation, for enums values that are duplicated.

Instances of spurious text:

  1. https://github.com/ni/nimi-python/blob/3d5d7ecfbf8836aefe610c03f29e247572a282ef/generated/nifgen/nifgen/session.py#L2139
  2. Two instances in docsting of send_software_edge_trigger in nidigital - https://github.com/ni/nimi-python/blob/ed4091d8c29d2117d345eb6e73fad1b1a58f8911/generated/nidigital/nidigital/session.py#L3141

The reason is some enum values (like NIDIGITAL_VAL_START_TRIGGER, NIFGEN_VAL_START_TRIGGER are present in two different enum types in metadata) and code generator is designed to flag such cases.

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 with build/helper/documentation_helper.py around line 276, then compare the generated documentation in generated/nifgen/nifgen/session.py and generated/nidigital/nidigital/session.py. Trace how duplicated enum values are handled and verify that regenerating the affected documentation no longer adds the “Referenced value not in API” text.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.