Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid creating a case directory until all input options are validated. #4

Closed
quantheory opened this issue Apr 1, 2015 · 3 comments
Closed
Assignees

Comments

@quantheory
Copy link
Contributor

The create_newcase command (and other scripts, e.g. create_test) should not create directories or write any files until first validating user-specified options. If someone forgets to add the -compset option, for instance, the directory is created, but the command fails, meaning that you have to go wipe it before trying again.

@douglasjacobsen
Copy link
Member

Alternatively, you could consider adding a --force options to create_newcase which will force the creation of the new case in the location you specified (could rm -rf the case before creating it, just to make sure nothing weird is left there).

@quantheory
Copy link
Contributor Author

@douglasjacobsen

This is admittedly a very minor issue, but I hit this a lot because I make a lot of typos and then forget that I have to remove the case directory afterward. I don't think that we want --force. If you don't use --force habitually, it doesn't add much convenience, since it's not much harder to remember to rm -rf by hand. If you do use --force habitually, it seems far too easy to make a mistake and blow away a case (or any other directory) that you want to keep.

Most command-line tools that I use on a regular basis check for valid options before doing anything (and create_newcase already has some checks, they just aren't complete). I think it would be better if we can make sure that all the required options are provided, and the grid/compset/machine/whatever are valid values, before starting to copy things into a case directory.

@sholly sholly mentioned this issue Aug 3, 2015
jgfouca pushed a commit that referenced this issue Jan 6, 2016
jgfouca added a commit that referenced this issue Jan 7, 2016
Skybridge config added

Still doesn't work because the account directive is not making it
to the slurm submit script.

[BFB]

* jgfouca/skybridge_config_added:
  Skybridge config added
jedwards4b added a commit that referenced this issue Jan 15, 2016
Adding ability to set GPTL externally
jedwards4b pushed a commit that referenced this issue Jan 15, 2016
Merge up to the head of the master
@rljacob
Copy link
Member

rljacob commented Jul 8, 2016

Fixed in new python version.

@rljacob rljacob closed this as completed Jul 8, 2016
jayeshkrishna pushed a commit that referenced this issue Aug 16, 2016
jgfouca pushed a commit that referenced this issue Dec 23, 2017
Add unit tests, fix some bugs, refactor for greater code reuse
jedwards4b pushed a commit that referenced this issue Sep 25, 2018
Fix bug in incorrect indexing in esmFlds.F90

Test suite:
SMS_Vnuopc.f19_g16.X.cheyenne_intel - changes answers
SMS_Vnuopc_Ld1.T31_g37_rx1.A.cheyenne_intel - changes answers
SMS_Vnuopc_Ld2.ww3a.ADWAV.cheyenne_intel - BFB
SMS_Vnuopc_Ld3.f09_f09_mg16.ADLND.cheyenne_intel.drv-glcnec10 - BFB
SMS_Vnuopc_Ln5.T62_g37.DTEST.cheyenne_intel.cice-nuopc_cap - changes answers
SMS_Vnuopc_Ln5.f45_f45_mg37.F2000Nuopc.cheyenne_intel.cam-nuopc_cap - BFB
SMS_Vnuopc_Ln5.f45_f45_mg37.I2000Clm50SpNuopc.cheyenne_intel.clm-nuopc_cap - BFB
SMS_Vnuopc_Ln5.ne16_ne16_mg17.QPC4.cheyenne_intel.cam-nuopc_cap - BFB

Test baseline: see above
Test namelist changes: NA
Test status: see above
Fixes #3
User interface changes?: None
Update gh-pages html? :N
Code review:
kauff pushed a commit to kauff/cime that referenced this issue Dec 19, 2018
daniele-peano added a commit to daniele-peano/cime that referenced this issue Feb 10, 2023
Avoid the round option for project option
jedwards4b pushed a commit that referenced this issue Apr 20, 2023
Update before cpl_hist_zeros push and PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants