Fix/report Python3 decoding errors, parse all suites if --suites=... argument not present#292
Merged
climbfuji merged 1 commit intoMay 12, 2020
Conversation
… decoding non-ascii files in scripts/metadata_parser.py, parse all suite definition files if suites argument is not present when calling ccpp_prebuild.py
This was referenced May 11, 2020
Merged
gold2718
approved these changes
May 12, 2020
Collaborator
gold2718
left a comment
There was a problem hiding this comment.
Not sure about some of the design decisions but seems okay.
Comment on lines
+164
to
+176
| def get_all_suites(suites_dir): | ||
| success = False | ||
| logging.info("No suites were given, compiling a list of all suites") | ||
| sdfs = [] | ||
| for f in os.listdir(suites_dir): | ||
| match = SUITE_DEFINITION_FILENAME_PATTERN.match(f) | ||
| if match: | ||
| logging.info('Adding suite definition file {}'.format(f)) | ||
| sdfs.append(f) | ||
| if sdfs: | ||
| success = True | ||
| return (success, sdfs) | ||
|
|
Collaborator
There was a problem hiding this comment.
This seems like a lot of work to do instead of something like:
sdfs = glob.glob(suite_dir, "suite_*.xml")
Collaborator
Author
There was a problem hiding this comment.
That's right ... when I was making those changes I wasn't sure whether I needed to get the suite name (which comes for free as match.group(1) with my approach) or not. Turned out I didn't.
In any case, even the more expensive approach costs probably less than a tenth of a second, so that should be ok.
grantfirl
approved these changes
May 12, 2020
Collaborator
grantfirl
left a comment
There was a problem hiding this comment.
This looks good to me. Approved.
Collaborator
Author
|
@JulieSchramm @ligiabernardet the changes in this PR require an update of the technical documentation ... looking for volunteers ... |
Collaborator
|
We will get to this but it will be a couple of weeks. We will need to ask
some questions before we get started.
…On Wed, May 13, 2020 at 1:50 PM Dom Heinzeller ***@***.***> wrote:
@JulieSchramm <https://github.com/JulieSchramm> @ligiabernardet
<https://github.com/ligiabernardet> the changes in this PR require an
update of the technical documentation ... looking for volunteers ...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#292 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE7WQAUW6UY3KS2BNSBYISLRRL2ZLANCNFSM4M6JPOLA>
.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
scripts/common.pyscripts/metadata_parser.pyccpp_prebuild.py; this addresses issue CCPP code generator needs to parse all available suites if SUITES argument is not present #293Associated PRs:
NOAA-EMC/GFDL_atmos_cubed_sphere#20
#292
NCAR/ccpp-physics#451
NOAA-EMC/ufsatm#115
NOAA-EMC/NEMS#62
ufs-community/ufs-weather-model#126
For regression testing information, see ufs-community/ufs-weather-model#126.