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

Create Collection edit interface that allows changing datatype and dbkey #11799

Merged

Conversation

@assuntad23
Copy link
Contributor

@assuntad23 assuntad23 commented Apr 7, 2021

What did you do?

  • created a collection edit interface, to allow users to change some attributes about the collection.
  • Database Tab will allow users to change the Database/Genome of all datasets in collection
  • Convert Tab will only be present if the datasets share a compatible converter. This will allow users to run the selected converter tool.

Why did you make this change?

#6965

How to test the changes?

(select the most appropriate option; if the latter, provide steps for testing below)

  • I've included appropriate automated tests.
  • Instructions for manual testing are as follows:
    For the Database Tab:
    1. In the beta history, create a collection.
    2. From the "..." menu beside the collection, click edit attributes.
    3. This will open the collection edit view.
    4. Check out the tabs. There should always be a Database Tab; the Convert Tab will only be present if the datasets in the collection share at least one converter.
    5. From the dropdown, change the dbkey of the elements.
    6. When you click save, a new collection will appear in the history.
    7. In the Collection Edit View of that new collection, under the Database tab, you should see the dbkey you've selected.
      For the Convert Tab:
    8. In the beta history, create a collection with two types that are compatible.
    9. From the "..." menu beside the collection, click edit attributes.
    10. This will open the collection edit view.
    11. Check out the tabs. There should always be a Database Tab; the Convert Tab will only be present if the datasets in the collection share at least one converter. If you do not see it, you have not chosen datasets that share a converter. Recreate your collection with different datasets.
    12. From the dropdown, select a converter tool to run on the datasets.
    13. When you click save, a new collection will appear in the history, the name will indicate which tool you've run.
    14. In the Collection Edit View of that new collection, if you look at the convert tab, you should see the different options that correspond to the new data type your datasets are.

License

For UI Components

  • I've included some screenshots of the changes
simplescreenrecorder-2021-05-19_00.27.35.online-video-cutter.com.mp4

In the video above, you'll see:

  • a .bed collection using the Convert tabular to CSV tool
  • two .beds with different genomes changing to another genome
  • a .bed and a .tabular collection using the Convert tabular to CSV tool
  • a .fasta and a .tabular collection that has no Convert tab, because there are no similar convert types
assuntad23 added 30 commits Jan 15, 2021
dannon
dannon approved these changes Sep 15, 2021
encoded_id = int(trans.app.security.decode_id(input_id))
decoded_id = self.hda_manager.get_accessible(encoded_id, trans.user).history_id
target_history = self.history_manager.get_owned(decoded_id, trans.user, current_history=trans.history)
Copy link
Member

@mvdbeek mvdbeek Sep 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
encoded_id = int(trans.app.security.decode_id(input_id))
decoded_id = self.hda_manager.get_accessible(encoded_id, trans.user).history_id
target_history = self.history_manager.get_owned(decoded_id, trans.user, current_history=trans.history)
decoded_id = trans.app.security.decode_id(input_id)
target_history = self.hda_manager.get_accessible(encoded_id, trans.user).history
self.history_manager.error_unless_owner(target_history, trans.user, current_history=trans.history)

This seems a little cleaner ?

Loading

Copy link
Member

@mvdbeek mvdbeek left a comment

Looks pretty good now!

Loading

assuntad23 and others added 4 commits Sep 16, 2021
@mvdbeek mvdbeek merged commit 710d9d3 into galaxyproject:dev Sep 16, 2021
33 checks passed
Loading
@mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Sep 16, 2021

Thanks a lot @assuntad23!

Loading

@github-actions
Copy link

@github-actions github-actions bot commented Sep 16, 2021

This PR was merged without a "kind/" label, please correct.

Loading

@mvdbeek mvdbeek changed the title Feature/6965/change datatype and dbkey Create Collection edit interface that allows changing datatype and dbkey Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants