selection_rank int64 0 10k | uid stringlengths 17 29 | source stringclasses 7
values | split stringclasses 3
values | row_idx int64 0 58.9k | instance_id stringlengths 14 120 | repo stringclasses 246
values | repo_canon stringclasses 232
values | language stringclasses 8
values | base_commit stringlengths 40 40 ⌀ | problem_statement stringlengths 84 23.6k | extra_context stringclasses 626
values | hints stringlengths 0 59.3k | patch stringlengths 252 175k | test_patch stringlengths 0 358k | f2p stringlengths 10 155k ⌀ | p2p stringlengths 2 1.75M ⌀ | env_image stringlengths 41 154 ⌀ | env_available bool 1
class | created_at stringlengths 10 20 ⌀ | n_src_files int64 1 15 | src_lines int64 1 1.48k | n_f2p float64 1 1.87k ⌀ | ps_chars int64 84 23.6k | leak_ratio float64 0 0.6 | s_prior float64 0.6 1 | s_verif float64 0.75 1 | s_ps float64 0.04 1 | s_patch float64 0.07 1 | s_tiebreak float64 0.02 1 | score float64 47.9 98.6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9,700 | r2e_gym::train::4018 | r2e_gym | train | 4,018 | coveragepy__1a27df4c768e5a183ddd0f890d139996ffc52778 | coveragepy | nedbat/coveragepy | python | 1a27df4c768e5a183ddd0f890d139996ffc52778 | **[ISSUE]**
**Title:** Tokenizer Fails to Handle Backslashes in Comment Lines
**Description:**
When the tokenizer processes source code containing comments that end with a backslash, it fails to handle the backslash correctly. This results in discrepancies between the original source code and the tokenized output, ca... | diff --git a/CHANGES.rst b/CHANGES.rst
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -23,6 +23,10 @@
- A class named "test_something" no longer confuses the `test_function` dynamic
context setting. Fixes `issue 829`_.
+- Fixed an unusual tokenizing issue with backslashes in comments. Fixes
+ `issue 822`_.
+
+.. _issu... | diff --git a/tests/test_phystokens.py b/tests/test_phystokens.py
--- a/tests/test_phystokens.py
+++ b/tests/test_phystokens.py
@@ -43,6 +43,13 @@
[('ws', ' '), ('nam', 'b'), ('op', '='), ('str', '"indented"')],
]
+# https://github.com/nedbat/coveragepy/issues/822
+BUG_822 = u"""\
+print( "Message 1" )
+a... | null | null | namanjain12/coveragepy_final:1a27df4c768e5a183ddd0f890d139996ffc52778 | true | null | 2 | 13 | null | 885 | 0 | 0.75 | 1 | 0.525 | 1 | 0.190833 | 77.285 | ||
9,701 | r2e_gym::train::5326 | r2e_gym | train | 5,326 | aiohttp__0813710e44b911e40809131521e108cdb8451c7b | aiohttp | aio-libs/aiohttp | python | 0813710e44b911e40809131521e108cdb8451c7b | **Title:** `PATH_INFO` is incorrectly unquoted in `wsgi.py`, causing encoded characters to be decoded
**Description:**
When processing a WSGI request, the `PATH_INFO` environment variable should retain the original URL-encoded characters. However, it appears that `PATH_INFO` is being unquoted, which decodes characters... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,10 @@
CHANGES
=======
+
+0.10.2 (11-19-2014)
+-------------------
+
+- Don't unquote `environ['PATH_INFO']` in wsgi.py #177
0.10.1 (11-17-2014)
-------------------
diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py
--- a/aio... | diff --git a/tests/test_wsgi.py b/tests/test_wsgi.py
--- a/tests/test_wsgi.py
+++ b/tests/test_wsgi.py
@@ -273,3 +273,11 @@
[c[1][0] for c in self.writer.write.mock_calls])
self.assertTrue(content.startswith(b'HTTP/1.0 200 OK'))
self.assertTrue(content.endswith(b'data'))
+
+ def test_d... | null | null | namanjain12/aiohttp_final:0813710e44b911e40809131521e108cdb8451c7b | true | null | 3 | 11 | null | 924 | 0 | 0.75 | 1 | 0.525 | 1 | 0.190667 | 77.2845 | ||
9,702 | r2e_gym::train::5124 | r2e_gym | train | 5,124 | pyramid__39f91d2c2f334eed78d294549a8c654da0a035e4 | pyramid | pylons/pyramid | python | 39f91d2c2f334eed78d294549a8c654da0a035e4 | **Title:** `urlencode` encodes `None` values as `'None'` instead of empty strings in query parameters
**Description:**
When encoding query parameters, providing `None` as a value results in the parameter being set to `'None'` rather than an empty string. This leads to unexpected query strings where parameters with `No... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -22,6 +22,16 @@
- Removed mention of ``pyramid_beaker`` from docs. Beaker is no longer
maintained. Point people at ``pyramid_redis_sessions`` instead.
+
+Backwards Incompatibilities
+---------------------------
+
+- The key/values in... | diff --git a/pyramid/tests/test_encode.py b/pyramid/tests/test_encode.py
--- a/pyramid/tests/test_encode.py
+++ b/pyramid/tests/test_encode.py
@@ -41,6 +41,18 @@
result = self._callFUT({'a':1})
self.assertEqual(result, 'a=1')
+ def test_None_value(self):
+ result = self._callFUT([('a', Non... | null | null | namanjain12/pyramid_final:39f91d2c2f334eed78d294549a8c654da0a035e4 | true | null | 2 | 16 | null | 815 | 0 | 0.75 | 1 | 0.525 | 1 | 0.189167 | 77.28 | ||
9,703 | r2e_gym::train::191 | r2e_gym | train | 191 | orange3__cc3e1f4a253031bb49da2a3ce183c690c3e9b55f | orange3 | biolab/orange3 | python | cc3e1f4a253031bb49da2a3ce183c690c3e9b55f | **Unexpected `setup_plot` Calls During Perfect Domain Context Matching**
When the domain context perfectly matches the provided attributes and metas, the `setup_plot` method is still being called. This leads to unexpected behavior and causes related tests to fail.
**Example Code:**
```python
def test_invalidated_mod... | diff --git a/Orange/widgets/data/owselectcolumns.py b/Orange/widgets/data/owselectcolumns.py
--- a/Orange/widgets/data/owselectcolumns.py
+++ b/Orange/widgets/data/owselectcolumns.py
@@ -116,6 +116,9 @@
return decoded
def match(self, context, domain, attrs, metas):
+ if context.attributes == attr... | diff --git a/Orange/widgets/visualize/tests/test_owlinearprojection.py b/Orange/widgets/visualize/tests/test_owlinearprojection.py
--- a/Orange/widgets/visualize/tests/test_owlinearprojection.py
+++ b/Orange/widgets/visualize/tests/test_owlinearprojection.py
@@ -178,7 +178,7 @@
self.widget.setup_plot.reset_m... | null | null | namanjain12/orange3_final:cc3e1f4a253031bb49da2a3ce183c690c3e9b55f | true | null | 2 | 6 | null | 1,014 | 0 | 0.75 | 1 | 0.525 | 1 | 0.189 | 77.2795 | ||
9,704 | r2e_gym::train::5114 | r2e_gym | train | 5,114 | pyramid__568b583af39880991470a5a23b2f1d5755f7c566 | pyramid | pylons/pyramid | python | 568b583af39880991470a5a23b2f1d5755f7c566 | **Title:** Logging Not Configured in PRequestCommand Leading to Missing Logs
**Description:**
When executing the `PRequestCommand` with a specified application configuration, the logging setup is not initialized. This results in logs not being recorded as expected, which can hinder debugging and monitoring efforts.
*... | diff --git a/pyramid/scripts/prequest.py b/pyramid/scripts/prequest.py
--- a/pyramid/scripts/prequest.py
+++ b/pyramid/scripts/prequest.py
@@ -5,7 +5,7 @@
from pyramid.compat import url_unquote
from pyramid.request import Request
-from pyramid.paster import get_app
+from pyramid.paster import get_app, setup_logging... | diff --git a/pyramid/tests/test_scripts/test_prequest.py b/pyramid/tests/test_scripts/test_prequest.py
--- a/pyramid/tests/test_scripts/test_prequest.py
+++ b/pyramid/tests/test_scripts/test_prequest.py
@@ -210,7 +210,20 @@
self.assertEqual(self._path_info, '/')
self.assertEqual(self._spec, 'developme... | null | null | namanjain12/pyramid_final:568b583af39880991470a5a23b2f1d5755f7c566 | true | null | 1 | 8 | null | 967 | 0 | 0.75 | 1 | 0.525 | 1 | 0.187833 | 77.276 | ||
9,705 | r2e_gym::train::5795 | r2e_gym | train | 5,795 | tornado__22e8614fdd045a1d2ac264c9917814ae4852170b | tornado | tornadoweb/tornado | python | 22e8614fdd045a1d2ac264c9917814ae4852170b | **Title:** XSRF Validation Incorrectly Enforces Strict Token Length
**Description:**
When submitting an XSRF token that does not meet the strict 32-character length requirement, the server incorrectly rejects the token, resulting in a 403 Forbidden error. This behavior prevents the use of valid hexadecimal tokens of d... | diff --git a/tornado/web.py b/tornado/web.py
--- a/tornado/web.py
+++ b/tornado/web.py
@@ -1140,14 +1140,15 @@
else:
# Treat unknown versions as not present instead of failing.
return None, None, None
- elif len(cookie) == 32:
+ else:
version = 1... | diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py
--- a/tornado/test/web_test.py
+++ b/tornado/test/web_test.py
@@ -1954,6 +1954,20 @@
body=urllib_parse.urlencode(dict(_xsrf=self.xsrf_token)))
self.assertEqual(response.code, 403)
+ def test_xsrf_success_short_token(self):
+... | null | null | namanjain12/tornado_final:22e8614fdd045a1d2ac264c9917814ae4852170b | true | null | 1 | 9 | null | 946 | 0 | 0.75 | 1 | 0.525 | 1 | 0.187667 | 77.2755 | ||
9,706 | r2e_gym::train::5967 | r2e_gym | train | 5,967 | tornado__6e00a75a95dce06a28af949915e0194e61b1898e | tornado | tornadoweb/tornado | python | 6e00a75a95dce06a28af949915e0194e61b1898e | **Title:** OAuth 1.0a Sends Incorrect `oauth_version`, Causing Authentication Failures with Certain Providers
**Description:**
When using OAuth 1.0a for authentication, the `oauth_version` parameter is set to `"1.0a"`. However, according to the OAuth 1.0 specification, some providers strictly require the `oauth_versi... | diff --git a/tornado/auth.py b/tornado/auth.py
--- a/tornado/auth.py
+++ b/tornado/auth.py
@@ -367,7 +367,7 @@
oauth_signature_method="HMAC-SHA1",
oauth_timestamp=str(int(time.time())),
oauth_nonce=escape.to_basestring(binascii.b2a_hex(uuid.uuid4().bytes)),
- oauth_vers... | diff --git a/tornado/test/auth_test.py b/tornado/test/auth_test.py
--- a/tornado/test/auth_test.py
+++ b/tornado/test/auth_test.py
@@ -172,7 +172,7 @@
assert 'oauth_signature' in self.request.arguments
assert self.get_argument('oauth_consumer_key') == 'test_twitter_consumer_key'
assert self.g... | null | null | namanjain12/tornado_final:6e00a75a95dce06a28af949915e0194e61b1898e | true | null | 1 | 6 | null | 1,005 | 0 | 0.75 | 1 | 0.525 | 1 | 0.1875 | 77.275 | ||
9,707 | r2e_gym::train::5061 | r2e_gym | train | 5,061 | datalad__751902c5dddce92a1ae5d115c62d96f4498c730c | datalad | datalad/datalad | python | 751902c5dddce92a1ae5d115c62d96f4498c730c | **Title:** Unable to Retrieve System SSH Version, Returning `None`
**Description:**
When attempting to obtain the system-wide SSH version, the function fails and returns `None` instead of the actual version string. This issue affects any functionality that relies on knowing the SSH version installed on the system.
**... | diff --git a/datalad/__init__.py b/datalad/__init__.py
--- a/datalad/__init__.py
+++ b/datalad/__init__.py
@@ -125,7 +125,7 @@
lgr.debug("Printing versioning information collected so far")
from datalad.support.external_versions import external_versions as ev
# request versioning for few others which we d... | diff --git a/datalad/support/tests/test_external_versions.py b/datalad/support/tests/test_external_versions.py
--- a/datalad/support/tests/test_external_versions.py
+++ b/datalad/support/tests/test_external_versions.py
@@ -183,3 +183,19 @@
for v in thing_with_list_version, thing_with_tuple_version, '0.1', (0, 1)... | null | null | namanjain12/datalad_final:751902c5dddce92a1ae5d115c62d96f4498c730c | true | null | 2 | 21 | null | 701 | 0 | 0.75 | 1 | 0.525 | 1 | 0.186833 | 77.273 | ||
9,708 | r2e_gym::train::247 | r2e_gym | train | 247 | orange3__b95e774dc19f1bf6ce0bf0e6f858a3b9199c11d2 | orange3 | biolab/orange3 | python | b95e774dc19f1bf6ce0bf0e6f858a3b9199c11d2 | **Title:** Radio Buttons in ErrorBarsDialog Display Incorrect Labels
**Description:**
In the `ErrorBarsDialog`, the radio buttons intended for selecting error types are currently labeled "Difference" and "Absolute". However, these labels are not sufficiently descriptive, leading to confusion and causing related tests ... | diff --git a/Orange/widgets/visualize/utils/error_bars_dialog.py b/Orange/widgets/visualize/utils/error_bars_dialog.py
--- a/Orange/widgets/visualize/utils/error_bars_dialog.py
+++ b/Orange/widgets/visualize/utils/error_bars_dialog.py
@@ -36,8 +36,9 @@
lower_combo.setModel(self.__model)
lower_combo.cu... | diff --git a/Orange/widgets/visualize/utils/tests/test_error_bars_dialog.py b/Orange/widgets/visualize/utils/tests/test_error_bars_dialog.py
--- a/Orange/widgets/visualize/utils/tests/test_error_bars_dialog.py
+++ b/Orange/widgets/visualize/utils/tests/test_error_bars_dialog.py
@@ -21,10 +21,12 @@
self.assertE... | null | null | namanjain12/orange3_final:b95e774dc19f1bf6ce0bf0e6f858a3b9199c11d2 | true | null | 1 | 6 | null | 1,001 | 0 | 0.75 | 1 | 0.525 | 1 | 0.186833 | 77.273 | ||
9,709 | r2e_gym::train::5379 | r2e_gym | train | 5,379 | aiohttp__5b5bbd688c630f7200b9385ee3798f03ba5f279c | aiohttp | aio-libs/aiohttp | python | 5b5bbd688c630f7200b9385ee3798f03ba5f279c | **Title:** `Response.body` Defaults to `b''` Instead of `None`, Causing Unexpected Behavior
**Description:**
When initializing a `Response` object without specifying the `body`, the `body` attribute is set to an empty bytes object (`b''`) by default. This behavior contrasts with the expected default value of `None`, w... | diff --git a/aiohttp/web.py b/aiohttp/web.py
--- a/aiohttp/web.py
+++ b/aiohttp/web.py
@@ -280,7 +280,7 @@
class Response(StreamResponse):
- def __init__(self, request, body=b'', *, status_code=200, headers=None):
+ def __init__(self, request, body=None, *, status_code=200, headers=None):
super().__... | diff --git a/tests/test_web_response.py b/tests/test_web_response.py
--- a/tests/test_web_response.py
+++ b/tests/test_web_response.py
@@ -1,7 +1,7 @@
import asyncio
import unittest
from unittest import mock
-from aiohttp.web import Request, StreamResponse
+from aiohttp.web import Request, StreamResponse, Response
... | null | null | namanjain12/aiohttp_final:5b5bbd688c630f7200b9385ee3798f03ba5f279c | true | null | 1 | 7 | null | 975 | 0 | 0.75 | 1 | 0.525 | 1 | 0.185833 | 77.27 | ||
9,710 | r2e_gym::train::5784 | r2e_gym | train | 5,784 | tornado__674d7eb506b5569f8be19fd3cd363421dc095af4 | tornado | tornadoweb/tornado | python | 674d7eb506b5569f8be19fd3cd363421dc095af4 | Title: HTTPHeaders.copy() Merges Duplicate Headers Instead of Preserving Them
**Description**
When copying an `HTTPHeaders` object that contains multiple headers with the same name, the copied headers incorrectly merge the duplicate entries into a single header with combined values.
**Example Code**
```python
impor... | diff --git a/tornado/httputil.py b/tornado/httputil.py
--- a/tornado/httputil.py
+++ b/tornado/httputil.py
@@ -233,6 +233,14 @@
def copy(self):
# default implementation returns dict(self), not the subclass
return HTTPHeaders(self)
+
+ # Use our overridden copy method for the copy.copy module.
... | diff --git a/tornado/test/httputil_test.py b/tornado/test/httputil_test.py
--- a/tornado/test/httputil_test.py
+++ b/tornado/test/httputil_test.py
@@ -9,6 +9,7 @@
from tornado.test.util import unittest
from tornado.util import u
+import copy
import datetime
import logging
import time
@@ -280,6 +281,24 @@
... | null | null | namanjain12/tornado_final:674d7eb506b5569f8be19fd3cd363421dc095af4 | true | null | 1 | 8 | null | 942 | 0 | 0.75 | 1 | 0.525 | 1 | 0.183667 | 77.2635 | ||
9,711 | r2e_gym::train::5194 | r2e_gym | train | 5,194 | pyramid__bb9b72cf31a93479137ea7495c45bbfca7d1abb8 | pyramid | pylons/pyramid | python | bb9b72cf31a93479137ea7495c45bbfca7d1abb8 | **Title:** UnicodeEncodeError When Using High-Order Unicode Characters in Session Secret
**Description:**
When a session secret contains high-order Unicode characters, such as `'αβγδ'`, the serialization and deserialization processes fail. This is because the default `'latin-1'` encoding cannot handle these characters... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,9 @@
- Avoid crash in ``pserve --reload`` under Py3k, when iterating over posiibly
mutated ``sys.modules``.
+
+- ``UnencryptedCookieSessionFactoryConfig`` failed if the secret contained
+ higher order characters. See https://gi... | diff --git a/pyramid/tests/test_session.py b/pyramid/tests/test_session.py
--- a/pyramid/tests/test_session.py
+++ b/pyramid/tests/test_session.py
@@ -544,7 +544,7 @@
from pyramid.compat import native_
from pyramid.compat import pickle
pickled = pickle.dumps(data, pickle.HIGHEST_PROTOCOL)
- sig = hmac... | null | null | namanjain12/pyramid_final:bb9b72cf31a93479137ea7495c45bbfca7d1abb8 | true | null | 4 | 23 | null | 1,352 | 0 | 0.75 | 1 | 0.6375 | 0.85 | 0.302 | 77.26225 | ||
9,712 | r2e_gym::train::5100 | r2e_gym | train | 5,100 | pyramid__e5bf80f65c1ad3c634ee1fa29735842ec0916afc | pyramid | pylons/pyramid | python | e5bf80f65c1ad3c634ee1fa29735842ec0916afc | **Title:** `Request` Object Raises AttributeError When Accessing `localizer`
**Description:**
When trying to access the `localizer` attribute on a `Request` object, an `AttributeError` is raised because the attribute does not exist. This prevents the application from retrieving the appropriate `Localizer` instance for... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,9 @@
Features
--------
+
+- Add ``localizer`` property (reified) to the request.
+ See https://github.com/Pylons/pyramid/issues/508.
- Add ``pdistreport`` script, which prints the Python version in use, the
Pyramid version ... | diff --git a/pyramid/tests/test_i18n.py b/pyramid/tests/test_i18n.py
--- a/pyramid/tests/test_i18n.py
+++ b/pyramid/tests/test_i18n.py
@@ -230,39 +230,36 @@
from pyramid.i18n import get_localizer
return get_localizer(request)
- def test_no_registry_on_request(self):
- request = DummyReques... | null | null | namanjain12/pyramid_final:e5bf80f65c1ad3c634ee1fa29735842ec0916afc | true | null | 4 | 35 | null | 1,109 | 0 | 0.75 | 1 | 0.6375 | 0.85 | 0.3015 | 77.26075 | ||
9,713 | r2e_gym::train::5874 | r2e_gym | train | 5,874 | tornado__ecb3ea7543cc942659faf3d2144853018afa6139 | tornado | tornadoweb/tornado | python | ecb3ea7543cc942659faf3d2144853018afa6139 | **Title: StaticFileHandler Allows Path Traversal to Access Files Outside Static Directory**
**Description**
The `StaticFileHandler` currently permits accessing files outside the designated static root directory by using path traversal patterns. For instance, requesting `/static/../static_foo.txt` should not be allowed... | diff --git a/MANIFEST.in b/MANIFEST.in
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -9,6 +9,7 @@
include tornado/test/options_test.cfg
include tornado/test/static/robots.txt
include tornado/test/static/dir/index.html
+include tornado/test/static_foo.txt
include tornado/test/templates/utf8.html
include tornado/test/test.... | diff --git a/tornado/test/static_foo.txt b/tornado/test/static_foo.txt
--- a/tornado/test/static_foo.txt
+++ b/tornado/test/static_foo.txt
@@ -0,0 +1,2 @@
+This file should not be served by StaticFileHandler even though
+its name starts with "static".
diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py
---... | null | null | namanjain12/tornado_final:ecb3ea7543cc942659faf3d2144853018afa6139 | true | null | 3 | 12 | null | 853 | 0 | 0.75 | 1 | 0.525 | 1 | 0.182167 | 77.259 | ||
9,714 | r2e_gym::train::8 | r2e_gym | train | 8 | orange3__70a4df334835bcb9ea7c6b0eb11b4f5f7e117f36 | orange3 | biolab/orange3 | python | 70a4df334835bcb9ea7c6b0eb11b4f5f7e117f36 | **[ISSUE]**
**Title:** ContinuousVariable Fails to Display Scientific Notation for High Decimal Precision
**Description:**
When a `ContinuousVariable` is initialized with a number of decimals exceeding five, it does not display the value in scientific notation as expected. Instead, it truncates the number to the spec... | diff --git a/Orange/data/variable.py b/Orange/data/variable.py
--- a/Orange/data/variable.py
+++ b/Orange/data/variable.py
@@ -22,6 +22,7 @@
MISSING_VALUES = {np.nan, "?", "nan", ".", "", "NA", "~", None}
DISCRETE_MAX_VALUES = 3 # == 2 + nan
+MAX_NUM_OF_DECIMALS = 5
def make_variable(cls, compute_value, *args... | diff --git a/Orange/data/tests/test_variable.py b/Orange/data/tests/test_variable.py
--- a/Orange/data/tests/test_variable.py
+++ b/Orange/data/tests/test_variable.py
@@ -292,7 +292,12 @@
def test_decimals(self):
a = ContinuousVariable("a", 4)
self.assertEqual(a.str_val(4.654321), "4.6543")
+ ... | null | null | namanjain12/orange3_final:70a4df334835bcb9ea7c6b0eb11b4f5f7e117f36 | true | null | 1 | 6 | null | 972 | 0 | 0.75 | 1 | 0.525 | 1 | 0.182 | 77.2585 | ||
9,715 | r2e_gym::train::393 | r2e_gym | train | 393 | orange3__7857c4be27105f2240917f6a33f6681dd58c3b9f | orange3 | biolab/orange3 | python | 7857c4be27105f2240917f6a33f6681dd58c3b9f | **Title:** Inconsistent Hashing for Value Objects with Non-Discrete Variables Causes Mismatches
**Description:**
Creating a `Value` object with a non-discrete variable results in the hash of the `Value` not matching the hash of the underlying value. This inconsistency can lead to unexpected behavior when using `Value`... | diff --git a/Orange/data/variable.py b/Orange/data/variable.py
--- a/Orange/data/variable.py
+++ b/Orange/data/variable.py
@@ -207,10 +207,15 @@
raise TypeError("invalid operation on Value()")
def __hash__(self):
+ if self.variable.is_discrete:
+ # It is not possible to hash the id and... | diff --git a/Orange/tests/test_value.py b/Orange/tests/test_value.py
--- a/Orange/tests/test_value.py
+++ b/Orange/tests/test_value.py
@@ -5,7 +5,8 @@
import unittest
import numpy as np
-from Orange.data import Table, Domain, DiscreteVariable
+from Orange.data import Table, Domain, Value,\
+ DiscreteVariable, Co... | null | null | namanjain12/orange3_final:7857c4be27105f2240917f6a33f6681dd58c3b9f | true | null | 1 | 7 | null | 950 | 0 | 0.75 | 1 | 0.525 | 1 | 0.181667 | 77.2575 | ||
9,716 | r2e_gym::train::195 | r2e_gym | train | 195 | orange3__1a916d7bffde022f04cc4547d35adda82484d151 | orange3 | biolab/orange3 | python | 1a916d7bffde022f04cc4547d35adda82484d151 | **Title:** CSV Reader Fails to Handle Files with More Data Columns Than Headers
**Description:**
When reading a CSV file where data rows contain more columns than the header row, the CSV Reader does not issue a warning and fails to remove the extra columns.
**Example Buggy Code:**
```python
import io
from Orange.data... | diff --git a/Orange/data/io.py b/Orange/data/io.py
--- a/Orange/data/io.py
+++ b/Orange/data/io.py
@@ -618,14 +618,24 @@
# Determine maximum row length
rowlen = max(map(len, (names, types, flags)))
+ strip = False
+
def _equal_length(lst):
- lst.extend(['']*(rowlen - len(l... | diff --git a/Orange/tests/test_io.py b/Orange/tests/test_io.py
--- a/Orange/tests/test_io.py
+++ b/Orange/tests/test_io.py
@@ -5,6 +5,7 @@
import os
import tempfile
import shutil
+import io
from Orange.data import ContinuousVariable
from Orange.data.io import FileFormat, TabReader, CSVReader, PickleReader, \
@@ ... | null | null | namanjain12/orange3_final:1a916d7bffde022f04cc4547d35adda82484d151 | true | null | 1 | 12 | null | 847 | 0 | 0.75 | 1 | 0.525 | 1 | 0.181167 | 77.256 | ||
9,717 | r2e_gym::train::4043 | r2e_gym | train | 4,043 | coveragepy__857833e9e901e667f2f3ae419282f8e1a1dd0b6c | coveragepy | nedbat/coveragepy | python | 857833e9e901e667f2f3ae419282f8e1a1dd0b6c | **Title:** Documentation URL Missing Version Path for Final Releases
**Description:**
When generating the documentation URL for a final release, the URL does not include the version-specific path. This results in the documentation link pointing to the base Read the Docs URL instead of the specific versioned documentat... | diff --git a/CHANGES.rst b/CHANGES.rst
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -20,7 +20,10 @@
Unreleased
----------
-Nothing yet.
+- Fix: the PyPI page had broken links to documentation pages, but no longer
+ does, closing `issue 1566`_.
+
+.. _issue 1566: https://github.com/nedbat/coveragepy/issues/1566
.. s... | diff --git a/tests/test_version.py b/tests/test_version.py
--- a/tests/test_version.py
+++ b/tests/test_version.py
@@ -33,7 +33,8 @@
assert _make_version(5, 10, 2, 'candidate', 7, 3) == "5.10.2rc7.dev3"
def test_make_url(self) -> None:
- assert _make_url(4, 0, 0, 'final') == "https://coverage.rea... | null | null | namanjain12/coveragepy_final:857833e9e901e667f2f3ae419282f8e1a1dd0b6c | true | null | 2 | 14 | null | 804 | 0 | 0.75 | 1 | 0.525 | 1 | 0.180667 | 77.2545 | ||
9,718 | swe_bench::dev::51 | swe_bench | dev | 51 | pvlib__pvlib-python-1653 | pvlib/pvlib-python | pvlib/pvlib-python | python | faf27fee1fcbae3b7056bd02f9e98b7d6e5cb42d | Corrections to Townsend snow model
Private communications with the model's author have turned up some issues with the pvlib implementation. Chief among the issues is this part of the calculation:
```
lower_edge_height_clipped = np.maximum(lower_edge_height, 0.01)
gamma = (
slant_height
* effec... | Interestingly, clamping the difference of squares at 0.01 was part of the original PR but got lost along the way: https://github.com/pvlib/pvlib-python/pull/1251#discussion_r830258000
It would be great if the communication with the author results in improved tests as well as improved code.
After communications with ... | diff --git a/pvlib/snow.py b/pvlib/snow.py
--- a/pvlib/snow.py
+++ b/pvlib/snow.py
@@ -219,7 +219,7 @@ def _townsend_effective_snow(snow_total, snow_events):
def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity,
temp_air, poa_global, slant_height, lower_edge_height,
- ... | diff --git a/pvlib/tests/test_snow.py b/pvlib/tests/test_snow.py
--- a/pvlib/tests/test_snow.py
+++ b/pvlib/tests/test_snow.py
@@ -6,6 +6,8 @@
from pvlib import snow
from pvlib.tools import sind
+import pytest
+
def test_fully_covered_nrel():
dt = pd.date_range(start="2019-1-1 12:00:00", end="2019-1-1 18:00... | ["pvlib/tests/test_snow.py::test_loss_townsend", "pvlib/tests/test_snow.py::test_loss_townsend_cases[poa_global0-2.0-2.0066040132080265-0.07620015240030481-1.0-expected0]", "pvlib/tests/test_snow.py::test_loss_townsend_cases[poa_global1-5.0-8.026416052832106-3.0480060960121924-0.75-expected1]", "pvlib/tests/test_snow.p... | ["pvlib/tests/test_snow.py::test_fully_covered_nrel", "pvlib/tests/test_snow.py::test_coverage_nrel_hourly", "pvlib/tests/test_snow.py::test_coverage_nrel_subhourly", "pvlib/tests/test_snow.py::test_fully_covered_nrel_irregular", "pvlib/tests/test_snow.py::test_coverage_nrel_initial", "pvlib/tests/test_snow.py::test_dc... | null | true | 2023-01-28T00:30:44Z | 1 | 51 | 5 | 1,514 | 0.08 | 0.8 | 1 | 0.55 | 1 | 0.422333 | 77.253 | |
9,719 | r2e_gym::train::5810 | r2e_gym | train | 5,810 | tornado__8f71301ee5a6b2cad1fef5eabe890b992f08b3ce | tornado | tornadoweb/tornado | python | 8f71301ee5a6b2cad1fef5eabe890b992f08b3ce | **Title:** Autoreload Loop Doesn't Terminate Cleanly After Successful Run
**Description:**
When using `python -m tornado.autoreload` to run a process, attempting to shut it down after a successful execution results in a traceback instead of a clean exit. This behavior makes it difficult to gracefully terminate applica... | diff --git a/tornado/autoreload.py b/tornado/autoreload.py
--- a/tornado/autoreload.py
+++ b/tornado/autoreload.py
@@ -313,6 +313,11 @@
)
parser.disable_interspersed_args()
parser.add_option("-m", dest="module", metavar="module", help="module to run")
+ parser.add_option(
+ "--until-success",
+... | diff --git a/tornado/test/autoreload_test.py b/tornado/test/autoreload_test.py
--- a/tornado/test/autoreload_test.py
+++ b/tornado/test/autoreload_test.py
@@ -16,12 +16,12 @@
self.path = mkdtemp()
- # Each test app runs itself twice via autoreload. The first time it manually triggers
+ # Most... | null | null | namanjain12/tornado_final:8f71301ee5a6b2cad1fef5eabe890b992f08b3ce | true | null | 1 | 10 | null | 877 | 0 | 0.75 | 1 | 0.525 | 1 | 0.1795 | 77.251 | ||
9,720 | r2e_gym::train::4090 | r2e_gym | train | 4,090 | coveragepy__f9a74c79b80200d065b4bd79acc427558c7db5a7 | coveragepy | nedbat/coveragepy | python | f9a74c79b80200d065b4bd79acc427558c7db5a7 | ### Title: Version Strings Omit Micro Version When It Is Zero
### Description
The version string generation does not include the micro version when it is zero, which violates semantic versioning standards. This causes confusion and inconsistencies in version reporting.
**Example Buggy Code:**
```python
version = _mak... | diff --git a/CHANGES.rst b/CHANGES.rst
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -26,7 +26,6 @@
function, as most environments do.
.. _pull 1381: https://github.com/nedbat/coveragepy/pull/1381
-
.. _changes_64:
diff --git a/coverage/version.py b/coverage/version.py
--- a/coverage/version.py
+++ b/coverage/versi... | diff --git a/tests/test_version.py b/tests/test_version.py
--- a/tests/test_version.py
+++ b/tests/test_version.py
@@ -21,9 +21,10 @@
assert coverage.version_info[3] in ['alpha', 'beta', 'candidate', 'final']
def test_make_version(self):
- assert _make_version(4, 0, 0, 'alpha', 0) == "4.0a0"
- ... | null | null | namanjain12/coveragepy_final:f9a74c79b80200d065b4bd79acc427558c7db5a7 | true | null | 3 | 12 | null | 834 | 0 | 0.75 | 1 | 0.525 | 1 | 0.179 | 77.2495 | ||
9,721 | r2e_gym::train::5742 | r2e_gym | train | 5,742 | scrapy__bca374d65192e6347f847e0feeac5b8a2a84e710 | scrapy | scrapy/scrapy | python | bca374d65192e6347f847e0feeac5b8a2a84e710 | **Title:** `data_path` Raises `NotConfigured` When Used Outside Project Directory
**Description:**
When attempting to use the `data_path` function outside of a Scrapy project directory, it unexpectedly raises a `NotConfigured` exception instead of returning the appropriate data path.
**Example Code:**
```python
from ... | diff --git a/scrapy/utils/project.py b/scrapy/utils/project.py
--- a/scrapy/utils/project.py
+++ b/scrapy/utils/project.py
@@ -12,6 +12,7 @@
ENVVAR = 'SCRAPY_SETTINGS_MODULE'
DATADIR_CFG_SECTION = 'datadir'
+
def inside_project():
scrapy_module = os.environ.get('SCRAPY_SETTINGS_MODULE')
if scrapy_module ... | diff --git a/tests/test_utils_project.py b/tests/test_utils_project.py
--- a/tests/test_utils_project.py
+++ b/tests/test_utils_project.py
@@ -0,0 +1,35 @@
+import unittest
+import os
+import tempfile
+import shutil
+import contextlib
+from scrapy.utils.project import data_path
+
+
+@contextlib.contextmanager
+def insi... | null | null | namanjain12/scrapy_final:bca374d65192e6347f847e0feeac5b8a2a84e710 | true | null | 1 | 14 | null | 784 | 0 | 0.75 | 1 | 0.525 | 1 | 0.177333 | 77.2445 | ||
9,722 | r2e_gym::train::5147 | r2e_gym | train | 5,147 | pyramid__af5fa07ca2fcc48ab357c0db4e1301bb960addca | pyramid | pylons/pyramid | python | af5fa07ca2fcc48ab357c0db4e1301bb960addca | **Title:** URL Encoding Includes `None` Values as 'key=None' in Query Parameters
**Description:**
When encoding query string parameters, parameters with a `None` value are included as `'key=None'` instead of just `'key'`. This leads to unexpected and incorrect query strings being generated.
**Example Buggy Code:**
``... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -5,6 +5,16 @@
-------------
- Added a "Quick Tutorial" to go with the Quick Tour
+
+Backwards Incompatibilities
+---------------------------
+
+- The key/values in the ``_query`` parameter of ``request.route_url`` and the
+ ``query`` par... | diff --git a/pyramid/tests/test_encode.py b/pyramid/tests/test_encode.py
--- a/pyramid/tests/test_encode.py
+++ b/pyramid/tests/test_encode.py
@@ -41,6 +41,14 @@
result = self._callFUT({'a':1})
self.assertEqual(result, 'a=1')
+ def test_None_value(self):
+ result = self._callFUT([('a', Non... | null | null | namanjain12/pyramid_final:af5fa07ca2fcc48ab357c0db4e1301bb960addca | true | null | 2 | 16 | null | 738 | 0 | 0.75 | 1 | 0.525 | 1 | 0.176333 | 77.2415 | ||
9,723 | r2e_gym::train::5601 | r2e_gym | train | 5,601 | scrapy__25bd3b3fea444f9f20b089436f94c4c91d37c05e | scrapy | scrapy/scrapy | python | 25bd3b3fea444f9f20b089436f94c4c91d37c05e | **Title**: `data_path` Fails to Prefix `.scrapy` When Used Outside a Project
**Description**
When using the `data_path` function with a relative path outside of a Scrapy project, it does not prepend the `.scrapy` directory as expected. This leads to incorrect path resolutions, which can cause issues with data storage ... | diff --git a/scrapy/utils/project.py b/scrapy/utils/project.py
--- a/scrapy/utils/project.py
+++ b/scrapy/utils/project.py
@@ -12,6 +12,7 @@
ENVVAR = 'SCRAPY_SETTINGS_MODULE'
DATADIR_CFG_SECTION = 'datadir'
+
def inside_project():
scrapy_module = os.environ.get('SCRAPY_SETTINGS_MODULE')
if scrapy_module ... | diff --git a/tests/test_utils_project.py b/tests/test_utils_project.py
--- a/tests/test_utils_project.py
+++ b/tests/test_utils_project.py
@@ -0,0 +1,34 @@
+import unittest
+import os
+import tempfile
+import shutil
+import contextlib
+from scrapy.utils.project import data_path
+
+
+@contextlib.contextmanager
+def insi... | null | null | namanjain12/scrapy_final:25bd3b3fea444f9f20b089436f94c4c91d37c05e | true | null | 1 | 13 | null | 793 | 0 | 0.75 | 1 | 0.525 | 1 | 0.1755 | 77.239 | ||
9,724 | r2e_gym::train::5577 | r2e_gym | train | 5,577 | scrapy__fe43411bc4d0164a0f0ecc596c23b59c99d31f17 | scrapy | scrapy/scrapy | python | fe43411bc4d0164a0f0ecc596c23b59c99d31f17 | **Title:** Using `pathlib.Path` as keys in `FEEDS` settings results in incorrect configuration
**Description:**
When defining the `FEEDS` settings with `pathlib.Path` objects as keys, the configuration does not process them correctly. Instead of recognizing the `Path` objects, the settings end up as an empty dictionar... | diff --git a/scrapy/settings/__init__.py b/scrapy/settings/__init__.py
--- a/scrapy/settings/__init__.py
+++ b/scrapy/settings/__init__.py
@@ -375,8 +375,12 @@
return len(self.attributes)
def _to_dict(self):
- return {k: (v._to_dict() if isinstance(v, BaseSettings) else v)
+ return {self._... | diff --git a/tests/test_cmdline/__init__.py b/tests/test_cmdline/__init__.py
--- a/tests/test_cmdline/__init__.py
+++ b/tests/test_cmdline/__init__.py
@@ -64,3 +64,7 @@
settingsdict = json.loads(settingsstr)
self.assertCountEqual(settingsdict.keys(), EXTENSIONS.keys())
self.assertEqual(200, s... | null | null | namanjain12/scrapy_final:fe43411bc4d0164a0f0ecc596c23b59c99d31f17 | true | null | 1 | 6 | null | 933 | 0 | 0.75 | 1 | 0.525 | 1 | 0.1755 | 77.239 | ||
9,725 | r2e_gym::train::5698 | r2e_gym | train | 5,698 | scrapy__1f59a69a971b615bd06ef0011f5fd476eeb4f962 | scrapy | scrapy/scrapy | python | 1f59a69a971b615bd06ef0011f5fd476eeb4f962 | **Title:** Warning Not Issued When Creating Link Objects with Unicode URLs in Python 3
**Description:**
When instantiating a `Link` object with a Unicode URL containing non-ASCII characters, a warning is expected to notify developers about the assumption of UTF-8 encoding. However, the warning is not being raised, whi... | diff --git a/scrapy/link.py b/scrapy/link.py
--- a/scrapy/link.py
+++ b/scrapy/link.py
@@ -5,15 +5,17 @@
its documentation in: docs/topics/link-extractors.rst
"""
+import six
+
class Link(object):
"""Link objects represent an extracted link by the LinkExtractor."""
__slots__ = ['url', 'text', 'fragment... | diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt
--- a/tests/py3-ignores.txt
+++ b/tests/py3-ignores.txt
@@ -28,7 +28,6 @@
tests/test_http_cookies.py
tests/test_http_request.py
tests/test_http_response.py
-tests/test_link.py
tests/test_logformatter.py
tests/test_log.py
tests/test_mail.py
diff --git a/te... | null | null | namanjain12/scrapy_final:1f59a69a971b615bd06ef0011f5fd476eeb4f962 | true | null | 1 | 8 | null | 890 | 0 | 0.75 | 1 | 0.525 | 1 | 0.175 | 77.2375 | ||
9,726 | r2e_gym::train::5700 | r2e_gym | train | 5,700 | scrapy__b51b52ff37c67daa9c1020b5f64668877b92d938 | scrapy | scrapy/scrapy | python | b51b52ff37c67daa9c1020b5f64668877b92d938 | **Title:** Retrieving Multiple Header Values Fails to Return All Entries
**Description:**
When initializing `Headers` with multiple headers sharing the same name, retrieving the list of values for that header does not return all provided values. Instead, only the last value is returned, causing incomplete data handlin... | diff --git a/scrapy/http/headers.py b/scrapy/http/headers.py
--- a/scrapy/http/headers.py
+++ b/scrapy/http/headers.py
@@ -1,3 +1,5 @@
+from collections.abc import Mapping
+
from w3lib.http import headers_dict_to_raw
from scrapy.utils.datatypes import CaselessDict
from scrapy.utils.python import to_unicode
@@ -9,6 +... | diff --git a/tests/test_http_headers.py b/tests/test_http_headers.py
--- a/tests/test_http_headers.py
+++ b/tests/test_http_headers.py
@@ -37,6 +37,12 @@
self.assertEqual(h.get('X-Forwarded-For'), b'ip2')
self.assertEqual(h.getlist('X-Forwarded-For'), [b'ip1', b'ip2'])
assert h.getlist('X-For... | null | null | namanjain12/scrapy_final:b51b52ff37c67daa9c1020b5f64668877b92d938 | true | null | 1 | 10 | null | 847 | 0 | 0.75 | 1 | 0.525 | 1 | 0.1745 | 77.236 | ||
9,727 | r2e_gym::train::4985 | r2e_gym | train | 4,985 | datalad__b4fafb048489019fc165e4e1f8b69e5bb40df008 | datalad | datalad/datalad | python | b4fafb048489019fc165e4e1f8b69e5bb40df008 | **Title:** Incorrect extraction of installation path from SSH URLs
**Description:**
When providing an SSH URL, the installation path is not correctly extracted, resulting in the path including the hostname instead of just the repository name.
**Example Code:**
```python
url = 'hostname:lastbit'
path = _get_installati... | diff --git a/.travis.yml b/.travis.yml
--- a/.travis.yml
+++ b/.travis.yml
@@ -234,7 +234,7 @@
# Run tests
- http_proxy=
PATH=$PWD/../tools/coverage-bin:$PATH
- $NOSE_WRAPPER `which nosetests` "${NOSE_OPTS[@]}"
+ $NOSE_WRAPPER python -m nose "${NOSE_OPTS[@]}"
-A "$NOSE_SELECTION_OP($NOSE_SELECTI... | diff --git a/datalad/core/distributed/tests/test_clone.py b/datalad/core/distributed/tests/test_clone.py
--- a/datalad/core/distributed/tests/test_clone.py
+++ b/datalad/core/distributed/tests/test_clone.py
@@ -537,24 +537,41 @@
def test_installationpath_from_url():
- cases = (
+ # cases for all OSes
+ ca... | null | null | namanjain12/datalad_final:b4fafb048489019fc165e4e1f8b69e5bb40df008 | true | null | 2 | 23 | null | 587 | 0 | 0.75 | 1 | 0.525 | 1 | 0.1745 | 77.236 | ||
9,728 | swe_bench::test::1587 | swe_bench | test | 1,587 | scikit-learn__scikit-learn-13253 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 04a5733b86bba57a48520b97b9c0a5cd325a1b9a | ENH: support DataFrames in OneHot/OrdinalEncoder without converting to array
Left-over to do from https://github.com/scikit-learn/scikit-learn/pull/9151#issuecomment-343306766
Idea is to support DataFrames without converting to a contiguous array. This conversion is not needed, as the transformer encodes the input col... | If there is no-one working on this issue I can do it.
By the way, I believe pandas supports one hot encoding found [this](https://stackoverflow.com/questions/37292872/how-can-i-one-hot-encode-in-python) on StackOverflow
What are your thoughts on detecting that it is a pandas dataframe and using pandas native enc... | diff --git a/sklearn/preprocessing/_encoders.py b/sklearn/preprocessing/_encoders.py
--- a/sklearn/preprocessing/_encoders.py
+++ b/sklearn/preprocessing/_encoders.py
@@ -38,27 +38,48 @@ def _check_X(self, X):
- convert list of strings to object dtype
- check for missing values for object dtype data (... | diff --git a/sklearn/preprocessing/tests/test_encoders.py b/sklearn/preprocessing/tests/test_encoders.py
--- a/sklearn/preprocessing/tests/test_encoders.py
+++ b/sklearn/preprocessing/tests/test_encoders.py
@@ -431,6 +431,30 @@ def test_one_hot_encoder_inverse(sparse_, drop):
assert_raises_regex(ValueError, msg, e... | ["sklearn/preprocessing/tests/test_encoders.py::test_encoder_dtypes_pandas"] | ["sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_sparse", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_dense", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_deprecationwarnings", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_force_ne... | null | true | 2019-02-25T15:12:08Z | 1 | 64 | 1 | 989 | 0 | 0.8 | 1 | 0.4 | 1 | 0.378167 | 77.2345 | |
9,729 | r2e_gym::train::5259 | r2e_gym | train | 5,259 | pyramid__1514ea003dfe39fa79a0ec07bbbc14f239cb4eb2 | pyramid | pylons/pyramid | python | 1514ea003dfe39fa79a0ec07bbbc14f239cb4eb2 | **Title:** `setup_logging` Raises TypeError When Passing `global_conf` Parameter
**Description:**
When attempting to initialize the logging configuration with additional variables by passing the `global_conf` parameter to the `setup_logging` function, a `TypeError` is thrown. This prevents the application from properl... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -26,6 +26,12 @@
rendering an exception view outside of the context of the excview tween
where you may need more control over the request.
See https://github.com/Pylons/pyramid/pull/2393
+
+- Allow using variable substitutions like ``... | diff --git a/pyramid/tests/test_paster.py b/pyramid/tests/test_paster.py
--- a/pyramid/tests/test_paster.py
+++ b/pyramid/tests/test_paster.py
@@ -105,17 +105,37 @@
self.assertEqual(result['foo'], 'baz')
class Test_setup_logging(unittest.TestCase):
- def _callFUT(self, config_file):
+ def _callFUT(sel... | null | null | namanjain12/pyramid_final:1514ea003dfe39fa79a0ec07bbbc14f239cb4eb2 | true | null | 4 | 27 | null | 1,215 | 0 | 0.75 | 1 | 0.6375 | 0.85 | 0.2925 | 77.23375 | ||
9,730 | r2e_gym::train::4067 | r2e_gym | train | 4,067 | coveragepy__903d2de43ac8c3d9d8ac081bc30d834f3894052d | coveragepy | nedbat/coveragepy | python | 903d2de43ac8c3d9d8ac081bc30d834f3894052d | **Title:** `--debug=sys` Option Sets `data_file` to "-none-" Instead of Coverage File
**Description:**
When running Coverage with the `--debug=sys` option, the `data_file` field is incorrectly set to `"-none-"` instead of the expected coverage data filename. This causes tests or functionalities that rely on the presen... | diff --git a/CHANGES.rst b/CHANGES.rst
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -33,8 +33,12 @@
- A new warning ("dynamic-conflict") is issued if two mechanisms are trying to
change the dynamic context. Closes `issue 901`_.
+- ``coverage run --debug=sys`` would fail with an AttributeError. This is now
+ fixed (`i... | diff --git a/tests/test_api.py b/tests/test_api.py
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -714,6 +714,14 @@
cov.start()
cov.stop()
+ def test_run_debug_sys(self):
+ # https://github.com/nedbat/coveragepy/issues/907
+ cov = coverage.Coverage()
+ cov.start()
+ ... | null | null | namanjain12/coveragepy_final:903d2de43ac8c3d9d8ac081bc30d834f3894052d | true | null | 2 | 6 | null | 921 | 0 | 0.75 | 1 | 0.525 | 1 | 0.1735 | 77.233 | ||
9,731 | r2e_gym::train::5123 | r2e_gym | train | 5,123 | pyramid__11cbc8fed50d9b652c8a178cebb290c98ecfeba4 | pyramid | pylons/pyramid | python | 11cbc8fed50d9b652c8a178cebb290c98ecfeba4 | **Title: `--package-name` Option Not Recognized by `pcreate` Command**
**Description:**
When using the `--package-name` option with the `pcreate` command to specify a custom package name, the command fails to recognize the option, resulting in an error.
**Example Command:**
```
pcreate -s dummy --package-name dummy_p... | diff --git a/pyramid/scripts/pcreate.py b/pyramid/scripts/pcreate.py
--- a/pyramid/scripts/pcreate.py
+++ b/pyramid/scripts/pcreate.py
@@ -45,6 +45,14 @@
action='store_true',
help=("A backwards compatibility alias for -l/--list. "
"List all ava... | diff --git a/pyramid/tests/test_scripts/test_pcreate.py b/pyramid/tests/test_scripts/test_pcreate.py
--- a/pyramid/tests/test_scripts/test_pcreate.py
+++ b/pyramid/tests/test_scripts/test_pcreate.py
@@ -80,6 +80,27 @@
{'project': 'Distro', 'egg': 'Distro', 'package': 'distro',
'pyramid_versio... | null | null | namanjain12/pyramid_final:11cbc8fed50d9b652c8a178cebb290c98ecfeba4 | true | null | 1 | 18 | null | 671 | 0 | 0.75 | 1 | 0.525 | 1 | 0.171833 | 77.228 | ||
9,732 | r2e_gym::train::4026 | r2e_gym | train | 4,026 | coveragepy__e0a550b27c984b2ca025090174ae73cc9a6a3f76 | coveragepy | nedbat/coveragepy | python | e0a550b27c984b2ca025090174ae73cc9a6a3f76 | **Title:** Unexpected Deprecation Warnings from `coverage annotate` Cause Test Failures
**Description:**
When using the `coverage annotate` command, unexpected deprecation warnings are printed to the output. This behavior disrupts existing tests that rely on specific stdout content, leading to test failures.
**Exampl... | diff --git a/CHANGES.rst b/CHANGES.rst
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -23,6 +23,10 @@
- Fix: function definitions with multi-line signatures can now be excluded by
matching any of the lines, closing `issue 684`_. Thanks, `Jan Rusak,
Maciej Kowalczyk and Joanna Ejzel <pull 1705_>`_.
+
+- The ``coverage a... | diff --git a/tests/test_annotate.py b/tests/test_annotate.py
--- a/tests/test_annotate.py
+++ b/tests/test_annotate.py
@@ -123,10 +123,5 @@
cov = coverage.Coverage()
self.start_import_stop(cov, "mae")
cov.annotate()
- assert self.stdout() == (
- "1\n" +
- "2\n" +
... | null | null | namanjain12/coveragepy_final:e0a550b27c984b2ca025090174ae73cc9a6a3f76 | true | null | 2 | 7 | null | 875 | 0 | 0.75 | 1 | 0.525 | 1 | 0.169167 | 77.22 | ||
9,733 | r2e_gym::train::452 | r2e_gym | train | 452 | orange3__4960b6048f3801bcb2984d78ab060fee2d817113 | orange3 | biolab/orange3 | python | 4960b6048f3801bcb2984d78ab060fee2d817113 | **Title:** Settings Migration Fails to Normalize Dataset Paths on Windows
**Description:**
When migrating settings, dataset paths are stored using OS-dependent separators. On Windows, this results in backslashes (`\`) being used, which leads to inconsistencies and test failures.
**Example Code:**
```python
def test_m... | diff --git a/Orange/widgets/data/owdatasets.py b/Orange/widgets/data/owdatasets.py
--- a/Orange/widgets/data/owdatasets.py
+++ b/Orange/widgets/data/owdatasets.py
@@ -408,7 +408,8 @@
row = [item1, item2, item3, item4, item5, item6, item7]
model.appendRow(row)
- if os.path.join(*fi... | diff --git a/Orange/widgets/data/tests/test_owdatasets.py b/Orange/widgets/data/tests/test_owdatasets.py
--- a/Orange/widgets/data/tests/test_owdatasets.py
+++ b/Orange/widgets/data/tests/test_owdatasets.py
@@ -96,6 +96,25 @@
# select the only dataset
sel_type = QItemSelectionModel.ClearAndSelect | QI... | null | null | namanjain12/orange3_final:4960b6048f3801bcb2984d78ab060fee2d817113 | true | null | 1 | 12 | null | 759 | 0 | 0.75 | 1 | 0.525 | 1 | 0.1665 | 77.212 | ||
9,734 | r2e_gym::train::4086 | r2e_gym | train | 4,086 | coveragepy__2ace7a261901e164bf54606b80a2dd1b4e49a904 | coveragepy | nedbat/coveragepy | python | 2ace7a261901e164bf54606b80a2dd1b4e49a904 | **Title:** Coverage Tool Misinterprets Lines with No Branches as Not Executed
**Description:**
When analyzing code that includes exception handling, the coverage tool incorrectly assumes that lines with no branches were never executed. This leads to assertion failures during report generation.
**Example Code:**
```py... | diff --git a/CHANGES.rst b/CHANGES.rst
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -23,7 +23,12 @@
Unreleased
----------
-Nothing yet.
+- fix: the LCOV report code assumed that a branch line that took no branches
+ meant that the entire line was unexecuted. This isn't true in a few cases:
+ the line might always rais... | diff --git a/tests/test_lcov.py b/tests/test_lcov.py
--- a/tests/test_lcov.py
+++ b/tests/test_lcov.py
@@ -526,3 +526,35 @@
""")
actual_result = self.get_lcov_report_content()
assert expected_result == actual_result
+
+ def test_always_raise(self) -> None:
+ self.make_file("alwa... | null | null | namanjain12/coveragepy_final:2ace7a261901e164bf54606b80a2dd1b4e49a904 | true | null | 2 | 11 | null | 764 | 0 | 0.75 | 1 | 0.525 | 1 | 0.164 | 77.2045 | ||
9,735 | r2e_gym::train::144 | r2e_gym | train | 144 | orange3__d5dc011f28c569034c4eac75699d460156889c2d | orange3 | biolab/orange3 | python | d5dc011f28c569034c4eac75699d460156889c2d | **Title:** Output Table Name Cannot Be Customized in OWEditDomain Widget
**Description**
When using the OWEditDomain widget, attempting to set a custom name for the output table does not change the output data's name. Instead, the output table retains the original input data's name.
**Example Code**
```python
# Attem... | diff --git a/Orange/widgets/data/oweditdomain.py b/Orange/widgets/data/oweditdomain.py
--- a/Orange/widgets/data/oweditdomain.py
+++ b/Orange/widgets/data/oweditdomain.py
@@ -1770,6 +1770,7 @@
_domain_change_store = settings.ContextSetting({})
_selected_item = settings.ContextSetting(None) # type: Optional[T... | diff --git a/Orange/widgets/data/tests/test_oweditdomain.py b/Orange/widgets/data/tests/test_oweditdomain.py
--- a/Orange/widgets/data/tests/test_oweditdomain.py
+++ b/Orange/widgets/data/tests/test_oweditdomain.py
@@ -170,6 +170,11 @@
np.testing.assert_array_equal(output.X, self.iris.X)
np.testing.as... | null | null | namanjain12/orange3_final:d5dc011f28c569034c4eac75699d460156889c2d | true | null | 1 | 12 | null | 737 | 0 | 0.75 | 1 | 0.525 | 1 | 0.162833 | 77.201 | ||
9,736 | r2e_gym::train::4927 | r2e_gym | train | 4,927 | datalad__0dd56479fb13c5ff8010a1d2995e54b633a5f5ba | datalad | datalad/datalad | python | 0dd56479fb13c5ff8010a1d2995e54b633a5f5ba | **Title:** Incorrect Handling of Encoded Paths and Ports in Installation URL
**Description:**
When providing a URL that includes percent-encoded characters or specifies a port, the installation path is not correctly extracted. This leads to unexpected and incorrect paths being returned.
**Example Code:**
```python
... | diff --git a/datalad/distribution/utils.py b/datalad/distribution/utils.py
--- a/datalad/distribution/utils.py
+++ b/datalad/distribution/utils.py
@@ -11,6 +11,8 @@
"""
import logging
+import re
+
from os.path import exists
from os.path import isdir
from os.path import join as opj
@@ -18,6 +20,8 @@
from os.path... | diff --git a/datalad/distribution/tests/test_install.py b/datalad/distribution/tests/test_install.py
--- a/datalad/distribution/tests/test_install.py
+++ b/datalad/distribution/tests/test_install.py
@@ -88,8 +88,19 @@
'lastbit.git/',
'http://example.com/lastbit',
'http://exa... | null | null | namanjain12/datalad_final:0dd56479fb13c5ff8010a1d2995e54b633a5f5ba | true | null | 1 | 11 | null | 755 | 0 | 0.75 | 1 | 0.525 | 1 | 0.1625 | 77.2 | ||
9,737 | r2e_gym::train::5266 | r2e_gym | train | 5,266 | aiohttp__ffb66cb0d1908bcc9b12fabd637d07b8a765430c | aiohttp | aio-libs/aiohttp | python | ffb66cb0d1908bcc9b12fabd637d07b8a765430c | **Title:** `Content-Length` Header Not Removed When Compression Is Enabled
**Description:**
When compression is enabled for a response, the `Content-Length` header should be removed to allow for proper handling of the compressed data. However, currently, after enabling compression, the `content_length` remains set, p... | diff --git a/HISTORY.rst b/HISTORY.rst
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,3 +1,8 @@
+0.17.3 (XX-XX-XXXX)
+---------------------
+
+- Remove Content-Length header on compressed responses #450
+
0.17.2 (08-11-2015)
---------------------
diff --git a/aiohttp/web_reqrep.py b/aiohttp/web_reqrep.py
--- a/aiohttp/w... | diff --git a/tests/test_web_response.py b/tests/test_web_response.py
--- a/tests/test_web_response.py
+++ b/tests/test_web_response.py
@@ -290,6 +290,17 @@
msg = resp.start(req)
msg.add_compression_filter.assert_called_with('gzip')
self.assertEqual('gzip', resp.headers.get(hdrs.CONTENT_ENCODI... | null | null | namanjain12/aiohttp_final:ffb66cb0d1908bcc9b12fabd637d07b8a765430c | true | null | 2 | 10 | null | 768 | 0 | 0.75 | 1 | 0.525 | 1 | 0.161333 | 77.1965 | ||
9,738 | r2e_gym::train::5458 | r2e_gym | train | 5,458 | aiohttp__8a7c2a5b5c9329b1c96f55801e5afed6d381afbd | aiohttp | aio-libs/aiohttp | python | 8a7c2a5b5c9329b1c96f55801e5afed6d381afbd | **Title:** BodyPartReader Incorrectly Counts Read Bytes, Causing Malformed Data Handling
**Description:**
When processing multipart content with a specified `Content-Length`, the `BodyPartReader` does not accurately track the number of bytes read. Instead of incrementing by the actual number of bytes received from the... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,4 +6,3 @@
* Use errors.HttpProcessingError.message as HTTP error reason and
message #459
-
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -66,5 +66,6 @@
Vaibhav Sagar
Vitaly Harito... | diff --git a/tests/test_multipart.py b/tests/test_multipart.py
--- a/tests/test_multipart.py
+++ b/tests/test_multipart.py
@@ -74,6 +74,20 @@
return self.content.readline()
+class StreamWithShortenRead(Stream):
+
+ def __init__(self, content):
+ self._first = True
+ super().__init__(conten... | null | null | namanjain12/aiohttp_final:8a7c2a5b5c9329b1c96f55801e5afed6d381afbd | true | null | 4 | 6 | null | 1,555 | 0 | 0.75 | 1 | 0.6375 | 0.85 | 0.279167 | 77.19375 | ||
9,739 | swe_bench::test::957 | swe_bench | test | 957 | matplotlib__matplotlib-18869 | matplotlib/matplotlib | matplotlib/matplotlib | python | b7d05919865fc0c37a0164cf467d5d5513bd0ede | Add easily comparable version info to toplevel
### Problem
Currently matplotlib only exposes `__version__`. For quick version checks, exposing either a `version_info` tuple (which can be compared with other tuples) or a `LooseVersion` instance (which can be properly compared with other strings) would be a small usab... | It seems that `__version_info__` is the way to go.
### Prior art
- There's no official specification for version tuples. [PEP 396 - Module Version Numbers](https://www.python.org/dev/peps/pep-0396/) only defines the string `__version__`.
- Many projects don't bother with version tuples.
- When they do, `__ver... | diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -129,25 +129,60 @@
year = 2007
}"""
+# modelled after sys.version_info
+_VersionInfo = namedtuple('_VersionInfo',
+ 'major, minor, micro, releasel... | diff --git a/lib/matplotlib/tests/test_matplotlib.py b/lib/matplotlib/tests/test_matplotlib.py
--- a/lib/matplotlib/tests/test_matplotlib.py
+++ b/lib/matplotlib/tests/test_matplotlib.py
@@ -7,6 +7,16 @@
import matplotlib
+@pytest.mark.parametrize('version_str, version_tuple', [
+ ('3.5.0', (3, 5, 0, 'final', 0... | ["lib/matplotlib/tests/test_matplotlib.py::test_parse_to_version_info[3.5.0-version_tuple0]", "lib/matplotlib/tests/test_matplotlib.py::test_parse_to_version_info[3.5.0rc2-version_tuple1]", "lib/matplotlib/tests/test_matplotlib.py::test_parse_to_version_info[3.5.0.dev820+g6768ef8c4c-version_tuple2]", "lib/matplotlib/te... | ["lib/matplotlib/tests/test_matplotlib.py::test_importable_with_no_home", "lib/matplotlib/tests/test_matplotlib.py::test_use_doc_standard_backends", "lib/matplotlib/tests/test_matplotlib.py::test_importable_with__OO"] | null | true | 2020-11-01T23:18:42Z | 1 | 67 | 4 | 847 | 0 | 0.8 | 1 | 0.4 | 1 | 0.3645 | 77.1935 | |
9,740 | r2e_gym::train::5253 | r2e_gym | train | 5,253 | pyramid__af0290407b50a18664c9ae28a4c01d4cfb27920b | pyramid | pylons/pyramid | python | af0290407b50a18664c9ae28a4c01d4cfb27920b | **Title:** Static view registration incorrectly appends a slash to package root specifications ending with ':'
**Description:**
When registering a static view with a package root asset specification that ends with a colon (`':'`), an unintended slash (`'/'`) is appended. This results in an incorrect specification, cau... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -69,6 +69,9 @@
- Fix a failing unittest caused by differing mimetypes across various OSs.
See https://github.com/Pylons/pyramid/issues/1405
+
+- Fix route generation for static view asset specifications having no path.
+ See https://gi... | diff --git a/pyramid/tests/test_config/test_views.py b/pyramid/tests/test_config/test_views.py
--- a/pyramid/tests/test_config/test_views.py
+++ b/pyramid/tests/test_config/test_views.py
@@ -3898,6 +3898,13 @@
('http://example.com/', 'anotherpackage:path/', None, None)]
self._assertRegistrations(... | null | null | namanjain12/pyramid_final:af0290407b50a18664c9ae28a4c01d4cfb27920b | true | null | 3 | 7 | null | 817 | 0 | 0.75 | 1 | 0.525 | 1 | 0.1595 | 77.191 | ||
9,741 | r2e_gym::train::175 | r2e_gym | train | 175 | orange3__f68cc2c15360f7e2aa0500a6b719b85adf02f57c | orange3 | biolab/orange3 | python | f68cc2c15360f7e2aa0500a6b719b85adf02f57c | **Title:** Coefficients Data Missing Intercept Row Leading to Incorrect Dimensions
**Description:**
When generating the "Coefficients and Loadings" table for the PLS model, the intercept is not included. This omission causes the table to have fewer rows than expected, leading to shape mismatches.
**Example Code:**
``... | diff --git a/Orange/widgets/model/owpls.py b/Orange/widgets/model/owpls.py
--- a/Orange/widgets/model/owpls.py
+++ b/Orange/widgets/model/owpls.py
@@ -67,6 +67,7 @@
self.Outputs.components.send(components)
def _create_output_coeffs_loadings(self) -> Table:
+ intercept = self.model.intercept
... | diff --git a/Orange/widgets/model/tests/test_owpls.py b/Orange/widgets/model/tests/test_owpls.py
--- a/Orange/widgets/model/tests/test_owpls.py
+++ b/Orange/widgets/model/tests/test_owpls.py
@@ -34,28 +34,31 @@
self.send_signal(self.widget.Inputs.data, self._data)
coefsdata = self.get_output(self.widg... | null | null | namanjain12/orange3_final:f68cc2c15360f7e2aa0500a6b719b85adf02f57c | true | null | 1 | 10 | null | 755 | 0 | 0.75 | 1 | 0.525 | 1 | 0.159167 | 77.19 | ||
9,742 | r2e_gym::train::4901 | r2e_gym | train | 4,901 | datalad__eee1331f77ea7abafe78a7cffe6bf1b53fd0ca64 | datalad | datalad/datalad | python | eee1331f77ea7abafe78a7cffe6bf1b53fd0ca64 | **Title**: RST Role Markup Not Removed for Custom Roles in Command-Line Docs
**Description**:
When using RST roles other than `:term:`, the markup is not removed correctly in command-line documentation. For example, processing a string with a custom role like `:murks:` leaves the role syntax intact, which affects the ... | diff --git a/datalad/interface/base.py b/datalad/interface/base.py
--- a/datalad/interface/base.py
+++ b/datalad/interface/base.py
@@ -110,11 +110,12 @@
'',
docs,
flags=re.MULTILINE | re.DOTALL)
- # remove :term:`...` RST markup for cmdline docs
- docs = re.sub(
- r':term:`.*`[\\... | diff --git a/datalad/interface/tests/test_docs.py b/datalad/interface/tests/test_docs.py
--- a/datalad/interface/tests/test_docs.py
+++ b/datalad/interface/tests/test_docs.py
@@ -16,7 +16,7 @@
from datalad.interface.base import alter_interface_docs_for_api
from datalad.interface.base import alter_interface_docs_for_c... | null | null | namanjain12/datalad_final:eee1331f77ea7abafe78a7cffe6bf1b53fd0ca64 | true | null | 1 | 11 | null | 704 | 0 | 0.75 | 1 | 0.525 | 1 | 0.154 | 77.1745 | ||
9,743 | r2e_gym::train::4006 | r2e_gym | train | 4,006 | coveragepy__94b231f7b6175a38e97ff2555a4553bfa0b58389 | coveragepy | nedbat/coveragepy | python | 94b231f7b6175a38e97ff2555a4553bfa0b58389 | **Title:** Comments within `{# ... #}` are not removed, causing unexpected output
**Description:**
When using `{# ... #}` to add comments in a template, the comments are not properly stripped out during rendering. This results in the comment tags remaining in the final output instead of being ignored.
**Example Buggy... | diff --git a/coverage/templite.py b/coverage/templite.py
--- a/coverage/templite.py
+++ b/coverage/templite.py
@@ -18,6 +18,10 @@
{% for var in list %}...{% endfor %}
+ Comments are within curly-hash markers::
+
+ {# This will be ignored #}
+
Construct a Templite with the templat... | diff --git a/test/test_templite.py b/test/test_templite.py
--- a/test/test_templite.py
+++ b/test/test_templite.py
@@ -126,6 +126,16 @@
"123 and 123"
)
+ def test_comments(self):
+ # Single-line comments work:
+ self.try_render(
+ "Hello, {# Name goes here: #}{{na... | null | null | namanjain12/coveragepy_final:94b231f7b6175a38e97ff2555a4553bfa0b58389 | true | null | 1 | 6 | null | 800 | 0 | 0.75 | 1 | 0.525 | 1 | 0.153333 | 77.1725 | ||
9,744 | swe_bench::test::1140 | swe_bench | test | 1,140 | mwaskom__seaborn-3010 | mwaskom/seaborn | mwaskom/seaborn | python | 0f5a013e2cf43562deec3b879458e59a73853813 | PolyFit is not robust to missing data
```python
so.Plot([1, 2, 3, None, 4], [1, 2, 3, 4, 5]).add(so.Line(), so.PolyFit())
```
<details><summary>Traceback</summary>
```python-traceback
---------------------------------------------------------------------------
LinAlgError Traceback (most ... | diff --git a/seaborn/_stats/regression.py b/seaborn/_stats/regression.py
--- a/seaborn/_stats/regression.py
+++ b/seaborn/_stats/regression.py
@@ -38,7 +38,10 @@ def _fit_predict(self, data):
def __call__(self, data, groupby, orient, scales):
- return groupby.apply(data, self._fit_predict)
+ retu... | diff --git a/tests/_stats/test_regression.py b/tests/_stats/test_regression.py
--- a/tests/_stats/test_regression.py
+++ b/tests/_stats/test_regression.py
@@ -4,6 +4,7 @@
import pytest
from numpy.testing import assert_array_equal, assert_array_almost_equal
+from pandas.testing import assert_frame_equal
from seab... | ["tests/_stats/test_regression.py::TestPolyFit::test_missing_data"] | ["tests/_stats/test_regression.py::TestPolyFit::test_no_grouper", "tests/_stats/test_regression.py::TestPolyFit::test_one_grouper"] | null | true | 2022-09-11T19:37:32Z | 1 | 5 | 1 | 3,864 | 0 | 0.8 | 1 | 0.62 | 0.8 | 0.516667 | 77.17 | ||
9,745 | r2e_gym::train::4902 | r2e_gym | train | 4,902 | datalad__d644c75e89f8b2daadbfedfc995ffcf6c2a0341b | datalad | datalad/datalad | python | d644c75e89f8b2daadbfedfc995ffcf6c2a0341b | **Title:** Unable to Provide AWS_S3 Credentials via Environment Variables
**Description:**
When attempting to supply AWS_S3 credentials through environment variables, the system fails to recognize them. This prevents the retrieval of credentials as expected.
**Example Buggy Code:**
```python
keyring = Keyring()
cred ... | diff --git a/datalad/support/keyring_.py b/datalad/support/keyring_.py
--- a/datalad/support/keyring_.py
+++ b/datalad/support/keyring_.py
@@ -8,6 +8,8 @@
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
"""Adapters and decorators for keyrings
"""
+
+import os
class Keyring(object... | diff --git a/datalad/downloaders/tests/test_credentials.py b/datalad/downloaders/tests/test_credentials.py
--- a/datalad/downloaders/tests/test_credentials.py
+++ b/datalad/downloaders/tests/test_credentials.py
@@ -8,14 +8,18 @@
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
"""Tests ... | null | null | namanjain12/datalad_final:d644c75e89f8b2daadbfedfc995ffcf6c2a0341b | true | null | 1 | 8 | null | 741 | 0 | 0.75 | 1 | 0.525 | 1 | 0.150167 | 77.163 | ||
9,746 | swe_bench::test::1381 | swe_bench | test | 1,381 | pytest-dev__pytest-10552 | pytest-dev/pytest | pytest-dev/pytest | python | 314e623304f32e7e9e31c49d63e58bc73b54dcd0 | Inconsistent support for staticmethod/classmethod
Pytest discovery & running of staticmethods/classmethods is inconsistent. Here's an example:
```python
import pytest
class TestFoo:
# passes:
@staticmethod
def test_staticmethod() -> None:
foo = 0
assert foo < 3
# warning: cannot collec... | diff --git a/src/_pytest/python.py b/src/_pytest/python.py
--- a/src/_pytest/python.py
+++ b/src/_pytest/python.py
@@ -403,8 +403,8 @@ def classnamefilter(self, name: str) -> bool:
def istestfunction(self, obj: object, name: str) -> bool:
if self.funcnamefilter(name) or self.isnosetest(obj):
- ... | diff --git a/testing/python/integration.py b/testing/python/integration.py
--- a/testing/python/integration.py
+++ b/testing/python/integration.py
@@ -416,7 +416,7 @@ def test_class(cls): pass
def test_static(): pass
"""
)
- assert len(items) == 3
+ assert len(items) == 4
assert is... | ["testing/python/integration.py::test_function_instance", "testing/test_collection.py::Test_genitems::test_classmethod_is_discovered"] | ["testing/python/integration.py::test_wrapped_getfslineno", "testing/python/integration.py::TestMockDecoration::test_wrapped_getfuncargnames", "testing/python/integration.py::TestMockDecoration::test_getfuncargnames_patching", "testing/python/integration.py::test_pytestconfig_is_session_scoped", "testing/test_collectio... | null | true | 2022-12-01T19:54:20Z | 1 | 4 | 2 | 3,224 | 0 | 0.8 | 1 | 0.62 | 0.8 | 0.513333 | 77.16 | ||
9,747 | swe_bench::test::65 | swe_bench | test | 65 | astropy__astropy-14628 | astropy/astropy | astropy/astropy | python | c667e73df92215cf1446c3eda71a56fdaebba426 | Make getting a topocentric ITRS position easier
### What is the problem this feature will solve?
Right now, it is not easy to create ITRS coordinates for sources relative to a given location (rather than geocentric), to the level that we have specific instructions on how to calculate relative `CartesianCoordinates` an... | Hi, I am interested in signing up for this issue. This would be my first contribution here
@ninja18 - great! Easiest is to go ahead and make a PR. I assume you are familiar with the astronomy side of it? (see "Additional Context" above) | diff --git a/astropy/coordinates/earth.py b/astropy/coordinates/earth.py
--- a/astropy/coordinates/earth.py
+++ b/astropy/coordinates/earth.py
@@ -655,21 +655,26 @@ def to_geocentric(self):
"""Convert to a tuple with X, Y, and Z as quantities."""
return (self.x, self.y, self.z)
- def get_itrs(sel... | 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
@@ -1036,24 +1036,12 @@ def test_itrs_str... | ["astropy/coordinates/tests/test_intermediate_transformations.py::test_itrs_straight_overhead"] | ["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... | null | true | 2023-04-12T10:00:55Z | 1 | 24 | 1 | 1,630 | 0 | 0.8 | 1 | 0.4 | 1 | 0.351667 | 77.155 | |
9,748 | r2e_gym::train::4110 | r2e_gym | train | 4,110 | coveragepy__474a3639cd73d5a9498ae3ae93ee78a6621d5a0a | coveragepy | nedbat/coveragepy | python | 474a3639cd73d5a9498ae3ae93ee78a6621d5a0a | **Title:** Duplicate "didn't" in Missing Arc Description Causes Incorrect Error Message
**Description:**
When a module fails to exit as expected, the generated error message incorrectly includes the word "didn't" twice, making the message confusing and unclear.
**Example Code:**
```python
# Example scenario where t... | diff --git a/CHANGES.rst b/CHANGES.rst
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -23,7 +23,10 @@
Unreleased
----------
-Nothing yet.
+- Fix: the missing branch message about not exiting a module had an extra
+ "didn't," as described in `issue 1873`_. This is now fixed.
+
+.. _issue 1873: https://github.com/nedbat/co... | diff --git a/tests/test_arcs.py b/tests/test_arcs.py
--- a/tests/test_arcs.py
+++ b/tests/test_arcs.py
@@ -322,6 +322,19 @@
assert self.stdout() == "4\n7\n"
expected = "line 3 didn't jump to the function exit"
assert self.get_missing_arc_description(cov, 3, -2) == expected
+
+ def test_lea... | null | null | namanjain12/coveragepy_final:474a3639cd73d5a9498ae3ae93ee78a6621d5a0a | true | null | 2 | 7 | null | 743 | 0 | 0.75 | 1 | 0.525 | 1 | 0.147167 | 77.154 | ||
9,749 | r2e_gym::train::6015 | r2e_gym | train | 6,015 | tornado__32377f2c2cdd95ade0e40fabdcc1364e07ea2239 | tornado | tornadoweb/tornado | python | 32377f2c2cdd95ade0e40fabdcc1364e07ea2239 | **Title:** Incorrect URL Reversal with Escaped Characters
**Description:**
When reversing a URL that includes escaped regex characters, the generated URL incorrectly retains the escape characters, resulting in an invalid path.
**Example Code:**
```python
from tornado.routing import url
# Attempting to reverse a URL ... | diff --git a/tornado/routing.py b/tornado/routing.py
--- a/tornado/routing.py
+++ b/tornado/routing.py
@@ -627,7 +627,13 @@
if ")" in fragment:
paren_loc = fragment.index(")")
if paren_loc >= 0:
- pieces.append("%s" + fragment[paren_loc + 1 :])
+ ... | diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py
--- a/tornado/test/web_test.py
+++ b/tornado/test/web_test.py
@@ -3107,6 +3107,10 @@
self.assertEqual(
"/api/v1/foo/bar", url(r"^/api/v1/foo/(\w+)$", None).reverse("bar")
)
+ self.assertEqual(
+ "/api.v1/fo... | null | null | namanjain12/tornado_final:32377f2c2cdd95ade0e40fabdcc1364e07ea2239 | true | null | 1 | 8 | null | 696 | 0 | 0.75 | 1 | 0.525 | 1 | 0.142667 | 77.1405 | ||
9,750 | swe_bench::test::1428 | swe_bench | test | 1,428 | pytest-dev__pytest-7122 | pytest-dev/pytest | pytest-dev/pytest | python | be68496440508b760ba1f988bcc63d1d09ace206 | -k mishandles numbers
Using `pytest 5.4.1`.
It seems that pytest cannot handle keyword selection with numbers, like `-k "1 or 2"`.
Considering the following tests:
```
def test_1():
pass
def test_2():
pass
def test_3():
pass
```
Selecting with `-k 2` works:
```
(venv) Victors-MacBook-Pro:keyword_numb... | IMO this is a bug.
This happens before the `-k` expression is evaluated using `eval`, `1` and `2` are evaluated as numbers, and `1 or 2` is just evaluated to True which means all tests are included. On the other hand `_1` is an identifier which only evaluates to True if matches the test name.
If you are intereste... | diff --git a/src/_pytest/mark/expression.py b/src/_pytest/mark/expression.py
new file mode 100644
--- /dev/null
+++ b/src/_pytest/mark/expression.py
@@ -0,0 +1,173 @@
+r"""
+Evaluate match expressions, as used by `-k` and `-m`.
+
+The grammar is:
+
+expression: expr? EOF
+expr: and_expr ('or' and_expr)*
+and_expr... | diff --git a/testing/test_mark.py b/testing/test_mark.py
--- a/testing/test_mark.py
+++ b/testing/test_mark.py
@@ -200,6 +200,8 @@ def test_hello():
"spec",
[
("xyz", ("test_one",)),
+ ("((( xyz)) )", ("test_one",)),
+ ("not not xyz", ("test_one",)),
("xyz and xyz2", ()),
... | ["testing/test_mark.py::TestMark::test_pytest_exists_in_namespace_all[py.test-mark]", "testing/test_mark.py::TestMark::test_pytest_exists_in_namespace_all[py.test-param]", "testing/test_mark.py::TestMark::test_pytest_exists_in_namespace_all[pytest-mark]", "testing/test_mark.py::TestMark::test_pytest_exists_in_namespace... | [] | null | true | 2020-04-25T13:16:25Z | 2 | 238 | 145 | 2,372 | 0 | 0.8 | 1 | 0.55 | 0.75 | 0.895333 | 77.1235 | |
9,751 | r2e_gym::train::4062 | r2e_gym | train | 4,062 | coveragepy__dc0e80657257def9203b5e0ca7b6141d3dcd1d57 | coveragepy | nedbat/coveragepy | python | dc0e80657257def9203b5e0ca7b6141d3dcd1d57 | **Title:** Windows Base Directory Aliases Not Mapped Correctly
**Description:**
When adding an alias for a Windows base directory, such as `X:\`, the path mapping does not function as expected. Instead of mapping paths like `X:\a\file.py` to the designated alias target, the original path remains unchanged.
**Example ... | diff --git a/coverage/files.py b/coverage/files.py
--- a/coverage/files.py
+++ b/coverage/files.py
@@ -359,17 +359,19 @@
match an entire tree, and not just its root.
"""
+ pattern_sep = sep(pattern)
+
if len(pattern) > 1:
pattern = pattern.rstrip(r"\/")
# The ... | diff --git a/tests/test_files.py b/tests/test_files.py
--- a/tests/test_files.py
+++ b/tests/test_files.py
@@ -349,6 +349,20 @@
'./django/foo/bar.py'
)
+ def test_windows_root_paths(self):
+ aliases = PathAliases()
+ aliases.add('X:\\', '/tmp/src')
+ self.assert_mapped(
+... | null | null | namanjain12/coveragepy_final:dc0e80657257def9203b5e0ca7b6141d3dcd1d57 | true | null | 1 | 6 | null | 675 | 0 | 0.75 | 1 | 0.525 | 1 | 0.1325 | 77.11 | ||
9,752 | r2e_gym::train::5013 | r2e_gym | train | 5,013 | datalad__d2b6914e464ab92d7ae64f1fa4a0bb91ca0d77c9 | datalad | datalad/datalad | python | d2b6914e464ab92d7ae64f1fa4a0bb91ca0d77c9 | **Title:** URL substitution mapping for GitHub URLs not applied correctly
**Description:**
When configuring URL substitutions for GitHub dataset hierarchies, the mappings are not applied as expected. Specifically, GitHub URLs containing spaces and special characters fail to be transformed into their sanitized versions... | diff --git a/datalad/core/distributed/clone.py b/datalad/core/distributed/clone.py
--- a/datalad/core/distributed/clone.py
+++ b/datalad/core/distributed/clone.py
@@ -124,13 +124,21 @@
URL mapping configuration
- 'clone' supports the transformation of URL via (multi-part) substitution
- specifications. S... | diff --git a/datalad/core/distributed/tests/test_clone.py b/datalad/core/distributed/tests/test_clone.py
--- a/datalad/core/distributed/tests/test_clone.py
+++ b/datalad/core/distributed/tests/test_clone.py
@@ -1604,14 +1604,6 @@
eq_(submod_rec['gitmodule_url'], src_path)
-_github_map = {
- 'datalad.clone.u... | null | null | namanjain12/datalad_final:d2b6914e464ab92d7ae64f1fa4a0bb91ca0d77c9 | true | null | 2 | 72 | null | 1,551 | 0.020833 | 0.75 | 1 | 0.525 | 1 | 0.4985 | 77.089276 | ||
9,753 | swe_bench::dev::205 | swe_bench | dev | 205 | sqlfluff__sqlfluff-3700 | sqlfluff/sqlfluff | sqlfluff/sqlfluff | python | 1000cf1beae75186cadf3a586c87e86e9f30ecb2 | L042 loop limit on fixes reached when CTE itself contains a subquery
### Search before asking
- [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues.
### What Happened
While running `sqlfluff fix --dialect snowflake` on a sql file, I get
```
==== finding fixable violat... | Unfortunately there is not much we can do without the SQL that produces this error (ideally a minimal reproducible example SQL) so will need to close this issue if we don’t get that.
I have updated the issue with a sample query. The query is very vague but it reproduces the error. Let me know if it helps.
Looks like th... | diff --git a/src/sqlfluff/core/parser/segments/base.py b/src/sqlfluff/core/parser/segments/base.py
--- a/src/sqlfluff/core/parser/segments/base.py
+++ b/src/sqlfluff/core/parser/segments/base.py
@@ -1749,6 +1749,11 @@ def add(self, value): # MutableSet
"""Add an element."""
self.map[self.key(value)] ... | diff --git a/test/fixtures/rules/std_rule_cases/L042.yml b/test/fixtures/rules/std_rule_cases/L042.yml
--- a/test/fixtures/rules/std_rule_cases/L042.yml
+++ b/test/fixtures/rules/std_rule_cases/L042.yml
@@ -99,7 +99,7 @@ double_nested_fail:
L042:
forbid_subquery_in: both
-double_nested_unfixable_cte_c... | ["test/utils/analysis/test_select_crawler.py::test_select_crawler_constructor[select", "test/utils/analysis/test_select_crawler.py::test_select_crawler_constructor[with", "test/utils/analysis/test_select_crawler.py::test_select_crawler_constructor[\\n", "test/utils/analysis/test_select_crawler.py::test_select_crawler_n... | [] | null | true | 2022-07-31T18:22:12Z | 4 | 540 | 4 | 2,615 | 0 | 0.8 | 1 | 0.85 | 0.3825 | 0.935833 | 77.066875 | |
9,754 | swe_bench::test::1564 | swe_bench | test | 1,564 | scikit-learn__scikit-learn-12827 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 4a7075aa8841789eab30578f56bc48d8e6dc6042 | DOC: add details to QuantileTransformer documentation
I think the documentation of `QuantileTransformer` should say how it is implemented. There is even a [stats.stackexchange question](https://stats.stackexchange.com/questions/325570/quantile-transformation-with-gaussian-distribution-sklearn-implementation/327102#3271... | Sounds like a good improvement. Could you maybe submit a PR with the improvements you have in mind? I guess it should go in the relevant [user guide](https://scikit-learn.org/dev/modules/preprocessing.html#preprocessing-transformer).
I will open a PR with the improvements of the doc.
> Besides I was thinking that t... | diff --git a/sklearn/preprocessing/data.py b/sklearn/preprocessing/data.py
--- a/sklearn/preprocessing/data.py
+++ b/sklearn/preprocessing/data.py
@@ -1995,10 +1995,12 @@ class QuantileTransformer(BaseEstimator, TransformerMixin):
to spread out the most frequent values. It also reduces the impact of
(marginal... | diff --git a/sklearn/preprocessing/tests/test_data.py b/sklearn/preprocessing/tests/test_data.py
--- a/sklearn/preprocessing/tests/test_data.py
+++ b/sklearn/preprocessing/tests/test_data.py
@@ -54,6 +54,7 @@
from sklearn.preprocessing.data import PolynomialFeatures
from sklearn.preprocessing.data import PowerTransfo... | ["sklearn/preprocessing/tests/test_data.py::test_quantile_transform_and_inverse"] | ["sklearn/preprocessing/tests/test_data.py::test_polynomial_features", "sklearn/preprocessing/tests/test_data.py::test_polynomial_feature_names", "sklearn/preprocessing/tests/test_data.py::test_polynomial_feature_array_order", "sklearn/preprocessing/tests/test_data.py::test_polynomial_features_csc_X[1-True-False-int]",... | null | true | 2018-12-19T09:17:59Z | 1 | 69 | 1 | 550 | 0 | 0.8 | 1 | 0.4 | 1 | 0.321667 | 77.065 | |
9,755 | r2e_gym::train::5199 | r2e_gym | train | 5,199 | pyramid__4b3603ad2f4850605c45e1b7bf4f077584303641 | pyramid | pylons/pyramid | python | 4b3603ad2f4850605c45e1b7bf4f077584303641 | **Title: Missing Default CSRF Storage Policy Causes ComponentLookupError**
**Description**
When attempting to validate a CSRF token without explicitly registering a CSRF storage policy, the application raises a `ComponentLookupError`. This makes it difficult to perform CSRF checks unless the storage policy is manuall... | diff --git a/docs/narr/extconfig.rst b/docs/narr/extconfig.rst
--- a/docs/narr/extconfig.rst
+++ b/docs/narr/extconfig.rst
@@ -263,7 +263,6 @@
- :meth:`pyramid.config.Configurator.override_asset`
- :meth:`pyramid.config.Configurator.set_authorization_policy`
- :meth:`pyramid.config.Configurator.set_default_csrf_opti... | diff --git a/pyramid/tests/test_csrf.py b/pyramid/tests/test_csrf.py
--- a/pyramid/tests/test_csrf.py
+++ b/pyramid/tests/test_csrf.py
@@ -15,11 +15,9 @@
from pyramid.csrf import get_csrf_token
return get_csrf_token(*args, **kwargs)
- def test_no_csrf_utility_registered(self):
- request = ... | null | null | namanjain12/pyramid_final:4b3603ad2f4850605c45e1b7bf4f077584303641 | true | null | 4 | 10 | null | 1,200 | 0 | 0.75 | 1 | 0.6375 | 0.85 | 0.233333 | 77.05625 | ||
9,756 | swe_bench::test::1066 | swe_bench | test | 1,066 | matplotlib__matplotlib-25129 | matplotlib/matplotlib | matplotlib/matplotlib | python | 1367ea5fd2420d264fcd63fbbc0521661f868cce | [Doc]: annotated_cursor example seems broken
### Documentation Link
https://matplotlib.org/stable/gallery/widgets/annotated_cursor.html
### Problem
As far as I can see, the annotated_cursor example doesn't display the cursor text position anymore (as of mpl3.7.0rc1 on qtagg).
### Suggested improvement
_No response... | I can't get this to work on `macosx` backend either.
Bisects to 733fbb092e1fd5ed9c0ea21fbddcffcfa32c738f
Something similar (with raw multicursor) was actually noticed prior to merge and merged despite this issue: https://github.com/matplotlib/matplotlib/pull/19763#pullrequestreview-657017782
Also reference to https:... | diff --git a/examples/event_handling/cursor_demo.py b/examples/event_handling/cursor_demo.py
--- a/examples/event_handling/cursor_demo.py
+++ b/examples/event_handling/cursor_demo.py
@@ -28,6 +28,8 @@
import matplotlib.pyplot as plt
import numpy as np
+from matplotlib.backend_bases import MouseEvent
+
class Curs... | diff --git a/lib/matplotlib/tests/test_widgets.py b/lib/matplotlib/tests/test_widgets.py
--- a/lib/matplotlib/tests/test_widgets.py
+++ b/lib/matplotlib/tests/test_widgets.py
@@ -1654,7 +1654,9 @@ def test_MultiCursor(horizOn, vertOn):
# Can't use `do_event` as that helper requires the widget
# to have a sing... | ["lib/matplotlib/tests/test_widgets.py::test_MultiCursor[False-False]", "lib/matplotlib/tests/test_widgets.py::test_MultiCursor[False-True]", "lib/matplotlib/tests/test_widgets.py::test_MultiCursor[True-False]", "lib/matplotlib/tests/test_widgets.py::test_MultiCursor[True-True]"] | ["lib/matplotlib/tests/test_widgets.py::test_rectangle_selector[kwargs0]", "lib/matplotlib/tests/test_widgets.py::test_rectangle_selector[kwargs1]", "lib/matplotlib/tests/test_widgets.py::test_rectangle_selector[kwargs2]", "lib/matplotlib/tests/test_widgets.py::test_rectangle_selector[kwargs3]", "lib/matplotlib/tests/t... | null | true | 2023-02-02T01:42:19Z | 3 | 79 | 4 | 321 | 0 | 0.8 | 1 | 0.4 | 1 | 0.316833 | 77.0505 | |
9,757 | r2e_gym::train::5419 | r2e_gym | train | 5,419 | aiohttp__970c5d9d84afc8fb762ff04940b5e25449a1f6ae | aiohttp | aio-libs/aiohttp | python | 970c5d9d84afc8fb762ff04940b5e25449a1f6ae | ### Title: Initializing ClientSession with proxy and proxy_auth Raises TypeError
### Description
When attempting to create a `ClientSession` with `proxy` and `proxy_auth` parameters, a `TypeError` is raised because these arguments are not recognized by the constructor.
#### Example Code
```python
from aiohttp import ... | diff --git a/CHANGES/9207.feature.rst b/CHANGES/9207.feature.rst
--- a/CHANGES/9207.feature.rst
+++ b/CHANGES/9207.feature.rst
@@ -0,0 +1 @@
+Added ``proxy`` and ``proxy_auth`` parameters to ``ClientSession`` -- by :user:`meshya`.
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTOR... | diff --git a/tests/test_client_session.py b/tests/test_client_session.py
--- a/tests/test_client_session.py
+++ b/tests/test_client_session.py
@@ -708,6 +708,55 @@
(session, "GET", "http://test.example.com"),
dict(allow_redirects=True, proxy="http://proxy.com", **params),
]
+
+
+async def test_de... | null | null | namanjain12/aiohttp_final:970c5d9d84afc8fb762ff04940b5e25449a1f6ae | true | null | 4 | 21 | null | 956 | 0 | 0.75 | 1 | 0.6375 | 0.85 | 0.229333 | 77.04425 | ||
9,758 | r2e_gym::train::4074 | r2e_gym | train | 4,074 | coveragepy__05fbe9c95352ad7536c1f8ebd53a6739714a8af9 | coveragepy | nedbat/coveragepy | python | 05fbe9c95352ad7536c1f8ebd53a6739714a8af9 | **Title:** URLs Include Incorrect 'coverage-' Prefix in Version Tags
**Description:**
When generating release URLs, the version tags are prefixed with "coverage-", resulting in incorrect URL paths.
**Example Buggy Code:**
```python
def _make_url(major, minor, micro, releaselevel, serial):
url = "https://coverage.... | diff --git a/ci/github_releases.py b/ci/github_releases.py
--- a/ci/github_releases.py
+++ b/ci/github_releases.py
@@ -78,7 +78,7 @@
"""
Turn a release note dict into the data needed by GitHub for a release.
"""
- tag = f"coverage-{relnote['version']}"
+ tag = relnote['version']
return {
... | diff --git a/tests/test_version.py b/tests/test_version.py
--- a/tests/test_version.py
+++ b/tests/test_version.py
@@ -30,5 +30,5 @@
def test_make_url(self):
assert _make_url(4, 0, 0, 'final', 0) == "https://coverage.readthedocs.io"
- expected = "https://coverage.readthedocs.io/en/coverage-4.1.2b... | null | null | namanjain12/coveragepy_final:05fbe9c95352ad7536c1f8ebd53a6739714a8af9 | true | null | 4 | 12 | null | 1,117 | 0 | 0.75 | 1 | 0.6375 | 0.85 | 0.226167 | 77.03475 | ||
9,759 | swe_bench::test::1314 | swe_bench | test | 1,314 | pydata__xarray-7400 | pydata/xarray | pydata/xarray | python | b21f62ee37eea3650a58e9ffa3a7c9f4ae83006b | Add defaults during concat 508
- [x] Closes #508
- [x] Tests added
- [x] Passes `black . && mypy . && flake8`
- [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API
Contined on issue #508 by removing exception when concat two datasets with disjoint variables and instead add th... | Thanks for working on this important issue!
There are a lot of edge cases that can come up in `concat`, so I think it would be very helpful to try to enumerate a broader set of unit tests for thoroughly testing this. For example:
- Pre-existing vs non-pre-existing dimension
- Pre-existing dimensions of different s... | diff --git a/xarray/core/concat.py b/xarray/core/concat.py
--- a/xarray/core/concat.py
+++ b/xarray/core/concat.py
@@ -5,7 +5,7 @@
import pandas as pd
from xarray.core import dtypes, utils
-from xarray.core.alignment import align
+from xarray.core.alignment import align, reindex_variables
from xarray.core.duck_arr... | diff --git a/xarray/tests/test_concat.py b/xarray/tests/test_concat.py
--- a/xarray/tests/test_concat.py
+++ b/xarray/tests/test_concat.py
@@ -1,7 +1,7 @@
from __future__ import annotations
from copy import deepcopy
-from typing import TYPE_CHECKING, Any
+from typing import TYPE_CHECKING, Any, Callable
import nu... | ["xarray/tests/test_concat.py::test_concat_compat", "xarray/tests/test_concat.py::test_concat_missing_var", "xarray/tests/test_concat.py::test_concat_missing_multiple_consecutive_var", "xarray/tests/test_concat.py::test_concat_second_empty", "xarray/tests/test_concat.py::test_concat_multiple_missing_variables", "xarray... | ["xarray/tests/test_concat.py::test_concat_all_empty", "xarray/tests/test_concat.py::TestConcatDataset::test_concat_simple[dim1-different]", "xarray/tests/test_concat.py::TestConcatDataset::test_concat_simple[dim1-minimal]", "xarray/tests/test_concat.py::TestConcatDataset::test_concat_simple[dim2-different]", "xarray/t... | null | true | 2022-12-22T14:41:56Z | 1 | 71 | 16 | 351 | 0 | 0.8 | 1 | 0.4 | 1 | 0.295167 | 76.9855 | |
9,760 | swe_bench::dev::31 | swe_bench | dev | 31 | pvlib__pvlib-python-1218 | pvlib/pvlib-python | pvlib/pvlib-python | python | 40ba4bd5c8b91754aa73e638ed984ab9657847cd | change eta_m to module_efficiency
`temperature.noct_sam` uses `eta_m_ref` to describe the module efficiency at reference conditions and `temperature.pvsyst_cell` uses `eta_m` to describe the module efficiency generically.
Just calling both of these `module_efficiency` would make the function signatures easily understa... | I support this change. | diff --git a/pvlib/modelchain.py b/pvlib/modelchain.py
--- a/pvlib/modelchain.py
+++ b/pvlib/modelchain.py
@@ -977,7 +977,7 @@ def infer_temperature_model(self):
return self.faiman_temp
elif {'noct_installed'} <= params:
return self.fuentes_temp
- elif {'noct', 'eta_m_ref'} <= ... | diff --git a/pvlib/tests/test_modelchain.py b/pvlib/tests/test_modelchain.py
--- a/pvlib/tests/test_modelchain.py
+++ b/pvlib/tests/test_modelchain.py
@@ -201,7 +201,7 @@ def pvwatts_dc_pvwatts_ac_faiman_temp_system():
@pytest.fixture(scope="function")
def pvwatts_dc_pvwatts_ac_pvsyst_temp_system():
module_param... | ["pvlib/tests/test_modelchain.py::test_run_model_with_weather_noct_sam_temp", "pvlib/tests/test_modelchain.py::test_temperature_models_arrays_multi_weather[temp_params4-noct_sam_temp]", "pvlib/tests/test_modelchain.py::test_infer_temp_model[noct_sam_temp]", "pvlib/tests/test_pvsystem.py::test_PVSystem_pvsyst_celltemp",... | ["pvlib/tests/test_modelchain.py::test_ModelChain_creation", "pvlib/tests/test_modelchain.py::test_with_sapm", "pvlib/tests/test_modelchain.py::test_with_pvwatts", "pvlib/tests/test_modelchain.py::test_run_model_with_irradiance", "pvlib/tests/test_modelchain.py::test_run_model_from_irradiance_arrays_no_loss", "pvlib/te... | null | true | 2021-05-06T16:02:38Z | 3 | 42 | 10 | 920 | 0 | 0.8 | 1 | 0.4 | 1 | 0.293333 | 76.98 | |
9,761 | swe_bench::test::1238 | swe_bench | test | 1,238 | pydata__xarray-4339 | pydata/xarray | pydata/xarray | python | 3b5a8ee46be7fd00d7ea9093d1941cb6c3be191c | missing parameter in DataArray.str.get
While working on #4286 I noticed that the docstring of `DataArray.str.get` claims to allow passing a default value in addition to the index, but the python code doesn't have that parameter at all.
I think the default value is a good idea and that we should make the code match the ... | Similarly `str.wrap` does not pass on its `kwargs`
https://github.com/pydata/xarray/blob/7daad4fce3bf8ad9b9bc8e7baa104c476437e68d/xarray/core/accessor_str.py#L654 | diff --git a/xarray/core/accessor_str.py b/xarray/core/accessor_str.py
--- a/xarray/core/accessor_str.py
+++ b/xarray/core/accessor_str.py
@@ -90,7 +90,7 @@ def _apply(self, f, dtype=None):
def len(self):
"""
- Compute the length of each element in the array.
+ Compute the length of each s... | diff --git a/xarray/tests/test_accessor_str.py b/xarray/tests/test_accessor_str.py
--- a/xarray/tests/test_accessor_str.py
+++ b/xarray/tests/test_accessor_str.py
@@ -596,7 +596,7 @@ def test_wrap():
)
# expected values
- xp = xr.DataArray(
+ expected = xr.DataArray(
[
"hello wor... | ["xarray/tests/test_accessor_str.py::test_wrap_kwargs_passed", "xarray/tests/test_accessor_str.py::test_get_default[str_]", "xarray/tests/test_accessor_str.py::test_get_default[bytes_]"] | ["xarray/tests/test_accessor_str.py::test_dask", "xarray/tests/test_accessor_str.py::test_count[str_]", "xarray/tests/test_accessor_str.py::test_count[bytes_]", "xarray/tests/test_accessor_str.py::test_contains[str_]", "xarray/tests/test_accessor_str.py::test_contains[bytes_]", "xarray/tests/test_accessor_str.py::test_... | null | true | 2020-08-14T14:09:56Z | 1 | 69 | 3 | 330 | 0 | 0.8 | 1 | 0.4 | 1 | 0.285 | 76.955 | |
9,762 | swe_bench::dev::64 | swe_bench | dev | 64 | pvlib__pvlib-python-1852 | pvlib/pvlib-python | pvlib/pvlib-python | python | f8b129418025b47ad669ba4802d03348a275e329 | Add `min_angle` argument to `tracking.singleaxis`
In `tracking.singleaxis` the minimum angle of the tracker is assumed to be opposite of the maximum angle, although in some cases the minimum angle could be different. NREL SAM doesn't support that but PVsyst does.
In order to support non symmetrical limiting angles, `t... | I'm in favor of pvlib being able to handle asymmetrical rotation limits in principle, but I'm curious what situation has that asymmetry in practice. @MichalArieli do you have a particular real-world application in mind?
Rather than separate `min_` and `max_` parameters, I think I'd favor a single parameter that acc... | diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py
--- a/pvlib/pvsystem.py
+++ b/pvlib/pvsystem.py
@@ -15,7 +15,7 @@
import pandas as pd
from dataclasses import dataclass
from abc import ABC, abstractmethod
-from typing import Optional
+from typing import Optional, Union
from pvlib._deprecation import deprecated,... | diff --git a/pvlib/tests/test_pvsystem.py b/pvlib/tests/test_pvsystem.py
--- a/pvlib/tests/test_pvsystem.py
+++ b/pvlib/tests/test_pvsystem.py
@@ -2422,6 +2422,15 @@ def test_SingleAxisTrackerMount_get_orientation(single_axis_tracker_mount):
assert actual[key] == pytest.approx(expected_value), err_msg
+def... | ["pvlib/tests/test_pvsystem.py::test_SingleAxisTrackerMount_get_orientation_asymmetric_max", "pvlib/tests/test_tracking.py::test_min_angle"] | ["pvlib/tests/test_pvsystem.py::test_PVSystem_get_iam[ashrae-model_params0]", "pvlib/tests/test_pvsystem.py::test_PVSystem_get_iam[physical-model_params1]", "pvlib/tests/test_pvsystem.py::test_PVSystem_get_iam[martin_ruiz-model_params2]", "pvlib/tests/test_pvsystem.py::test_PVSystem_multi_array_get_iam", "pvlib/tests/t... | null | true | 2023-09-12T16:46:37Z | 2 | 51 | 2 | 671 | 0 | 0.8 | 1 | 0.4 | 1 | 0.281833 | 76.9455 | |
9,763 | swe_bench::test::1387 | swe_bench | test | 1,387 | pytest-dev__pytest-11044 | pytest-dev/pytest | pytest-dev/pytest | python | 4f3f36c396b52f8398bc4734ff0c00c57cf1fed1 | Issue warning/error if 'testpaths' does not match any files/folders
We should issue a warning (or even an error?) if `testpaths` does not match any files or folders.
I think an error is reasonable, even if it might break some incorrectly-configured suite out there.
----
_Originally posted by @nicoddemus in https://... | i propose start with warning, elevate to error in 8.x
Agree, sounds good. :+1:
Hello!
Adding a warning for this, will submit a PR shortly | diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py
--- a/src/_pytest/config/__init__.py
+++ b/src/_pytest/config/__init__.py
@@ -1382,6 +1382,15 @@ def parse(self, args: List[str], addopts: bool = True) -> None:
args = []
for path in testpaths:... | diff --git a/testing/test_warnings.py b/testing/test_warnings.py
--- a/testing/test_warnings.py
+++ b/testing/test_warnings.py
@@ -777,6 +777,20 @@ def test_it():
)
+def test_warning_on_testpaths_not_found(pytester: Pytester) -> None:
+ # Check for warning when testpaths set, but not found by glob
+ ... | ["testing/test_warnings.py::test_warning_on_testpaths_not_found"] | ["testing/test_warnings.py::test_warnings_checker_twice", "testing/test_warnings.py::test_normal_flow", "testing/test_warnings.py::test_setup_teardown_warnings", "testing/test_warnings.py::test_ignore[cmdline]", "testing/test_warnings.py::test_ignore[ini]", "testing/test_warnings.py::test_unicode", "testing/test_warnin... | null | true | 2023-05-27T23:26:11Z | 1 | 9 | 1 | 1,465 | 0 | 0.8 | 1 | 0.4 | 1 | 0.274167 | 76.9225 | |
9,764 | swe_bench::test::1556 | swe_bench | test | 1,556 | scikit-learn__scikit-learn-12626 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | ac327c5ad66fa3d4eb607d007e3684dec872d49a | make_column_transformer has different order of arguments than ColumnTransformer
I'm not sure if we discussed this or did this on purpose, but I find this very confusing.
``ColumnTransformer`` has ``(name, transformer, columns)`` and ``make_columntransformer`` has ``(columns, transformer)``. I guess it's too late to cha... | It's not very nice, is it!! I don't know what to do...
we said we might break it... I feel this is a good reason to?
Basically either that or I have to add to my book (and every tutorial I ever give) "but be careful, they go in a different order for some reason"
Then is it better to break in 0.20.1 or 0.21??
Breaking... | diff --git a/sklearn/compose/_column_transformer.py b/sklearn/compose/_column_transformer.py
--- a/sklearn/compose/_column_transformer.py
+++ b/sklearn/compose/_column_transformer.py
@@ -11,6 +11,7 @@
from itertools import chain
import numpy as np
+import warnings
from scipy import sparse
from ..base import clo... | diff --git a/sklearn/compose/tests/test_column_transformer.py b/sklearn/compose/tests/test_column_transformer.py
--- a/sklearn/compose/tests/test_column_transformer.py
+++ b/sklearn/compose/tests/test_column_transformer.py
@@ -13,6 +13,7 @@
from sklearn.utils.testing import assert_dict_equal
from sklearn.utils.testin... | ["sklearn/compose/tests/test_column_transformer.py::test_column_transformer_mixed_cols_sparse", "sklearn/compose/tests/test_column_transformer.py::test_make_column_transformer"] | ["sklearn/compose/tests/test_column_transformer.py::test_column_transformer", "sklearn/compose/tests/test_column_transformer.py::test_column_transformer_dataframe", "sklearn/compose/tests/test_column_transformer.py::test_column_transformer_empty_columns[list-pandas]", "sklearn/compose/tests/test_column_transformer.py::... | null | true | 2018-11-20T16:19:19Z | 1 | 62 | 2 | 388 | 0 | 0.8 | 1 | 0.4 | 1 | 0.271333 | 76.914 | |
9,765 | swe_bench::test::1121 | swe_bench | test | 1,121 | matplotlib__matplotlib-26341 | matplotlib/matplotlib | matplotlib/matplotlib | python | 2aee6ccd7c7e1f8d282c1e7579f4ee546b838542 | [MNT]: Make cyclers indexable and rely on indexing them rather than itertools.cycle
### Summary
Currently the prop_cycle code (in _process_plot_var_args) creates an itertools.cycle over the Cycler instance to yield the successive line properties. itertools.cycle objects are opaque, which creates some difficulties e.g... | xref matplotlib/cycler#27 matplotlib/cycler#8
Technically it is _possible_ to do indexing to the cycler object (though of course the itertools.cycle wrapper obscures this internally, as you mention, and it is not super pretty):
```python
next(iter(mpl.rcParams["axes.prop_cycle"][2:]))
```
- Slicing on cycler... | diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py
--- a/lib/matplotlib/axes/_base.py
+++ b/lib/matplotlib/axes/_base.py
@@ -2,7 +2,6 @@
from contextlib import ExitStack
import functools
import inspect
-import itertools
import logging
from numbers import Real
from operator import attrgetter
... | diff --git a/lib/matplotlib/tests/test_cycles.py b/lib/matplotlib/tests/test_cycles.py
--- a/lib/matplotlib/tests/test_cycles.py
+++ b/lib/matplotlib/tests/test_cycles.py
@@ -1,3 +1,6 @@
+import contextlib
+from io import StringIO
+
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
@@ -120,... | ["lib/matplotlib/tests/test_pickle.py::test_cycler"] | ["lib/matplotlib/tests/test_cycles.py::test_colorcycle_basic", "lib/matplotlib/tests/test_cycles.py::test_marker_cycle", "lib/matplotlib/tests/test_cycles.py::test_marker_cycle_kwargs_arrays_iterators", "lib/matplotlib/tests/test_cycles.py::test_linestylecycle_basic", "lib/matplotlib/tests/test_cycles.py::test_fillcycl... | null | true | 2023-07-18T09:13:18Z | 2 | 21 | 1 | 1,195 | 0 | 0.8 | 1 | 0.4 | 1 | 0.269167 | 76.9075 | |
9,766 | r2e_gym::train::4071 | r2e_gym | train | 4,071 | coveragepy__933ef836fce0dcf6adc0c40ef801c30c9a1d1293 | coveragepy | nedbat/coveragepy | python | 933ef836fce0dcf6adc0c40ef801c30c9a1d1293 | **Title:** Setting `xml:package_depth` Configuration Option Raises `CoverageException`
**Description:**
Attempting to configure the `xml:package_depth` option in the coverage configuration leads to a `CoverageException`, preventing users from customizing the package depth in XML reports.
**Example Buggy Code:**
```py... | diff --git a/AUTHORS.txt b/AUTHORS.txt
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -7,6 +7,7 @@
Chris Adams
Danny Allen
Geoff Bache
+Lex Berezhny
Julian Berman
Titus Brown
Brett Cannon
diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,6 +13,11 @@
- The XML report now reports each direc... | diff --git a/tests/test_config.py b/tests/test_config.py
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -233,6 +233,7 @@
title = Title & nums # nums!
[{section}xml]
output=mycov.xml
+ package_depth = 17
[{section}paths]
... | null | null | namanjain12/coveragepy_final:933ef836fce0dcf6adc0c40ef801c30c9a1d1293 | true | null | 4 | 10 | null | 902 | 0 | 0.75 | 1 | 0.6375 | 0.85 | 0.183667 | 76.90725 | ||
9,767 | swe_bench::test::1318 | swe_bench | test | 1,318 | pylint-dev__pylint-4339 | pylint-dev/pylint | pylint-dev/pylint | python | 9d959abd39cd787fa7b5d68327d19d3972fe888e | Support output to a file to support tox on CI servers
Currently [`tox` cannot redirect commands to files](https://bitbucket.org/hpk42/tox/issues/73/pipe-output-of-command-into-file), which means when running Pylint from within `tox` there seems to be no way to output the results to a single (for example HTML) file that... | Why not redirecting pylint command in your tox file into a file?
@PCManticore Because (and this was new to me as I hadn't tried before) [`tox` does not support file redirection](https://bitbucket.org/hpk42/tox/issues/73/pipe-output-of-command-into-file), so there is no way to do it that I am aware of.
Hello,
I've ... | diff --git a/pylint/lint/run.py b/pylint/lint/run.py
--- a/pylint/lint/run.py
+++ b/pylint/lint/run.py
@@ -79,6 +79,7 @@ def __init__(
do_exit=UNUSED_PARAM_SENTINEL,
): # pylint: disable=redefined-builtin
self._rcfile = None
+ self._output = None
self._version_asked = False
... | diff --git a/tests/test_self.py b/tests/test_self.py
--- a/tests/test_self.py
+++ b/tests/test_self.py
@@ -45,6 +45,7 @@
from copy import copy
from io import StringIO
from os.path import abspath, dirname, join
+from pathlib import Path
from typing import Generator, Optional
from unittest import mock
from unittest... | ["tests/test_self.py::TestRunTC::test_output_file_valid_path", "tests/test_self.py::TestRunTC::test_output_file_can_be_combined_with_output_format_option[text-tests/regrtest_data/unused_variable.py:4:4:", "tests/test_self.py::TestRunTC::test_output_file_can_be_combined_with_output_format_option[parseable-tests/regrtest... | ["tests/test_self.py::TestRunTC::test_pkginfo", "tests/test_self.py::TestRunTC::test_all", "tests/test_self.py::TestRunTC::test_no_ext_file", "tests/test_self.py::TestRunTC::test_w0704_ignored", "tests/test_self.py::TestRunTC::test_exit_zero", "tests/test_self.py::TestRunTC::test_generate_config_option", "tests/test_se... | null | true | 2021-04-11T17:25:22Z | 1 | 31 | 8 | 990 | 0 | 0.8 | 1 | 0.4 | 1 | 0.268333 | 76.905 | |
9,768 | swe_bench::test::1623 | swe_bench | test | 1,623 | scikit-learn__scikit-learn-13933 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | e747376eef58ab671243fbc463e6ef8bf342636c | GBDTs should bin train and validation data separately?
In the new GBDTs we bin the data before calling `train_test_split()` (for early-stopping).
That means that the validation set is also used to find the bin thresholds (it is of course not used to find the split points!).
I feel like the "data leak" is very minimal... | Well it means that the internal scores are but not as accurate estimates as
they could be, but you expect it would rarely affect prediction, yeah?
This can impact early stopping and therefore prediction but probably minimally.
But I agree better avoid any kind of data leak. +1 for fixing this.
| diff --git a/sklearn/ensemble/_hist_gradient_boosting/binning.py b/sklearn/ensemble/_hist_gradient_boosting/binning.py
--- a/sklearn/ensemble/_hist_gradient_boosting/binning.py
+++ b/sklearn/ensemble/_hist_gradient_boosting/binning.py
@@ -140,7 +140,7 @@ def transform(self, X):
Returns
-------
... | diff --git a/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py b/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
--- a/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
+++ b/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
@... | ["sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py::test_binning_train_validation_are_separated"] | ["sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py::test_init_parameters_validation[params0-Loss", "sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py::test_init_parameters_validation[params1-learning_rate=0", "sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_bo... | null | true | 2019-05-23T14:44:19Z | 2 | 60 | 1 | 400 | 0 | 0.8 | 1 | 0.4 | 1 | 0.266667 | 76.9 | |
9,769 | swe_bench::test::1566 | swe_bench | test | 1,566 | scikit-learn__scikit-learn-12860 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 4223633b0d64c75fef1230f66cfb1d50fb5a8d04 | Suggestion: Add support for unpenalized logistic regression
`LinearRegression` provides unpenalized OLS, and `SGDClassifier`, which supports `loss="log"`, also supports `penalty="none"`. But if you want plain old unpenalized logistic regression, you have to fake it by setting `C` in `LogisticRegression` to a large numb... | > you have to fake it by setting C in LogisticRegression to a large number
What's the problem with that approach?
I assumed that it's inexact and slower than a direct implementation of unpenalized logistic regression. Am I wrong?
I notice that setting `C` too high, as in the following, will cause `LogisticRegression... | diff --git a/sklearn/linear_model/logistic.py b/sklearn/linear_model/logistic.py
--- a/sklearn/linear_model/logistic.py
+++ b/sklearn/linear_model/logistic.py
@@ -437,13 +437,13 @@ def _check_solver(solver, penalty, dual):
raise ValueError("Logistic Regression supports only solvers in %s, got"
... | diff --git a/sklearn/linear_model/tests/test_logistic.py b/sklearn/linear_model/tests/test_logistic.py
--- a/sklearn/linear_model/tests/test_logistic.py
+++ b/sklearn/linear_model/tests/test_logistic.py
@@ -234,7 +234,7 @@ def test_check_solver_option(LR):
# all solvers except 'liblinear' and 'saga'
for sol... | ["sklearn/linear_model/tests/test_logistic.py::test_check_solver_option[LogisticRegression]", "sklearn/linear_model/tests/test_logistic.py::test_check_solver_option[LogisticRegressionCV]", "sklearn/linear_model/tests/test_logistic.py::test_penalty_none[lbfgs]", "sklearn/linear_model/tests/test_logistic.py::test_penalty... | ["sklearn/linear_model/tests/test_logistic.py::test_predict_2_classes", "sklearn/linear_model/tests/test_logistic.py::test_error", "sklearn/linear_model/tests/test_logistic.py::test_logistic_cv_mock_scorer", "sklearn/linear_model/tests/test_logistic.py::test_logistic_cv_score_does_not_warn_by_default", "sklearn/linear_... | null | true | 2018-12-24T20:07:42Z | 1 | 61 | 6 | 366 | 0 | 0.8 | 1 | 0.4 | 1 | 0.264333 | 76.893 | |
9,770 | swe_bench::test::1669 | swe_bench | test | 1,669 | scikit-learn__scikit-learn-15138 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 7c47337f7b15a5368c922ed1781a267bf66c7367 | Stacking: add an option to use the original dataset when training final_estimator
I think it will be readonable to add an option to use the original dataset when training final_estimator. This seems reasonable and has proved to be useful in some Kaggle competitions.
Reference: implementation from mlxtend
http://rasbt.... | I think that I added this in the early stage of the PR and we ruled this out.
I agree that it existed at one point. I think it can be considered now in
any case.
`use_feature_in_secondary` might be a long name. At that time, I named it `passthrough`.
Would it be better.
> I think that I added this in the early stage o... | diff --git a/sklearn/ensemble/_stacking.py b/sklearn/ensemble/_stacking.py
--- a/sklearn/ensemble/_stacking.py
+++ b/sklearn/ensemble/_stacking.py
@@ -8,6 +8,7 @@
import numpy as np
from joblib import Parallel, delayed
+import scipy.sparse as sparse
from ..base import clone
from ..base import ClassifierMixin, R... | diff --git a/sklearn/ensemble/tests/test_stacking.py b/sklearn/ensemble/tests/test_stacking.py
--- a/sklearn/ensemble/tests/test_stacking.py
+++ b/sklearn/ensemble/tests/test_stacking.py
@@ -5,6 +5,7 @@
import pytest
import numpy as np
+import scipy.sparse as sparse
from sklearn.base import BaseEstimator
from s... | ["sklearn/ensemble/tests/test_stacking.py::test_stacking_classifier_iris[False-None-3]", "sklearn/ensemble/tests/test_stacking.py::test_stacking_classifier_iris[False-None-cv1]", "sklearn/ensemble/tests/test_stacking.py::test_stacking_classifier_iris[False-final_estimator1-3]", "sklearn/ensemble/tests/test_stacking.py:... | ["sklearn/ensemble/tests/test_stacking.py::test_stacking_classifier_drop_column_binary_classification", "sklearn/ensemble/tests/test_stacking.py::test_stacking_classifier_drop_estimator", "sklearn/ensemble/tests/test_stacking.py::test_stacking_regressor_drop_estimator", "sklearn/ensemble/tests/test_stacking.py::test_st... | null | true | 2019-10-05T13:41:54Z | 1 | 45 | 26 | 667 | 0 | 0.8 | 1 | 0.4 | 1 | 0.261167 | 76.8835 | |
9,771 | swe_bench::test::1528 | swe_bench | test | 1,528 | scikit-learn__scikit-learn-11160 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 87a3910e1734b69ccfcf12c5668d549fccffb7b0 | `classification_report` output options?
Is it possible to add output options to http://scikit-learn.org/stable/modules/generated/sklearn.metrics.classification_report.html. It would be really useful to have a `pd.DataFrame` output or `xr.DataArray` output. Right now it outputs as a string that must be printed but it'... | We're not going to accept a Pandas dependency etc. But a dict-of-arrays
output might be appropriarte.
On 9 November 2016 at 12:42, Josh L. Espinoza notifications@github.com
wrote:
> Is it possible to add output options to http://scikit-learn.org/
> stable/modules/generated/sklearn.metrics.classification_report.html. ... | diff --git a/sklearn/metrics/classification.py b/sklearn/metrics/classification.py
--- a/sklearn/metrics/classification.py
+++ b/sklearn/metrics/classification.py
@@ -1427,7 +1427,7 @@ def balanced_accuracy_score(y_true, y_pred, sample_weight=None):
def classification_report(y_true, y_pred, labels=None, target_nam... | diff --git a/sklearn/metrics/tests/test_classification.py b/sklearn/metrics/tests/test_classification.py
--- a/sklearn/metrics/tests/test_classification.py
+++ b/sklearn/metrics/tests/test_classification.py
@@ -12,7 +12,7 @@
from sklearn.datasets import make_multilabel_classification
from sklearn.preprocessing import... | ["sklearn/metrics/tests/test_classification.py::test_classification_report_dictionary_output"] | ["sklearn/metrics/tests/test_classification.py::test_multilabel_accuracy_score_subset_accuracy", "sklearn/metrics/tests/test_classification.py::test_precision_recall_f1_score_binary", "sklearn/metrics/tests/test_classification.py::test_precision_recall_f_binary_single_class", "sklearn/metrics/tests/test_classification.... | null | true | 2018-05-29T17:50:47Z | 1 | 39 | 1 | 739 | 0 | 0.8 | 1 | 0.4 | 1 | 0.253167 | 76.8595 | |
9,772 | swe_bench::test::1888 | swe_bench | test | 1,888 | sphinx-doc__sphinx-9547 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | 8fd4373d3aec07b8d9a4fb159b6236f4dc715b21 | Missing support for GNU extension types like `_Complex` or `_Fract`
I'm currently working on the transition of the GNU C compiler (GCC) manuals and I noticed there are unsupported C extensions like:
```
.. c:function:: complex long foo(int)
.. c:function:: _Complex long foo(int)
.. c:function:: long fract __satfractun... | One related problem might be something like:
```
.. c:function:: unsigned HOST_WIDE_INT foo ()
```
Where we have defined `HOST_WIDE_INT` with a typedef to something like `unsigned long`. Can one handle it with Sphinx somehow?
@jakobandersen | diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py
--- a/sphinx/domains/c.py
+++ b/sphinx/domains/c.py
@@ -92,6 +92,34 @@
_string_re = re.compile(r"[LuU8]?('([^'\\]*(?:\\.[^'\\]*)*)'"
r'|"([^"\\]*(?:\\.[^"\\]*)*)")', re.S)
+_simple_type_sepcifiers_re = re.compile(r"""(?x)
+ \b(
+ v... | diff --git a/tests/test_domain_c.py b/tests/test_domain_c.py
--- a/tests/test_domain_c.py
+++ b/tests/test_domain_c.py
@@ -275,6 +275,62 @@ def exprCheck(expr, output=None):
exprCheck('a or_eq 5')
+def test_domain_c_ast_fundamental_types():
+ def types():
+ def signed(t):
+ yield t
+ ... | ["tests/test_domain_c.py::test_domain_c_ast_fundamental_types"] | ["tests/test_domain_c.py::test_domain_c_ast_expressions", "tests/test_domain_c.py::test_domain_c_ast_type_definitions", "tests/test_domain_c.py::test_domain_c_ast_macro_definitions", "tests/test_domain_c.py::test_domain_c_ast_member_definitions", "tests/test_domain_c.py::test_domain_c_ast_function_definitions", "tests/... | null | true | 2021-08-14T14:02:03Z | 2 | 184 | 1 | 1,833 | 0 | 0.8 | 1 | 0.55 | 0.75 | 0.8055 | 76.854 | |
9,773 | swe_bench::test::1675 | swe_bench | test | 1,675 | scikit-learn__scikit-learn-15625 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | e650a207efc9dd33556b1b9678b043f73a18aecb | ENH: add normalize parameter to metrics.classification.confusion_matrix
Allows to get a normalized confusion matrix directly from the function
call. I use `confusion_matrix` frequently and find the need to always
normalize the matrix manually maybe unnecessary.
I am aware of the fact that other functions like `accurac... | I'm okay with giving options. I think calling it precision/recall/accuracy
is a bit misleading since they don't pertain off the diagonal of the
matrix. true vs pred might be better names. It's still not entirely clear
to me that providing this facility is of great benefit to users.
With your proposal, you also need to... | diff --git a/sklearn/metrics/_classification.py b/sklearn/metrics/_classification.py
--- a/sklearn/metrics/_classification.py
+++ b/sklearn/metrics/_classification.py
@@ -193,8 +193,9 @@ def accuracy_score(y_true, y_pred, normalize=True, sample_weight=None):
return _weighted_sum(score, sample_weight, normalize)
... | diff --git a/sklearn/metrics/tests/test_classification.py b/sklearn/metrics/tests/test_classification.py
--- a/sklearn/metrics/tests/test_classification.py
+++ b/sklearn/metrics/tests/test_classification.py
@@ -1,6 +1,8 @@
from functools import partial
from itertools import product
+from itertools import chain
+fro... | ["sklearn/metrics/tests/test_classification.py::test_confusion_matrix_normalize[true-f-0.333333333]", "sklearn/metrics/tests/test_classification.py::test_confusion_matrix_normalize[pred-f-0.333333333]", "sklearn/metrics/tests/test_classification.py::test_confusion_matrix_normalize[all-f-0.1111111111]", "sklearn/metrics... | ["sklearn/metrics/tests/test_classification.py::test_classification_report_dictionary_output", "sklearn/metrics/tests/test_classification.py::test_multilabel_accuracy_score_subset_accuracy", "sklearn/metrics/tests/test_classification.py::test_precision_recall_f1_score_binary", "sklearn/metrics/tests/test_classification... | null | true | 2019-11-14T16:30:49Z | 2 | 44 | 5 | 545 | 0 | 0.8 | 1 | 0.4 | 1 | 0.2375 | 76.8125 | |
9,774 | swe_bench::test::78 | swe_bench | test | 78 | astropy__astropy-7441 | astropy/astropy | astropy/astropy | python | 5e5764ed27a8ee1a162a09e3398fcfb7481389af | astropy.time.TimeDelta should support conversion to `datetime.timedelta`
Because of the inheritance `TimeDelta` has a method `to_datetime` which is useless.
It should have a method `to_timedelta` which returns a `datetime.timedelta` object or objects.
Conversion to `np.datetime64` (for `Time`) and `np.timedelta64` (f... | +1
This would not be too difficult to implement, but as I don't see myself having time soon (I really want to avoid `datetime` if at all possible...), just what I think would be needed:
1. Make a new `TimeDeltaDatetime(TimeDeltaFormat, TimeUnique)` class in `astropy.time.formats` (can add near the very end of the file... | diff --git a/astropy/time/core.py b/astropy/time/core.py
--- a/astropy/time/core.py
+++ b/astropy/time/core.py
@@ -10,7 +10,7 @@
import copy
import operator
-from datetime import datetime
+from datetime import datetime, timedelta
import numpy as np
@@ -1603,7 +1603,7 @@ def __add__(self, other):
... | diff --git a/astropy/time/tests/test_delta.py b/astropy/time/tests/test_delta.py
--- a/astropy/time/tests/test_delta.py
+++ b/astropy/time/tests/test_delta.py
@@ -6,6 +6,8 @@
import pytest
+from datetime import timedelta
+
from .. import (Time, TimeDelta, OperandTypeError, ScaleValueError,
TIME_S... | ["astropy/time/tests/test_delta.py::test_python_timedelta_scalar", "astropy/time/tests/test_delta.py::test_python_timedelta_vector", "astropy/time/tests/test_delta.py::test_timedelta_to_datetime"] | ["astropy/time/tests/test_delta.py::TestTimeDeltaScales::test_delta_scales_definition", "astropy/time/tests/test_delta.py::TestTimeDeltaScales::test_standard_scales_for_time_minus_time[tai-tai]", "astropy/time/tests/test_delta.py::TestTimeDeltaScales::test_standard_scales_for_time_minus_time[tai-tcg]", "astropy/time/te... | null | true | 2018-05-08T10:23:12Z | 2 | 53 | 3 | 356 | 0 | 0.8 | 1 | 0.4 | 1 | 0.236 | 76.808 | |
9,775 | swe_bench::test::35 | swe_bench | test | 35 | astropy__astropy-13731 | astropy/astropy | astropy/astropy | python | a30301e5535be2f558cb948da6b3475df4e36a98 | `Time` parses fractional days in year-month-day format incorrectly
`Time('2017-08-24.25')` results in `2017-08-24 00:00:00.250`: the fractional days are interpreted as fractional seconds (`2017-08-24 06:00:00` is what I hoped for).
The format `2017-08-24.25` is perhaps not the best format, but it is used, and since As... | @evertrol - I think the best strategy here is to raise an exception. The point is that the astropy string subformats like `date` are documented to be symmetric, so that if you put in `2017-08-24.25` then it parses that and the representation would then be something like `2017-08-24.250` (with a default precision of 3 ... | diff --git a/astropy/time/formats.py b/astropy/time/formats.py
--- a/astropy/time/formats.py
+++ b/astropy/time/formats.py
@@ -1294,13 +1294,15 @@ def parse_string(self, timestr, subfmts):
try:
idot = timestr.rindex('.')
except Exception:
- fracsec = 0.0
+ timestr_ha... | diff --git a/astropy/time/tests/test_basic.py b/astropy/time/tests/test_basic.py
--- a/astropy/time/tests/test_basic.py
+++ b/astropy/time/tests/test_basic.py
@@ -18,7 +18,8 @@
from astropy.coordinates import EarthLocation
from astropy.table import Column, Table
from astropy.time import (
- STANDARD_TIME_SCALES, ... | ["astropy/time/tests/test_basic.py::test_format_fractional_string_parsing[False]"] | ["astropy/time/tests/test_basic.py::TestBasic::test_different_dimensions", "astropy/time/tests/test_basic.py::TestBasic::test_empty_value[jd]", "astropy/time/tests/test_basic.py::TestBasic::test_empty_value[mjd]", "astropy/time/tests/test_basic.py::TestBasic::test_empty_value[decimalyear]", "astropy/time/tests/test_bas... | null | true | 2022-09-21T16:19:30Z | 1 | 17 | 1 | 1,075 | 0 | 0.8 | 1 | 0.4 | 1 | 0.235833 | 76.8075 | |
9,776 | swe_bench::test::1665 | swe_bench | test | 1,665 | scikit-learn__scikit-learn-15096 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | e424ab17bb73472a829faca3dfdc599a9d6df56b | GridSearchCV saves all fitted estimator in cv_results['params'] when params are estimators
#### Description
I use GridSearchCV to optimize the hyperparameters of a pipeline. I set the param grid by inputing transformers or estimators at different steps of the pipeline, following the Pipeline documentation:
> A step’s ... | A solution could be to clone the estimator after set_param call in _fit_and_score, and return the new cloned estimator. However it would break any function that use _fit_and_score and expect to keep using the same estimator instance than passed in _fit_and_score..
Hmm... I agree this is a bit of an issue. But I think i... | diff --git a/sklearn/model_selection/_search.py b/sklearn/model_selection/_search.py
--- a/sklearn/model_selection/_search.py
+++ b/sklearn/model_selection/_search.py
@@ -730,8 +730,10 @@ def evaluate_candidates(candidate_params):
self.best_params_ = results["params"][self.best_index_]
if self.r... | diff --git a/sklearn/model_selection/tests/test_search.py b/sklearn/model_selection/tests/test_search.py
--- a/sklearn/model_selection/tests/test_search.py
+++ b/sklearn/model_selection/tests/test_search.py
@@ -63,7 +63,7 @@
from sklearn.metrics import roc_auc_score
from sklearn.impute import SimpleImputer
from skle... | ["sklearn/model_selection/tests/test_search.py::test_grid_search_pipeline_steps"] | ["sklearn/model_selection/tests/test_search.py::test_validate_parameter_input[0-TypeError-Parameter", "sklearn/model_selection/tests/test_search.py::test_validate_parameter_input[input1-TypeError-Parameter", "sklearn/model_selection/tests/test_search.py::test_validate_parameter_input[input2-TypeError-Parameter.*", "skl... | null | true | 2019-09-26T17:13:08Z | 2 | 15 | 1 | 1,111 | 0 | 0.8 | 1 | 0.4 | 1 | 0.235167 | 76.8055 | |
9,777 | swe_bench::test::1099 | swe_bench | test | 1,099 | matplotlib__matplotlib-25794 | matplotlib/matplotlib | matplotlib/matplotlib | python | 6a323c043b77154656b28fd34ac4ca6dfb0ecf9b | Raise when both singular and plural scatter attributes are specified
### Problem
`plt.scatter` accepts both singular and plural forms of the `linewidth(s)` and `edgecolor(s)` attributes. The plural forms are documented in the function signature, but the singular forms actually take precedence if both are specified.
T... | Well - there should be some consistency at least. I think @brunobeltran is looking at overhauling this?
> Well - there should be some consistency at least.
new motto for matplotlib? :)
Consistent, community-developed, flexible with lots of features. You may choose two.
Hello I would like to starting contributin... | diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py
--- a/lib/matplotlib/axes/_axes.py
+++ b/lib/matplotlib/axes/_axes.py
@@ -4552,6 +4552,18 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
size matches the size of *x* and *y*.
"""
+ # add ... | diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -2704,6 +2704,27 @@ def test_scatter_linewidths(self):
assert_array_equal(pc.get_linewidths(),
[*range(1, 5), mpl.rcP... | ["lib/matplotlib/tests/test_axes.py::TestScatter::test_scatter_singular_plural_arguments"] | ["lib/matplotlib/tests/test_axes.py::test_invisible_axes[png]", "lib/matplotlib/tests/test_axes.py::test_get_labels", "lib/matplotlib/tests/test_axes.py::test_repr", "lib/matplotlib/tests/test_axes.py::test_label_loc_vertical[png]", "lib/matplotlib/tests/test_axes.py::test_label_loc_vertical[pdf]", "lib/matplotlib/test... | null | true | 2023-05-01T00:00:35Z | 1 | 12 | 1 | 1,109 | 0 | 0.8 | 1 | 0.4 | 1 | 0.224833 | 76.7745 | |
9,778 | swe_bench::test::1351 | swe_bench | test | 1,351 | pylint-dev__pylint-6526 | pylint-dev/pylint | pylint-dev/pylint | python | 0220a39f6d4dddd1bf8f2f6d83e11db58a093fbe | How does pylint decide where it should put stat files?
### Question
I am from the VS Code python extension team, working on building an extension for VS Code using pylint. We have pre-release version out. An issue was reported on the extension that it creates pylint stat files in the project directory. We are not spec... | One thing that could prevent using the XDG_HOME is if an env var for PYLINTHOME exists.
Relevant code:
https://github.com/PyCQA/pylint/blob/main/pylint/constants.py#L54
https://github.com/PyCQA/pylint/blob/main/pylint/config/__init__.py#L39
Another issue might be that by using `stdin` the `FileItem` used by our ma... | diff --git a/pylint/lint/caching.py b/pylint/lint/caching.py
--- a/pylint/lint/caching.py
+++ b/pylint/lint/caching.py
@@ -16,7 +16,12 @@
def _get_pdata_path(
base_name: Path, recurs: int, pylint_home: Path = Path(PYLINT_HOME)
) -> Path:
- underscored_name = "_".join(str(p) for p in base_name.parts)
+ # We... | diff --git a/tests/lint/test_caching.py b/tests/lint/test_caching.py
--- a/tests/lint/test_caching.py
+++ b/tests/lint/test_caching.py
@@ -5,6 +5,7 @@
# Pytest fixtures work like this by design
# pylint: disable=redefined-outer-name
+import sys
from pathlib import Path
import pytest
@@ -18,15 +19,67 @@
@py... | ["tests/lint/test_caching.py::test__get_pdata_path_nix[/test.py-1-pylint_home0-expected0]", "tests/lint/test_caching.py::test__get_pdata_path_nix[/test.py-1-pylint_home1-expected1]"] | ["tests/lint/test_caching.py::test__get_pdata_path[-1-pylint_home0-expected0]", "tests/lint/test_caching.py::test__get_pdata_path[-2-pylint_home1-expected1]", "tests/lint/test_caching.py::test__get_pdata_path[a/path-42-pylint_home2-expected2]", "tests/lint/test_caching.py::test_save_and_load_result[.tests/]", "tests/li... | null | true | 2022-05-06T14:39:49Z | 1 | 7 | 2 | 1,179 | 0 | 0.8 | 1 | 0.4 | 1 | 0.219833 | 76.7595 | |
9,779 | swe_bench::test::1514 | swe_bench | test | 1,514 | scikit-learn__scikit-learn-10803 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | a4dcd70e84176a255654586bd20e78779191447f | weighted KDE
Not sure this is the correct place, but I would very much appreciate the ability to
pass a weight for each sample in kde density estimation.
There exits a adapted version of scipy.stats.gaussian_kde :
http://stackoverflow.com/questions/27623919/weighted-gaussian-kernel-density-estimation-in-python
weight... | I think that wouldn't be too hard to add but @jakevdp knows better.
Thats good news.
Well I would use it for astronomy project, so @jakevdp help/advice would be welcome.
Hope to be able to work on it after paper deadlines, but can't promise anything.
It's actually not trivial, because of the fast tree-based KDE t... | diff --git a/sklearn/neighbors/kde.py b/sklearn/neighbors/kde.py
--- a/sklearn/neighbors/kde.py
+++ b/sklearn/neighbors/kde.py
@@ -7,7 +7,8 @@
import numpy as np
from scipy.special import gammainc
from ..base import BaseEstimator
-from ..utils import check_array, check_random_state
+from ..utils import check_array, ... | diff --git a/sklearn/neighbors/tests/test_kde.py b/sklearn/neighbors/tests/test_kde.py
--- a/sklearn/neighbors/tests/test_kde.py
+++ b/sklearn/neighbors/tests/test_kde.py
@@ -137,6 +137,11 @@ def test_kde_badargs():
metric='blah')
assert_raises(ValueError, KernelDensity,
algor... | ["sklearn/neighbors/tests/test_kde.py::test_kde_badargs"] | ["sklearn/neighbors/tests/test_kde.py::test_kde_algorithm_metric_choice[haversine-kd_tree]", "sklearn/neighbors/tests/test_kde.py::test_kde_score"] | null | true | 2018-03-13T08:01:30Z | 1 | 33 | 1 | 626 | 0 | 0.8 | 1 | 0.4 | 1 | 0.214333 | 76.743 | |
9,780 | swe_bench::test::1680 | swe_bench | test | 1,680 | scikit-learn__scikit-learn-24769 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 65d42c9996b6b9778fa2d57352a8d81557d7eb07 | Add mean_average_precision
Mean average precision (mAP) is a standard multi-class extension of average precision using OVR: https://en.wikipedia.org/wiki/Evaluation_measures_(information_retrieval)#Mean_average_precision
Recently I prefer AP over AUC so I think it would be cool to add this.
Maybe @gbolmier is interest... | I could work on this, but would need some more information or example of something similar added.
@amueller I would like to work on this as my first PR , but as @Reksbril mentioned would need more information.
Sorry for the slow reply, would need one or two weeks before working on it
@amueller I would love to work on t... | diff --git a/sklearn/metrics/_ranking.py b/sklearn/metrics/_ranking.py
--- a/sklearn/metrics/_ranking.py
+++ b/sklearn/metrics/_ranking.py
@@ -135,9 +135,6 @@ def average_precision_score(
trapezoidal rule, which uses linear interpolation and can be too
optimistic.
- Note: this implementation is restricte... | diff --git a/sklearn/metrics/tests/test_classification.py b/sklearn/metrics/tests/test_classification.py
--- a/sklearn/metrics/tests/test_classification.py
+++ b/sklearn/metrics/tests/test_classification.py
@@ -350,31 +350,86 @@ def test_precision_recall_f_ignored_labels():
assert recall_13(average=average... | ["sklearn/metrics/tests/test_classification.py::test_average_precision_score_duplicate_values[y_true0-y_score0]", "sklearn/metrics/tests/test_classification.py::test_average_precision_score_tied_values[y_true0-y_score0]", "sklearn/metrics/tests/test_common.py::test_multiclass_sample_weight_invariance[average_precision_... | ["sklearn/metrics/tests/test_classification.py::test_classification_report_dictionary_output", "sklearn/metrics/tests/test_classification.py::test_classification_report_output_dict_empty_input", "sklearn/metrics/tests/test_classification.py::test_classification_report_zero_division_warning[warn]", "sklearn/metrics/test... | null | true | 2022-10-27T10:16:06Z | 1 | 45 | 11 | 369 | 0 | 0.8 | 1 | 0.4 | 1 | 0.2115 | 76.7345 | |
9,781 | swe_bench::test::1037 | swe_bench | test | 1,037 | matplotlib__matplotlib-24224 | matplotlib/matplotlib | matplotlib/matplotlib | python | aaa5129a9fb472a239bb7421635c31f20a523c5f | [Doc]: document `julian2num` and `num2julian`?
### Documentation Link
https://matplotlib.org/stable/api/dates_api.html
### Problem
These two methods have a decent doc-string, but are not in the documentation.
https://github.com/matplotlib/matplotlib/blob/7de767e927b4b4f5212e268c6432107116752d85/lib/matplotlib/dates... | I also don't see why they are not picked up by sphinx.
OTOH, I don't know why we have this. I suppose very few people care about julian dates. I wouldn't spend time on this.
Yes these should just be deprecated. We can't even plot Julian day 1. | diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py
--- a/lib/matplotlib/dates.py
+++ b/lib/matplotlib/dates.py
@@ -202,6 +202,18 @@
UTC = datetime.timezone.utc
+@_api.caching_module_getattr
+class __getattr__:
+ JULIAN_OFFSET = _api.deprecated("3.7")(property(lambda self: 1721424.5))
+ # Julian d... | diff --git a/lib/matplotlib/tests/test_dates.py b/lib/matplotlib/tests/test_dates.py
--- a/lib/matplotlib/tests/test_dates.py
+++ b/lib/matplotlib/tests/test_dates.py
@@ -1241,17 +1241,18 @@ def test_change_interval_multiples():
def test_julian2num():
- mdates._reset_epoch_test_example()
- mdates.set_epoch('... | ["lib/matplotlib/tests/test_dates.py::test_julian2num"] | ["lib/matplotlib/tests/test_dates.py::test_date_numpyx", "lib/matplotlib/tests/test_dates.py::test_date_date2num_numpy[datetime64[s]-t00]", "lib/matplotlib/tests/test_dates.py::test_date_date2num_numpy[datetime64[s]-t01]", "lib/matplotlib/tests/test_dates.py::test_date_date2num_numpy[datetime64[s]-t02]", "lib/matplotli... | null | true | 2022-10-20T08:47:45Z | 1 | 24 | 1 | 763 | 0 | 0.8 | 1 | 0.4 | 1 | 0.207167 | 76.7215 | |
9,782 | swe_bench::test::1817 | swe_bench | test | 1,817 | sphinx-doc__sphinx-8273 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | 88b81a06eb635a1596617f8971fa97a84c069e93 | Generate man page section directories
**Current man page generation does not conform to `MANPATH` search functionality**
Currently, all generated man pages are placed in to a single-level directory: `<build-dir>/man`. Unfortunately, this cannot be used in combination with the unix `MANPATH` environment variable. The `m... | I think that users should copy the generated man file to the appropriate directory. The build directory is not an appropriate directory to manage man pages. So no section directory is needed, AFAIK. I don't know why do you want to set `MANPATH` to the output directory. To check the output, you can give the path to the ... | diff --git a/sphinx/builders/manpage.py b/sphinx/builders/manpage.py
--- a/sphinx/builders/manpage.py
+++ b/sphinx/builders/manpage.py
@@ -24,7 +24,7 @@
from sphinx.util import progress_message
from sphinx.util.console import darkgreen # type: ignore
from sphinx.util.nodes import inline_all_toctrees
-from sphinx.ut... | diff --git a/tests/test_build_manpage.py b/tests/test_build_manpage.py
--- a/tests/test_build_manpage.py
+++ b/tests/test_build_manpage.py
@@ -30,6 +30,13 @@ def test_all(app, status, warning):
assert 'Footnotes' not in content
+@pytest.mark.sphinx('man', testroot='basic',
+ confoverrides={'... | ["tests/test_build_manpage.py::test_man_make_section_directory"] | ["tests/test_build_manpage.py::test_all", "tests/test_build_manpage.py::test_default_man_pages", "tests/test_build_manpage.py::test_rubric"] | null | true | 2020-10-03T13:31:13Z | 1 | 10 | 1 | 1,032 | 0 | 0.8 | 1 | 0.4 | 1 | 0.205333 | 76.716 | |
9,783 | r2e_gym::train::4917 | r2e_gym | train | 4,917 | datalad__cf145ab408055e86ef8c7acee244fe07d8f7689c | datalad | datalad/datalad | python | cf145ab408055e86ef8c7acee244fe07d8f7689c | **Title:** ImportError When Importing `saved_generator` from `datalad.utils`
**Description:**
Attempting to import the `saved_generator` function from the `datalad.utils` module results in an ImportError. This prevents the execution of tests that rely on this function.
**Example Code:**
```python
from datalad.utils i... | diff --git a/.travis.yml b/.travis.yml
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,6 +31,7 @@
env:
- DATALAD_LOGLEVEL=2
- DATALAD_LOGTARGET=/dev/null
+ - DATALAD_API_ALWAYS_RENDER=1
- python: 2.7
env:
# to test operation under root since also would consider FS "crippled" due to
diff --git ... | diff --git a/datalad/metadata/tests/test_search.py b/datalad/metadata/tests/test_search.py
--- a/datalad/metadata/tests/test_search.py
+++ b/datalad/metadata/tests/test_search.py
@@ -9,6 +9,7 @@
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
"""Some additional tests for search command... | null | null | namanjain12/datalad_final:cf145ab408055e86ef8c7acee244fe07d8f7689c | true | null | 4 | 103 | null | 795 | 0.02 | 0.75 | 1 | 0.6375 | 0.85 | 0.475833 | 76.714762 | ||
9,784 | r2e_gym::train::340 | r2e_gym | train | 340 | orange3__3d0787a31d380830e32eaca07bc50f504e626fd5 | orange3 | biolab/orange3 | python | 3d0787a31d380830e32eaca07bc50f504e626fd5 | **Analysis:**
- **Key Parts:**
- **Commit Message:** Fixes an outer join bug in `OWMergeData`.
- **Test Results:** The test `test_output_merge_by_ids_outer_single_class` failed in the old commit and passes after the fix.
- **Error Message:**
```
ValueError: all the input array dimensions for the concaten... | diff --git a/Orange/widgets/data/owmergedata.py b/Orange/widgets/data/owmergedata.py
--- a/Orange/widgets/data/owmergedata.py
+++ b/Orange/widgets/data/owmergedata.py
@@ -579,7 +579,10 @@
domain.metas[:len(lt_dom.metas)] + xt_dom.metas)
extras = self.extra_data[rightu].transform(right_doma... | diff --git a/Orange/widgets/data/tests/test_owmergedata.py b/Orange/widgets/data/tests/test_owmergedata.py
--- a/Orange/widgets/data/tests/test_owmergedata.py
+++ b/Orange/widgets/data/tests/test_owmergedata.py
@@ -470,6 +470,33 @@
np.testing.assert_equal(
out.ids, np.hstack((self.dataA.ids[1:], s... | null | null | namanjain12/orange3_final:3d0787a31d380830e32eaca07bc50f504e626fd5 | true | null | 1 | 5 | null | 2,985 | 0 | 0.75 | 1 | 0.6375 | 0.8 | 0.514167 | 76.71125 | ||
9,785 | swe_bench::test::1100 | swe_bench | test | 1,100 | matplotlib__matplotlib-25859 | matplotlib/matplotlib | matplotlib/matplotlib | python | 8faa835c81d9cf12342992521ddb95e9a645bc36 | [MNT]: Do not accept arbitrary positional parameters in Figure.add_axes()
### Summary

seen at https://www.modular.com/mojo.
**What are the `False, 1` parameters?** 👀
- This is not readable
- I'm surprised... | Can this please have a more descriptive title?
It looks like `*args` used to fall through to `_process_projection_requirements` which used to use the `*args` as part of `_make_key` but that is now removed.
Naively adding a deprecation to passing extra args
```diff
diff --git a/lib/matplotlib/figure.py b/lib/ma... | diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py
--- a/lib/matplotlib/axes/_axes.py
+++ b/lib/matplotlib/axes/_axes.py
@@ -392,8 +392,7 @@ def inset_axes(self, bounds, *, transform=None, zorder=5, **kwargs):
# This puts the rectangle into figure-relative coordinates.
inset_loca... | diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
--- a/lib/matplotlib/tests/test_figure.py
+++ b/lib/matplotlib/tests/test_figure.py
@@ -485,12 +485,21 @@ def test_invalid_figure_add_axes():
with pytest.raises(TypeError, match="multiple values for argument 'rect'"):
f... | ["lib/matplotlib/tests/test_figure.py::test_invalid_figure_add_axes"] | ["lib/matplotlib/tests/test_figure.py::test_align_labels[png]", "lib/matplotlib/tests/test_figure.py::test_align_labels_stray_axes", "lib/matplotlib/tests/test_figure.py::test_figure_label", "lib/matplotlib/tests/test_figure.py::test_fignum_exists", "lib/matplotlib/tests/test_figure.py::test_clf_keyword", "lib/matplotl... | null | true | 2023-05-11T08:17:56Z | 3 | 29 | 1 | 634 | 0 | 0.8 | 1 | 0.4 | 1 | 0.202333 | 76.707 | |
9,786 | swe_bench::test::1718 | swe_bench | test | 1,718 | scikit-learn__scikit-learn-9304 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | e161700c6f8948b820073a72f09a71e1dda89ccc | Bug: the predict method of Pipeline object does not use the exact predict method of final step estimator
I am trying to use Pipeline with a customized final step estimator. This final estimator predict method can output std when using return_std=True.
But the predict method of Pipeline does not allow return_std option,... | Yes, I suppose this is a valid complaint. Additional args should probably be forwarded on prediction methods in Pipeline. | diff --git a/sklearn/pipeline.py b/sklearn/pipeline.py
--- a/sklearn/pipeline.py
+++ b/sklearn/pipeline.py
@@ -287,7 +287,7 @@ def fit_transform(self, X, y=None, **fit_params):
return last_step.fit(Xt, y, **fit_params).transform(Xt)
@if_delegate_has_method(delegate='_final_estimator')
- def predi... | diff --git a/sklearn/tests/test_pipeline.py b/sklearn/tests/test_pipeline.py
--- a/sklearn/tests/test_pipeline.py
+++ b/sklearn/tests/test_pipeline.py
@@ -144,6 +144,17 @@ def fit(self, X, y):
return self
+class DummyEstimatorParams(BaseEstimator):
+ """Mock classifier that takes params on predict"""
+
... | ["sklearn/tests/test_pipeline.py::test_predict_with_predict_params"] | ["sklearn/tests/test_pipeline.py::test_pipeline_init", "sklearn/tests/test_pipeline.py::test_pipeline_init_tuple", "sklearn/tests/test_pipeline.py::test_pipeline_methods_anova", "sklearn/tests/test_pipeline.py::test_pipeline_fit_params", "sklearn/tests/test_pipeline.py::test_pipeline_sample_weight_supported", "sklearn/... | null | true | 2017-07-09T03:54:27Z | 1 | 12 | 1 | 966 | 0 | 0.8 | 1 | 0.4 | 1 | 0.201 | 76.703 | |
9,787 | swe_bench::dev::58 | swe_bench | dev | 58 | pvlib__pvlib-python-1739 | pvlib/pvlib-python | pvlib/pvlib-python | python | 909f86dc67eddc88154c9e7bff73fd9d6bfe2e4d | `pvlib.iotools.get_pvgis_hourly`'s `surface_azimuth` parameter doesn't use pvlib's azimuth convention
Nearly everything in pvlib represents azimuth angles as values in [0, 360) clockwise from north, except `pvlib.iotools.get_pvgis_hourly`:
https://github.com/pvlib/pvlib-python/blob/3def7e3375002ee3a5492b7bc609d3fb63a8... | Since `get_pvgis_hourly` is only using `surface_azimuth` to pass a value to a pvgis keyword `aspect`, we could add `aspect` with the South=0 convention and deprecate `surface_azimuth` as is. Then later, we can deprecate `aspect` and add `surface_azimuth` back with its pvlib meaning. Now that I write that out, seems bet... | diff --git a/pvlib/iotools/pvgis.py b/pvlib/iotools/pvgis.py
--- a/pvlib/iotools/pvgis.py
+++ b/pvlib/iotools/pvgis.py
@@ -45,7 +45,7 @@
def get_pvgis_hourly(latitude, longitude, start=None, end=None,
raddatabase=None, components=True,
- surface_tilt=0, surface_azimuth=0,
+ ... | diff --git a/pvlib/tests/iotools/test_pvgis.py b/pvlib/tests/iotools/test_pvgis.py
--- a/pvlib/tests/iotools/test_pvgis.py
+++ b/pvlib/tests/iotools/test_pvgis.py
@@ -206,14 +206,14 @@ def test_read_pvgis_hourly_bad_extension():
args_radiation_csv = {
- 'surface_tilt': 30, 'surface_azimuth': 0, 'outputformat': ... | ["pvlib/tests/iotools/test_pvgis.py::test_get_pvgis_hourly[testfile0-expected_radiation_csv-args0-False-https://re.jrc.ec.europa.eu/api/seriescalc?lat=45&lon=8&outputformat=csv&angle=30&aspect=0&usehorizon=0&pvtechchoice=crystSi&mountingplace=free&trackingtype=0&components=1&raddatabase=PVGIS-SARAH&startyear=2016&endye... | ["pvlib/tests/iotools/test_pvgis.py::test_read_pvgis_hourly[testfile0-expected_radiation_csv-metadata_exp0-inputs_exp0-False-None]", "pvlib/tests/iotools/test_pvgis.py::test_read_pvgis_hourly[testfile1-expected_radiation_csv_mapped-metadata_exp1-inputs_exp1-True-csv]", "pvlib/tests/iotools/test_pvgis.py::test_read_pvgi... | null | true | 2023-05-16T23:56:19Z | 1 | 28 | 5 | 636 | 0 | 0.8 | 1 | 0.4 | 1 | 0.199333 | 76.698 | |
9,788 | r2e_gym::train::5989 | r2e_gym | train | 5,989 | tornado__1b4556f1507dfd955ef783d08ad201500786d62b | tornado | tornadoweb/tornado | python | 1b4556f1507dfd955ef783d08ad201500786d62b | **Title:** Custom Exception Logging Not Triggered in RequestHandler
**Description:**
When attempting to customize the logging of specific exceptions like `PermissionError` in a `RequestHandler`, the custom log messages are not being captured as expected. This results in incorrect response statuses and prevents proper ... | diff --git a/tornado/web.py b/tornado/web.py
--- a/tornado/web.py
+++ b/tornado/web.py
@@ -1110,20 +1110,33 @@
" (" + self.request.remote_ip + ")"
def _handle_request_exception(self, e):
+ self.log_exception(*sys.exc_info())
if isinstance(e, HTTPError):
- if e.log_message:... | diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py
--- a/tornado/test/web_test.py
+++ b/tornado/test/web_test.py
@@ -1120,3 +1120,57 @@
set_cookies = sorted(response.headers.get_list('Set-Cookie'))
self.assertTrue(set_cookies[0].startswith('baz=;'))
self.assertTrue(set_cookies[1... | null | null | namanjain12/tornado_final:1b4556f1507dfd955ef783d08ad201500786d62b | true | null | 1 | 25 | null | 1,639 | 0.076923 | 0.75 | 1 | 0.6375 | 1 | 0.3565 | 76.684933 | ||
9,789 | swe_bench::dev::56 | swe_bench | dev | 56 | pvlib__pvlib-python-1737 | pvlib/pvlib-python | pvlib/pvlib-python | python | 5119b4281fa9de8a4dc97002b5c10a6d73c25a4f | SolarAnywhere File -- pvlib.iotools.read_tmy3 Bug
@AdamRJensen
There's a bug report for reading SolarAnywhere Files with using the pvlib.iotools.read_tmy3 function. This bug is in the TMY3 file (I think?)
 | Interesting, did this come up during the 2023 PVPMC workshop? These functions are meant to read the legacy TMY files from the [NSRDB archives](https://nsrdb.nrel.gov/data-sets/archives), but because SolarAnywhere TGY files are similar, you may also be able to read them with `pvlib.iotools.read_tmy3()` but you might nee... | diff --git a/pvlib/iotools/tmy.py b/pvlib/iotools/tmy.py
--- a/pvlib/iotools/tmy.py
+++ b/pvlib/iotools/tmy.py
@@ -24,7 +24,8 @@
}
-def read_tmy3(filename, coerce_year=None, map_variables=None, recolumn=None):
+def read_tmy3(filename, coerce_year=None, map_variables=None, recolumn=None,
+ encoding=Non... | diff --git a/pvlib/tests/iotools/test_tmy.py b/pvlib/tests/iotools/test_tmy.py
--- a/pvlib/tests/iotools/test_tmy.py
+++ b/pvlib/tests/iotools/test_tmy.py
@@ -121,7 +121,8 @@ def test_solaranywhere_tmy3(solaranywhere_index):
# The SolarAnywhere TMY3 format specifies midnight as 00:00 whereas the
# NREL TMY3 f... | ["pvlib/tests/iotools/test_tmy.py::test_solaranywhere_tmy3"] | ["pvlib/tests/iotools/test_tmy.py::test_read_tmy3", "pvlib/tests/iotools/test_tmy.py::test_read_tmy3_recolumn", "pvlib/tests/iotools/test_tmy.py::test_read_tmy3_norecolumn", "pvlib/tests/iotools/test_tmy.py::test_read_tmy3_raise_valueerror", "pvlib/tests/iotools/test_tmy.py::test_read_tmy3_map_variables", "pvlib/tests/... | null | true | 2023-05-16T18:00:13Z | 1 | 43 | 1 | 306 | 0 | 0.8 | 1 | 0.4 | 1 | 0.194333 | 76.683 | |
9,790 | swe_bench::test::1272 | swe_bench | test | 1,272 | pydata__xarray-5580 | pydata/xarray | pydata/xarray | python | 4bb9d9c6df77137f05e85c7cc6508fe7a93dc0e4 | Increase default `display_max_rows`
This must have been introduced into `xr.set_options()` somewhere around version 0.17.
First of all this limit breaks backwards compatibility in the output format with `print()` or something similar on the console. Second, the default of 12 is much too low imo and makes no sense, in p... | Why not just use:
```python
import xarray as xr
xr.set_options(display_max_rows=N)
```
where `N` is your wanted number of lines
The reasons for the restriction are laid out in https://github.com/pydata/xarray/issues/4736
Update: Fixed the call to `set_options`, stupid copy&paste error.
Why not increase tha... | diff --git a/xarray/core/formatting.py b/xarray/core/formatting.py
--- a/xarray/core/formatting.py
+++ b/xarray/core/formatting.py
@@ -377,14 +377,12 @@ def _mapping_repr(
):
if col_width is None:
col_width = _calculate_col_width(mapping)
- if max_rows is None:
- max_rows = OPTIONS["display_max... | diff --git a/xarray/tests/test_formatting.py b/xarray/tests/test_formatting.py
--- a/xarray/tests/test_formatting.py
+++ b/xarray/tests/test_formatting.py
@@ -509,15 +509,16 @@ def test__mapping_repr(display_max_rows, n_vars, n_attr):
long_name = "long_name"
a = np.core.defchararray.add(long_name, np.arange(0... | ["xarray/tests/test_formatting.py::test__mapping_repr[35-40-30]", "xarray/tests/test_formatting.py::test__mapping_repr[11-40-30]", "xarray/tests/test_formatting.py::test__mapping_repr[1-40-30]"] | ["xarray/tests/test_formatting.py::TestFormatting::test_get_indexer_at_least_n_items", "xarray/tests/test_formatting.py::TestFormatting::test_first_n_items", "xarray/tests/test_formatting.py::TestFormatting::test_last_n_items", "xarray/tests/test_formatting.py::TestFormatting::test_last_item", "xarray/tests/test_format... | null | true | 2021-07-05T20:03:55Z | 1 | 14 | 3 | 873 | 0 | 0.8 | 1 | 0.4 | 1 | 0.192167 | 76.6765 | |
9,791 | swe_bench::test::1533 | swe_bench | test | 1,533 | scikit-learn__scikit-learn-11281 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 4143356c3c51831300789e4fdf795d83716dbab6 | Should mixture models have a clusterer-compatible interface
Mixture models are currently a bit different. They are basically clusterers, except they are probabilistic, and are applied to inductive problems unlike many clusterers. But they are unlike clusterers in API:
* they have an `n_components` parameter, with ident... | In my opinion, yes.
I wanted to compare K-Means, GMM and HDBSCAN and was very disappointed that GMM does not have a `fit_predict` method. The HDBSCAN examples use `fit_predict`, so I was expecting GMM to have the same interface.
I think we should add ``fit_predict`` at least. I wouldn't rename ``n_components``.
I wo... | diff --git a/sklearn/mixture/base.py b/sklearn/mixture/base.py
--- a/sklearn/mixture/base.py
+++ b/sklearn/mixture/base.py
@@ -172,7 +172,7 @@ def _initialize(self, X, resp):
def fit(self, X, y=None):
"""Estimate model parameters with the EM algorithm.
- The method fit the model `n_init` times an... | diff --git a/sklearn/mixture/tests/test_bayesian_mixture.py b/sklearn/mixture/tests/test_bayesian_mixture.py
--- a/sklearn/mixture/tests/test_bayesian_mixture.py
+++ b/sklearn/mixture/tests/test_bayesian_mixture.py
@@ -1,12 +1,16 @@
# Author: Wei Xue <xuewei4d@gmail.com>
# Thierry Guillemot <thierry.guillemot... | ["sklearn/mixture/tests/test_bayesian_mixture.py::test_bayesian_mixture_fit_predict", "sklearn/mixture/tests/test_gaussian_mixture.py::test_gaussian_mixture_fit_predict"] | ["sklearn/mixture/tests/test_bayesian_mixture.py::test_log_dirichlet_norm", "sklearn/mixture/tests/test_bayesian_mixture.py::test_log_wishart_norm", "sklearn/mixture/tests/test_bayesian_mixture.py::test_bayesian_mixture_covariance_type", "sklearn/mixture/tests/test_bayesian_mixture.py::test_bayesian_mixture_weight_conc... | null | true | 2018-06-15T17:15:25Z | 1 | 30 | 2 | 544 | 0 | 0.8 | 1 | 0.4 | 1 | 0.190667 | 76.672 | |
9,792 | swe_bench::test::1553 | swe_bench | test | 1,553 | scikit-learn__scikit-learn-12583 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | e8c6cb151cff869cf1b61bddd3c72841318501ab | add_indicator switch in imputers
For whatever imputers we have, but especially [SimpleImputer](http://scikit-learn.org/dev/modules/generated/sklearn.impute.SimpleImputer.html), we should have an `add_indicator` parameter, which simply stacks a [MissingIndicator](http://scikit-learn.org/dev/modules/generated/sklearn.imp... | This allows downstream models to adjust for the fact that a value was imputed, rather than observed.
Can I take this up if no one else is working on it yet @jnothman ?
Go for it
@prathusha94 are you still working on this? | diff --git a/sklearn/impute.py b/sklearn/impute.py
--- a/sklearn/impute.py
+++ b/sklearn/impute.py
@@ -141,13 +141,26 @@ class SimpleImputer(BaseEstimator, TransformerMixin):
a new copy will always be made, even if `copy=False`:
- If X is not an array of floating values;
- - If X is encoded a... | diff --git a/sklearn/tests/test_impute.py b/sklearn/tests/test_impute.py
--- a/sklearn/tests/test_impute.py
+++ b/sklearn/tests/test_impute.py
@@ -952,15 +952,15 @@ def test_missing_indicator_error(X_fit, X_trans, params, msg_err):
])
@pytest.mark.parametrize(
"param_features, n_features, features_indices",... | ["sklearn/tests/test_impute.py::test_imputation_add_indicator[nan]", "sklearn/tests/test_impute.py::test_imputation_add_indicator[-1]", "sklearn/tests/test_impute.py::test_imputation_add_indicator[0]", "sklearn/tests/test_impute.py::test_imputation_add_indicator_sparse_matrix[csc_matrix]", "sklearn/tests/test_impute.py... | ["sklearn/tests/test_impute.py::test_imputation_shape", "sklearn/tests/test_impute.py::test_imputation_error_invalid_strategy[const]", "sklearn/tests/test_impute.py::test_imputation_error_invalid_strategy[101]", "sklearn/tests/test_impute.py::test_imputation_error_invalid_strategy[None]", "sklearn/tests/test_impute.py:... | null | true | 2018-11-14T11:41:05Z | 1 | 37 | 8 | 402 | 0 | 0.8 | 1 | 0.4 | 1 | 0.190333 | 76.671 | |
9,793 | swe_bench::test::1712 | swe_bench | test | 1,712 | scikit-learn__scikit-learn-26644 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 33a1f1690e7a7007633f59b6bee32017f4229864 | partial_dependence should respect sample weights
### Describe the workflow you want to enable
Currently, the inspect.partial_dependence funtions calculate arithmetic averages over predictions. For models fitted with sample weights, this is between suboptimal and wrong.
### Describe your proposed solution
Add new arg... | @mayer79, have you already started working on this issue? I would love to solve it if you didn't. :)
@vitaliset Not yet started! I would be super happy if you could dig into this.
I think there are two ways to calculate PDPs. For the model agnostic logic, we would probably need to replace `np.mean()` by `np.average... | diff --git a/sklearn/inspection/_plot/partial_dependence.py b/sklearn/inspection/_plot/partial_dependence.py
--- a/sklearn/inspection/_plot/partial_dependence.py
+++ b/sklearn/inspection/_plot/partial_dependence.py
@@ -86,8 +86,9 @@ class PartialDependenceDisplay:
.. note::
The fast ``method='rec... | diff --git a/sklearn/inspection/_plot/tests/test_plot_partial_dependence.py b/sklearn/inspection/_plot/tests/test_plot_partial_dependence.py
--- a/sklearn/inspection/_plot/tests/test_plot_partial_dependence.py
+++ b/sklearn/inspection/_plot/tests/test_plot_partial_dependence.py
@@ -1086,3 +1086,34 @@ def test_partial_d... | ["sklearn/inspection/_plot/tests/test_plot_partial_dependence.py::test_partial_dependence_display_with_constant_sample_weight"] | ["sklearn/inspection/_plot/tests/test_plot_partial_dependence.py::test_plot_partial_dependence[10]", "sklearn/inspection/_plot/tests/test_plot_partial_dependence.py::test_plot_partial_dependence[20]", "sklearn/inspection/_plot/tests/test_plot_partial_dependence.py::test_plot_partial_dependence_kind[average-False-None-s... | null | true | 2023-06-21T04:24:21Z | 1 | 25 | 1 | 635 | 0 | 0.8 | 1 | 0.4 | 1 | 0.189167 | 76.6675 | |
9,794 | swe_bench::test::1378 | swe_bench | test | 1,378 | pytest-dev__pytest-10371 | pytest-dev/pytest | pytest-dev/pytest | python | bc2c3b66aa084fa4ff64f836aee73eae4cb72818 | RFE: allow to selectively disable loggers from command-line
A common debugging strategy is to study the logs.
But sometimes the program issues excessive logging messages,
necessitating the selective disabling of babbler loggers.
This SO captures the crux & solution of this Request For Enhancement:
https://stackoverflo... | i believe this could play into #7417
Back after some time out :)
What do we think about a --suppress-logger= appendable parsearg option here, which takes a list of logger names (convert to set to avoid duplicates) and doing the following:
- add NullHandler() to the logger to avoid warnings from last resort writ... | diff --git a/src/_pytest/logging.py b/src/_pytest/logging.py
--- a/src/_pytest/logging.py
+++ b/src/_pytest/logging.py
@@ -297,6 +297,13 @@ def add_option_ini(option, dest, default=None, type=None, **kwargs):
default=None,
help="Auto-indent multiline messages passed to the logging module. Accepts true... | diff --git a/testing/logging/test_reporting.py b/testing/logging/test_reporting.py
--- a/testing/logging/test_reporting.py
+++ b/testing/logging/test_reporting.py
@@ -1165,3 +1165,72 @@ def test_log_file_cli_subdirectories_are_successfully_created(
result = pytester.runpytest("--log-file=foo/bar/logf.log")
as... | ["testing/logging/test_reporting.py::test_disable_loggers", "testing/logging/test_reporting.py::test_disable_loggers_does_not_propagate", "testing/logging/test_reporting.py::test_log_disabling_works_with_log_cli"] | ["[100%]", "[", "[100%]------------------------------", "testing/logging/test_reporting.py::test_live_logging_suspends_capture[True]", "testing/logging/test_reporting.py::test_live_logging_suspends_capture[False]", "testing/logging/test_reporting.py::test_nothing_logged", "testing/logging/test_reporting.py::test_messag... | null | true | 2022-10-11T20:27:58Z | 1 | 16 | 3 | 755 | 0 | 0.8 | 1 | 0.4 | 1 | 0.179167 | 76.6375 | |
9,795 | swe_bench::test::1492 | swe_bench | test | 1,492 | scikit-learn__scikit-learn-10198 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 726fa36f2556e0d604d85a1de48ba56a8b6550db | add get_feature_names to CategoricalEncoder
We should add a ``get_feature_names`` to the new CategoricalEncoder, as discussed [here](https://github.com/scikit-learn/scikit-learn/pull/9151#issuecomment-345830056). I think it would be good to be consistent with the PolynomialFeature which allows passing in original featu... | I'd like to try this one.
If you haven't contributed before, I suggest you try an issue labeled "good first issue". Though this one isn't too hard, eigher.
@amueller
I think I can handle it.
So we want something like this right?
enc.fit([['male',0], ['female', 1]])
enc.get_feature_names()
>> ['fem... | diff --git a/sklearn/preprocessing/_encoders.py b/sklearn/preprocessing/_encoders.py
--- a/sklearn/preprocessing/_encoders.py
+++ b/sklearn/preprocessing/_encoders.py
@@ -240,6 +240,8 @@ class OneHotEncoder(_BaseEncoder):
>>> enc.inverse_transform([[0, 1, 1, 0, 0], [0, 0, 0, 1, 0]])
array([['Male', 1],
... | diff --git a/sklearn/preprocessing/tests/test_encoders.py b/sklearn/preprocessing/tests/test_encoders.py
--- a/sklearn/preprocessing/tests/test_encoders.py
+++ b/sklearn/preprocessing/tests/test_encoders.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
from __future__ import division
import re
@@ -455,6 +456,47 @@ def t... | ["sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_feature_names", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_feature_names_unicode"] | ["sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_sparse", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_dense", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_deprecationwarnings", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_force_ne... | null | true | 2017-11-24T16:19:38Z | 1 | 34 | 2 | 378 | 0 | 0.8 | 1 | 0.4 | 1 | 0.176333 | 76.629 | |
9,796 | r2e_gym::train::4982 | r2e_gym | train | 4,982 | datalad__22500efeb3b70831836a6c7cccfc24fb9c09e8d5 | datalad | datalad/datalad | python | 22500efeb3b70831836a6c7cccfc24fb9c09e8d5 | **Title:** `extract()` Does Not Return Complete Data for Progress Tracking and Subdataset Management
**Description:**
The `extract()` function in `addurls.py` is currently implemented as a generator that yields individual tuples for each row. This design makes it challenging to implement features like a progress bar a... | diff --git a/datalad/plugin/addurls.py b/datalad/plugin/addurls.py
--- a/datalad/plugin/addurls.py
+++ b/datalad/plugin/addurls.py
@@ -9,7 +9,7 @@
"""Create and update a dataset from a list of URLs.
"""
-from collections import Mapping
+from collections import Mapping, namedtuple
from functools import partial
imp... | diff --git a/datalad/plugin/tests/test_addurls.py b/datalad/plugin/tests/test_addurls.py
--- a/datalad/plugin/tests/test_addurls.py
+++ b/datalad/plugin/tests/test_addurls.py
@@ -93,11 +93,15 @@
def test_extract():
- fnames, urls, meta, subpaths = zip(*addurls.extract(
+ info, subpaths = addurls.extract(
... | null | null | namanjain12/datalad_final:22500efeb3b70831836a6c7cccfc24fb9c09e8d5 | true | null | 1 | 57 | null | 1,572 | 0.083333 | 0.75 | 1 | 0.6375 | 1 | 0.452 | 76.612823 | ||
9,797 | swe_bench::test::1156 | swe_bench | test | 1,156 | pallets__flask-4575 | pallets/flask | pallets/flask | python | bd56d19b167822a9a23e2e9e2a07ccccc36baa8d | Move `redirect` to the `Flask` app object
Add a `redirect` method to the `Flask` app object. Similar to functions like `flask.json.dumps`, `flask.redirect` should look for a `current_app` and call its `redirect` method. This will allow applications to override the redirect behavior. | I'm at the sprint and will start on this. | diff --git a/src/flask/__init__.py b/src/flask/__init__.py
--- a/src/flask/__init__.py
+++ b/src/flask/__init__.py
@@ -1,7 +1,6 @@
from markupsafe import escape
from markupsafe import Markup
from werkzeug.exceptions import abort as abort
-from werkzeug.utils import redirect as redirect
from . import json as json
... | diff --git a/tests/test_helpers.py b/tests/test_helpers.py
--- a/tests/test_helpers.py
+++ b/tests/test_helpers.py
@@ -158,6 +158,22 @@ def post(self):
assert flask.url_for("myview", _method="POST") == "/myview/create"
+def test_redirect_no_app():
+ response = flask.redirect("https://localhost", 307)
+ ... | ["tests/test_helpers.py::test_redirect_with_app"] | ["tests/test_helpers.py::test_redirect_no_app", "tests/test_helpers.py::TestNoImports::test_name_with_import_error", "tests/test_helpers.py::TestHelpers::test_get_debug_flag[-False-False]", "tests/test_helpers.py::TestHelpers::test_get_debug_flag[0-False-False]", "tests/test_helpers.py::TestHelpers::test_get_debug_flag... | null | true | 2022-05-02T16:46:41Z | 3 | 37 | 1 | 283 | 0 | 0.8 | 1 | 0.4 | 1 | 0.1705 | 76.6115 | |
9,798 | swe_bench::test::1133 | swe_bench | test | 1,133 | mwaskom__seaborn-2813 | mwaskom/seaborn | mwaskom/seaborn | python | 60e58eb07e4448694ca25e887684d39d5138babd | histplot stat=count does not count all data points
`import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
sns.set(style="whitegrid")
data_a = [1, 2, 3]
data_b = [2.4, 2.5, 2.6]
sns.histplot(np.array(data_a), color="red", binwidth=0.01, stat="count")
sns.histplot(np.array(data_b), color="blue... | Thanks for reporting; I think this is the same underlying issue as #2721 (that is just a noisier manifestation of it). | diff --git a/seaborn/_statistics.py b/seaborn/_statistics.py
--- a/seaborn/_statistics.py
+++ b/seaborn/_statistics.py
@@ -261,6 +261,9 @@ def _define_bin_edges(self, x, weights, bins, binwidth, binrange, discrete):
elif binwidth is not None:
step = binwidth
bin_edges = np.arange(star... | diff --git a/seaborn/tests/test_statistics.py b/seaborn/tests/test_statistics.py
--- a/seaborn/tests/test_statistics.py
+++ b/seaborn/tests/test_statistics.py
@@ -282,6 +282,19 @@ def test_discrete_bins(self, rng):
assert bin_kws["range"] == (x.min() - .5, x.max() + .5)
assert bin_kws["bins"] == (x.ma... | ["seaborn/tests/test_statistics.py::TestHistogram::test_odd_single_observation", "seaborn/tests/test_statistics.py::TestHistogram::test_binwidth_roundoff"] | ["seaborn/tests/test_statistics.py::TestKDE::test_gridsize", "seaborn/tests/test_statistics.py::TestKDE::test_cut", "seaborn/tests/test_statistics.py::TestKDE::test_clip", "seaborn/tests/test_statistics.py::TestKDE::test_density_normalization", "seaborn/tests/test_statistics.py::TestKDE::test_cumulative", "seaborn/test... | null | true | 2022-05-18T00:32:38Z | 3 | 7 | 2 | 882 | 0 | 0.8 | 1 | 0.4 | 1 | 0.170333 | 76.611 | |
9,799 | swe_bench::test::1746 | swe_bench | test | 1,746 | sphinx-doc__sphinx-10757 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | 8c4865c30d5fa847d727fea16519d7afce627932 | linkcheck should check URLs of raw directives
**Is your feature request related to a problem? Please describe.**
When using a [`raw` directive](https://docutils.sourceforge.io/docs/ref/rst/directives.html#raw-data-pass-through) with the `url` option, the `linkcheck` builder does not check this URL.
**Describe the solu... | Sorry I just found out that Sphinx resolves `raw` directives while reading sources so an error will be displayed before the `linkcheck` builder is even used.
On second thought it could still be useful to check for redirections. | diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py
--- a/sphinx/builders/linkcheck.py
+++ b/sphinx/builders/linkcheck.py
@@ -502,32 +502,34 @@ def run(self, **kwargs: Any) -> None:
builder = cast(CheckExternalLinksBuilder, self.app.builder)
hyperlinks = builder.hyperlinks
- ... | diff --git a/tests/roots/test-linkcheck/links.txt b/tests/roots/test-linkcheck/links.txt
--- a/tests/roots/test-linkcheck/links.txt
+++ b/tests/roots/test-linkcheck/links.txt
@@ -17,3 +17,6 @@ Some additional anchors to exercise ignore code
.. image:: https://www.google.com/image.png
.. figure:: https://www.google.... | ["tests/test_build_linkcheck.py::test_defaults_json"] | ["tests/test_build_linkcheck.py::test_raises_for_invalid_status", "tests/test_build_linkcheck.py::test_auth_header_uses_first_match", "tests/test_build_linkcheck.py::test_auth_header_no_match", "tests/test_build_linkcheck.py::test_linkcheck_request_headers", "tests/test_build_linkcheck.py::test_linkcheck_request_header... | null | true | 2022-08-07T09:14:28Z | 1 | 30 | 1 | 411 | 0 | 0.8 | 1 | 0.4 | 1 | 0.1685 | 76.6055 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.