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

genomedata-erase-data doesn't work #40

Open
EricR86 opened this issue Jul 14, 2017 · 5 comments
Open

genomedata-erase-data doesn't work #40

EricR86 opened this issue Jul 14, 2017 · 5 comments
Labels
bug Something isn't working minor

Comments

@EricR86
Copy link
Member

EricR86 commented Jul 14, 2017

Original report (archived issue) by Rachel Chan (Bitbucket: rcwchan).


Specifically, the arg parser (if called from commandline) is searching for attributes that don't exist:

From _erase_data.py:

#!python

38 def parse_options(args):
 39 
 40     description = ("Erase the specified tracks from the Genomedata archive"
 41                    " in such a way that the track data can be replaced"
 42                    " (via genomedata-load-data).")
 43 
 44     parser = ArgumentParser(description=description,
 45                             prog='genomedata-erase-data',
 46                             version=__version__)
 47 
 48     parser.add_argument('gdarchive', help='genomedata archive')
 49 
 50     parser.add_argument("--trackname", required=True, nargs='+',
 51                         help="tracknames to erase")
 52 
 53     parser.add_argument("--verbose", default=False, action="store_true",
 54                         help="Print status updates and diagnostic messages")
 55 
 56     args = parser.parse_args(args)
 57 
 58     return args
 59 
 60 def main(argv=sys.argv[1:]):
 61     args = parse_options(argv)
 62     gdarchive = args.archive
 63 
 64     for trackname in args.tracknames:
 65         erase_data(gdarchive, trackname, verbose=args.verbose)
 66 
 67 if __name__ == "__main__":
 68     sys.exit(main())                                   

In particular, args.archive should be args.gdarchive, args.tracknames doesn't exist, etc. Edit: Possibly a test should be added for it in the genomedata test suite?

@EricR86
Copy link
Member Author

EricR86 commented Jul 14, 2017

Original comment by Rachel Chan (Bitbucket: rcwchan).


  • Edited issue description

1 similar comment
@EricR86
Copy link
Member Author

EricR86 commented Jul 14, 2017

Original comment by Rachel Chan (Bitbucket: rcwchan).


  • Edited issue description

@EricR86
Copy link
Member Author

EricR86 commented Jul 14, 2017

Original comment by Michael Hoffman (Bitbucket: hoffman, GitHub: michaelmhoffman).


It appears to be documented, just there is no test coverage. I think better to fix it.

@EricR86
Copy link
Member Author

EricR86 commented Jul 14, 2017

Original comment by Rachel Chan (Bitbucket: rcwchan).


  • Edited issue description

@EricR86
Copy link
Member Author

EricR86 commented Jul 14, 2017

Original comment by Michael Hoffman (Bitbucket: hoffman, GitHub: michaelmhoffman).


A smoke test alone would have caught this.

@EricR86 EricR86 added minor bug Something isn't working labels Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor
Projects
None yet
Development

No branches or pull requests

1 participant