home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 677296128 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • spencerkclark 2
  • aidanheerdegen 1
  • stale[bot] 1

author_association 3

  • MEMBER 2
  • CONTRIBUTOR 1
  • NONE 1

issue 1

  • cftime_range fails for base cftime.datetime object · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1100692765 https://github.com/pydata/xarray/issues/4336#issuecomment-1100692765 https://api.github.com/repos/pydata/xarray/issues/4336 IC_kwDOAMm_X85Bmz0d stale[bot] 26384082 2022-04-16T15:43:46Z 2022-04-16T15:43:46Z NONE

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cftime_range fails for base cftime.datetime object 677296128
674011630 https://github.com/pydata/xarray/issues/4336#issuecomment-674011630 https://api.github.com/repos/pydata/xarray/issues/4336 MDEyOklzc3VlQ29tbWVudDY3NDAxMTYzMA== spencerkclark 6628425 2020-08-14T10:37:06Z 2020-08-14T10:37:06Z MEMBER

Ah, I think I see now. So you are arguing that in the case that generic cftime.datetime objects are provided we should cast them to whatever calendar is specified in the calendar argument (in the case that no calendar argument is provided, cftime.DatetimeGregorian)?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cftime_range fails for base cftime.datetime object 677296128
673783177 https://github.com/pydata/xarray/issues/4336#issuecomment-673783177 https://api.github.com/repos/pydata/xarray/issues/4336 MDEyOklzc3VlQ29tbWVudDY3Mzc4MzE3Nw== aidanheerdegen 6063709 2020-08-14T01:05:33Z 2020-08-14T01:05:33Z CONTRIBUTOR

Thanks for the link to the tests. Your pytest-fu is strong! You're right, I didn't spot those.

I guess my philosophical point was that this throws an error: python import cftime import xarray date = cftime.datetime(10,1,1) xarray.cftime_range(date, periods=3, freq='Y') but this doesn't: python import cftime import xarray date = cftime.datetime(10,1,1).isoformat() xarray.cftime_range(date, periods=3, freq='Y') due to the latter being transformed to cftime.DatetimeGregorian as there is a default calendar attribute for cftime_range:

https://github.com/pydata/xarray/blob/cafab46aac8f7a073a32ec5aa47e213a9810ed54/xarray/coding/cftime_offsets.py#L788

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cftime_range fails for base cftime.datetime object 677296128
672812271 https://github.com/pydata/xarray/issues/4336#issuecomment-672812271 https://api.github.com/repos/pydata/xarray/issues/4336 MDEyOklzc3VlQ29tbWVudDY3MjgxMjI3MQ== spencerkclark 6628425 2020-08-12T11:20:32Z 2020-08-12T11:20:32Z MEMBER

Indeed calendar-agnostic cftime.datetime objects are not supported. I agree error messages and documentation could be improved regarding this. We often use cftime.datetime as a shorthand to indicate that any one of cftime.DatetimeNoLeap, cftime.DatetimeGregorian, cftime.DatetimeProlepticGregorian, cftime.DatetimeJulian, cftime.Datetime360Day, cftime.DatetimeAllLeap (all subclasses of cftime.datetime) could be passed as inputs, even though cftime.datetime itself is not supported.

The primary cftime_range tests can be found here, where we do test calendar-aware datetime inputs of all calendar types.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cftime_range fails for base cftime.datetime object 677296128

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 11.352ms · About: xarray-datasette