home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1040230765

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/6276#issuecomment-1040230765 https://api.github.com/repos/pydata/xarray/issues/6276 1040230765 IC_kwDOAMm_X84-AKlt 10194086 2022-02-15T12:45:53Z 2022-02-15T12:45:53Z MEMBER

Looks like you need to define a open_dataset_parameters class variable if you want to pass on kwargs. I would prefer this but I don't have much experience with the backends, so others opinions may differ @aurghs @alexamici

See for example:

https://github.com/pydata/xarray/blob/8c5c230881d616af32c5a42cca261eb11fce3916/xarray/backends/pseudonetcdf_.py#L107-L111

If you want to keep the named arguments I would probably avoid inspect and just pass kwargs that are not None:

```python kwargs = {"a": 5, "b": None}

only pass on kwargs that are not None -> pydap has some defaults that are not None

kwargs = {key: value for key, value in kwargs.items() if value is not None} ```

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1138440632
Powered by Datasette · Queries took 0.756ms · About: xarray-datasette