Skip to content

A neater way to add attrs#71

Merged
pp-mo merged 7 commits intomainfrom
attrs_init_convenience
Jun 25, 2024
Merged

A neater way to add attrs#71
pp-mo merged 7 commits intomainfrom
attrs_init_convenience

Conversation

@pp-mo
Copy link
Member

@pp-mo pp-mo commented May 8, 2024

For now, just a placeholder, since some working out + testing required.
WIP
Now functionally complete, and tested.
But it will now be simpler to await #70, to avoid forcing a rebase of that.
ALSO

The objective is to replace e.g. :

NcVariable(
    "var_z", dimensions=("z"), data=np.arange(N_Z),
    attributes=[
        NcAttribute("a", 1),
        NcAttribute("units", "m")
    ]
),

with the simpler ...

NcVariable(
    "var_z", dimensions=("z"), data=np.arange(N_Z),
    attributes={"a": 1, "units": "m"}
),

@pp-mo pp-mo mentioned this pull request May 13, 2024
6 tasks
@pp-mo pp-mo marked this pull request as ready for review June 25, 2024 06:56
@pp-mo pp-mo force-pushed the attrs_init_convenience branch from b684977 to 62f4f48 Compare June 25, 2024 16:08
@pp-mo pp-mo merged commit 5961f38 into main Jun 25, 2024
@pp-mo pp-mo deleted the attrs_init_convenience branch August 15, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant