Skip to content

Bad --programs and --projects options should fail immediately #2

@noblem

Description

@noblem

At present gdctools does not validate --projects and --program options at startup: so bad input like

  %    bin/gdc_dice --config config/tcga.cfg --projects blahblah

causes the dicer to start, acquire a lock, etc ... only to fail (see below). The code can detect this bad input earlier, and fail more gracefully (with a message and exit with suitable error code) before commencing to acquire lock, etc.


2016-07-20 16:26:11,253[INFO]: GDC Dicer Version: 0.3.0
2016-07-20 16:26:11,253[INFO]: Command: gdc_dice.py --config config/tcga.cfg --projects blahblah
2016-07-20 16:26:11,269[INFO]: Mirror timestamp: 9999_99_99
2016-07-20 16:26:11,269[INFO]: Attempting to acquire lock: /xchip/gdac_data/gdc/dice/TCGA/.dice.lock
2016-07-20 16:26:11,281[INFO]: Lock acquired.
2016-07-20 16:26:11,281[INFO]: Attempting to acquire lock: /xchip/gdac_data/gdc/mirror/TCGA/.mirror.lock
2016-07-20 16:26:11,283[INFO]: Lock acquired.
2016-07-20 16:26:11,285[ERROR]: Dicing FAILED:
Traceback (most recent call last):
File "gdc_dice.py", line 192, in execute
self.dice()
File "gdc_dice.py", line 133, in dice
metadata = meta.latest_metadata(stamp_root)
File "/xchip/cga_home/mnoble/src/gdctools/lib/meta.py", line 38, in latest_metadata
metadata_files = [f for f in os.listdir(stamp_dir)
OSError: [Errno 2] No such file or directory: '/xchip/gdac_data/gdc/mirror/TCGA/blahblah/metadata/9999_99_99'

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