Skip to content

Let fre pp checkout use a local fre-workflows copy #673

@ilaflott

Description

@ilaflott

people who develop for NOAA-GFDL/fre-workflows will have a bit of a workflow to their efforts, a rough sketch of this might look like:

git clone git@github.com:noaa-gfdl/fre-workflows
cd fre-workflows
git checkout dev_branch
# proceed to hack at code in favorite text editor

to test the edits to the workflow locally then with all fre commands, since fre pp checkout only clones code from noaa-gfdl/fre-workflows, the above efforts have to first be pushed to the remote:

git commit -o foo.py -m 'commit message'
git push
conda activate fre-cli
(fre-cli) fre pp checkout -e exp_name -p ptest -t ttest -y model.yaml --tag dev_branch
# rest of required fre commands to configure/install/run the workflow
# realize you did something super small wrong
# re-hack, re-edit
(fre-cli) git commit -o foo.py -m 'small oops'
(fre-cli) git push
(fre-cli) fre pp checkout -e exp_name -p ptest -t ttest -y model.yaml --tag dev_branch
# the hilarity continues

This is for certain, better than nothing, but sometimes one wants to test things locally BEFORE committing / pushing to a remote so one doesn't end up in a tiny-correction/test-large-workflow cycle for too long. So it'd be nice, instead, if we could do something like:

conda activate fre-cli 
(fre-cli) fre pp checkout -e exp_name -p ptest -t ttest -y model.yaml --use-local-workflow $PWD
# rest of required fre commands to configure/install/run the workflow
# realize you did something super small wrong
# re-hack, re-edit
(fre-cli) fre pp checkout -e exp_name -p ptest -t ttest -y model.yaml --use-local-workflow $PWD
(fre-cli) git commit -o foo.py -m 'got it right first try ;-)'
(fre-cli) git push
# done with less noise

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions