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

Module: Fix enrichment of type info via Module imports #448

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

mlange05
Copy link
Collaborator

This addresses issue #428 . Many thanks to @wertysas for the excellent reproducer and test

The problem was essentially that we would drop type info for subroutines if the info enrichment came though type imports on the parent Module. This is easily fixed by including parent imports in the enrichment loop over Imports.

I took the opportunity to also clean up the import on test_module.py in the process.

Type info gets attached via updated imports, and we would only
consider local imports. By including parent imports, we now get
type infor attached, even if the import lives in the parent module.
Copy link

Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/448/index.html

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.20%. Comparing base (bcef931) to head (83222f4).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #448   +/-   ##
=======================================
  Coverage   93.19%   93.20%           
=======================================
  Files         219      219           
  Lines       40908    40929   +21     
=======================================
+ Hits        38126    38147   +21     
  Misses       2782     2782           
Flag Coverage Δ
lint_rules 96.39% <ø> (ø)
loki 93.15% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Collaborator

@reuterbal reuterbal left a comment

Choose a reason for hiding this comment

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

Fantastic, many thanks for the excellently described issue @wertysas and neat fix @mlange05!

@reuterbal reuterbal added the ready for merge This PR has been approved and is ready to be merged label Nov 24, 2024
@reuterbal reuterbal merged commit b93a01d into main Nov 25, 2024
13 checks passed
@reuterbal reuterbal deleted the naml-fix-module-enrichment branch November 25, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for merge This PR has been approved and is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enrichment of module fails to update the TypeDef information of imported types
2 participants