Skip to content

initial refactor for NamedArray - #8075

Merged
dcherian merged 83 commits into
pydata:mainfrom
andersy005:named-array
Sep 27, 2023
Merged

initial refactor for NamedArray#8075
dcherian merged 83 commits into
pydata:mainfrom
andersy005:named-array

Conversation

@andersy005

@andersy005andersy005 commented Aug 17, 2023

Copy link
Copy Markdown
Member

this pull request introduces the initial prototype for NamedArray as discussed in issue #8073. the intention is to approach the implementation in multiple phases through separate pull requests. the main objectives of this PR are as follows:

  1. creation of a new class, xarray.named_array.NamedArray, which will encompass most of the necessary functionality for the lightweight version of xarray.Variable. As a result, xarray.Variable will inherit from this class and implement specific functionality related to xarray.

  2. removal of all imports of internal Xarray classes and utilities from the xarray.named_array sub-package. the aim is to eliminate dependencies on anything within xarray.core. This will facilitate the future goal of moving named_array into its own standalone package, with xarray then depending on it.

@TomNicholas

Copy link
Copy Markdown
Member

Should we use namedarray over named_array?

@keewis

Copy link
Copy Markdown
Collaborator

Should we use namedarray over named_array?

the advantage is that the package name on PyPI / conda-forge would be the same as the import name

@TomNicholas

Copy link
Copy Markdown
Member

Also it's ironic that our NamedArray won't actually have a .name attribute, but at least pytorch's NamedTensor is guilty of the same sin 😅

@TomNicholasTomNicholas added the topic-NamedArray Lightweight version of Variable label Aug 17, 2023
Comment threadxarray/named_array/core.py Outdated
Comment threadxarray/named_array/utils.py Outdated
Comment threadxarray/named_array/utils.py Outdated
Comment threadxarray/named_array/utils.py Outdated
Comment threadxarray/named_array/utils.py Outdated
Comment threadxarray/named_array/core.py Outdated
Comment threadxarray/core/utils.py
Comment threadxarray/core/utils.py
Comment threadxarray/namedarray/core.py Outdated
Comment threadxarray/namedarray/core.py Outdated
Comment threadxarray/namedarray/core.py Outdated
Comment threadxarray/namedarray/core.py Outdated
Comment threadxarray/namedarray/core.py Outdated
andersy005and others added 4 commits August 18, 2023 16:28
Comment threadxarray/core/dataarray.py Outdated
Comment threadxarray/namedarray/core.py Outdated
Comment threadxarray/namedarray/core.py Outdated
Comment threadxarray/tests/test_namedarray.py Outdated
Comment threadxarray/namedarray/core.py Outdated
Comment threadxarray/tests/test_namedarray.py Outdated
Comment threadxarray/namedarray/core.py
Comment threadxarray/tests/test_namedarray.py Outdated
Comment threadxarray/tests/test_namedarray.py Outdated
Comment threadxarray/tests/test_namedarray.py Outdated
Comment threadxarray/tests/test_namedarray.py Outdated
Comment threadxarray/tests/test_namedarray.py Outdated
Comment threadxarray/tests/test_namedarray.py Outdated
Comment threadxarray/tests/test_namedarray.py Outdated
Comment threadxarray/tests/test_namedarray.py Outdated
Comment threadxarray/tests/test_namedarray.py Outdated
@andersy005

Copy link
Copy Markdown
MemberAuthor

this initial prototype is ready for another round of review. however, there is still a significant amount of work that needs to be done

we are keeping track of all the tasks in this project board. for those who are interested in following along or contributing, you can find the project board here: Link

Comment threadxarray/tests/test_namedarray.py
Comment threadxarray/namedarray/core.py Outdated
@dcherian

Copy link
Copy Markdown
Contributor

Thanks for adding the tests @andersy005 .

Let's move forward here.

@dcheriandcherian changed the title initial prototype for NamedArrayinitial refactor for NamedArraySep 27, 2023
@dcherian
dcherian merged commit c3b5ead into pydata:mainSep 27, 2023
@andersy005
andersy005 deleted the named-array branch September 27, 2023 15:35
@dcheriandcherian mentioned this pull request Sep 27, 2023
20 tasks
@ivirshupivirshup mentioned this pull request Sep 27, 2023
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs reviewrun-benchmarkRun the ASV benchmark workflowtopic-groupbytopic-NamedArrayLightweight version of Variabletopic-typing

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants

@andersy005@TomNicholas@keewis@dcherian@Illviljan@shoyer