Skip to content

Commit

Permalink
Merge pull request #246 from rem1776/run-fremake-fix
Browse files Browse the repository at this point in the history
update function names for run_fremake subcommand
  • Loading branch information
singhd789 authored Nov 4, 2024
2 parents c826804 + ee4b5b5 commit 564be4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fre/make/gfdlfremake/checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def finish (self,pc):
## TODO: batch script building
def run (self):
"""
Brief: Changes the permission on the checkout script and runs it
Brief: Runs the checkout script
Param:
- self The checkout script object
"""
Expand Down
7 changes: 4 additions & 3 deletions fre/make/runFremake.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
targetfre, varsfre, yamlfre, checkout,
makefilefre, buildDocker, buildBaremetal )

def _fremake_run(yamlfile,platform,target,parallel,jobs,no_parallel_checkout,verbose):
def fremake_run(yamlfile,platform,target,parallel,jobs,no_parallel_checkout,verbose):
''' run fremake via click'''
yml = yamlfile
name = yamlfile.split(".")[0]
Expand Down Expand Up @@ -86,6 +86,7 @@ def _fremake_run(yamlfile,platform,target,parallel,jobs,no_parallel_checkout,ver
freCheckout = checkout.checkout("checkout.sh",srcDir)
freCheckout.writeCheckout(modelYaml.compile.getCompileYaml(),jobs,pc)
freCheckout.finish(pc)
os.chmod(srcDir+"/checkout.sh", 0o744)
## TODO: Options for running on login cluster?
freCheckout.run()

Expand Down Expand Up @@ -200,12 +201,12 @@ def _fremake_run(yamlfile,platform,target,parallel,jobs,no_parallel_checkout,ver
pool.map(buildBaremetal.fremake_parallel,fremakeBuildList)

@click.command()
def fremake_run(yamlfile,platform,target,parallel,jobs,no_parallel_checkout,verbose):
def _fremake_run(yamlfile,platform,target,parallel,jobs,no_parallel_checkout,verbose):
'''
Decorator for calling _fremake_run - allows the decorated version
of the function to be separate from the undecorated version
'''
return _fremake_run(yamlfile,platform,target,parallel,jobs,no_parallel_checkout,verbose)
return fremake_run(yamlfile,platform,target,parallel,jobs,no_parallel_checkout,verbose)

if __name__ == "__main__":
fremake_run()

0 comments on commit 564be4a

Please sign in to comment.