Skip to content

ENH: Deprecate @pytask.mark.parametrize. #233

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

Closed
tobiasraabe opened this issue Mar 7, 2022 · 0 comments · Fixed by #381
Closed

ENH: Deprecate @pytask.mark.parametrize. #233

tobiasraabe opened this issue Mar 7, 2022 · 0 comments · Fixed by #381
Labels
enhancement New feature or request feedback-wanted Feedback from everyone is requested.

Comments

@tobiasraabe
Copy link
Member

tobiasraabe commented Mar 7, 2022

Closes #224.

Is your feature request related to a problem?

#229 implements a more intuitive approach to parametrizations for v0.2 which is based on loops. It will likely render the pytest approach obsolete which allows us to simplify the interface and get rid of a lot of unnecessary code.

Describe the solution you'd like

Deprecate @pytask.mark.parametrize in a couple of steps.

Starting with some version in the early v0.2.x cycle, show a deprecation warning

  • Mention that parametrizations are deprecated from v0.3 or v1.0 on.
  • Mention that they need to pin pytask if they dont want to refactor the parametrizations.
  • Link to the tutorial for parametrizations for advice on refactoring.
  • Mention and implement a configuration value which allows to silence the warning
  • Add deprecation warning to the articles in the documentation.

Then, deprecate the approach in v0.3 or v1.0.

  • Remove _pytask.parametrize.
  • Remove hook pytask_parametrize_hook if there is no intention to move the code to a new plugin.
  • Rename pytask_parametrize_kwarg_to_marker or refactor it. It allows plugins to turn keyword arguments for tasks to markers. But, they could also extract the information from task.kwargs.
  • Remove any documentation related to it.

API breaking implications

@pytask.mark.parametrize will no longer exist.

Describe alternatives you've considered

It would be possible to move everything to its own pytask-parametrize plugin and allow people to continue with the old approach. Due to the maintenance effort, we are currently not pursuing this direction, but everyone is invited to pick it up.

@tobiasraabe tobiasraabe added the enhancement New feature or request label Mar 7, 2022
@tobiasraabe tobiasraabe added the feedback-wanted Feedback from everyone is requested. label Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feedback-wanted Feedback from everyone is requested.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant