- 
                Notifications
    
You must be signed in to change notification settings  - Fork 170
 
          feat(typing): Make Implementation less opaque
          #3016
        
          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
          
     Merged
      
      
    
  
     Merged
                    Changes from 1 commit
      Commits
    
    
            Show all changes
          
          
            59 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      2c36eea
              
                feat(typing): Make `Implementation` less opaque
              
              
                dangotbanned 2350dfc
              
                ci(typing): fix pyright coverage
              
              
                dangotbanned fe80d52
              
                ci: Handle descriptors in API reference
              
              
                dangotbanned 123dc2e
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 54bfbe4
              
                Merge remote-tracking branch 'upstream/main' into implementation-typing
              
              
                dangotbanned cadcdf0
              
                cov
              
              
                dangotbanned 5b2bc62
              
                add typing tests, tweak overloads
              
              
                dangotbanned 14974bc
              
                refactor(typing): Switch most overloads to `BaseFrame`
              
              
                dangotbanned 685409c
              
                feat(typing): Get basic `LazyFrame.implementation` working
              
              
                dangotbanned 0f83e44
              
                kinda support dask
              
              
                dangotbanned 49a10bd
              
                ci: try include `dask` in typing?
              
              
                dangotbanned fd2b93e
              
                aaaaand `modin` as well
              
              
                dangotbanned 618ce8c
              
                feat(typing): `duckdb` & `sqlframe` work!
              
              
                dangotbanned 0606a14
              
                kinda support `ibis`
              
              
                dangotbanned 37aaa69
              
                test(typing): Simplify Any/Into, also test lazy
              
              
                dangotbanned 141b687
              
                test(typing): Add `DataFrame.lazy` suite
              
              
                dangotbanned cabedd4
              
                refactor: Prepare for `Series` support
              
              
                dangotbanned 71c5163
              
                extend this overload abomination
              
              
                dangotbanned 2b7945b
              
                refactor: Move `_ImplDescriptor` to `_utils`
              
              
                dangotbanned c573cfd
              
                feat(typing): Add (new) `Series.implementation`
              
              
                dangotbanned 410b5bd
              
                oop
              
              
                dangotbanned e07cbc5
              
                test(typing): Add `Series` tests
              
              
                dangotbanned c4bceed
              
                test: Redo everything, check collect as well
              
              
                dangotbanned c8dbe07
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned eaa43c1
              
                docs: Ensure `BaseFrame.implementation` shows in api ref
              
              
                dangotbanned 5ef8103
              
                fix(typing): `ibis`, `dask` work!!!
              
              
                dangotbanned f55cb3a
              
                fix(typing): Unbreak `modin`
              
              
                dangotbanned 811290c
              
                test(typing): Check `mpd.Series` too
              
              
                dangotbanned 012c2bf
              
                typo
              
              
                dangotbanned b0694d0
              
                fix `mpd.Series`
              
              
                dangotbanned 2a75529
              
                chore: Add overload for pyspark
              
              
                dangotbanned 7d42972
              
                simplify, add notes
              
              
                dangotbanned fd736c6
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 5d2f54f
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 05d4115
              
                rename, add brief doc to `_Implementation`
              
              
                dangotbanned 87d4439
              
                refactor: Rename `NarwhalsObj` -> `Narwhals`
              
              
                dangotbanned bee6984
              
                tighten up `Narwhals` w/ `Compliant`
              
              
                dangotbanned 1c68c68
              
                docs(typing): Add `Narwhals` explainer
              
              
                dangotbanned fcafec6
              
                docs: Add crossref to `Implementation`
              
              
                dangotbanned 7157bbd
              
                refactor: shrinking
              
              
                dangotbanned 08d900c
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned b2aaf0d
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 635b5a8
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 5049a2a
              
                docs: Explain typing test structure
              
              
                dangotbanned 4b78837
              
                Update narwhals/_utils.py
              
              
                dangotbanned 29daf5e
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned f6da9ce
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned fe21d09
              
                Merge remote-tracking branch 'upstream/main' into implementation-typing
              
              
                dangotbanned a94a0f8
              
                test(typing): Update for (#3032)
              
              
                dangotbanned 884d135
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 4ad081c
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 791ecae
              
                ci: Exclude `OrderedDict` methods from `check-api-reference`
              
              
                dangotbanned a3bd3ac
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 043b9d1
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 6b59ed9
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 919b22f
              
                Merge remote-tracking branch 'upstream/main' into implementation-typing
              
              
                dangotbanned 5e2838e
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 6bc2c47
              
                Merge branch 'main' into implementation-typing
              
              
                dangotbanned 21800fe
              
                ci: Try adding `--group 'typing-ci'`
              
              
                dangotbanned File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -11,7 +11,6 @@ | |
| import pytest | ||
| 
     | 
||
| import narwhals as nw | ||
| from narwhals._utils import is_eager_allowed | ||
| from narwhals.exceptions import ComputeError, InvalidOperationError | ||
| from tests.conftest import ( | ||
| dask_lazy_p1_constructor, | ||
| 
          
            
          
           | 
    @@ -114,11 +113,8 @@ def test_is_close_series_with_series( | |
| ) -> None: | ||
| df = nw.from_native(constructor_eager(data), eager_only=True) | ||
| x, y = df["x"], df["y"] | ||
| backend = df.implementation | ||
| assert is_eager_allowed(backend) | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π₯³  | 
||
| 
     | 
||
| nulls = nw.new_series( | ||
| name="nulls", values=[None] * len(x), dtype=nw.Float64(), backend=backend | ||
| "nulls", [None] * len(x), nw.Float64(), backend=df.implementation | ||
| ) | ||
| x = x.zip_with(x != NAN_PLACEHOLDER, x**0.5).zip_with(x != NULL_PLACEHOLDER, nulls) | ||
| y = y.zip_with(y != NAN_PLACEHOLDER, y**0.5).zip_with(y != NULL_PLACEHOLDER, nulls) | ||
| 
        
          
        
         | 
    @@ -141,11 +137,8 @@ def test_is_close_series_with_scalar( | |
| ) -> None: | ||
| df = nw.from_native(constructor_eager(data), eager_only=True) | ||
| y = df["y"] | ||
| backend = df.implementation | ||
| assert is_eager_allowed(backend) | ||
| 
     | 
||
| nulls = nw.new_series( | ||
| name="nulls", values=[None] * len(y), dtype=nw.Float64(), backend=backend | ||
| "nulls", [None] * len(y), nw.Float64(), backend=df.implementation | ||
| ) | ||
| y = y.zip_with(y != NAN_PLACEHOLDER, y**0.5).zip_with(y != NULL_PLACEHOLDER, nulls) | ||
| result = y.is_close(other, abs_tol=abs_tol, rel_tol=rel_tol, nans_equal=nans_equal) | ||
| 
          
            
          
           | 
    ||
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.