stfc / fparser

This project maintains and develops a Fortran parser called fparser2 written purely in Python which supports Fortran 2003 and some Fortran 2008. A legacy parser fparser1 is also available but is not supported. The parsers were originally part of the f2py project by Pearu Peterson.
https://fparser.readthedocs.io
Other
64 stars 29 forks source link

(Closes #426) Add convert argument to open(). #435

Closed arporter closed 10 months ago

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (0410062) 91.99% compared to head (ce2a081) 91.96%.

:exclamation: Current head ce2a081 differs from pull request most recent head 53f32fa. Consider uploading reports for the commit 53f32fa to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #435 +/- ## ========================================== - Coverage 91.99% 91.96% -0.04% ========================================== Files 85 85 Lines 13681 13641 -40 ========================================== - Hits 12586 12545 -41 - Misses 1095 1096 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

arporter commented 11 months ago

In the interests of speed (of implementation) I haven't added full testing of the OPEN statement here. Ready for review from either @sergisiso or @rupertford.

arporter commented 10 months ago

Ready for another look now. Ran across #432 while trying to check the documentation. Happily that's a separate issue though :-)

arporter commented 10 months ago

Taking this back as I've discovered it doesn't work if one requests a F2008 parser instead of F2003!

arporter commented 10 months ago

This has got a bit bigger as, on looking at the Fortran2008 implementation of Open (which I missed first time around), I realised that there was a lot of code duplication that could be factored out. I also slightly refactored the way that we handle the list of supported extensions (we now have a method that returns the list rather than just a module-scope variable containing a list). This makes testing a bit cleaner as monkeypatch can be used more easily.

Ready for another look now.