Dataset Viewer
Auto-converted to Parquet Duplicate
repo
string
instance_id
string
base_commit
string
patch
string
test_patch
string
problem_statement
string
hints_text
string
created_at
string
version
string
FAIL_TO_PASS
string
PASS_TO_PASS
string
environment_setup_commit
string
difficulty
string
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...
A direct approach to ITRS to Observed transformations that stays within the ITRS. <!-- This comments are hidden when you submit the issue, so you do not need to remove them! --> <!-- Please be sure to check out our contributing guidelines, https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md . Please be s...
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-14508
a3f4ae6cd24d5ecdf49f213d77b3513dd509a06c
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -1298,31 +1298,17 @@ def _format_value(value): def _format_float(value): - """Format a floating number to make sure it gets the decimal point.""" - value_str = f"{value:.16G}" - if...
diff --git a/astropy/io/fits/tests/test_header.py b/astropy/io/fits/tests/test_header.py --- a/astropy/io/fits/tests/test_header.py +++ b/astropy/io/fits/tests/test_header.py @@ -137,6 +137,27 @@ def test_floating_point_value_card(self): ): assert str(c) == _pad("FLOATNUM= -4.6737463674763E+32") ...
`io.fits.Card` may use a string representation of floats that is larger than necessary ### Description In some scenarios, `io.fits.Card` may use a string representation of floats that is larger than necessary, which can force comments to be truncated. Due to this, there are some keyword/value/comment combinations that...
Agreed this is a bug. As far as I know, python floats by default now have reprs that use the right number of digits to be reproducible. So I think replacing this by `value_str = str(value)` should be totally fine. Do you want to try that and run the tests, to see if it works? If so, I think we should make that change ...
2023-03-09T11:08:51Z
5.1
["astropy/io/fits/tests/test_header.py::TestHeaderFunctions::test_floating_point_string_representation_card"]
["astropy/io/fits/tests/test_header.py::test_shallow_copy", "astropy/io/fits/tests/test_header.py::test_init_with_header", "astropy/io/fits/tests/test_header.py::test_init_with_dict", "astropy/io/fits/tests/test_header.py::test_init_with_ordereddict", "astropy/io/fits/tests/test_header.py::TestHeaderFunctions::test_ren...
5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5
15 min - 1 hour
astropy/astropy
astropy__astropy-14539
c0a24c1dc957a3b565294213f435fefb2ec99714
diff --git a/astropy/io/fits/diff.py b/astropy/io/fits/diff.py --- a/astropy/io/fits/diff.py +++ b/astropy/io/fits/diff.py @@ -1449,7 +1449,7 @@ def _diff(self): arrb.dtype, np.floating ): diffs = where_not_allclose(arra, arrb, rtol=self.rtol, atol=self.atol) - ...
diff --git a/astropy/io/fits/tests/test_diff.py b/astropy/io/fits/tests/test_diff.py --- a/astropy/io/fits/tests/test_diff.py +++ b/astropy/io/fits/tests/test_diff.py @@ -406,16 +406,17 @@ def test_identical_tables(self): c8 = Column("H", format="C", array=[0.0 + 1.0j, 2.0 + 3.0j]) c9 = Column("I", fo...
`io.fits.FITSDiff` may sometimes report differences between identical files ### Description In some scenarios, `io.fits.FITSDiff` may report differences between identical files, even when comparing the same file to itself. This may be caused by improper handling of VLAs (variable-length arrays). ### Expected behavior...
Seems due to the use of `Q`, only `P` is handled in the diff code. This: ``` --- astropy/io/fits/diff.py +++ astropy/io/fits/diff.py @@ -1449,7 +1449,7 @@ class TableDataDiff(_BaseDiff): arrb.dtype, np.floating ): diffs = where_not_allclose(arra, arrb, rtol=self.rto...
2023-03-16T18:45:19Z
5.1
["astropy/io/fits/tests/test_diff.py::TestDiff::test_identical_tables", "astropy/io/fits/tests/test_diff.py::TestDiff::test_different_table_data"]
["astropy/io/fits/tests/test_diff.py::TestDiff::test_identical_headers", "astropy/io/fits/tests/test_diff.py::TestDiff::test_slightly_different_headers", "astropy/io/fits/tests/test_diff.py::TestDiff::test_common_keywords", "astropy/io/fits/tests/test_diff.py::TestDiff::test_different_keyword_count", "astropy/io/fits/t...
5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5
15 min - 1 hour
astropy/astropy
astropy__astropy-14995
b16c7d12ccbc7b2d20364b89fb44285bcbfede54
diff --git a/astropy/nddata/mixins/ndarithmetic.py b/astropy/nddata/mixins/ndarithmetic.py --- a/astropy/nddata/mixins/ndarithmetic.py +++ b/astropy/nddata/mixins/ndarithmetic.py @@ -520,10 +520,10 @@ def _arithmetic_mask(self, operation, operand, handle_mask, axis=None, **kwds): elif self.mask is None and ope...
diff --git a/astropy/nddata/mixins/tests/test_ndarithmetic.py b/astropy/nddata/mixins/tests/test_ndarithmetic.py --- a/astropy/nddata/mixins/tests/test_ndarithmetic.py +++ b/astropy/nddata/mixins/tests/test_ndarithmetic.py @@ -1310,3 +1310,42 @@ def test_raise_method_not_supported(): # raise error for unsupported ...
In v5.3, NDDataRef mask propagation fails when one of the operand does not have a mask ### Description This applies to v5.3. It looks like when one of the operand does not have a mask, the mask propagation when doing arithmetic, in particular with `handle_mask=np.bitwise_or` fails. This is not a problem in v5.2. ...
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...
2023-06-27T19:48:18Z
5.2
["astropy/nddata/mixins/tests/test_ndarithmetic.py::test_nddata_bitmask_arithmetic"]
["astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data10-data20]", "astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data11-data21]", "astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data12-data22]", "astropy/nddata/mixins/tests/test_ndarithmetic.py...
362f6df12abf9bd769d4915fabf955c993ea22cf
<15 min fix
astropy/astropy
astropy__astropy-7166
26d147868f8a891a6009a25cd6a8576d2e1bd747
diff --git a/astropy/utils/misc.py b/astropy/utils/misc.py --- a/astropy/utils/misc.py +++ b/astropy/utils/misc.py @@ -4,9 +4,6 @@ A "grab bag" of relatively small general-purpose utilities that don't have a clear module/package to live in. """ - - - import abc import contextlib import difflib @@ -27,7 +24,6 @@ ...
diff --git a/astropy/utils/tests/test_misc.py b/astropy/utils/tests/test_misc.py --- a/astropy/utils/tests/test_misc.py +++ b/astropy/utils/tests/test_misc.py @@ -80,14 +80,26 @@ def __call__(self, *args): "FOO" pass + @property + def bar(self): + "BAR" + ...
InheritDocstrings metaclass doesn't work for properties Inside the InheritDocstrings metaclass it uses `inspect.isfunction` which returns `False` for properties.
This was as implemented back in #2159. I don't see any `inspect.isproperty`. Do you have any suggestions? I guess it should work with [inspect.isdatadescriptor](https://docs.python.org/3/library/inspect.html#inspect.isdatadescriptor). And I wonder if this class is still needed, it seems that it started with #2136 for...
2018-02-07T15:05:31Z
1.3
["astropy/utils/tests/test_misc.py::test_inherit_docstrings"]
["astropy/utils/tests/test_misc.py::test_isiterable", "astropy/utils/tests/test_misc.py::test_signal_number_to_name_no_failure", "astropy/utils/tests/test_misc.py::test_skip_hidden", "astropy/utils/tests/test_misc.py::test_JsonCustomEncoder", "astropy/utils/tests/test_misc.py::test_check_broadcast", "astropy/utils/test...
848c8fa21332abd66b44efe3cb48b72377fb32cc
<15 min fix
django/django
django__django-11292
eb16c7260e573ec513d84cb586d96bdf508f3173
diff --git a/django/core/management/base.py b/django/core/management/base.py --- a/django/core/management/base.py +++ b/django/core/management/base.py @@ -95,7 +95,7 @@ class DjangoHelpFormatter(HelpFormatter): """ show_last = { '--version', '--verbosity', '--traceback', '--settings', '--pythonpath',...
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py --- a/tests/user_commands/tests.py +++ b/tests/user_commands/tests.py @@ -253,6 +253,16 @@ def test_disallowed_abbreviated_options(self): self.assertNoOutput(err) self.assertEqual(out.strip(), 'Set foo') + def test_skip_chec...
Add --skip-checks option to management commands. Description Management commands already have skip_checks stealth option. I propose exposing this option on the command line. This would allow users to skip checks when running a command from the command line. Sometimes in a development environment, it is nice to move a...
2019-04-27T14:23:07Z
3.0
["test_skip_checks (user_commands.tests.CommandRunTests)"]
["test_get_random_secret_key (user_commands.tests.UtilsTests)", "test_is_ignored_path_false (user_commands.tests.UtilsTests)", "test_is_ignored_path_true (user_commands.tests.UtilsTests)", "test_no_existent_external_program (user_commands.tests.UtilsTests)", "test_normalize_path_patterns_truncates_wildcard_base (user_c...
419a78300f7cd27611196e1e464d50fd0385ff27
15 min - 1 hour
django/django
django__django-11400
1f8382d34d54061eddc41df6994e20ee38c60907
diff --git a/django/contrib/admin/filters.py b/django/contrib/admin/filters.py --- a/django/contrib/admin/filters.py +++ b/django/contrib/admin/filters.py @@ -193,11 +193,17 @@ def has_output(self): def expected_parameters(self): return [self.lookup_kwarg, self.lookup_kwarg_isnull] - def field_choice...
diff --git a/tests/admin_filters/tests.py b/tests/admin_filters/tests.py --- a/tests/admin_filters/tests.py +++ b/tests/admin_filters/tests.py @@ -591,6 +591,22 @@ class BookAdmin(ModelAdmin): expected = [(self.john.pk, 'John Blue'), (self.jack.pk, 'Jack Red')] self.assertEqual(filterspec.lookup_choic...
Ordering problem in admin.RelatedFieldListFilter and admin.RelatedOnlyFieldListFilter Description RelatedFieldListFilter doesn't fall back to the ordering defined in Model._meta.ordering. Ordering gets set to an empty tuple in ​https://github.com/django/django/blob/2.2.1/django/contrib/admin/filters.py#L196 and unle...
Sample project illustrating the problem. Navigate to /admin/foo/book and observer the order of Author in the list filters. Screenshot of RelatedOnlyFieldListFilter not ordering items. OK, yes, seems a reasonable suggestion if you'd like to work on it. Hello. We've updated our django recently and faced this bug. For me ...
2019-05-22T11:30:39Z
3.0
["test_get_choices_default_ordering (model_fields.tests.GetChoicesOrderingTests)", "test_get_choices_reverse_related_field_default_ordering (model_fields.tests.GetChoicesOrderingTests)", "RelatedFieldListFilter ordering respects Model.ordering.", "test_relatedfieldlistfilter_reverse_relationships_default_ordering (admi...
["test_choices_and_field_display (model_fields.tests.GetFieldDisplayTests)", "test_empty_iterator_choices (model_fields.tests.GetFieldDisplayTests)", "A translated display value is coerced to str.", "test_iterator_choices (model_fields.tests.GetFieldDisplayTests)", "test_check (model_fields.tests.ChoicesTests)", "test_...
419a78300f7cd27611196e1e464d50fd0385ff27
1-4 hours
django/django
django__django-11451
e065b293878b1e3ea56655aa9d33e87576cd77ff
diff --git a/django/contrib/auth/backends.py b/django/contrib/auth/backends.py --- a/django/contrib/auth/backends.py +++ b/django/contrib/auth/backends.py @@ -39,6 +39,8 @@ class ModelBackend(BaseBackend): def authenticate(self, request, username=None, password=None, **kwargs): if username is None: ...
diff --git a/tests/auth_tests/test_auth_backends.py b/tests/auth_tests/test_auth_backends.py --- a/tests/auth_tests/test_auth_backends.py +++ b/tests/auth_tests/test_auth_backends.py @@ -226,6 +226,19 @@ def test_authentication_timing(self): authenticate(username='no_such_user', password='test') self....
ModelBackend.authenticate() shouldn't make a database query when username is None Description It's easier to explain my issue by adding a comment in the current implementation of ModelBackend.authenticate(): def authenticate(self, request, username=None, password=None, **kwargs): if username is None: username =...
2019-06-08T19:11:42Z
3.0
["test_authentication_without_credentials (auth_tests.test_auth_backends.ModelBackendTest)", "test_custom_perms (auth_tests.test_auth_backends.ModelBackendTest)", "test_authentication_without_credentials (auth_tests.test_auth_backends.CustomPermissionsUserModelBackendTest)", "test_custom_perms (auth_tests.test_auth_bac...
["test_raises_exception (auth_tests.test_auth_backends.NoBackendsTest)", "test_get_all_permissions (auth_tests.test_auth_backends.BaseBackendTest)", "test_get_group_permissions (auth_tests.test_auth_backends.BaseBackendTest)", "test_get_user_permissions (auth_tests.test_auth_backends.BaseBackendTest)", "test_has_perm (...
419a78300f7cd27611196e1e464d50fd0385ff27
<15 min fix
django/django
django__django-11532
a5308514fb4bc5086c9a16a8a24a945eeebb073c
diff --git a/django/core/mail/message.py b/django/core/mail/message.py --- a/django/core/mail/message.py +++ b/django/core/mail/message.py @@ -16,7 +16,7 @@ from django.conf import settings from django.core.mail.utils import DNS_NAME -from django.utils.encoding import force_str +from django.utils.encoding import fo...
diff --git a/tests/mail/tests.py b/tests/mail/tests.py --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -14,10 +14,11 @@ from io import StringIO from smtplib import SMTP, SMTPAuthenticationError, SMTPException from ssl import SSLError +from unittest import mock from django.core import mail from django.core...
Email messages crash on non-ASCII domain when email encoding is non-unicode. Description When the computer hostname is set in unicode (in my case "正宗"), the following test fails: ​https://github.com/django/django/blob/master/tests/mail/tests.py#L368 Specifically, since the encoding is set to iso-8859-1, Python attemp...
Thanks for the report. Simple encoding should fix this issue, e.g. diff --git a/django/core/mail/utils.py b/django/core/mail/utils.py index d18dfe4667..68f9e464d6 100644 --- a/django/core/mail/utils.py +++ b/django/core/mail/utils.py @@ -14,6 +14,10 @@ class CachedDnsName: def get_fqdn(self): if not hasattr(self, '_fqd...
2019-07-02T10:29:28Z
3.0
["test_non_ascii_dns_non_unicode_email (mail.tests.MailTests)"]
["test_7bit (mail.tests.PythonGlobalState)", "test_8bit_latin (mail.tests.PythonGlobalState)", "test_8bit_non_latin (mail.tests.PythonGlobalState)", "test_utf8 (mail.tests.PythonGlobalState)", "test_date_header_localtime (mail.tests.MailTimeZoneTests)", "test_date_header_utc (mail.tests.MailTimeZoneTests)", "test_close...
419a78300f7cd27611196e1e464d50fd0385ff27
15 min - 1 hour
django/django
django__django-11734
999891bd80b3d02dd916731a7a239e1036174885
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -2332,10 +2332,6 @@ def get_db_prep_value(self, value, connection, prepared=False): value = connection.ops.validate_autopk_value(valu...
diff --git a/tests/queries/tests.py b/tests/queries/tests.py --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -6,7 +6,7 @@ from django.core.exceptions import EmptyResultSet, FieldError from django.db import DEFAULT_DB_ALIAS, connection -from django.db.models import Count, F, Q +from django.db.models imp...
OuterRef in exclude() or ~Q() uses wrong model. Description The following test (added to tests/queries/test_qs_combinators) fails when trying to exclude results using OuterRef() def test_exists_exclude(self): # filter() qs = Number.objects.annotate( foo=Exists( Item.objects.filter(tags__category_id=OuterRef('p...
Thanks for the report. ValueError was fixed in 35431298226165986ad07e91f9d3aca721ff38ec. Provided test fails on master with django.db.utils.ProgrammingError: missing FROM-clause entry for table "V0" LINE 1: ...(U1."tag_id" = U2."id") WHERE U2."category_id" = ("V0"."id")... It looks that OuterRef resolves to "V0"."id" i...
2019-09-01T18:46:50Z
3.0
["test_subquery_exclude_outerref (queries.tests.ExcludeTests)"]
["test_ticket8597 (queries.tests.ComparisonTests)", "#13227 -- If a queryset is already evaluated, it can still be used as a query arg", "test_no_fields_cloning (queries.tests.CloneTests)", "test_no_model_options_cloning (queries.tests.CloneTests)", "test_exists (queries.tests.ExistsSql)", "test_ticket_18414 (queries.t...
419a78300f7cd27611196e1e464d50fd0385ff27
15 min - 1 hour
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
7