292 fab pfunit#323
Conversation
…nfiguration to compile skeleton.
… build system and scripts.
…cific flags in order to only suppress for one file).
… link without openmp.
…pport, trying to use no-omp)
|
I've modified this PR to assume that the pfunit tool will be provided by Fab, and that Fab supports external declarations. While updating Fab's FabBase class based on the code reviews in lfric_core and um (fab ticket #544), the 'root_symbol' usage was renamed to Additionally, I discovered that the testing of the LFRicBase class in #240 was totally broken (luckily only the tests were not updated, the class itself was fine), I've fixed all the failing tests as well. I also noticed that lfric does not compile without openmp (some psykal lite files contain omp calls without sentinels, so it will cause compile time and/or linking errors. I have added a test to abort early if a user tries to disable OpenMP (ideally, we would want to just disable this command line flag, which is handled in FabBase - but afaik argparse does not provide an official way of removing command line options 😢 |
|
Matthew Hambley (@MatthewHambley), Sam Clarke-Green (@t00sa) - ready for a first review. Though it might be preferable to first handle the three required Fab updates (in case that they will require a change in the implementation, which could affect this PR):
|
Matthew Hambley (MatthewHambley)
left a comment
There was a problem hiding this comment.
Only a couple of minor issues.
| ): | ||
|
|
||
| self._apps_dir = apps_dir | ||
| # Will be set to true if a unit-test directory is found |
There was a problem hiding this comment.
This comment doesn't seem to reflect the preceding line. Is it left over from earlier development?
There was a problem hiding this comment.
Oops, indeed.
| raise RuntimeError(msg) from err | ||
|
|
||
| @property | ||
| def apps_dir(self) -> Path: |
There was a problem hiding this comment.
I think the plural "apps" is confusing here due to common reference to the "apps repository," which this isn't directly related to. The singular app_dir would seem to make sense, since there's only one of it.
This name crops up all over the place but hopefully a search and replace will fix it.
There was a problem hiding this comment.
I've renamed it everywhere.
|
Ready for next review. |
…in the Fab review.
…ince sys.path is not inherited by child processes (as which all tools run).
PR Summary
Sci/Tech Reviewer:
Code Reviewer: Matthew Hambley (@MatthewHambley)
As discussed, this PR adds a mixin class that enables building of PFUnit-tests. It adds support to the skeleton app.
Code Quality Checklist
Testing
All N/A - this change does not integrate with cylc yet. Local builds have been successful.
Building skeleton with (and without) testing is now possible.
trac.log
N/A
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review