Closed jasonjunweilyu closed 3 months ago
Taken back the ready-for-review as I found there is a unit test needs to be fixed.
Now the mypy and flake8 issues are fixed. PSyclone unit test has been modified. This pull request is ready for review.
@jasonjunweilyu , sorry, I just realised I forgot two things:
it would be good to have a real example of this function in the run configs (lfric/atm.py
and lfric/gungho.py
seems to use a script), so you would have to update them, and include the proper function to use (i.e. a function that does the current Makefile behaviour - i.e. checks for a file-specific script, if not global.py, if not None).
Also, surprisingly there is no documentation on how to use PSyclone at all (only the PSyclone overrides in doc/sources/advanced_config.rst). Can you add a section on how to use PSyclone to
doc/source/writing_config.rst`? Just link to the PSyclone github page for details, but describe how a PSyclone step is added, including an example of a transformation script (i.e. the one you have added to the run_configs above).
Hi @hiker , I just finished making changes according to your comments. Now you can re-review my PR. Thanks.
Hi @hiker , I finished making modifications. Please review the changes when you have time. Thanks.
Hi @hiker , thanks a lot for the suggestions. It is not nit-picking. They all made the codes and docs better. I have modified accordingly.
This pull request is related to Issue #18. The purpose is to allow each x90 file to have its specific transformation script. Two files have changed:
The
psyclone
function now takes in a function as the argument for thetransformation_script
parameter. This input function will be written by the user to take in an x90 file path (parameterfpath
), and return a transformation script path.Tests have been added to verify that the input transformation script function takes in the x90 file path and returns a transformation script path, which is then passed successfully to the psyclone command with
-s
. The checking for the transformation_script_hash is now done in the unit test, as now the transformation_script_hash is calculated when processing each file.Transformation_script_hash test and prebuild_hash test have been updated.