repo stringclasses 2
values | instance_id stringlengths 20 22 | base_commit stringlengths 40 40 | patch stringlengths 359 13.9k | test_patch stringlengths 399 19.2k | problem_statement stringlengths 263 6.19k | hints_text stringlengths 0 14.2k | created_at stringdate 2018-02-07 15:05:31 2023-06-27 19:48:18 | version stringclasses 11
values | FAIL_TO_PASS stringlengths 38 32.6k | PASS_TO_PASS stringlengths 2 107k | environment_setup_commit stringclasses 12
values | difficulty stringclasses 3
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
astropy/astropy | astropy__astropy-13033 | 298ccb478e6bf092953bca67a3d29dc6c35f6752 | diff --git a/astropy/timeseries/core.py b/astropy/timeseries/core.py
--- a/astropy/timeseries/core.py
+++ b/astropy/timeseries/core.py
@@ -55,6 +55,13 @@ class BaseTimeSeries(QTable):
_required_columns_relax = False
def _check_required_columns(self):
+ def as_scalar_or_list_str(obj):
+ if ... | diff --git a/astropy/timeseries/tests/test_sampled.py b/astropy/timeseries/tests/test_sampled.py
--- a/astropy/timeseries/tests/test_sampled.py
+++ b/astropy/timeseries/tests/test_sampled.py
@@ -395,6 +395,14 @@ def test_required_columns():
assert exc.value.args[0] == ("TimeSeries object is invalid - expected "
... | ## Issue Description
TimeSeries required-column validation raises a misleading ValueError when non-first required columns are missing. After column-modifying operations the autocheck_required_columns wrapper calls the TimeSeries required-column check which formats an error like "expected 'time' as the first columns but... | The relevant code that produces the misleading exception.
https://github.com/astropy/astropy/blob/00ccfe76113dca48d19396986872203dc2e978d7/astropy/timeseries/core.py#L77-L82
It works under the assumption that `time` is the only required column. So when a `TimeSeries` object has additional required columns, the me... | 2022-03-31T23:28:27Z | 4.3 | ["astropy/timeseries/tests/test_sampled.py::test_required_columns"] | ["astropy/timeseries/tests/test_sampled.py::test_empty_initialization", "astropy/timeseries/tests/test_sampled.py::test_empty_initialization_invalid", "astropy/timeseries/tests/test_sampled.py::test_initialize_only_time", "astropy/timeseries/tests/test_sampled.py::test_initialization_with_data", "astropy/timeseries/tes... | 298ccb478e6bf092953bca67a3d29dc6c35f6752 | 15 min - 1 hour |
astropy/astropy | astropy__astropy-13977 | 5250b2442501e6c671c6b380536f1edb352602d1 | diff --git a/astropy/units/quantity.py b/astropy/units/quantity.py
--- a/astropy/units/quantity.py
+++ b/astropy/units/quantity.py
@@ -633,53 +633,70 @@ def __array_ufunc__(self, function, method, *inputs, **kwargs):
Returns
-------
- result : `~astropy.units.Quantity`
+ result : `~ast... | diff --git a/astropy/units/tests/test_quantity.py b/astropy/units/tests/test_quantity.py
--- a/astropy/units/tests/test_quantity.py
+++ b/astropy/units/tests/test_quantity.py
@@ -505,11 +505,10 @@ def test_incompatible_units(self):
def test_non_number_type(self):
q1 = u.Quantity(11.412, unit=u.meter)
- ... | ## Issue Description
Quantity.__array_ufunc__ raises ValueError when an operand cannot be coerced by the unit-converter (core._condition_arg), instead of returning NotImplemented. This prevents Python/numpy from trying the reflected operation (e.g., __radd__) on a duck-type operand (user DuckArray). The behavior violat... | @byrdie - I think you are right that really one should return `NotImplemented`. In general, the idea is indeed that one only works on classes that are recognized, while in the implementation that we have (which I wrote...) essentially everything that has a `unit` attribute is treated as a `Quantity`. I think it is a go... | 2022-11-01T22:24:58Z | 5.1 | ["astropy/units/tests/test_quantity_ufuncs.py::TestUfuncReturnsNotImplemented::TestBinaryUfuncs::test_full[None-duck_quantity0-quantity0-add]", "astropy/units/tests/test_quantity_ufuncs.py::TestUfuncReturnsNotImplemented::TestBinaryUfuncs::test_full[None-duck_quantity0-quantity0-less]", "astropy/units/tests/test_quanti... | ["astropy/units/tests/test_quantity.py::TestQuantityCreation::test_1", "astropy/units/tests/test_quantity.py::TestQuantityCreation::test_2", "astropy/units/tests/test_quantity.py::TestQuantityCreation::test_3", "astropy/units/tests/test_quantity.py::TestQuantityCreation::test_nan_inf", "astropy/units/tests/test_quantit... | 5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5 | 15 min - 1 hour |
astropy/astropy | astropy__astropy-13453 | 19cc80471739bcb67b7e8099246b391c355023ee | diff --git a/astropy/io/ascii/html.py b/astropy/io/ascii/html.py
--- a/astropy/io/ascii/html.py
+++ b/astropy/io/ascii/html.py
@@ -349,11 +349,13 @@ def write(self, table):
cols = list(table.columns.values())
self.data.header.cols = cols
+ self.data.cols = cols
if isinstance(self.d... | diff --git a/astropy/io/ascii/tests/test_html.py b/astropy/io/ascii/tests/test_html.py
--- a/astropy/io/ascii/tests/test_html.py
+++ b/astropy/io/ascii/tests/test_html.py
@@ -717,6 +717,49 @@ def test_multi_column_write_table_html_fill_values_masked():
assert buffer_output.getvalue() == buffer_expected.getvalue()
... | ## Issue Description
Writing an astropy Table with format="html" ignores the user-supplied formats mapping (callables or format-strings) and emits raw/unformatted cell text (full float repr). Other ascii writers (csv, rst, etc.) honor the same formats argument. Likely causes: html writer either never receives/forwards ... | Welcome to Astropy 👋 and thank you for your first issue!
A project member will respond to you as soon as possible; in the meantime, please double-check the [guidelines for submitting issues](https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md#reporting-issues) and make sure you've provided the requested deta... | 2022-07-14T10:04:40Z | 5.0 | ["astropy/io/ascii/tests/test_html.py::test_write_table_formatted_columns"] | ["astropy/io/ascii/tests/test_html.py::test_listwriter", "astropy/io/ascii/tests/test_html.py::test_htmlinputter_no_bs4", "astropy/io/ascii/tests/test_html.py::test_multicolumn_write", "astropy/io/ascii/tests/test_html.py::test_write_no_multicols", "astropy/io/ascii/tests/test_html.py::test_write_table_html_fill_values... | cdf311e0714e611d48b0a31eb1f0e2cbffab7f23 | 15 min - 1 hour |
astropy/astropy | astropy__astropy-14096 | 1a4462d72eb03f30dc83a879b1dd57aac8b2c18b | diff --git a/astropy/coordinates/sky_coordinate.py b/astropy/coordinates/sky_coordinate.py
--- a/astropy/coordinates/sky_coordinate.py
+++ b/astropy/coordinates/sky_coordinate.py
@@ -894,10 +894,8 @@ def __getattr__(self, attr):
if frame_cls is not None and self.frame.is_transformable_to(frame_cls):
... | diff --git a/astropy/coordinates/tests/test_sky_coord.py b/astropy/coordinates/tests/test_sky_coord.py
--- a/astropy/coordinates/tests/test_sky_coord.py
+++ b/astropy/coordinates/tests/test_sky_coord.py
@@ -2165,3 +2165,21 @@ def test_match_to_catalog_3d_and_sky():
npt.assert_array_equal(idx, [0, 1, 2, 3])
as... | ## Issue Description
Accessing a subclassed SkyCoord property whose getter raises AttributeError produces a misleading error: SkyCoord.__getattr__ catches AttributeError raised during nested lookups and re-raises a new AttributeError saying the top-level property (e.g. "prop") is missing, masking the real missing attri... | This is because the property raises an `AttributeError`, which causes Python to call `__getattr__`. You can catch the `AttributeError` in the property and raise another exception with a better message.
The problem is it's a nightmare for debugging at the moment. If I had a bunch of different attributes in `prop(self)`,... | 2022-12-04T17:06:07Z | 5.1 | ["astropy/coordinates/tests/test_sky_coord.py::test_subclass_property_exception_error"] | ["astropy/coordinates/tests/test_sky_coord.py::test_is_transformable_to_str_input", "astropy/coordinates/tests/test_sky_coord.py::test_transform_to", "astropy/coordinates/tests/test_sky_coord.py::test_round_tripping[ICRS-ICRS-None-None-None-None]", "astropy/coordinates/tests/test_sky_coord.py::test_round_tripping[ICRS-... | 5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5 | 15 min - 1 hour |
astropy/astropy | astropy__astropy-13398 | 6500928dc0e57be8f06d1162eacc3ba5e2eff692 | diff --git a/astropy/coordinates/builtin_frames/__init__.py b/astropy/coordinates/builtin_frames/__init__.py
--- a/astropy/coordinates/builtin_frames/__init__.py
+++ b/astropy/coordinates/builtin_frames/__init__.py
@@ -48,6 +48,7 @@
from . import icrs_cirs_transforms
from . import cirs_observed_transforms
from . imp... | diff --git a/astropy/coordinates/tests/test_intermediate_transformations.py b/astropy/coordinates/tests/test_intermediate_transformations.py
--- a/astropy/coordinates/tests/test_intermediate_transformations.py
+++ b/astropy/coordinates/tests/test_intermediate_transformations.py
@@ -194,6 +194,116 @@ def test_cirs_to_ha... | ## Issue Description
Transforming nearby ITRS positions to AltAz/HADec sometimes produces large, non-physical offsets (satellites/airplanes/buildings appear far away or wrong az/alt). Root cause: the transform graph or finite-difference machinery treats ITRS positions as time-varying via SSB/GCRS routing and/or finite-... | cc @StuartLittlefair, @adrn, @eteq, @eerovaher, @mhvk
Yes, would be good to address this recurring problem. But we somehow have to ensure it gets used only when relevant. For instance, the coordinates better have a distance, and I suspect it has to be near Earth...
Yeah, so far I've made no attempt at hardening this a... | 2022-06-24T15:22:11Z | 5.0 | ["astropy/coordinates/tests/test_intermediate_transformations.py::test_itrs_topo_to_altaz_with_refraction", "astropy/coordinates/tests/test_intermediate_transformations.py::test_itrs_topo_to_hadec_with_refraction", "astropy/coordinates/tests/test_intermediate_transformations.py::test_cirs_itrs_topo", "astropy/coordinat... | ["astropy/coordinates/tests/test_intermediate_transformations.py::test_icrs_gcrs[icoo0]", "astropy/coordinates/tests/test_intermediate_transformations.py::test_icrs_gcrs[icoo1]", "astropy/coordinates/tests/test_intermediate_transformations.py::test_icrs_gcrs_dist_diff[gframe0]", "astropy/coordinates/tests/test_intermed... | cdf311e0714e611d48b0a31eb1f0e2cbffab7f23 | 1-4 hours |
astropy/astropy | astropy__astropy-13236 | 6ed769d58d89380ebaa1ef52b300691eefda8928 | "diff --git a/astropy/table/table.py b/astropy/table/table.py\n--- a/astropy/table/table.py\n+++ b/a(...TRUNCATED) | "diff --git a/astropy/table/tests/test_mixin.py b/astropy/table/tests/test_mixin.py\n--- a/astropy/t(...TRUNCATED) | "## Issue Description\nWhen a structured numpy.ndarray is added to an Astropy Table it is automatica(...TRUNCATED) | "@mhvk - I'm happy to do this PR if you think it is a good idea.\nI agree there no longer is any rea(...TRUNCATED) | 2022-05-09T14:16:30Z | 5.0 | "[\"astropy/table/tests/test_mixin.py::test_ndarray_mixin[False]\", \"astropy/table/tests/test_table(...TRUNCATED) | "[\"astropy/table/tests/test_mixin.py::test_attributes[arrayswap]\", \"astropy/table/tests/test_mixi(...TRUNCATED) | cdf311e0714e611d48b0a31eb1f0e2cbffab7f23 | 15 min - 1 hour |
astropy/astropy | astropy__astropy-12907 | d16bfe05a744909de4b27f5875fe0d4ed41ce607 | "diff --git a/astropy/modeling/separable.py b/astropy/modeling/separable.py\n--- a/astropy/modeling/(...TRUNCATED) | "diff --git a/astropy/modeling/tests/test_separable.py b/astropy/modeling/tests/test_separable.py\n-(...TRUNCATED) | "## Issue Description\nseparability_matrix produces incorrect boolean dependency matrices for nested(...TRUNCATED) | 2022-03-03T15:14:54Z | 4.3 | "[\"astropy/modeling/tests/test_separable.py::test_separable[compound_model6-result6]\", \"astropy/m(...TRUNCATED) | "[\"astropy/modeling/tests/test_separable.py::test_coord_matrix\", \"astropy/modeling/tests/test_sep(...TRUNCATED) | 298ccb478e6bf092953bca67a3d29dc6c35f6752 | 15 min - 1 hour | |
astropy/astropy | astropy__astropy-14182 | a5917978be39d13cd90b517e1de4e7a539ffaa48 | "diff --git a/astropy/io/ascii/rst.py b/astropy/io/ascii/rst.py\n--- a/astropy/io/ascii/rst.py\n+++ (...TRUNCATED) | "diff --git a/astropy/io/ascii/tests/test_rst.py b/astropy/io/ascii/tests/test_rst.py\n--- a/astropy(...TRUNCATED) | "## Issue Description\nRST writer (astropy/io/ascii/rst.py) raises TypeError when caller passes writ(...TRUNCATED) | 2022-12-16T11:13:37Z | 5.1 | ["astropy/io/ascii/tests/test_rst.py::test_rst_with_header_rows"] | "[\"astropy/io/ascii/tests/test_rst.py::test_read_normal\", \"astropy/io/ascii/tests/test_rst.py::te(...TRUNCATED) | 5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5 | 15 min - 1 hour | |
astropy/astropy | astropy__astropy-14365 | 7269fa3e33e8d02485a647da91a5a2a60a06af61 | "diff --git a/astropy/io/ascii/qdp.py b/astropy/io/ascii/qdp.py\n--- a/astropy/io/ascii/qdp.py\n+++ (...TRUNCATED) | "diff --git a/astropy/io/ascii/tests/test_qdp.py b/astropy/io/ascii/tests/test_qdp.py\n--- a/astropy(...TRUNCATED) | "## Issue Description\nascii.qdp reader treats QDP commands case-sensitively. Lines like \"read serr(...TRUNCATED) | "Welcome to Astropy 👋 and thank you for your first issue!\n\nA project member will respond to you(...TRUNCATED) | 2023-02-06T19:20:34Z | 5.1 | ["astropy/io/ascii/tests/test_qdp.py::test_roundtrip[True]"] | "[\"astropy/io/ascii/tests/test_qdp.py::test_get_tables_from_qdp_file\", \"astropy/io/ascii/tests/te(...TRUNCATED) | 5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5 | 15 min - 1 hour |
astropy/astropy | astropy__astropy-14508 | a3f4ae6cd24d5ecdf49f213d77b3513dd509a06c | "diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py\n--- a/astropy/io/fits/card.py\n+++ (...TRUNCATED) | "diff --git a/astropy/io/fits/tests/test_header.py b/astropy/io/fits/tests/test_header.py\n--- a/ast(...TRUNCATED) | "## Issue Description\nio.fits.Card can expand floating-point values into unnecessarily long decimal(...TRUNCATED) | "Agreed this is a bug. As far as I know, python floats by default now have reprs that use the right (...TRUNCATED) | 2023-03-09T11:08:51Z | 5.1 | "[\"astropy/io/fits/tests/test_header.py::TestHeaderFunctions::test_floating_point_string_representa(...TRUNCATED) | "[\"astropy/io/fits/tests/test_header.py::test_shallow_copy\", \"astropy/io/fits/tests/test_header.p(...TRUNCATED) | 5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5 | 15 min - 1 hour |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 8