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

Make file filters more intuitive #207

Closed
hannes-ucsc opened this issue Nov 20, 2018 · 14 comments
Closed

Make file filters more intuitive #207

hannes-ucsc opened this issue Nov 20, 2018 · 14 comments
Assignees
Labels
demoed orange Done by the Azul, Data Browser and Portal team

Comments

@hannes-ucsc
Copy link
Contributor

hannes-ucsc commented Nov 20, 2018

  1. rename --data-files to --data-filter
  2. rename --metadata-files to --metadata-filter
  3. Add --no-data as an alias of --data-filter ""
  4. Add --no-metadata as an alias of --metadata-filter ""
  5. Add all of the above to hca dss download-manifest as well

Specifying both --no-data and --no-metadata simultaneously could be disallowed but we will be adding the download of the actual bundle object (bundle.json) as a third artifact. With --no-data --no-metadata a user would only get the bundle object.

@hannes-ucsc hannes-ucsc changed the title Explain --data-files and --metadata-files options to download-bundle better Explain --data-files and --metadata-files options better Nov 20, 2018
@hewgreen
Copy link

This comment may be helpful but ignore it if it isn't.

The --data-files flag means don't give me data files and the --metadata-files flag means don't give me the metadata files. It seems more intuitive for it to work the other way around. Also rather than passing "" it may be better to allow an empty arg to be taken to mean all.

For example, I wanted to only download metadata files so I expected to pass the flag --metadata-files with no argument to do this.

@kozbo
Copy link
Collaborator

kozbo commented Jan 14, 2019

@hewgreen can you give us an example command line?

@hewgreen
Copy link

hewgreen commented Jan 15, 2019

@malloryfreeberg @willrockout @rolando-ebi
We mentioned that the hca dss download arguments could be more intuitive. Do you guys have any suggestions before I wade in?

This command will only give you the links file:
hca dss download --bundle-uuid <BUNDLE-UUID> --replica aws --data-files “” --metadata-files "links.json”

dropping --data-files “” will give you all the data files

Is this intuitive?

@willrockout
Copy link

@hewgreen I'm in agreement with you I would expect --data-files or --metadata-files to just give me those files. So something like the below would give me all the metadata files for a bundle:

hca dss download --bundle-uuid <BUNDLE-UUID> --replica aws --metadata-files

Also, I think it would be beneficial to have an example for the possible arguments to feed to --data-files and --metadata-files as at least for me it wasn't super intuitive.

@hewgreen
Copy link

hewgreen commented Jan 16, 2019

Just regarding --data-files and --metadata-files flags

no flags = give me everything in the bundle
just --data-files = give me all data files
just --metadata-files = give me all metadata files
--metadata-files "links.json" = just give me the links file
--metadata-files "donor*.json" = give me all donor metadata files
so --data-files and --metadata-files would imply = give me no files

Does that look right? @malloryfreeberg @willrockout @rolando-ebi

@willrockout
Copy link

so --data-files and --metadata-files would imply = give me no files

@hewgreen I don't think the double flag should mean give me no files. I don't really see a use case where you'd use download and not want any files.

@willrockout
Copy link

The rest looks good!

@hewgreen
Copy link

I'm not saying you every want that. I'm just saying thats where the logic follows. It would be the same as the current --data-files “" --metadata-files "".

@hannes-ucsc
Copy link
Contributor Author

Another proposal:

  1. Rename --data-files to --data-filter and --metadata-files to --metadata-filter
  2. Add two mutually exclusive options
    --data-only (only download data files, ignore metadata files)
    --metadata-only (only download metadata files, ignore data files)

--data-only --metadata-only would be disallowed and lead to an error.

Internally --data-only is implemented as --metdata-filter "" and --metadata-only is implemented as --data-filter="".

@hannes-ucsc
Copy link
Contributor Author

I propose another slight tweak to the above:

  1. rename --data-files to --data-filter
  2. rename --metadata-files to --metadata-filter
  3. Add --no-data as an alias of --data-filter ""
  4. Add --no-metadata as an alias of --metadata-filter ""
  5. Add all of the above to hca dss download-manifest as well

Specifying both --no-data and --no-metadata simultaneously could be disallowed but we will be adding the download of the actual bundle object (bundle.json) as a third artifact. With --no-data --no-metadata a user would only get the bundle object.

@diekhans
Copy link

diekhans commented Feb 19, 2019 via email

@hannes-ucsc hannes-ucsc added the orange Done by the Azul, Data Browser and Portal team label Apr 15, 2019
@theathorn theathorn added this to the Q2 2019 Sprint 3 milestone May 31, 2019
@jessebrennan
Copy link
Collaborator

@hannes-ucsc I assume that this ticket is now to change metadata_files and data_files to match the spec you outline:

I propose another slight tweak to the above:

  1. rename --data-files to --data-filter
  2. rename --metadata-files to --metadata-filter
  3. Add --no-data as an alias of --data-filter ""
  4. Add --no-metadata as an alias of --metadata-filter ""
  5. Add all of the above to hca dss download-manifest as well

Specifying both --no-data and --no-metadata simultaneously could be disallowed but we will be adding the download of the actual bundle object (bundle.json) as a third artifact. With --no-data --no-metadata a user would only get the bundle object.

Is that correct?

@hannes-ucsc
Copy link
Contributor Author

Correct. My problem with --metadata-only instead of --no-data is that being alias of --data-filter "" the semantics would break down if there were a third category of files, in addition to data and metadata. If the third type of file were called, say, auxiliary, with --metadata-only being equivalent to --data-filter "" you would get metadata and auxiliary files. That would contradict the name.

As I write this I notice that there will be a 3rd category of files, as I mention in the section you quote: bundle.json is neither metadata nor data.

@diekhans
Copy link

Convinced, --no-data makes lots of sense.

@jessebrennan jessebrennan changed the title Explain --data-files and --metadata-files options better Make file filters more intuitive Jun 13, 2019
jessebrennan added a commit that referenced this issue Jun 14, 2019
Add two new options:
 - `--no-data` and
 - `--no-metadata`

 and rename `--metadata-files` and `--data-files` to
 `--metadata-filter` and `--data-filter` respectively.
jessebrennan added a commit that referenced this issue Jun 14, 2019
Add two new options:
 - `--no-data` and
 - `--no-metadata`

 and rename `--metadata-files` and `--data-files` to
 `--metadata-filter` and `--data-filter` respectively.
jessebrennan added a commit that referenced this issue Jul 24, 2019
Add two new options:
 - `--no-data` and
 - `--no-metadata`

 and rename `--metadata-files` and `--data-files` to
 `--metadata-filter` and `--data-filter` respectively.
jessebrennan added a commit that referenced this issue Jul 30, 2019
Add two new options:
 - `--no-data` and
 - `--no-metadata`

 and rename `--metadata-files` and `--data-files` to
 `--metadata-filter` and `--data-filter` respectively.
@theathorn theathorn removed this from the Q3 2019 Milestone 1 milestone Jul 31, 2019
@theathorn theathorn added this to the Q3 2019 Milestone 2 milestone Jul 31, 2019
jessebrennan added a commit that referenced this issue Aug 1, 2019
Add two new options:
 - `--no-data` and
 - `--no-metadata`

 and rename `--metadata-files` and `--data-files` to
 `--metadata-filter` and `--data-filter` respectively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demoed orange Done by the Azul, Data Browser and Portal team
Projects
None yet
Development

No branches or pull requests

7 participants