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

Remove benchmark params slot, type core decorators #15

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

nicholasjng
Copy link
Collaborator

@nicholasjng nicholasjng commented Jan 23, 2024

This was redundant with the addition of the runner.run() params slot, and everything else can be handled directly via default arguments on the function itself.

The parametrization factory was updated to take the resulting partial instead.


Properly type and document the core decorators (d9a8d6b)

Previously, the decorator typing was suffering since no proper overloads were available for the parentheses vs. no parentheses cases. These are now added.

As a consequence, both varieties for both decorators now result in sensible return types. This also paves the way for an easier implementation of the cartesian product decorator coming up.

As a consequence of the removed params slot, the function in a parametrized benchmark is replaced by an update-wrapped partial, with the keyword arguments from the parametrization applied.

This was redundant with the addition of the `runner.run()` params slot,
and everything else can be handled directly via default arguments on the
function itself.

The parametrization factory was updated to take the resulting partial
instead.
Previously, the decorator typing was suffering since no proper overloads
were available for the parentheses vs. no parentheses cases. These are
now added.

As a consequence, both varieties for both decorators now result in
sensible return types. This also paves the way for an easier implementation
of the cartesian product decorator coming up.

As a consequence of the removed params slot, the function in a
parametrized benchmark is replaced by an update-wrapped partial, with
the keyword arguments from the parametrization applied.
@nicholasjng nicholasjng self-assigned this Jan 23, 2024
@nicholasjng
Copy link
Collaborator Author

Addresses point 1) of #3.

cc @maxmynter

@nicholasjng nicholasjng merged commit bc5e76a into main Jan 23, 2024
5 checks passed
@nicholasjng nicholasjng deleted the remove-benchmark-params-slot branch January 23, 2024 14:54
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.

1 participant