narwhals icon indicating copy to clipboard operation
narwhals copied to clipboard

feat: dask expr `cast`

Open aidoskanapyanov opened this issue 1 year ago • 4 comments

What type of PR is this? (check all applicable)

  • [ ] 💾 Refactor
  • [x] ✨ Feature
  • [ ] 🐛 Bug Fix
  • [ ] 🔧 Optimization
  • [ ] 📝 Documentation
  • [ ] ✅ Test
  • [ ] 🐳 Other

Related issues

  • Related issue #637
  • Closes #

Checklist

  • [x] Code follows style guide (ruff)
  • [ ] Tests added
  • [ ] Documented the changes

If you have comments or can explain your changes, please do so below.

Implemented without preserving a dtype backend for now. Need to dig more into that :P

aidoskanapyanov avatar Aug 20 '24 11:08 aidoskanapyanov

Thanks for the review! :)

Some CI failures:

  • Coverage is dropping for some reason for pytest-38 (3.8, windows-latest)
  • Also, modin constructor is not failing, but marked as failing in pytest

aidoskanapyanov avatar Aug 21 '24 18:08 aidoskanapyanov

  • Coverage is dropping for some reason for pytest-38 (3.8, windows-latest)

I will take a look and see if I can spot anything

  • Also, modin constructor is not failing, but marked as failing in pytest

That's typically good news even though... why is that happening now 😂?

Edit: Feel free to remove such block and check against CI. Locally I was able to get all green dots, but I can't replicate on windows.

FBruzzesi avatar Aug 22 '24 07:08 FBruzzesi

I wonder why windows and linux pytest coverage CI show different results. For some reason windows run is flagging lots of lines as uncovered, whereas linux is flagging them as green.

For example, on my linux machine coverage report is saying all good for these lines: image

while the windows CI run is flagging lines 84-121:

2024-08-22T18:19:06.5566828Z narwhals\_dask\utils.py                             72     60     46      0    10%   18-45, 51-75, 79-80, 84-121

aidoskanapyanov avatar Aug 22 '24 19:08 aidoskanapyanov

I wonder why windows and linux pytest coverage CI show different results. For some reason windows run is flagging lots of lines as uncovered, whereas linux is flagging them as green.

Yeah, nevermind that, I figure CI coverage reports are a bit more involved than I understand rn. Gotta dig into it first.

aidoskanapyanov avatar Aug 22 '24 19:08 aidoskanapyanov

Hey there!

I think the problem with coverage for python 3.8 is that dask is entirely skipped (min python version is 3.9), therefore as we increase total number of functions, the coverage will gradually decrease.

I think you just unluckily hit the threshold number to push the total below 90%.

As all other workflows are passing, I would not worry too much about it. I think we will need to be smarter about it or come with another threshold value.

FBruzzesi avatar Aug 23 '24 07:08 FBruzzesi

Thanks @FBruzzesi ! Yeah, server error on the anaconda side by the looks of it. I've rerun the CI manually, it's passing now 😄

aidoskanapyanov avatar Aug 25 '24 19:08 aidoskanapyanov