Skip to content

3461 duplicated script names#3468

Open
hiker wants to merge 3 commits into
masterfrom
3461_duplicated_script_names
Open

3461 duplicated script names#3468
hiker wants to merge 3 commits into
masterfrom
3461_duplicated_script_names

Conversation

@hiker

@hiker hiker commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Fixes #3461.

@hiker

hiker commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

I've fixed the unit test failures by slightly changing the test (instead of setting sys.path, I chdir into the script directory).

We do get additional failure in example, since without modifying sys.path, helper scripts in the same directory as the psyclone scripts are NOT found anymore (unless you set PYTHONPATH=.). We could still modify sys.path in generator.py to accommodate that use case, I have started the CI to see if nemo/lfric relies on this.

…orting helper scripts, but clean up sys.pathin the end.
@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 99.99%. Comparing base (2d08da6) to head (ab86dd3).

❌ Your project check has failed because you have indirect coverage changes. Learn more about Unexpected Coverage Changes and reasons for indirect coverage changes.

Additional details and impacted files
@@             Coverage Diff             @@
##            master    #3468      +/-   ##
===========================================
- Coverage   100.00%   99.99%   -0.01%     
===========================================
  Files          395      395              
  Lines        55199    55205       +6     
===========================================
+ Hits         55199    55204       +5     
- Misses           0        1       +1     

☔ 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.

@hiker

hiker commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

Failures in one example and nemo (lfric is fine) indicate that we should modify sys.path when importing and executing a script (so that helper scripts in the same directory as the script are found). That was done in ab86dd3, so once I've updated the documentation this should be ready to go.

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.

Import scripts with the same name more than once (and sys.path growing)

1 participant