Skip to content

Conversation

@pseewald
Copy link
Collaborator

@pseewald pseewald commented Nov 9, 2025

I finally found time to wrap up refactoring of the testing mechanism, so that it's better maintainable and so that results are more transparent. The new mechanism is documented in README.md. This fixes #44, fixes #140 and fixes #134.

@coveralls
Copy link

coveralls commented Nov 9, 2025

Pull Request Test Coverage Report for Build 19594268342

Details

  • 474 of 484 (97.93%) changed or added relevant lines in 4 files are covered.
  • 21 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+4.6%) to 96.521%

Changes Missing Coverage Covered Lines Changed/Added Lines %
fprettify/init.py 88 90 97.78%
fprettify/tests/fortrantests.py 141 149 94.63%
Files with Coverage Reduction New Missed Lines %
fprettify/init.py 2 97.94%
fprettify/version.py 6 0.0%
fprettify/_version.py 13 0.0%
Totals Coverage Status
Change from base Build 10803218841: 4.6%
Covered Lines: 1526
Relevant Lines: 1581

💛 - Coveralls

README.md Outdated
1. one or more unit tests are added which test formatting of small Fortran code
snippets, covering all relevant aspects of the added features.
2. if the changes lead to failures of existing tests, these test failures
should be carefully examinated. Only if the test failures are due to
Copy link
Contributor

Choose a reason for hiding this comment

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

'examinated' -> 'examined'

README.md Outdated
in = "Some Fortran code"
out = "Same Fortran code after fprettify formatting"

# seleced fprettify command line arguments, as documented in "fprettify.py -h":
Copy link
Contributor

Choose a reason for hiding this comment

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

'seleced' -> 'selected'

Copy link

@max-models max-models left a comment

Choose a reason for hiding this comment

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

I couldn't find any breaking errors. Here and there I saw some points on the python code style which I would have done differently, but I don't think it's worth quibbling over. The PR looks good to me now :)

output.
"""
if cls.n_parsefail + cls.n_internalfail > 0:
format = "{:<20}{:<6}"

Choose a reason for hiding this comment

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

You are overwriting the built-in function format() with a local variable named format, maybe it would be better if you renamed the variable to fmt or format_string or so.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@max-models
Copy link

Is there anything more that needs to be done before merging this? It looks good to me!

@pseewald
Copy link
Collaborator Author

pseewald commented Nov 21, 2025

Is there anything more that needs to be done before merging this? It looks good to me!

Thanks a lot for your timely review. I checked the changes again myself, and I haven't found anything which would need rework, so I'm going to merge it. I'll keep an eye on possible failures of cron job.

EDIT: @max-models I'll wait for your re-review (actually required by our rules).

@pseewald pseewald requested a review from max-models November 21, 2025 18:39
@max-models
Copy link

Is there anything more that needs to be done before merging this? It looks good to me!

Thanks a lot for your timely review. I checked the changes again myself, and I haven't found anything which would need rework, so I'm going to merge it. I'll keep an eye on possible failures of cron job.

EDIT: @max-models I'll wait for your re-review (actually required by our rules).

Great! Looks good to me, I approved again!

@pseewald
Copy link
Collaborator Author

@gnikit or @awvwgk could you review as well (or give your ok to merge anyway)?

@gnikit
Copy link
Member

gnikit commented Nov 21, 2025 via email

Copy link
Member

@gnikit gnikit left a comment

Choose a reason for hiding this comment

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

nice work @pseewald

@pseewald pseewald force-pushed the 140-testing-mechanism branch from cc5d03f to 904241c Compare November 22, 2025 10:34
@pseewald
Copy link
Collaborator Author

I had to rebase the entire branch post-review (because the branch was previously updated using merge commits) - I checked myself that diff between cc5d03f (old HEAD) and 904241c (new HEAD) is empty. Merging now.

@pseewald pseewald merged commit 97e799b into fortran-lang:master Nov 22, 2025
4 checks passed
@pseewald pseewald deleted the 140-testing-mechanism branch November 22, 2025 10:39
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.

Streamline and document testing mechanism bug: exceptions thrown during CI Improve testing

5 participants