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

Handle compressed content in dataset preview for all sequence classes #18776

Merged
merged 4 commits into from
Sep 6, 2024

Conversation

PlushZ
Copy link
Contributor

@PlushZ PlushZ commented Sep 4, 2024

This PR fixes #15653
Method display_data moved to common class for fasta and fastq instead being used only in fasq class.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 24.2 milestone Sep 4, 2024
@bgruening
Copy link
Member

Thanks @PlushZ. Can you please run make format or fix the failing python linting's

@@ -336,8 +336,43 @@ def split(cls, input_datasets: List, subdir_generator_function: Callable, split_
raise NotImplementedError("Can't split generic alignment files")


class BaseSequence(Sequence):
Copy link
Member

Choose a reason for hiding this comment

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

The class names should be the other way around, Base* something should be the thing you inherit from. I don't think there's a reason you could not push the display_data method right into the current Sequence class (and replace Sequence.display_data(self, trans, dataset, preview, filename, to_ext, **kwd) with super().display_data(self, trans, dataset, preview, filename, to_ext, **kwd))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for comment, I agreed and modified accordingly. As I understand, there is no need to pass self argument when using super() because it automatically passes self. But I don't know why the tests still use the version where self was explicitly passed, which leads to argument mismatches and results errors "too many arguments" in the method call. Removing self should resolve these errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now all seems to be fine

@mvdbeek mvdbeek changed the title fix fasta.gz viewer issue Handle compressed content in dataset preview for all sequence classes Sep 6, 2024
@mvdbeek mvdbeek merged commit 4e47fce into galaxyproject:dev Sep 6, 2024
50 of 54 checks passed
@mvdbeek
Copy link
Member

mvdbeek commented Sep 6, 2024

Thanks @PlushZ!

@galaxyproject galaxyproject deleted a comment from github-actions bot Sep 6, 2024
@PlushZ PlushZ deleted the fastagz-view-issue branch September 7, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fastq.gz is viewed but fasta.gz is not
3 participants