Skip to content

Add some type annotations.#1

Merged
rjzamora merged 4 commits intorjzamora:initial-collection-operationfrom
ian-r-rose:initial-collection-operation-typing
May 27, 2022
Merged

Add some type annotations.#1
rjzamora merged 4 commits intorjzamora:initial-collection-operationfrom
ian-r-rose:initial-collection-operation-typing

Conversation

@ian-r-rose
Copy link
Copy Markdown

Quick hit on some annotations that I find helpful, as per dask#9119 (comment) :)

from typing import Any, Callable, Hashable
from typing import Any, Callable

from typing_extensions import TypeAlias
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would require adding this to the requirements, but it's already added in distributed, so I wouldn't be too worried

"CollectionOperationType", bound="CollectionOperation"
)

@dataclass(frozen=True)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw no reason to make these dataclasses instead of an abstract interface

@rjzamora rjzamora self-requested a review May 27, 2022 15:44
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #1 (d28c976) into initial-collection-operation (0833429) will decrease coverage by 2.18%.
The diff coverage is 100.00%.

@@                       Coverage Diff                        @@
##           initial-collection-operation       #1      +/-   ##
================================================================
- Coverage                         92.14%   89.95%   -2.19%     
================================================================
  Files                               120      120              
  Lines                             28181    28163      -18     
================================================================
- Hits                              25966    25333     -633     
- Misses                             2215     2830     +615     
Impacted Files Coverage Δ
dask/dataframe/operation.py 52.48% <100.00%> (ø)
dask/operation.py 38.54% <100.00%> (+0.69%) ⬆️
dask/dataframe/io/orc/arrow.py 0.00% <0.00%> (-93.19%) ⬇️
dask/dot.py 27.17% <0.00%> (-67.18%) ⬇️
dask/dataframe/io/orc/core.py 28.16% <0.00%> (-66.20%) ⬇️
dask/array/numpy_compat.py 70.10% <0.00%> (-20.62%) ⬇️
dask/dataframe/io/io.py 77.23% <0.00%> (-15.57%) ⬇️
dask/highlevelgraph.py 79.12% <0.00%> (-12.32%) ⬇️
dask/blockwise.py 85.40% <0.00%> (-12.11%) ⬇️
dask/dataframe/optimize.py 82.79% <0.00%> (-9.68%) ⬇️
... and 30 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0833429...d28c976. Read the comment docs.

@rjzamora rjzamora merged commit 8fdbacf into rjzamora:initial-collection-operation May 27, 2022
rjzamora added a commit that referenced this pull request Jan 9, 2025
Updates `ReadParquet` to use metadata-parsing and IO logic from `dask.dataframe.io.parquet`.

Requires dask#9637 (only because my environment was using that PR when I put this together).
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.

3 participants