Skip to content

Control over Fortran file extensions recognised by ModuleManager#3469

Open
mn416 wants to merge 6 commits into
masterfrom
mn416-fortran-file-exts
Open

Control over Fortran file extensions recognised by ModuleManager#3469
mn416 wants to merge 6 commits into
masterfrom
mn416-fortran-file-exts

Conversation

@mn416

@mn416 mn416 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Basic stuff, but I started using PSyclone in a code base with .f95 files and wondered why imports were not getting resolved. Turns out that ModuleManager has a limited set of harded coded file extensions that doesn't include .f95 so this PR adds the ability to add/remove Fortran file extensions recognised by ModuleManager. It also abstracts out a commonly used "doesn't need preprocessing" check into a method, which makes the code a bit cleaner.

Edit: I believe these changes preserve existing behaviour exactly; they just introduce methods to allow modification of the default settings.

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4216b9a) to head (636f73c).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3469   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          395       395           
  Lines        55199     55228   +29     
=========================================
+ Hits         55199     55228   +29     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LonelyCat124 LonelyCat124 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@mn416 This mostly seems fine - I have one slight request to change the defaults as well. I will set the ITs running after that.

Comment thread src/psyclone/parse/module_manager.py Outdated
@mn416

mn416 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @LonelyCat124. Change made.

@LonelyCat124

Copy link
Copy Markdown
Collaborator

Setting ITs running and then will proceed to merge unless they flag any issues.

@LonelyCat124 LonelyCat124 deployed to integration June 29, 2026 10:44 — with GitHub Actions Active
@LonelyCat124 LonelyCat124 added ready to be merged Blocked An issue/PR that is blocked by one or more issues/PRs. and removed ready for review labels Jun 29, 2026

@LonelyCat124 LonelyCat124 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ready to merge once the new release is done.

@LonelyCat124 LonelyCat124 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One minor change requested actually.

if not isinstance(exts, set):
raise TypeError(
f"'fortran_file_exts' must be a set, but found "
f"{type(exts).__name__}")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Actually @mn416 one minor formatting thing - would you mind adjust this to

raise TypeErrror(
    f"...."
    f"...."
)

before I merge? I can't merge this until after our release anyway

@LonelyCat124 LonelyCat124 added reviewed with actions and removed ready to be merged Blocked An issue/PR that is blocked by one or more issues/PRs. labels Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants