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

removing redundant descriptions #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

locolupo
Copy link
Member

fixing #142

@mriehl
Copy link
Member

mriehl commented Jul 13, 2015

I think the descriptions should override each other instead, makes more sense to see the python specific description when the python version of run_unit_tests is used? This would mean always using the "last one".

@locolupo
Copy link
Member Author

I think the descriptions should override each other instead, makes more sense to see the python specific description when the python version of run_unit_tests is used? This would mean always using the "last one".

i understand but why do we need a "default" @description("foo") in the core_plugin.py? i think an empty description makes in more clear that you need a descripion in your plugin.

@mriehl
Copy link
Member

mriehl commented Jul 14, 2015

i understand but why do we need a "default" @description("foo") in the core_plugin.py? i think an empty description makes in more clear that you need a descripion in your plugin.

Yes you're right, but IMHO the override solution "just works" in all cases.
If you forget to add a description (or you don't want to) then at least you have the generic description.
If you want to specialize it and document some quirk or special addition, then you can do that.
If you want to completely change the description then you can also do that.

@locolupo
Copy link
Member Author

If you forget to add a description (or you don't want to) then at least you have the generic description.

to make it clear, this change has no influence on third-party plugins or optional plugins e.g pybuilder sphinx plugin. it's just for core_plugins, integration_tests_plugin andunit_tests_plugin

there is no extra benefit for plugin developers if we overwrite the descriptions in core_plugins

IMHO, but maybe i don't get it , pls help me to understand it

@mriehl
Copy link
Member

mriehl commented Jul 14, 2015

Well I think there is, a plugin that provides a run_unit_tests task is completely valid.

With overwrites I would get the generic unit test task description without having to do anything. If my plugin just runs unit tests then I shouldn't have to duplicate the "upstream" description.
Then again if there are any specifics I am free to overwrite it.

The advantage is that generic tasks have "sane default" descriptions that can still be overridden.
Without overwrites each unit test plugin would have to write a description "Runs unit tests" for their task, or something more specific.

@mriehl
Copy link
Member

mriehl commented Jul 14, 2015

Also it totally affects other plugins, if I have a plugin with a task called run_unit_tests but not the python core plugin enabled then I will not have a description.

I like the idea that we can refine task descriptions progressively:

  • core plugin: "Runs unit tests"
  • python core plugin: "Runs python unit tests"
  • tox plugin: "Runs python unit tests under all configured python environments using tox"

and so on

@locolupo
Copy link
Member Author

In general it sounds like a very good idea, but i think this is a new feature. Maybe we can sum it up in a new ticket. What do you think?

I just want to get rid of the dublicates but i understand that we need the override mechanism.

btw. if no description is provided you will get a placeholder <no description available>

@arcivanov arcivanov modified the milestone: v0.11.3 Dec 3, 2015
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.

None yet

3 participants