Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parameter rosette_meas_types type in docstrings #511

Merged

Conversation

WayneDroid
Copy link
Collaborator

@WayneDroid WayneDroid commented Feb 21, 2024

What does this Pull Request accomplish?

Added 'python_codegen_method': 'CustomCode' to CreateAIRosetteStrainGageChan in order to update parameter rosette_meas_types type in the function.

Why should this Pull Request be merged?

This PR is to address issue #483.

What testing has been done?

image

Copy link
Collaborator

@zhindes zhindes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is either a gap in our support for arrays of enumerations or some sort of issue with this specific function definition in the metadata. I want to say we have array of enums somewhere else in the API, so I think maybe the metadata is bad?

generated/nidaqmx/_task_modules/ai_channel_collection.py Outdated Show resolved Hide resolved
@zhindes
Copy link
Collaborator

zhindes commented Feb 21, 2024

This is either a gap in our support for arrays of enumerations or some sort of issue with this specific function definition in the metadata. I want to say we have array of enums somewhere else in the API, so I think maybe the metadata is bad?

My point here is I don't think just no longer code-generating rosette is correct. I think there is a metadata problem.

@bkeryan
Copy link
Collaborator

bkeryan commented Feb 21, 2024

This is either a gap in our support for arrays of enumerations or some sort of issue with this specific function definition in the metadata. I want to say we have array of enums somewhere else in the API, so I think maybe the metadata is bad?

My point here is I don't think just no longer code-generating rosette is correct. I think there is a metadata problem.

I think rosette_meas_types = numpy.int32(rosette_meas_types) is generated based on get_instantiation_lines:

instantiation_lines.append(

It has a special case for enum arrays, so yeah, I think the metadata for this parameter is wrong.

Copy link
Collaborator

@bkeryan bkeryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with suggestions (revert or delete private method's docstring)

Sorry, the review was in pending for a couple days because I forgot to submit it.

@WayneDroid WayneDroid force-pushed the users/waynedroid/fix_rosette_meas_types branch from abc47bc to fa31caa Compare March 8, 2024 01:52
@WayneDroid WayneDroid merged commit 0f65354 into ni:master Mar 12, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants