-
Notifications
You must be signed in to change notification settings - Fork 67
Allow declaration of a scheme-dependent kind #719
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,4 +10,4 @@ | |
| FORTRAN_CONDITIONAL_REGEX_WORDS = [' ', '(', ')', '==', '/=', '<=', '>=', '<', '>', '.eqv.', '.neqv.', | ||
| '.true.', '.false.', '.lt.', '.le.', '.eq.', '.ge.', '.gt.', '.ne.', | ||
| '.not.', '.and.', '.or.', '.xor.'] | ||
| FORTRAN_CONDITIONAL_REGEX = re.compile(r"[\w']+|" + "|".join([word.replace('(','\(').replace(')', '\)') for word in FORTRAN_CONDITIONAL_REGEX_WORDS])) | ||
| FORTRAN_CONDITIONAL_REGEX = re.compile(r"[\w']+|" + "|".join([word.replace('(',r'\(').replace(')', r'\)') for word in FORTRAN_CONDITIONAL_REGEX_WORDS])) | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed due to warnings in the test output. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,13 +13,13 @@ | |
| ######################################################################## | ||
|
|
||
| _UNITLESS_REGEX = "1" | ||
| _NON_LEADING_ZERO_NUM = "[1-9]\d*" | ||
| _NON_LEADING_ZERO_NUM = r"[1-9]\d*" | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed due to warnings in the test output. |
||
| _CHAR_WITH_UNDERSCORE = "([a-zA-Z]+_[a-zA-Z]+)+" | ||
| _NEGATIVE_NON_LEADING_ZERO_NUM = f"[-]{_NON_LEADING_ZERO_NUM}" | ||
| _POSITIVE_NON_LEADING_ZERO_NUM = f"[+]{_NON_LEADING_ZERO_NUM}" | ||
| _UNIT_EXPONENT = f"({_NEGATIVE_NON_LEADING_ZERO_NUM}|{_POSITIVE_NON_LEADING_ZERO_NUM}|{_NON_LEADING_ZERO_NUM})" | ||
| _UNIT_REGEX = f"[a-zA-Z]+{_UNIT_EXPONENT}?" | ||
| _UNITS_REGEX = f"^({_CHAR_WITH_UNDERSCORE}|{_UNIT_REGEX}(\s{_UNIT_REGEX})*|{_UNITLESS_REGEX})$" | ||
| _UNITS_REGEX = rf"^({_CHAR_WITH_UNDERSCORE}|{_UNIT_REGEX}(\s{_UNIT_REGEX})*|{_UNITLESS_REGEX})$" | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed due to warnings in the test output. |
||
| _UNITS_RE = re.compile(_UNITS_REGEX) | ||
| _MAX_MOLAR_MASS = 10000.0 | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1172,7 +1172,7 @@ def _get_kind_convstrs(self, var1_kind, var2_kind, run_env): | |||||
| 'scheme_files':'', \ | ||||||
| 'suites':''}, \ | ||||||
| kind_types=["kind_phys=REAL64", \ | ||||||
| "kind_dyn=REAL32", \ | ||||||
| "kind_dyn=REAL32", \ | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| "kind_host=REAL64"]) | ||||||
| >>> _DOCTEST_CONTEXT1 = ParseContext(linenum=3, filename='foo.F90') | ||||||
| >>> _DOCTEST_CONTEXT2 = ParseContext(linenum=5, filename='bar.F90') | ||||||
|
|
@@ -1318,7 +1318,7 @@ def _get_dim_transforms(self, var1_dims, var2_dims): | |||||
| 'scheme_files':'', \ | ||||||
| 'suites':''}, \ | ||||||
| kind_types=["kind_phys=REAL64", \ | ||||||
| "kind_dyn=REAL32", \ | ||||||
| "kind_dyn=REAL32", \ | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| "kind_host=REAL64"]) | ||||||
| >>> _DOCTEST_CONTEXT1 = ParseContext(linenum=3, filename='foo.F90') | ||||||
| >>> _DOCTEST_CONTEXT2 = ParseContext(linenum=5, filename='bar.F90') | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule only applies on the command line.