home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "MEMBER", issue = 748379763 and user = 10194086 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 1

  • mathause · 4 ✖

issue 1

  • plot tests: ensure all figures are closed · 4 ✖

author_association 1

  • MEMBER · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
734759599 https://github.com/pydata/xarray/pull/4600#issuecomment-734759599 https://api.github.com/repos/pydata/xarray/issues/4600 MDEyOklzc3VlQ29tbWVudDczNDc1OTU5OQ== mathause 10194086 2020-11-27T10:17:32Z 2020-11-27T10:17:32Z MEMBER

Ok. let's get this in before the release. Thanks again @Nirupamkn @yashsaboo, happy to have you as contributors!

{
    "total_count": 3,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 2,
    "rocket": 0,
    "eyes": 0
}
  plot tests: ensure all figures are closed 748379763
733235217 https://github.com/pydata/xarray/pull/4600#issuecomment-733235217 https://api.github.com/repos/pydata/xarray/issues/4600 MDEyOklzc3VlQ29tbWVudDczMzIzNTIxNw== mathause 10194086 2020-11-24T21:10:16Z 2020-11-24T21:10:16Z MEMBER

Good catch! If you haven't lost patience, there are two more things that leave open figures: test_plot_transposed_nondim_coord and some of the tests in TestDiscreteColorMap.

  1. To fix the first both of these lines need to be enclosed in a figure_context (each line separately):

https://github.com/pydata/xarray/blob/f1e2f9d510a63480f4dd7917083cd982ac4d451d/xarray/tests/test_plot.py#L2431-L2432

  1. To fix the second you can add the following code

python yield # Remove all matplotlib figures plt.close("all") after the following line:

https://github.com/pydata/xarray/blob/f1e2f9d510a63480f4dd7917083cd982ac4d451d/xarray/tests/test_plot.py#L964

And you should give yourselves credit in what's new. That's now more than a one-liner ;-)


Just as an addendum. The figures in the PlotTestCase class are autoclosed by

https://github.com/pydata/xarray/blob/f1e2f9d510a63480f4dd7917083cd982ac4d451d/xarray/tests/test_plot.py#L128-L133

but only if no more than one figure is opened per method.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  plot tests: ensure all figures are closed 748379763
732445905 https://github.com/pydata/xarray/pull/4600#issuecomment-732445905 https://api.github.com/repos/pydata/xarray/issues/4600 MDEyOklzc3VlQ29tbWVudDczMjQ0NTkwNQ== mathause 10194086 2020-11-23T21:48:28Z 2020-11-23T21:48:28Z MEMBER

Thanks! There are two more instances that would be good to wrap in a figure_context.

https://github.com/pydata/xarray/blob/a28f0df559cf5a18fce6c4a78277d3ef60898c0f/xarray/tests/test_plot.py#L316

https://github.com/pydata/xarray/blob/a28f0df559cf5a18fce6c4a78277d3ef60898c0f/xarray/tests/test_plot.py#L1759

If you want you can also give yourselves credit in whats-new.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  plot tests: ensure all figures are closed 748379763
732041825 https://github.com/pydata/xarray/pull/4600#issuecomment-732041825 https://api.github.com/repos/pydata/xarray/issues/4600 MDEyOklzc3VlQ29tbWVudDczMjA0MTgyNQ== mathause 10194086 2020-11-23T09:36:25Z 2020-11-23T09:36:25Z MEMBER

Thanks for looking into this. Yes, closing the figure at the beginning is brittle, unless every test does it. However, it cannot be done at the end because else the figure is not closed if there is an error in the test (and the figure is still open at the start of the next test).

My preference is to enclose the test in a figure_context as already done for some of the tests: https://github.com/pydata/xarray/blob/9533c92c675a30b8c9803da8d5c9bc529763f3eb/xarray/tests/test_plot.py#L2456-L2457

figure_context is a small context manager that wraps a try: ... finally block, closing all open figures. https://github.com/pydata/xarray/blob/9533c92c675a30b8c9803da8d5c9bc529763f3eb/xarray/tests/test_plot.py#L49

I think all plt.clf() instances should be replaced with figure_context. I missed those in my PR (#4365). Let us know if you are up to that.

cc @dcherian

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  plot tests: ensure all figures are closed 748379763

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