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

Add framework test for profile behavior of format="input" #15482

Merged

Conversation

bernt-matthias
Copy link
Contributor

@bernt-matthias bernt-matthias commented Feb 1, 2023

stumbled over this here: galaxyproteomics/tools-galaxyp#679 could not find a test.

Wondering if we can/should be a bit more strict .. in the sense that some of the tool testing / linting would lead to an error that is easily recognized, e.g. by adding a linter rule or fail the tests if a unknown format is used ("input" in this case)

In the original implementation of the profile behavior (b92074e) it is stated "Disable format="input" - require explicit metadata targets (metadata_source, format_source).". Currently "disable" means that just the format is set to the invalid datatype "input". Wondering if we want to change this to really disable this, e.g. by just failing tool execution.

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 23.1 milestone Feb 1, 2023
@mvdbeek
Copy link
Member

mvdbeek commented Feb 2, 2023

Is making that a linting error enough ?

@bernt-matthias
Copy link
Contributor Author

Is making that a linting error enough ?

Yes, lets do this.

@bernt-matthias bernt-matthias marked this pull request as draft February 2, 2023 11:24
@bernt-matthias bernt-matthias force-pushed the test/profile-format-input branch 2 times, most recently from e17310b to 0b05080 Compare March 7, 2023 12:38
@bernt-matthias bernt-matthias marked this pull request as ready for review March 7, 2023 12:39
@mvdbeek
Copy link
Member

mvdbeek commented Jun 21, 2023

There's a conflict here, otherwise this looks fine to me.

@mvdbeek mvdbeek modified the milestones: 23.1, 23.2 Jun 21, 2023
@bernt-matthias
Copy link
Contributor Author

Good to go 😁

)
if profile <= "16.01":
lint_ctx.warn(
f"Using format='input' on {node.tag}: format_source attribute is less ambiguous and should be used instead (with a non-legacy tool profile).",
Copy link
Member

@mvdbeek mvdbeek Jul 31, 2023

Choose a reason for hiding this comment

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

Why not use the same message ? It'll work with or without profile version, and that's another linter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean: I should use this warning irrespective of the profile?

Copy link
Member

Choose a reason for hiding this comment

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

Yes

Copy link
Member

@mvdbeek mvdbeek Jul 31, 2023

Choose a reason for hiding this comment

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

But use the one from below. No need to refer to the profile version, that is handled by another linter.

irrespective of the profile
Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

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

Thanks that's quite an important linter.

@bernt-matthias bernt-matthias merged commit c3ee00b into galaxyproject:dev Aug 6, 2023
41 checks passed
@bernt-matthias bernt-matthias deleted the test/profile-format-input branch August 6, 2023 06:45
@github-actions
Copy link

github-actions bot commented Aug 6, 2023

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

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.

3 participants