home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

19 rows where issue = 624378150 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 5

  • aaronspring 13
  • dcherian 3
  • spencerkclark 1
  • keewis 1
  • pep8speaks 1

author_association 3

  • CONTRIBUTOR 13
  • MEMBER 5
  • NONE 1

issue 1

  • CFTimeIndex calendar in repr · 19 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
663138597 https://github.com/pydata/xarray/pull/4092#issuecomment-663138597 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY2MzEzODU5Nw== aaronspring 12237157 2020-07-23T17:36:56Z 2020-07-23T17:38:38Z CONTRIBUTOR

My pleasure. Learnt a lot.

And it was a long-standing issue that was mentioned in a medium article about xarray looking for more contributors.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
663049967 https://github.com/pydata/xarray/pull/4092#issuecomment-663049967 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY2MzA0OTk2Nw== dcherian 2448579 2020-07-23T14:47:19Z 2020-07-23T14:47:19Z MEMBER

Thanks @aaronspring this is a great contribution.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
662937499 https://github.com/pydata/xarray/pull/4092#issuecomment-662937499 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY2MjkzNzQ5OQ== spencerkclark 6628425 2020-07-23T10:42:40Z 2020-07-23T10:42:40Z MEMBER

Thanks again @aaronspring!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
638471679 https://github.com/pydata/xarray/pull/4092#issuecomment-638471679 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDYzODQ3MTY3OQ== pep8speaks 24736507 2020-06-03T21:28:21Z 2020-07-19T17:01:25Z NONE

Hello @aaronspring! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2020-07-19 17:01:25 UTC
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
660531286 https://github.com/pydata/xarray/pull/4092#issuecomment-660531286 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY2MDUzMTI4Ng== aaronspring 12237157 2020-07-18T19:34:29Z 2020-07-18T19:34:29Z CONTRIBUTOR

Thanks @aaronspring; this is looking very close! Just a few more minor suggestions.

I hope this is the final one. all tests pass. implemented your suggestions. took me a few commits, but I learned a lot. thanks for the guidance @spencerkclark

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
656111308 https://github.com/pydata/xarray/pull/4092#issuecomment-656111308 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY1NjExMTMwOA== keewis 14808389 2020-07-09T12:57:43Z 2020-07-09T12:57:43Z MEMBER

that's #4204. #4206 pinned the version of isort, so you should be able to get a green CI by merging master into your feature branch.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
656101309 https://github.com/pydata/xarray/pull/4092#issuecomment-656101309 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY1NjEwMTMwOQ== aaronspring 12237157 2020-07-09T12:35:49Z 2020-07-09T12:35:49Z CONTRIBUTOR

dont understand why isort fails

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
654743050 https://github.com/pydata/xarray/pull/4092#issuecomment-654743050 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY1NDc0MzA1MA== aaronspring 12237157 2020-07-07T10:00:18Z 2020-07-07T10:00:18Z CONTRIBUTOR

now aligns to display_width:

python for dw in [40,60,80,120]: with xr.set_options(display_width=dw): print(time[:2],dw,'\n')

``` CFTimeIndex([2000-01-01 00:00:00, 2000-01-02 00:00:00], dtype='object', length=2, calendar='gregorian') 40

CFTimeIndex([2000-01-01 00:00:00, 2000-01-02 00:00:00], dtype='object', length=2, calendar='gregorian') 60

CFTimeIndex([2000-01-01 00:00:00, 2000-01-02 00:00:00], dtype='object', length=2, calendar='gregorian') 80

CFTimeIndex([2000-01-01 00:00:00, 2000-01-02 00:00:00], dtype='object', length=2, calendar='gregorian') 120 ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
653742478 https://github.com/pydata/xarray/pull/4092#issuecomment-653742478 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY1Mzc0MjQ3OA== aaronspring 12237157 2020-07-04T09:10:57Z 2020-07-04T09:10:57Z CONTRIBUTOR

@spencerkclark I reimplemented the repr. Mostly went after the visuals. So now this looks like before but including calendar in the repr. Any more tests needed? Would you please give this a look?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
644035565 https://github.com/pydata/xarray/pull/4092#issuecomment-644035565 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY0NDAzNTU2NQ== aaronspring 12237157 2020-06-15T10:08:21Z 2020-06-15T10:08:21Z CONTRIBUTOR

I now reimplemented the visuals of pd.Index and also test against pd.Index.repr @spencerkclark

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
641182167 https://github.com/pydata/xarray/pull/4092#issuecomment-641182167 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY0MTE4MjE2Nw== aaronspring 12237157 2020-06-09T10:02:20Z 2020-06-09T15:31:03Z CONTRIBUTOR

now after clicking on the data item:

this PR is now ready for review. I don't understand why azure tests are failing.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
640096726 https://github.com/pydata/xarray/pull/4092#issuecomment-640096726 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY0MDA5NjcyNg== aaronspring 12237157 2020-06-06T17:59:49Z 2020-06-06T23:22:20Z CONTRIBUTOR

I found a workaround with to_index() in formatting.short_data_repr. this is makes one test fail: xarray/tests/test_dask.py TestDataArrayAndDataset.test_dataarray_repr. is this ok or not a valid way to implement a cftimeindex.repr?

EDIT: I ensure now that to_index is only done when if CFTimeIndex.

Ready for review.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
640073445 https://github.com/pydata/xarray/pull/4092#issuecomment-640073445 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDY0MDA3MzQ0NQ== aaronspring 12237157 2020-06-06T14:54:31Z 2020-06-06T14:54:31Z CONTRIBUTOR

Currently only the cftimeindex repr shows the calendar property. I aim to get it into the dataset/dataarray repr.

would it be a good idea to modify formatting.py.array_repr(array)? IndexVariable uses this repr. Once time is a coordinate, it becomes an IndexVariable. but the index variable doesnt have this cftime.calender property anymore. Should I try to add this calendar property to the array or would this not be desired?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
638913996 https://github.com/pydata/xarray/pull/4092#issuecomment-638913996 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDYzODkxMzk5Ng== aaronspring 12237157 2020-06-04T15:10:46Z 2020-06-04T15:10:46Z CONTRIBUTOR

I do understand the meaning of this last sentence @spencerkclark

My sense is that it is more important that indexes with the same date type have the same calendar attribute than that the calendar argument passed to cftime_range is propagated verbatim to the index it produces. What do you think?

Should I rather test on cftimeindex created in a different way?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
638779099 https://github.com/pydata/xarray/pull/4092#issuecomment-638779099 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDYzODc3OTA5OQ== aaronspring 12237157 2020-06-04T11:02:00Z 2020-06-04T11:02:00Z CONTRIBUTOR

This doesnt change the html repr yet: when clicking on the data symbol, calendar is not shown in the printout. I will further try to fix this

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
638302372 https://github.com/pydata/xarray/pull/4092#issuecomment-638302372 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDYzODMwMjM3Mg== aaronspring 12237157 2020-06-03T16:17:01Z 2020-06-03T16:17:01Z CONTRIBUTOR

I was hoping to inherit from pandas like: python def __repr__(self): super().__repr__() return self.__repr__().strip(")")+f", calendar={self.calendar}')"

But I will now try to rebuild as in pandas.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
637584966 https://github.com/pydata/xarray/pull/4092#issuecomment-637584966 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDYzNzU4NDk2Ng== dcherian 2448579 2020-06-02T14:37:28Z 2020-06-02T14:37:57Z MEMBER

Ah now I understand your questions. Thanks for clarifying.

My question was whether should replicate the pd.Index.repr or try to import or inherit as much as I can from pandas?

Maybe start by making the smallest possible change to the pandas repr?

EDIT: If we want to build our own repr, there are some helpful functions in core/formatting.py

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
637369697 https://github.com/pydata/xarray/pull/4092#issuecomment-637369697 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDYzNzM2OTY5Nw== aaronspring 12237157 2020-06-02T08:10:24Z 2020-06-02T08:10:24Z CONTRIBUTOR

how should I extend the __repr__ coming from pd.Index

if you define a __repr__ method under CFTimeIndex, won't it override pd.Index.__repr__?

Yes. I will do that. My question was whether should replicate the pd.Index.repr or try to import or inherit as much as I can from pandas?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150
637234055 https://github.com/pydata/xarray/pull/4092#issuecomment-637234055 https://api.github.com/repos/pydata/xarray/issues/4092 MDEyOklzc3VlQ29tbWVudDYzNzIzNDA1NQ== dcherian 2448579 2020-06-02T02:38:14Z 2020-06-02T02:38:14Z MEMBER

how should I extend the __repr__ coming from pd.Index

if you define a __repr__ method under CFTimeIndex, won't it override pd.Index.__repr__?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  CFTimeIndex calendar in repr 624378150

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 239.884ms · About: xarray-datasette