Skip to content

Conversation

@cwhitlock-NOAA
Copy link
Collaborator

@cwhitlock-NOAA cwhitlock-NOAA commented May 23, 2025

Describe your changes

Adding new args to fre pp checkout

  • --repo; allows for setting a new remote to clone from
  • --force-update; runs a git pull on a pre-existing clone to update it
  • --limit-checkout-size: limits the size of the fre-workflows checkout to the smallest we can get away with

Modifying the behavior around pre-existing checkouts

  • clearer error messages on why checking out a different branch under the same experiment fails (and how to fix)
  • --force-update allows for updating existing checkouts

Removing os.chdir() and replacing with git -C

Adding new args to fre pp all to mirror fre pp checkout

Issue ticket number and link (if applicable)

This links to issue #440

Checklist before requesting a review

  • I ran my code
  • I tried to make my code readable
  • I tried to comment my code
  • I wrote a new test, if applicable
  • I wrote new instructions/documentation, if applicable
  • I ran pytest and inspected it's output
  • I ran pylint and attempted to implement some of it's feedback
  • No print statements; all user-facing info uses logging module

@cwhitlock-NOAA
Copy link
Collaborator Author

cwhitlock-NOAA commented May 23, 2025

Question for review: should --force-checkout be able to check out a branch other than the one checked out previously? That is, should running

fre pp checkout --branch 51.bugfix.var.filtering -e $experiment -p $platform -t $target

Give you an error?

I am currently inclined to say yes on the grounds that the "right" way to do this is to make sure no one triggers unexpected behavior by accident and either deleting your old directory in ~/cylc-src or setting a new $experiment both require a level of user intervention that you might not get if you're used to setting --force-update whenever you set your commands for fre pp checkout.

@cwhitlock-NOAA
Copy link
Collaborator Author

Should we be trying to make the fre-workflows checkout as small as possible as our default behavior? We don't want anyone to be doing development from the directories in ~/cylc-src , so setting the git clone as small as possible in a way that you can't turn off from the command-line is arguably a good thing.

@cwhitlock-NOAA
Copy link
Collaborator Author

We should probably accept both github and gitlab NOAA-GFDL urls.

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.

3 participants