Skip to content

Conversation

kostrykin
Copy link
Contributor

Currently, running planemo shed_lint --tools --ensure_metadata --urls --biocontainers on a tool that defines containerized requirements instead of conda packages yields the warning

.. WARNING: No valid package requirement tags found to infer BioContainer from.

whichs makes the linting fail. Examples of this behavior are, but are not limited to:

This generally happens in the weekly linting workflows employed by many repositories, e.g.:
https://github.com/galaxyproject/tools-iuc/actions/runs/16405860532/workflow#L99-L107

However, the fact that there are no package requirements defined in those tools is a decision by design of those tools. It makes no sense to check the availability of Biocontainers for those tools, does it? Hence, I would consider these lint failures as false positives.

To cope with that, I suggest to suppress the warning if the tool only defines containerized requirements.

@mvdbeek
Copy link
Member

mvdbeek commented Jul 22, 2025

This is logged as a warning, which I think is the appropriate level for tools that only run containerized. You can chose to ignore particular warnings IIRC, ping @bernt-matthias.

@kostrykin
Copy link
Contributor Author

This is logged as a warning, which I think is the appropriate level for tools that only run containerized.

Yes, but since weekly linting runs with fail-level: warn (see, e.g., here), this causes the whole workflow to fail.

You can chose to ignore particular warnings IIRC, ping @bernt-matthias.

I'd very much appreciate getting to know how to ignore this warning!

@kostrykin kostrykin marked this pull request as ready for review July 22, 2025 12:44
@bernt-matthias
Copy link
Collaborator

You can chose to ignore particular warnings IIRC, ping @bernt-matthias.

Can you try to add requirements_in_conda to the .lint_skip file of the tool. Not 100% sure if this works for linters defined in planemo

Adding a check for defined containers seems also reasonable.

@kostrykin
Copy link
Contributor Author

You can chose to ignore particular warnings IIRC, ping @bernt-matthias.

Can you try to add requirements_in_conda to the .lint_skip file of the tool. Not 100% sure if this works for linters defined in planemo

This gives the error

Unknown linter type(s) ['requirements_in_conda'] in list of linters to be skipped. Known linters ['HelpMissing', 'HelpEmpty', 'HelpPresent', 'HelpTODO', 'HelpInvalidRST', 'HelpValidRST', 'CitationsMissing', 'CitationsNoText', 'CitationsFound', 'CitationsNoValid', 'CommandMissing', 'CommandEmpty', 'CommandTODO', 'CommandInterpreterDeprecated', 'CommandInfo', 'CWLValid', 'CWLInValid', 'CWLVersionMissing', 'CWLVersionUnknown', 'CWLVersionGood', 'CWLDockerMissing', 'CWLDockerGood', 'CWLDescriptionMissing', 'CWLHelpTODO', 'DatatypesCustomConf', 'ValidDatatypes', 'ToolVersionMissing', 'ToolVersionPEP404', 'ToolVersionWhitespace', 'ToolVersionValid', 'ToolNameMissing', 'ToolNameWhitespace', 'ToolNameValid', 'ToolIDMissing', 'ToolIDWhitespace', 'ToolIDValid', 'ToolProfileInvalid', 'ToolProfileLegacy', 'ToolProfileValid', 'RequirementNameMissing', 'RequirementVersionMissing', 'RequirementVersionWhitespace', 'ResourceRequirementExpression', 'BioToolsValid', 'EDAMTermsValid', 'InputsNum', 'InputsMissing', 'InputsMissingDataSource', 'InputsDatasourceTags', 'InputsName', 'InputsNameRedundantArgument', 'InputsNameEmpty', 'InputsNameValid', 'InputsNameDuplicate', 'InputsNameDuplicateOutput', 'InputsTypeChildCombination', 'InputsDataFormat', 'InputsDataOptionsMultiple', 'InputsDataOptionsAttrib', 'InputsDataOptionsFilterAttribFiltersType', 'InputsDataOptionsFiltersType', 'InputsDataOptionsFiltersRef', 'InputsSelectDynamicOptions', 'InputsSelectOptionsDef', 'InputsSelectOptionsDefConditional', 'InputsSelectOptionValueMissing', 'InputsSelectOptionDuplicateValue', 'InputsSelectOptionDuplicateText', 'InputsSelectOptionsMultiple', 'InputsSelectOptionsDefinesOptions', 'InputsSelectOptionsDeprecatedAttr', 'InputsSelectOptionsFromDatasetAndDatatable', 'InputsSelectOptionsMetaFileKey', 'InputsBoolDistinctValues', 'InputsBoolProblematic', 'InputsSelectSingleCheckboxes', 'InputsSelectMandatoryCheckboxes', 'InputsSelectMultipleRadio', 'InputsSelectOptionalRadio', 'ValidatorParamIncompatible', 'ValidatorAttribIncompatible', 'ValidatorHasText', 'ValidatorHasNoText', 'ValidatorExpression', 'ValidatorExpressionFuture', 'ValidatorMinMax', 'ValidatorDatasetMetadataEqualValue', 'ValidatorDatasetMetadataEqualValueOrJson', 'ValidatorMetadataCheckSkip', 'ValidatorTableName', 'ValidatorMetadataName', 'ConditionalParamTypeBool', 'ConditionalParamType', 'ConditionalParamIncompatibleAttributes', 'ConditionalWhenMissing', 'ConditionalOptionMissing', 'ConditionalOptionMissingBoolean', 'OutputsMissing', 'OutputsOutput', 'OutputsNameInvalidCheetah', 'OutputsNameDuplicated', 'OutputsFilterExpression', 'OutputsLabelDuplicatedFilter', 'OutputsLabelDuplicatedNoFilter', 'OutputsCollectionType', 'OutputsNumber', 'OutputsFormatInput', 'OutputsFormat', 'OutputsFormatSourceIncomp', 'StdIOAbsenceLegacy', 'StdIOAbsence', 'StdIORegex', 'TestsMissing', 'TestsMissingDatasource', 'TestsAssertsMultiple', 'TestsAssertsHasNQuant', 'TestsAssertsHasSizeQuant', 'TestsAssertsHasSizeOrValueQuant', 'TestsAssertionValidation', 'TestsCaseValidation', 'TestsExpectNumOutputs', 'TestsParamInInputs', 'TestsOutputName', 'TestsOutputDefined', 'TestsOutputCorresponding', 'TestsOutputCollectionCorresponding', 'TestsOutputCompareAttrib', 'TestsOutputCheckDiscovered', 'TestsOutputCollectionCheckDiscovered', 'TestsOutputCollectionCheckDiscoveredNested', 'TestsOutputFailing', 'TestsExpectNumOutputsFailing', 'TestsHasExpectations', 'TestsNoValid', 'TestsValid', 'XMLOrder', 'XSD']

Copy link
Collaborator

@bernt-matthias bernt-matthias left a comment

Choose a reason for hiding this comment

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

Makes perfect sense to me

conda_targets = tool_source_conda_targets(tool_source)
if not conda_targets:
lint_ctx.warn(MESSAGE_WARN_NO_REQUIREMENTS)
_, containers, *_ = tool_source.parse_requirements_and_containers()
Copy link
Member

Choose a reason for hiding this comment

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

This should still check that we have a biocontainer here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe I'm missing something here. But if this should always check for a Biocontainer, then this PR is pointless (the whole idea of this PR is to only check for Biocontainers in cases where it makes sense to expect a Biocontainer).

Why would it make sense to check for a Biocontainer if the wrapper specifies a custom container image? If I'm not mistaken, this is like producing a warning for every wrapper that uses a custom container image?

Still, if this PR is pointless, I'm still wondering how we are going to suppress the warnings for wrappers that use a custom container image. I think there is no mechanism for this in place yet.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree.

Copy link
Member

Choose a reason for hiding this comment

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

This is a warning that you can choose to ignore (as opposed to errors). The wider Galaxy ecosystem has agreed to bicontainers and caches them on CVMFS, custom images should make the iuc linter fail. You can select the warnings you want to ignore on a per directory basis. You can also ignore the biocontainers linter on a per tool basis. It is a valuable warning.

Copy link
Member

Choose a reason for hiding this comment

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

If I'm not mistaken, this is like producing a warning for every wrapper that uses a custom container image?

yes, that is the purpose of this linter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@kostrykin can you try to change

linters.extend(["version_bumped"])
to linters.extend(["version_bumped", "requirements_in_conda", "biocontainer_registered"]).

Then it might be possible to really add these linters to the skip list.

Copy link
Member

Choose a reason for hiding this comment

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

You should also be able to just omit the --biocontainers flag

Copy link
Collaborator

Choose a reason for hiding this comment

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

True, but if you want to use the linter for other tools it could be handy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants