Skip to content

Allow commit script to use path to dummy DSIDs

Spyros Argyropoulos requested to merge fixscript into master

Description of bug

Currently if one uses

./scripts/commit_new_dsid.sh 100xxx/100001 -m="test" --dry-run 

the script would throw an error: ERROR: Directory 100xxx/100xxx/100001 does not contain any jO files since it assumes that for directories that have 6 digits, it would have to pre-pend the path.

Changes introduced

Allow script to use path to dummy DSIDs

Tests

./scripts/commit_new_dsid.sh 100xxx/100001 -m="test" --dry-run          
INFO: will use following remote for pushing: origin
Will use branch: dsid_sargyrop_100xxx100001...
Will create new branch: dsid_sargyrop_100xxx100001
Checking jO consistency and DSID ranges ...
		Will move 100xxx/100001 to 500xxx/500288
New DSID directory: 100xxx/100001 ...
	OK: log.generate file found.
	OK: log.generate file contains no errors
	OK: CI job expected to last less than 1h - time estimate: 0.03 hours
	Will now add files to git commit
		File: 100xxx/100001/Cards/Cards2/param.dat cannot be added to the commit. Skipping.
		File: 100xxx/100001/Cards/param_card_SM_SVT_leplep.dat cannot be added to the commit. Skipping.
		Will add: 100xxx/100001/MadGraphControl_Py8EG_SVT_RPVleplep.py
		File: 100xxx/100001/log.generate cannot be added to the commit. Skipping.
		Will add: 100xxx/100001/log.generate.short
		Will add: 100xxx/100001/mc.MGPy8EG_A14NNPDF23LO_SVT_emu_m500.py
		Will add: 100xxx/100001/param_card_SM_SVT_leplep.dat

old behaviour is preserved:

./scripts/commit_new_dsid.sh -m="test" --dry-run -d=100001              
INFO: will use following remote for pushing: origin
Will use branch: dsid_sargyrop_100001...
Will create new branch: dsid_sargyrop_100001
Checking jO consistency and DSID ranges ...
		Will move 100xxx/100001 to 500xxx/500288
New DSID directory: 100xxx/100001 ...
	OK: log.generate file found.
	OK: log.generate file contains no errors
	OK: CI job expected to last less than 1h - time estimate: 0.03 hours
	Will now add files to git commit
		File: 100xxx/100001/Cards/Cards2/param.dat cannot be added to the commit. Skipping.
		File: 100xxx/100001/Cards/param_card_SM_SVT_leplep.dat cannot be added to the commit. Skipping.
		Will add: 100xxx/100001/MadGraphControl_Py8EG_SVT_RPVleplep.py
		File: 100xxx/100001/log.generate cannot be added to the commit. Skipping.
		Will add: 100xxx/100001/log.generate.short
		Will add: 100xxx/100001/mc.MGPy8EG_A14NNPDF23LO_SVT_emu_m500.py
		Will add: 100xxx/100001/param_card_SM_SVT_leplep.dat

Issues resolved

Closes #

Edited by Spyros Argyropoulos

Merge request reports