-
Notifications
You must be signed in to change notification settings - Fork 2
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
Result File Dataclasses #166
base: main
Are you sure you want to change the base?
Conversation
…action`s are derived
Looks like the tests had been updated on |
49f5319
to
df5ce85
Compare
df5ce85
to
1dc94a9
Compare
- Make the `predicate` argument positional/keyword to match `apply`, `orderby`, and `groupby`. - Make something like `extractions.where(attrgetter("rejected"))` cleaner.
Couple quick updates:
For the latter, I designed the API to use the
|
I've done a significant rewrite of this PR in light of recent changes to the platform. It now aims to provide an API consistent with our v4 result file proposal. It uses IPA 6.8+ version 3 as the new baseline for result files with partial support for IPA 6.8+ version 1 (some attributes are not present in v1). It does not attempt to support version 2 result files or the various inconsistencies of IPA 6.7 and prior due to their limited use. Overall the code and the API are simpler and cleaner. I've dogfooded it in a couple projects and think it's ready for broader use and feedback. |
…st.where(review=None)` Use `None` for everything else to improve typing.
This PR adds a new set of dataclasses for working with result files as native Python types rather than nested
dict
s andlist
s.dict
, JSONstr
, orPath
predictions.where()
predictions.groupby()
predictions.orderby()
predictions.apply()
changes
dict suitable forSubmitReview
.See the example script for sample use cases and attribute references.
The dataclasses have been added as a new
indico_toolkit.results
module rather than replacingindico_toolkit.types
as originally planned. The existingtypes
module is used in many places, and updating its dependents would make this already-large PR much bigger. As a standalone PR this will be easier to review, andtypes
can be replaced piecemeal as needed in future PRs.