Skip to content

Conversation

@A-CGray
Copy link
Contributor

@A-CGray A-CGray commented Oct 2, 2025

Summary

The UnitCompBase class inspects the input arguments of ExplicitComponent.add_output to get the set of metadata that should be copied from its inputs to it's outputs. However, in OpenMDAO 3.40, this PR replaced most of the arguments of ExplicitComponent.add_output with **kwargs. This removes a bunch of entries from the copied metadata and results in several fields, including units not being copied to the outputs. I fixed this by simply inspecting the input arguments of Component.add_output instead.

Full disclosure, I have absolutely no idea how pyCycle works, or what exactly this UnitCompBase component does (other than converting the units of some variables to imperial). There may well be a much better way to do this.

Backwards incompatibilities

I tested this with OM 3.39 which is the last release before the change that necessitates this PR, and it is compatible.

New Dependencies

None

@A-CGray
Copy link
Contributor Author

A-CGray commented Oct 2, 2025

@Kenneth-T-Moore tagging you here because I can't assign a reviewer

@Kenneth-T-Moore
Copy link
Member

Hey @A-CGray . This looks good, so I'll merge it in as soon as it passes CI. Thanks for fixing it.

@Kenneth-T-Moore Kenneth-T-Moore merged commit 2d8ffbb into OpenMDAO:master Oct 15, 2025
4 checks passed
@A-CGray A-CGray deleted the OM340 branch October 15, 2025 13:34
@A-CGray
Copy link
Contributor Author

A-CGray commented Oct 15, 2025

Thanks Ken, could we get a new patch release with this fix?

@Kenneth-T-Moore
Copy link
Member

Thanks Ken, could we get a new patch release with this fix?

Sure, we are overdue for a release.

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.

2 participants