-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[24.2] Add linters for datatypes #17600
[24.2] Add linters for datatypes #17600
Conversation
de6143f
to
40c342a
Compare
- tools should only use available datatypes in inputs, outputs and tests - discourage the use of custom datatypes_conf.xml
20d20e1
to
c026305
Compare
ebc32d2
to
9f7df83
Compare
9f7df83
to
2bfb731
Compare
011f8e0
to
f8478d7
Compare
Would be interested to know why this did not make it into 24.2? It just feels very unsatisfying to open this months ago, spend time to update the branch multiple times, and make it ready prior to freeze, and even requesting review ahead of time to get this of the list before the busy times during the release. |
I am sorry - this was obviously an oversight. Merging now. |
This PR was merged without a "kind/" label, please correct. |
from galaxy.tool_util.lint import LintContext | ||
from galaxy.tool_util.parser import ToolSource | ||
|
||
DATATYPES_CONF = os.path.join(os.path.dirname(__file__), "datatypes_conf.xml.sample") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like:
from pkg_resources import resource_filename
DATATYPES_CONF = resource_filename('galaxy.config', 'sample/datatypes_conf.xml.sample')
would again require config
being installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think pkg_resources is deprecated, but using galaxy.util.resource_path
would be a minor improvement here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to rely on importlib.resources
, wouldn't this mean that we rely on config
again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've created a copy by including datatypes_conf.xml.sample"
in the manifest, so the galaxy.tool_util.linters
package should have that file.
How to test the changes?
(Select all options that apply)
License