schema_version
int64
3
3
instance_id
stringclasses
30 values
spec
dict
mask_patch
stringclasses
30 values
gold_patch
stringclasses
30 values
mutant_patch
stringlengths
295
1.33k
test_patch
stringclasses
30 values
proof
dict
metadata
dict
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S5", "text": "The method resets: - Import tracking sets for regular and typing imports", "category": "behavioral", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "335-339", "function": "_reset" } ] }
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..884e1de8 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -333,11 +333,11 @@ class StubGenerator: # but simplifies code quite a bit. # Impor...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S6", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S10", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S7", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": ...
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S6", "text": "The method resets: - Sub-module import tracking", "category": "behavioral", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "337-337", "function": "_reset" } ] }
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..919edbd3 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -335,7 +335,7 @@ class StubGenerator: # Imports that are needed at the top of the file ...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S5", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S10", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S7", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": ...
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S7", "text": "The method resets: - TypeVar definitions dictionary", "category": "behavioral", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "341-341", "function": "_reset" } ] }
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..2873d0e5 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -339,7 +339,8 @@ class StubGenerator: # Typing imports (behind if TYPE_CHECKING) that are nee...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S10", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S5", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S6", "shared_functions": 1, "shared_lines": 0 } ] }
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S9", "text": "The method resets: - Generated stub content list", "category": "behavioral", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "346-346", "function": "_reset" } ] }
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..81c01813 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -344,7 +344,8 @@ class StubGenerator: self._current_objects = {} # type: Dict[str, Any] ...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S10", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S5", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S6", "shared_functions": 1, "shared_lines": 0 } ] }
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S10", "text": "The method resets: - Current parent module reference", "category": "behavioral", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "352-352", "function": "_reset" } ] }
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..a9b4d539 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -349,7 +349,9 @@ class StubGenerator: # These have a shorter "scope" # Current paren...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S5", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S6", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S7", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "...
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S20", "text": "name : str — The name of the class for which to generate the stub. clazz : type — The class object to analyze and generate a stub for", "category": "structural", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "637-637", "function...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..a5cdcb09 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -634,7 +634,8 @@ class StubGenerator: ) return annotation_string - def _gen...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S21", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S22", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S23", "shared_functions": 1, "shared_lines": 0 }, { "spec_id"...
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S24", "text": "Processes static methods, class methods, and regular methods with appropriate decorators / Support decorator analysis and signature extraction", "category": "behavioral", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "690-700", ...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..20922189 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -694,7 +694,7 @@ class StubGenerator: for key, element in clazz.__dict__.items(): ...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S23", "shared_functions": 1, "shared_lines": 11 }, { "spec_id": "S27", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S20", "shared_functions": 1, "shared_lines": 0 } ] }
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S27", "text": "Skips __init__ method generation for TriggeredRun and DeployedFlow subclasses", "category": "behavioral", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "639-639", "function": "_generate_class_stub" }, { "file": "me...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..ecd199ce 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -636,7 +636,7 @@ class StubGenerator: def _generate_class_stub(self, name: str, clazz: type) ->...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S23", "shared_functions": 1, "shared_lines": 5 }, { "spec_id": "S24", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S20", "shared_functions": 1, "shared_lines": 0 } ] }
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S32", "text": "name : str — The name of the function for which to generate the stub. func : Optional[Union[Callable, classmethod]], optional — The actual function object to analyze. sign : Optional[List[inspect.Signature]], optional — List of function signatures to use instead of inspecting 'func'.", ...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..1e9f146d 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -1179,7 +1179,7 @@ class StubGenerator: self, name: str, func: Optional[Uni...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S33", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S34", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S35", "shared_functions": 1, "shared_lines": 0 }, { "spec_id"...
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S33", "text": "Either 'func' or 'sign' must be provided, but not necessarily both / func : ... If None, the 'sign' parameter must be provided / Exceptions: RuntimeError — Raised when neither 'func' nor 'sign' parameters are provided", "category": "behavioral", "code_mapping": [ { "file":...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..a49a2494 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -1238,7 +1238,7 @@ class StubGenerator: buff = StringIO() if sign is None and func...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S32", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S34", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S35", "shared_functions": 1, "shared_lines": 0 }, { "spec_id"...
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S37", "text": "Exceptions: ValueError — May be raised when inspect.signature() fails on the provided function (handled gracefully)", "category": "behavioral", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "1248-1255", "function": "_generate_fu...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..7faca31b 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -1244,7 +1244,7 @@ class StubGenerator: ) try: sign = sign or [insp...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S32", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S33", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S34", "shared_functions": 1, "shared_lines": 0 } ] }
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S39", "text": "Functions with STUBGEN_IGNORE docstring are ignored and return empty string", "category": "behavioral", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "1256-1260", "function": "_generate_function_stub" } ] }
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..98f564d0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -1253,7 +1253,7 @@ class StubGenerator: if doc == "STUBGEN_IGNORE": # Ignore met...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S41", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S32", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S33", "shared_functions": 1, "shared_lines": 0 } ] }
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S41", "text": "doc : Optional[str], optional — Custom documentation string to use. If None, uses func.__doc__", "category": "behavioral", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "1256-1256", "function": "_generate_function_stub" }, ...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..56ea64f3 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -1249,7 +1249,10 @@ class StubGenerator: # which doesn't have a signature. We ignore for ...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S38", "shared_functions": 1, "shared_lines": 11 }, { "spec_id": "S42", "shared_functions": 1, "shared_lines": 11 }, { "spec_id": "S39", "shared_functions": 1, "shared_lines": 1 } ] }
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S43", "text": "deco : Optional[str], optional — Decorator string to apply to the function (e.g., \"@property\", \"@staticmethod\")", "category": "behavioral", "code_mapping": [ { "file": "metaflow/cmd/develop/stub_generator.py", "lines": "1281-1284", "function": "_generate_fu...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..92b04dad 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -1271,7 +1271,7 @@ class StubGenerator: # some IDEs seem to prefer if there is one no...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S38", "shared_functions": 1, "shared_lines": 4 }, { "spec_id": "S42", "shared_functions": 1, "shared_lines": 4 }, { "spec_id": "S34", "shared_functions": 1, "shared_lines": 2 } ] }
3
Netflix__metaflow.b390a8d4.test_stub_generator.7bf08c98.lv1
{ "spec_id": "S42", "text": "Generate a stub definition for a Python function with proper type annotations and documentation. This method creates a stub representation of a function that can be used in .pyi files for type checking and IDE support. It handles function signatures, parameter defaults, type annotations...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() - def _reset(self): - # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..9ee2a2e0 100644 +++ a/metaflow/cmd/develop/stub_generator.py --- b/metaflow/cmd/develop/stub_generator.py @@ -328,28 +328,28 @@ class StubGenerator: self._reset() + def _reset(self): + # "...
diff --git a/metaflow/cmd/develop/stub_generator.py b/metaflow/cmd/develop/stub_generator.py index 50d9ca29..cc73bbef 100644 --- a/metaflow/cmd/develop/stub_generator.py +++ b/metaflow/cmd/develop/stub_generator.py @@ -1325,7 +1325,8 @@ class StubGenerator: init_blank = False b...
diff --git a/test/cmd/develop/test_stub_generator.py b/test/cmd/develop/test_stub_generator.py deleted file mode 100644 index c115c463..00000000 --- a/test/cmd/develop/test_stub_generator.py +++ /dev/null @@ -1,525 +0,0 @@ -import tempfile -import typing -import inspect -from typing import TypeVar, Optional -from unitt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S38", "shared_functions": 1, "shared_lines": 58 }, { "spec_id": "S40", "shared_functions": 1, "shared_lines": 34 }, { "spec_id": "S36", "shared_functions": 1, "shared_lines": 16 }, { "spec_...
3
astropy__astropy.b0db0daa.test_comparison.445d81a3.lv1
{ "spec_id": "S2", "text": "The name field automatically converts values to strings. Sets _name attribute to None if value is None, otherwise converts to str.", "category": "behavioral", "code_mapping": [ { "file": "/testbed/astropy/cosmology/_src/core.py", "lines": "105-106", "function": ...
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 --- a/astropy/cosmology/__init__.py +++ b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) -from ._src.funcs import cosmology_equal, z_at_value +from ._src.f...
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 +++ a/astropy/cosmology/__init__.py --- b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) +from ._src.funcs import cosmology_equal, z_at_value -from ._src.f...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..6f47b5dacd 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -103,7 +103,7 @@ class _NameField: return instance._name def __set__(self, instance: "Cosmology", value: str | Non...
diff --git a/astropy/cosmology/_src/tests/funcs/test_comparison.py b/astropy/cosmology/_src/tests/funcs/test_comparison.py deleted file mode 100644 index 80999a7bc8..0000000000 --- a/astropy/cosmology/_src/tests/funcs/test_comparison.py +++ /dev/null @@ -1,337 +0,0 @@ -# Licensed under a 3-clause BSD style license - se...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 1, "shared_lines": 2 }, { "spec_id": "S3", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S4", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_comparison.445d81a3.lv1
{ "spec_id": "S3", "text": "Check equality between Cosmologies.\n\nChecks the Parameters and immutable fields (i.e. not \"meta\").\n\nParameters\n----------\nother : `~astropy.cosmology.Cosmology` subclass instance, positional-only\n The object in which to compare.\n\nReturns\n-------\nbool\n `True` if Parame...
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 --- a/astropy/cosmology/__init__.py +++ b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) -from ._src.funcs import cosmology_equal, z_at_value +from ._src.f...
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 +++ a/astropy/cosmology/__init__.py --- b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) +from ._src.funcs import cosmology_equal, z_at_value -from ._src.f...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..3c623771ea 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -418,14 +418,12 @@ class Cosmology(metaclass=ABCMeta): return NotImplemented # allows other.__eq__ return...
diff --git a/astropy/cosmology/_src/tests/funcs/test_comparison.py b/astropy/cosmology/_src/tests/funcs/test_comparison.py deleted file mode 100644 index 80999a7bc8..0000000000 --- a/astropy/cosmology/_src/tests/funcs/test_comparison.py +++ /dev/null @@ -1,337 +0,0 @@ -# Licensed under a 3-clause BSD style license - se...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S4", "shared_functions": 1, "shared_lines": 2 }, { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S2", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_comparison.445d81a3.lv1
{ "spec_id": "S4", "text": "If other.__class__ is not self.__class__, return NotImplemented to allow other.__eq__ to be called.", "category": "behavioral", "code_mapping": [ { "file": "/testbed/astropy/cosmology/_src/core.py", "lines": "419-420", "function": "Cosmology.__eq__" } ] }
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 --- a/astropy/cosmology/__init__.py +++ b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) -from ._src.funcs import cosmology_equal, z_at_value +from ._src.f...
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 +++ a/astropy/cosmology/__init__.py --- b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) +from ._src.funcs import cosmology_equal, z_at_value -from ._src.f...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..b98e281c46 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -415,7 +415,7 @@ class Cosmology(metaclass=ABCMeta): `True` if Parameters and names are the same, `False` otherwise. ...
diff --git a/astropy/cosmology/_src/tests/funcs/test_comparison.py b/astropy/cosmology/_src/tests/funcs/test_comparison.py deleted file mode 100644 index 80999a7bc8..0000000000 --- a/astropy/cosmology/_src/tests/funcs/test_comparison.py +++ /dev/null @@ -1,337 +0,0 @@ -# Licensed under a 3-clause BSD style license - se...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S3", "shared_functions": 1, "shared_lines": 2 }, { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S2", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_comparison.445d81a3.lv1
{ "spec_id": "S9", "text": "The function internally calls `cosmology_equal` and returns its logical negation, providing a consistent way to check for cosmology inequality with the same parameter parsing and conversion capabilities.", "category": "implementation_constraint", "code_mapping": [ { "file":...
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 --- a/astropy/cosmology/__init__.py +++ b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) -from ._src.funcs import cosmology_equal, z_at_value +from ._src.f...
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 +++ a/astropy/cosmology/__init__.py --- b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) +from ._src.funcs import cosmology_equal, z_at_value -from ._src.f...
diff --git a/astropy/cosmology/_src/funcs/comparison.py b/astropy/cosmology/_src/funcs/comparison.py index 9225fdcdc9..d7285fc625 100644 --- a/astropy/cosmology/_src/funcs/comparison.py +++ b/astropy/cosmology/_src/funcs/comparison.py @@ -360,6 +360,13 @@ def _cosmology_not_equal( astropy.cosmology.cosmology_equal...
diff --git a/astropy/cosmology/_src/tests/funcs/test_comparison.py b/astropy/cosmology/_src/tests/funcs/test_comparison.py deleted file mode 100644 index 80999a7bc8..0000000000 --- a/astropy/cosmology/_src/tests/funcs/test_comparison.py +++ /dev/null @@ -1,337 +0,0 @@ -# Licensed under a 3-clause BSD style license - se...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S8", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S12", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_comparison.445d81a3.lv1
{ "spec_id": "S10", "text": "Parse Cosmology-like objects to |Cosmology| instances, using provided formats.\n\n``format`` is broadcast to match the shape of the cosmology arguments. Note\nthat the cosmology arguments are not broadcast against ``format``, so it\ncannot determine the output shape.\n\nParameters\n----...
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 --- a/astropy/cosmology/__init__.py +++ b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) -from ._src.funcs import cosmology_equal, z_at_value +from ._src.f...
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 +++ a/astropy/cosmology/__init__.py --- b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) +from ._src.funcs import cosmology_equal, z_at_value -from ._src.f...
diff --git a/astropy/cosmology/_src/funcs/comparison.py b/astropy/cosmology/_src/funcs/comparison.py index 9225fdcdc9..a4c8ed0e3d 100644 --- a/astropy/cosmology/_src/funcs/comparison.py +++ b/astropy/cosmology/_src/funcs/comparison.py @@ -149,7 +149,8 @@ def _parse_formats(*cosmos: object, format: _FormatsType) -> ndar...
diff --git a/astropy/cosmology/_src/tests/funcs/test_comparison.py b/astropy/cosmology/_src/tests/funcs/test_comparison.py deleted file mode 100644 index 80999a7bc8..0000000000 --- a/astropy/cosmology/_src/tests/funcs/test_comparison.py +++ /dev/null @@ -1,337 +0,0 @@ -# Licensed under a 3-clause BSD style license - se...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S12", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S8", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S9", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_comparison.445d81a3.lv1
{ "spec_id": "S12", "text": "Return element-wise equality check on the cosmologies.\n\n.. note::\n\n Cosmologies are currently scalar in their parameters.\n\nParameters\n----------\ncosmo1, cosmo2 : |Cosmology|-like\n The objects to compare. Must be convertible to |Cosmology|, as specified\n by ``format``....
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 --- a/astropy/cosmology/__init__.py +++ b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) -from ._src.funcs import cosmology_equal, z_at_value +from ._src.f...
diff --git a/astropy/cosmology/__init__.py b/astropy/cosmology/__init__.py index 6f9df74213..13c1c03096 100644 +++ a/astropy/cosmology/__init__.py --- b/astropy/cosmology/__init__.py @@ -23,7 +23,7 @@ from ._src.flrw import ( wCDM, wpwaCDM, ) +from ._src.funcs import cosmology_equal, z_at_value -from ._src.f...
diff --git a/astropy/cosmology/_src/funcs/comparison.py b/astropy/cosmology/_src/funcs/comparison.py index 9225fdcdc9..d17bdc1331 100644 --- a/astropy/cosmology/_src/funcs/comparison.py +++ b/astropy/cosmology/_src/funcs/comparison.py @@ -312,7 +312,7 @@ def cosmology_equal( if eq is NotImplemented: ...
diff --git a/astropy/cosmology/_src/tests/funcs/test_comparison.py b/astropy/cosmology/_src/tests/funcs/test_comparison.py deleted file mode 100644 index 80999a7bc8..0000000000 --- a/astropy/cosmology/_src/tests/funcs/test_comparison.py +++ /dev/null @@ -1,337 +0,0 @@ -# Licensed under a 3-clause BSD style license - se...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S8", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S9", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_compression_failures.48dc420b.lv1
{ "spec_id": "S1", "text": "Check if a keyword exists in the header.\n\nThis method implements the 'in' operator for Header objects, allowing you to check whether a specific keyword is present in the header using syntax like `keyword in header`.\n\nParameters: keyword (str, int, or tuple) - The keyword to search fo...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/header.py b/astropy/io/fits/header.py index 0ca9aac9e8..360cb90faf 100644 --- a/astropy/io/fits/header.py +++ b/astropy/io/fits/header.py @@ -144,7 +144,7 @@ class Header: return True try: self._cardindex(keyword) - except (KeyError, IndexError): + ...
diff --git a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py b/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py deleted file mode 100644 index 048bcb2232..0000000000 --- a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py +++ /dev/null @@ -1,173 +0,0 @@ -# Licensed und...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S11", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S2", "shared_functions": 0, "shared_lines": 0 }, { "spec_id":...
3
astropy__astropy.b0db0daa.test_compression_failures.48dc420b.lv1
{ "spec_id": "S2", "text": "Returns an index into the ._cards list given a valid lookup key.\n\nThis method handles various types of keys to locate cards within the header's internal card list. It supports string keywords, integer indices, tuples for duplicate keyword access, and slices.\n\nParameters: key (str, in...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/header.py b/astropy/io/fits/header.py index 0ca9aac9e8..a181b1738e 100644 --- a/astropy/io/fits/header.py +++ b/astropy/io/fits/header.py @@ -1689,7 +1689,7 @@ class Header: return key elif isinstance(key, tuple): if ( - len(key) != 2 + ...
diff --git a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py b/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py deleted file mode 100644 index 048bcb2232..0000000000 --- a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py +++ /dev/null @@ -1,173 +0,0 @@ -# Licensed und...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S11", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_compression_failures.48dc420b.lv1
{ "spec_id": "S4", "text": "Insert a new card before or after an existing card in the header.\n\nThis is an internal method used to implement support for the legacy before/after keyword arguments to Header.update() and related methods. It provides functionality to insert cards at specific positions relative to exis...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/header.py b/astropy/io/fits/header.py index 0ca9aac9e8..9ef360aa17 100644 --- a/astropy/io/fits/header.py +++ b/astropy/io/fits/header.py @@ -1786,8 +1786,6 @@ class Header: if before is not None: if old_idx == insertion_idx - 1: return - ...
diff --git a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py b/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py deleted file mode 100644 index 048bcb2232..0000000000 --- a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py +++ /dev/null @@ -1,173 +0,0 @@ -# Licensed und...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S11", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_compression_failures.48dc420b.lv1
{ "spec_id": "S8", "text": "Similar to :meth:`dict.get`--returns the value associated with keyword in the header, or a default value if the keyword is not found.\n\nParameters: key (str) - A keyword that may or may not be in the header. default (optional) - A default value to return if the keyword is not found in t...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/header.py b/astropy/io/fits/header.py index 0ca9aac9e8..457cd72876 100644 --- a/astropy/io/fits/header.py +++ b/astropy/io/fits/header.py @@ -885,7 +885,10 @@ class Header: if the keyword is not in the header. """ try: - return self[key] + ...
diff --git a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py b/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py deleted file mode 100644 index 048bcb2232..0000000000 --- a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py +++ /dev/null @@ -1,173 +0,0 @@ -# Licensed und...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S11", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_compression_failures.48dc420b.lv1
{ "spec_id": "S11", "text": "Descriptor method to lazily load and return the Header object from stored header string data.\n\nThis method implements the descriptor protocol's __get__ method to provide lazy loading of Header objects. When an HDU's header is first accessed, this method converts the raw header string ...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/header.py b/astropy/io/fits/header.py index 0ca9aac9e8..075f5687ab 100644 --- a/astropy/io/fits/header.py +++ b/astropy/io/fits/header.py @@ -1929,7 +1929,7 @@ class _DelayedHeader: except KeyError: if obj._header_str is not None: hdr = Header.fromstri...
diff --git a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py b/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py deleted file mode 100644 index 048bcb2232..0000000000 --- a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py +++ /dev/null @@ -1,173 +0,0 @@ -# Licensed und...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S2", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": ...
3
astropy__astropy.b0db0daa.test_compression_failures.48dc420b.lv1
{ "spec_id": "S14", "text": "Parse TFORMn keyword for a binary table into a (repeat, format, option) tuple.\n\nThis function parses the FITS binary table column format specification (TFORMn) and extracts the repeat count, format code, and optional parameters.\n\nParameters: tform (str) - The TFORMn keyword value fr...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/column.py b/astropy/io/fits/column.py index 804adb07c9..a7f15cbe93 100644 --- a/astropy/io/fits/column.py +++ b/astropy/io/fits/column.py @@ -2297,7 +2297,7 @@ def _parse_tformat(tform): raise VerifyError(f"Format {tform!r} is not recognized.") if repeat == "": - repe...
diff --git a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py b/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py deleted file mode 100644 index 048bcb2232..0000000000 --- a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py +++ /dev/null @@ -1,173 +0,0 @@ -# Licensed und...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S15", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_compression_failures.48dc420b.lv1
{ "spec_id": "S15", "text": "Parse the TFORMn keywords for ASCII tables into a (format, width, precision) tuple.\n\nThis function parses ASCII table column format specifications from FITS headers. The precision value is always zero unless the format is one of 'E', 'F', or 'D' (floating-point formats).\n\nParameters...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..6d62e97c84 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/column.py b/astropy/io/fits/column.py index 804adb07c9..d4544b7ce1 100644 --- a/astropy/io/fits/column.py +++ b/astropy/io/fits/column.py @@ -2340,7 +2340,7 @@ def _parse_ascii_tformat(tform, strict=False): else: # Just use a default width of 0 if unspecified ...
diff --git a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py b/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py deleted file mode 100644 index 048bcb2232..0000000000 --- a/astropy/io/fits/hdu/compressed/tests/test_compression_failures.py +++ /dev/null @@ -1,173 +0,0 @@ -# Licensed und...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S14", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_realizations.5b9cf523.lv1
{ "spec_id": "S1", "text": "Return the state of the unit for pickling. This method is called during the pickling process to get the object's state that should be serialized. Returns dict: A dictionary containing the object's state.", "category": "behavioral", "code_mapping": [ { "file": "astropy/units...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None - def __get__( - self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 +++ a/astropy/cosmology/_src/core.py --- b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None + def __get__( + self, instance: Union["Cosmology...
diff --git a/astropy/units/core.py b/astropy/units/core.py index 1fa99c38e1..7d260596ed 100644 --- a/astropy/units/core.py +++ b/astropy/units/core.py @@ -374,6 +374,7 @@ class UnitBase: state = self.__dict__.copy() state.pop("_hash", None) state.pop("_physical_type_id", None) + state....
diff --git a/astropy/cosmology/_src/tests/test_realizations.py b/astropy/cosmology/_src/tests/test_realizations.py deleted file mode 100644 index bfe7a1352e..0000000000 --- a/astropy/cosmology/_src/tests/test_realizations.py +++ /dev/null @@ -1,105 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rs...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S2", "shared_functions": 1, "shared_lines": 3 }, { "spec_id": "S3", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S4", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "...
3
astropy__astropy.b0db0daa.test_realizations.5b9cf523.lv1
{ "spec_id": "S2", "text": "It removes cached properties that depend on string hashes, which can vary between Python sessions, to ensure consistent behavior when unpickling units in different sessions. Specifically, the '_hash' and '_physical_type_id' cached properties are excluded from the returned state since the...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None - def __get__( - self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 +++ a/astropy/cosmology/_src/core.py --- b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None + def __get__( + self, instance: Union["Cosmology...
diff --git a/astropy/units/core.py b/astropy/units/core.py index 1fa99c38e1..6c3aafaafe 100644 --- a/astropy/units/core.py +++ b/astropy/units/core.py @@ -373,7 +373,6 @@ class UnitBase: # hashes of strings vary between sessions. state = self.__dict__.copy() state.pop("_hash", None) - ...
diff --git a/astropy/cosmology/_src/tests/test_realizations.py b/astropy/cosmology/_src/tests/test_realizations.py deleted file mode 100644 index bfe7a1352e..0000000000 --- a/astropy/cosmology/_src/tests/test_realizations.py +++ /dev/null @@ -1,105 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rs...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 1, "shared_lines": 3 }, { "spec_id": "S3", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S4", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "...
3
astropy__astropy.b0db0daa.test_realizations.5b9cf523.lv1
{ "spec_id": "S3", "text": "Enter the unit context manager. This method is called when entering a `with` statement block that uses a `_UnitContext` instance as a context manager. Returns None: This method does not return any value. The actual unit registry modification occurs during the `_UnitContext` initializatio...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None - def __get__( - self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 +++ a/astropy/cosmology/_src/core.py --- b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None + def __get__( + self, instance: Union["Cosmology...
diff --git a/astropy/units/core.py b/astropy/units/core.py index 1fa99c38e1..a5651dabba 100644 --- a/astropy/units/core.py +++ b/astropy/units/core.py @@ -1448,7 +1448,7 @@ class _UnitContext: _unit_registries.append(_UnitRegistry(init=init, equivalencies=equivalencies)) def __enter__(self) -> None: - ...
diff --git a/astropy/cosmology/_src/tests/test_realizations.py b/astropy/cosmology/_src/tests/test_realizations.py deleted file mode 100644 index bfe7a1352e..0000000000 --- a/astropy/cosmology/_src/tests/test_realizations.py +++ /dev/null @@ -1,105 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rs...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S2", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S4", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_realizations.5b9cf523.lv1
{ "spec_id": "S5", "text": "def __exit__(self, type: type[BaseException] | None, value: BaseException | None, tb: TracebackType | None) -> None, where type is the exception type that caused the context to exit, or None if no exception occurred; value is the exception instance; tb is the traceback object. Returns No...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None - def __get__( - self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 +++ a/astropy/cosmology/_src/core.py --- b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None + def __get__( + self, instance: Union["Cosmology...
diff --git a/astropy/units/core.py b/astropy/units/core.py index 1fa99c38e1..ff66207d34 100644 --- a/astropy/units/core.py +++ b/astropy/units/core.py @@ -1457,6 +1457,8 @@ class _UnitContext: tb: TracebackType | None, ) -> None: _unit_registries.pop() + if type is not None: + r...
diff --git a/astropy/cosmology/_src/tests/test_realizations.py b/astropy/cosmology/_src/tests/test_realizations.py deleted file mode 100644 index bfe7a1352e..0000000000 --- a/astropy/cosmology/_src/tests/test_realizations.py +++ /dev/null @@ -1,105 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rs...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S4", "shared_functions": 1, "shared_lines": 8 }, { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S2", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_realizations.5b9cf523.lv1
{ "spec_id": "S14", "text": "Converts string names to their corresponding cosmology realizations from the registry. If a string, it should be the name of a built-in cosmology realization (e.g., 'Planck18', 'WMAP7'). Returns astropy.cosmology.Cosmology: A validated Cosmology instance corresponding to the input value...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None - def __get__( - self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 +++ a/astropy/cosmology/_src/core.py --- b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None + def __get__( + self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/default.py b/astropy/cosmology/_src/default.py index 48ca309529..ed8788b60a 100644 --- a/astropy/cosmology/_src/default.py +++ b/astropy/cosmology/_src/default.py @@ -37,6 +37,8 @@ class default_cosmology(ScienceState): _default_value: ClassVar[str] = "Planck18" _value: C...
diff --git a/astropy/cosmology/_src/tests/test_realizations.py b/astropy/cosmology/_src/tests/test_realizations.py deleted file mode 100644 index bfe7a1352e..0000000000 --- a/astropy/cosmology/_src/tests/test_realizations.py +++ /dev/null @@ -1,105 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rs...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S13", "shared_functions": 1, "shared_lines": 4 }, { "spec_id": "S15", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S16", "shared_functions": 1, "shared_lines": 0 }, { "spec_id"...
3
astropy__astropy.b0db0daa.test_realizations.5b9cf523.lv1
{ "spec_id": "S15", "text": "Validates that Cosmology instances are passed through unchanged. If a Cosmology instance, it is returned unchanged.", "category": "behavioral", "code_mapping": [ { "file": "astropy/cosmology/_src/default.py", "lines": "66-71", "function": "default_cosmology.val...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None - def __get__( - self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 +++ a/astropy/cosmology/_src/core.py --- b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None + def __get__( + self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/default.py b/astropy/cosmology/_src/default.py index 48ca309529..fa49d550ce 100644 --- a/astropy/cosmology/_src/default.py +++ b/astropy/cosmology/_src/default.py @@ -71,6 +71,13 @@ class default_cosmology(ScienceState): "default_cosmology must be a string or Cosmolo...
diff --git a/astropy/cosmology/_src/tests/test_realizations.py b/astropy/cosmology/_src/tests/test_realizations.py deleted file mode 100644 index bfe7a1352e..0000000000 --- a/astropy/cosmology/_src/tests/test_realizations.py +++ /dev/null @@ -1,105 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rs...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S16", "shared_functions": 1, "shared_lines": 6 }, { "spec_id": "S13", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S14", "shared_functions": 1, "shared_lines": 0 }, { "spec_id"...
3
astropy__astropy.b0db0daa.test_realizations.5b9cf523.lv1
{ "spec_id": "S16", "text": "Raises TypeError: If value is not None, a string, or a Cosmology instance.", "category": "behavioral", "code_mapping": [ { "file": "astropy/cosmology/_src/default.py", "lines": "66-71", "function": "default_cosmology.validate" } ] }
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None - def __get__( - self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 +++ a/astropy/cosmology/_src/core.py --- b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None + def __get__( + self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/default.py b/astropy/cosmology/_src/default.py index 48ca309529..b4f55d277d 100644 --- a/astropy/cosmology/_src/default.py +++ b/astropy/cosmology/_src/default.py @@ -66,7 +66,7 @@ class default_cosmology(ScienceState): value = None else: ...
diff --git a/astropy/cosmology/_src/tests/test_realizations.py b/astropy/cosmology/_src/tests/test_realizations.py deleted file mode 100644 index bfe7a1352e..0000000000 --- a/astropy/cosmology/_src/tests/test_realizations.py +++ /dev/null @@ -1,105 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rs...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S15", "shared_functions": 1, "shared_lines": 6 }, { "spec_id": "S13", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S14", "shared_functions": 1, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_realizations.5b9cf523.lv1
{ "spec_id": "S17", "text": "Raises ValueError: If value is a string but does not correspond to any built-in cosmology realization available in the registry.", "category": "behavioral", "code_mapping": [ { "file": "astropy/cosmology/_src/default.py", "lines": "95-105", "function": "default...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None - def __get__( - self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 +++ a/astropy/cosmology/_src/core.py --- b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None + def __get__( + self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/default.py b/astropy/cosmology/_src/default.py index 48ca309529..ad256bb084 100644 --- a/astropy/cosmology/_src/default.py +++ b/astropy/cosmology/_src/default.py @@ -97,6 +97,9 @@ class default_cosmology(ScienceState): """ from astropy.cosmology import realizations...
diff --git a/astropy/cosmology/_src/tests/test_realizations.py b/astropy/cosmology/_src/tests/test_realizations.py deleted file mode 100644 index bfe7a1352e..0000000000 --- a/astropy/cosmology/_src/tests/test_realizations.py +++ /dev/null @@ -1,105 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rs...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S13", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S14", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S15", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_realizations.5b9cf523.lv1
{ "spec_id": "S18", "text": "@classmethod def validate(cls, value: Cosmology | str | None) -> Cosmology | None, with parameter value : None, str, or astropy.cosmology.Cosmology, the cosmology specification to validate.", "category": "structural", "code_mapping": [ { "file": "astropy/cosmology/_src/def...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 --- a/astropy/cosmology/_src/core.py +++ b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None - def __get__( - self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/core.py b/astropy/cosmology/_src/core.py index 0d561c169c..d1073ddc2e 100644 +++ a/astropy/cosmology/_src/core.py --- b/astropy/cosmology/_src/core.py @@ -93,17 +93,17 @@ class _NameField: default: str | None = None + def __get__( + self, instance: Union["Cosmology...
diff --git a/astropy/cosmology/_src/default.py b/astropy/cosmology/_src/default.py index 48ca309529..7a8d2104dd 100644 --- a/astropy/cosmology/_src/default.py +++ b/astropy/cosmology/_src/default.py @@ -39,7 +39,7 @@ class default_cosmology(ScienceState): _value: ClassVar[str | Cosmology] = "Planck18" @clas...
diff --git a/astropy/cosmology/_src/tests/test_realizations.py b/astropy/cosmology/_src/tests/test_realizations.py deleted file mode 100644 index bfe7a1352e..0000000000 --- a/astropy/cosmology/_src/tests/test_realizations.py +++ /dev/null @@ -1,105 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rs...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S13", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S14", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S15", "shared_functions": 1, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_table.48eef659.lv1
{ "spec_id": "S25", "text": "table : `astropy.table.Table`\n An Astropy Table instance containing the data and metadata from\n this VOTable. The table's meta dictionary will contain relevant\n table-level metadata such as ID, name, ref, ucd, utype, and\n description if present.", "category": "behavior...
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 --- a/astropy/io/votable/converters.py +++ b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x -def _make_masked_array(data, mask): - """ - Masked arrays of zero leng...
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 +++ a/astropy/io/votable/converters.py --- b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x +def _make_masked_array(data, mask): + """ + Masked arrays of zero leng...
diff --git a/astropy/io/votable/tree.py b/astropy/io/votable/tree.py index 31af4b7353..05e1f7e839 100644 --- a/astropy/io/votable/tree.py +++ b/astropy/io/votable/tree.py @@ -3516,7 +3516,7 @@ class TableElement( from astropy.table import Table meta = {} - for key in ["ID", "name", "ref", "uc...
diff --git a/astropy/io/votable/tests/test_table.py b/astropy/io/votable/tests/test_table.py deleted file mode 100644 index c01997ea9a..0000000000 --- a/astropy/io/votable/tests/test_table.py +++ /dev/null @@ -1,996 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst -""" -Test the conversion to/fr...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S28", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S29", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_table.48eef659.lv1
{ "spec_id": "S29", "text": "Raises IndexError if no non-empty table is found in the VOTable file.", "category": "behavioral", "code_mapping": [ { "file": "/testbed/astropy/io/votable/tree.py", "lines": "4498-4505", "function": "get_first_table" } ] }
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 --- a/astropy/io/votable/converters.py +++ b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x -def _make_masked_array(data, mask): - """ - Masked arrays of zero leng...
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 +++ a/astropy/io/votable/converters.py --- b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x +def _make_masked_array(data, mask): + """ + Masked arrays of zero leng...
diff --git a/astropy/io/votable/tree.py b/astropy/io/votable/tree.py index 31af4b7353..db77f86982 100644 --- a/astropy/io/votable/tree.py +++ b/astropy/io/votable/tree.py @@ -4503,7 +4503,7 @@ class VOTableFile(Element, _IDProperty, _DescriptionProperty): for table in self.iter_tables(): if not ta...
diff --git a/astropy/io/votable/tests/test_table.py b/astropy/io/votable/tests/test_table.py deleted file mode 100644 index c01997ea9a..0000000000 --- a/astropy/io/votable/tests/test_table.py +++ /dev/null @@ -1,996 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst -""" -Test the conversion to/fr...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S28", "shared_functions": 1, "shared_lines": 8 }, { "spec_id": "S25", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_table.48eef659.lv1
{ "spec_id": "S38", "text": "Add a new column to the table using ``col`` as input. If ``index`` is supplied then insert column before ``index`` position in the list of columns, otherwise append column to the end of the list.\n\nThe ``col`` input can be any data object which is acceptable as a `~astropy.table.Table...
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 --- a/astropy/io/votable/converters.py +++ b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x -def _make_masked_array(data, mask): - """ - Masked arrays of zero leng...
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 +++ a/astropy/io/votable/converters.py --- b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x +def _make_masked_array(data, mask): + """ + Masked arrays of zero leng...
diff --git a/astropy/table/table.py b/astropy/table/table.py index e08b790d23..10c1236c2f 100644 --- a/astropy/table/table.py +++ b/astropy/table/table.py @@ -2474,7 +2474,7 @@ class Table: if index is not None: # Move the other cols to the right of the new one - move_names = self.col...
diff --git a/astropy/io/votable/tests/test_table.py b/astropy/io/votable/tests/test_table.py deleted file mode 100644 index c01997ea9a..0000000000 --- a/astropy/io/votable/tests/test_table.py +++ /dev/null @@ -1,996 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst -""" -Test the conversion to/fr...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S42", "shared_functions": 1, "shared_lines": 143 }, { "spec_id": "S43", "shared_functions": 1, "shared_lines": 143 }, { "spec_id": "S44", "shared_functions": 1, "shared_lines": 143 }, { "sp...
3
astropy__astropy.b0db0daa.test_table.48eef659.lv1
{ "spec_id": "S42", "text": "rename_duplicate : bool\n Uniquify column name if it already exist. Default is False.", "category": "structural", "code_mapping": [ { "file": "/testbed/astropy/table/table.py", "lines": "2340-2482", "function": "add_column" } ] }
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 --- a/astropy/io/votable/converters.py +++ b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x -def _make_masked_array(data, mask): - """ - Masked arrays of zero leng...
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 +++ a/astropy/io/votable/converters.py --- b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x +def _make_masked_array(data, mask): + """ + Masked arrays of zero leng...
diff --git a/astropy/table/table.py b/astropy/table/table.py index e08b790d23..a3285fe86d 100644 --- a/astropy/table/table.py +++ b/astropy/table/table.py @@ -2342,7 +2342,7 @@ class Table: col, index=None, name=None, - rename_duplicate=False, + rename_duplicate=True, c...
diff --git a/astropy/io/votable/tests/test_table.py b/astropy/io/votable/tests/test_table.py deleted file mode 100644 index c01997ea9a..0000000000 --- a/astropy/io/votable/tests/test_table.py +++ /dev/null @@ -1,996 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst -""" -Test the conversion to/fr...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S38", "shared_functions": 1, "shared_lines": 143 }, { "spec_id": "S43", "shared_functions": 1, "shared_lines": 143 }, { "spec_id": "S44", "shared_functions": 1, "shared_lines": 143 } ] }
3
astropy__astropy.b0db0daa.test_table.48eef659.lv1
{ "spec_id": "S43", "text": "copy : bool\n Make a copy of the new column. Default is True.", "category": "structural", "code_mapping": [ { "file": "/testbed/astropy/table/table.py", "lines": "2340-2482", "function": "add_column" } ] }
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 --- a/astropy/io/votable/converters.py +++ b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x -def _make_masked_array(data, mask): - """ - Masked arrays of zero leng...
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 +++ a/astropy/io/votable/converters.py --- b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x +def _make_masked_array(data, mask): + """ + Masked arrays of zero leng...
diff --git a/astropy/table/table.py b/astropy/table/table.py index e08b790d23..31f3031a53 100644 --- a/astropy/table/table.py +++ b/astropy/table/table.py @@ -2430,7 +2430,7 @@ class Table: # Note that along with the lines above and below, this allows broadcasting # of scalars to the correct shape for...
diff --git a/astropy/io/votable/tests/test_table.py b/astropy/io/votable/tests/test_table.py deleted file mode 100644 index c01997ea9a..0000000000 --- a/astropy/io/votable/tests/test_table.py +++ /dev/null @@ -1,996 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst -""" -Test the conversion to/fr...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S38", "shared_functions": 1, "shared_lines": 143 }, { "spec_id": "S42", "shared_functions": 1, "shared_lines": 143 }, { "spec_id": "S44", "shared_functions": 1, "shared_lines": 143 } ] }
3
astropy__astropy.b0db0daa.test_table.48eef659.lv1
{ "spec_id": "S44", "text": "default_name : str or None\n Name to use if both ``name`` and ``col.info.name`` are not available.\n Defaults to ``col{number_of_columns}``.", "category": "structural", "code_mapping": [ { "file": "/testbed/astropy/table/table.py", "lines": "2340-2482", "...
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 --- a/astropy/io/votable/converters.py +++ b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x -def _make_masked_array(data, mask): - """ - Masked arrays of zero leng...
diff --git a/astropy/io/votable/converters.py b/astropy/io/votable/converters.py index 77184900ce..522e98ce05 100644 +++ a/astropy/io/votable/converters.py --- b/astropy/io/votable/converters.py @@ -72,85 +72,85 @@ else: return x +def _make_masked_array(data, mask): + """ + Masked arrays of zero leng...
diff --git a/astropy/table/table.py b/astropy/table/table.py index e08b790d23..e863930c3b 100644 --- a/astropy/table/table.py +++ b/astropy/table/table.py @@ -2424,7 +2424,7 @@ class Table: 2 0.2 b y """ if default_name is None: - default_name = f"col{len(self.columns)}"...
diff --git a/astropy/io/votable/tests/test_table.py b/astropy/io/votable/tests/test_table.py deleted file mode 100644 index c01997ea9a..0000000000 --- a/astropy/io/votable/tests/test_table.py +++ /dev/null @@ -1,996 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst -""" -Test the conversion to/fr...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S38", "shared_functions": 1, "shared_lines": 143 }, { "spec_id": "S42", "shared_functions": 1, "shared_lines": 143 }, { "spec_id": "S43", "shared_functions": 1, "shared_lines": 143 } ] }
3
astropy__astropy.b0db0daa.test_tilde_path.383d7c0c.lv1
{ "spec_id": "S8", "text": "The method performs an early return optimization if `idx` is greater than the number of cards in the header, as no indices would need updating in that case.", "category": "implementation_constraint", "code_mapping": [ { "file": "/testbed/astropy/io/fits/header.py", "l...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/header.py b/astropy/io/fits/header.py index 0ca9aac9e8..ffae5e2fc8 100644 --- a/astropy/io/fits/header.py +++ b/astropy/io/fits/header.py @@ -1807,10 +1807,6 @@ class Header: For all cards with index above idx, increment or decrement its index value in the keyword_indices ...
diff --git a/astropy/io/fits/tests/test_tilde_path.py b/astropy/io/fits/tests/test_tilde_path.py deleted file mode 100644 index f5bfd0f7da..0000000000 --- a/astropy/io/fits/tests/test_tilde_path.py +++ /dev/null @@ -1,174 +0,0 @@ -# Licensed under a 3-clause BSD style license - see PYFITS.rst - -import os - -import num...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S11", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S12", "shared_functions": 0, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_tilde_path.383d7c0c.lv1
{ "spec_id": "S11", "text": "useblanks : bool, optional - If there are blank cards at the end of the Header, replace the first blank card so that the total number of cards in the Header does not increase. Otherwise preserve the number of blank cards. Default is True.", "category": "structural", "code_mapping": ...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/header.py b/astropy/io/fits/header.py index 0ca9aac9e8..f31e7a10c0 100644 --- a/astropy/io/fits/header.py +++ b/astropy/io/fits/header.py @@ -1167,7 +1167,7 @@ class Header: self._keyword_indices[keyword].sort() # Finally, if useblanks, delete a blank cards f...
diff --git a/astropy/io/fits/tests/test_tilde_path.py b/astropy/io/fits/tests/test_tilde_path.py deleted file mode 100644 index f5bfd0f7da..0000000000 --- a/astropy/io/fits/tests/test_tilde_path.py +++ /dev/null @@ -1,174 +0,0 @@ -# Licensed under a 3-clause BSD style license - see PYFITS.rst - -import os - -import num...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S9", "shared_functions": 1, "shared_lines": 7 }, { "spec_id": "S12", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S14", "shared_functions": 1, "shared_lines": 0 }, { "spec_id":...
3
astropy__astropy.b0db0daa.test_tilde_path.383d7c0c.lv1
{ "spec_id": "S14", "text": "Raises ValueError if the card parameter is not a valid keyword string, tuple, Card object, or None.", "category": "behavioral", "code_mapping": [ { "file": "/testbed/astropy/io/fits/header.py", "lines": "1125-1135", "function": "append" } ] }
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/header.py b/astropy/io/fits/header.py index 0ca9aac9e8..320623f402 100644 --- a/astropy/io/fits/header.py +++ b/astropy/io/fits/header.py @@ -1129,10 +1129,7 @@ class Header: elif card is None: card = Card() elif not isinstance(card, Card): - raise ...
diff --git a/astropy/io/fits/tests/test_tilde_path.py b/astropy/io/fits/tests/test_tilde_path.py deleted file mode 100644 index f5bfd0f7da..0000000000 --- a/astropy/io/fits/tests/test_tilde_path.py +++ /dev/null @@ -1,174 +0,0 @@ -# Licensed under a 3-clause BSD style license - see PYFITS.rst - -import os - -import num...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S9", "shared_functions": 1, "shared_lines": 11 }, { "spec_id": "S11", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S12", "shared_functions": 1, "shared_lines": 0 } ] }
3
astropy__astropy.b0db0daa.test_tilde_path.383d7c0c.lv1
{ "spec_id": "S20", "text": "keyword : str - The keyword to count instances of in the header", "category": "structural", "code_mapping": [ { "file": "/testbed/astropy/io/fits/header.py", "lines": "1288-1307", "function": "count" } ] }
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/header.py b/astropy/io/fits/header.py index 0ca9aac9e8..7f13f0ff58 100644 --- a/astropy/io/fits/header.py +++ b/astropy/io/fits/header.py @@ -1286,7 +1286,7 @@ class Header: for card in extend_cards: self.append(card, useblanks=useblanks, bottom=bottom, end=end) - ...
diff --git a/astropy/io/fits/tests/test_tilde_path.py b/astropy/io/fits/tests/test_tilde_path.py deleted file mode 100644 index f5bfd0f7da..0000000000 --- a/astropy/io/fits/tests/test_tilde_path.py +++ /dev/null @@ -1,174 +0,0 @@ -# Licensed under a 3-clause BSD style license - see PYFITS.rst - -import os - -import num...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S19", "shared_functions": 1, "shared_lines": 20 }, { "spec_id": "S24", "shared_functions": 1, "shared_lines": 13 }, { "spec_id": "S22", "shared_functions": 1, "shared_lines": 3 }, { "spec_i...
3
astropy__astropy.b0db0daa.test_tilde_path.383d7c0c.lv1
{ "spec_id": "S22", "text": "Raises KeyError if the keyword is not found in the header", "category": "behavioral", "code_mapping": [ { "file": "/testbed/astropy/io/fits/header.py", "lines": "1300-1302", "function": "count" } ] }
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/header.py b/astropy/io/fits/header.py index 0ca9aac9e8..da52cedad7 100644 --- a/astropy/io/fits/header.py +++ b/astropy/io/fits/header.py @@ -1302,7 +1302,7 @@ class Header: # We have to look before we leap, since otherwise _keyword_indices, # being a defaultdict, will cre...
diff --git a/astropy/io/fits/tests/test_tilde_path.py b/astropy/io/fits/tests/test_tilde_path.py deleted file mode 100644 index f5bfd0f7da..0000000000 --- a/astropy/io/fits/tests/test_tilde_path.py +++ /dev/null @@ -1,174 +0,0 @@ -# Licensed under a 3-clause BSD style license - see PYFITS.rst - -import os - -import num...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S19", "shared_functions": 1, "shared_lines": 3 }, { "spec_id": "S20", "shared_functions": 1, "shared_lines": 3 }, { "spec_id": "S24", "shared_functions": 1, "shared_lines": 3 } ] }
3
astropy__astropy.b0db0daa.test_tilde_path.383d7c0c.lv1
{ "spec_id": "S23", "text": "The keyword lookup is case-insensitive and follows FITS keyword normalization rules.", "category": "behavioral", "code_mapping": [ { "file": "/testbed/astropy/io/fits/header.py", "lines": "1295-1296", "function": "count" } ] }
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/header.py b/astropy/io/fits/header.py index 0ca9aac9e8..9081ca2d6a 100644 --- a/astropy/io/fits/header.py +++ b/astropy/io/fits/header.py @@ -1297,7 +1297,8 @@ class Header: The keyword to count instances of in the header """ - keyword = Card.normalize_keyword...
diff --git a/astropy/io/fits/tests/test_tilde_path.py b/astropy/io/fits/tests/test_tilde_path.py deleted file mode 100644 index f5bfd0f7da..0000000000 --- a/astropy/io/fits/tests/test_tilde_path.py +++ /dev/null @@ -1,174 +0,0 @@ -# Licensed under a 3-clause BSD style license - see PYFITS.rst - -import os - -import num...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S19", "shared_functions": 1, "shared_lines": 2 }, { "spec_id": "S20", "shared_functions": 1, "shared_lines": 2 }, { "spec_id": "S24", "shared_functions": 1, "shared_lines": 2 } ] }
3
astropy__astropy.b0db0daa.test_tilde_path.383d7c0c.lv1
{ "spec_id": "S27", "text": "verbose : bool, optional - If True (default), enables verbose output including warnings about missing extensions, keywords, or other issues encountered during processing. If False, suppresses most warning messages.", "category": "structural", "code_mapping": [ { "file": "/...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/scripts/fitsheader.py b/astropy/io/fits/scripts/fitsheader.py index 1d6f9c7691..f4dcb611e7 100644 --- a/astropy/io/fits/scripts/fitsheader.py +++ b/astropy/io/fits/scripts/fitsheader.py @@ -108,7 +108,7 @@ class HeaderFormatter: If `filename` does not exist or cannot be read. ...
diff --git a/astropy/io/fits/tests/test_tilde_path.py b/astropy/io/fits/tests/test_tilde_path.py deleted file mode 100644 index f5bfd0f7da..0000000000 --- a/astropy/io/fits/tests/test_tilde_path.py +++ /dev/null @@ -1,174 +0,0 @@ -# Licensed under a 3-clause BSD style license - see PYFITS.rst - -import os - -import num...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S26", "shared_functions": 1, "shared_lines": 4 }, { "spec_id": "S28", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S29", "shared_functions": 1, "shared_lines": 1 }, { "spec_id"...
3
astropy__astropy.b0db0daa.test_tilde_path.383d7c0c.lv1
{ "spec_id": "S29", "text": "The constructor automatically opens the FITS file using astropy.io.fits.open().", "category": "implementation_constraint", "code_mapping": [ { "file": "/testbed/astropy/io/fits/scripts/fitsheader.py", "lines": "114", "function": "__init__" } ] }
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/scripts/fitsheader.py b/astropy/io/fits/scripts/fitsheader.py index 1d6f9c7691..6053a588c3 100644 --- a/astropy/io/fits/scripts/fitsheader.py +++ b/astropy/io/fits/scripts/fitsheader.py @@ -109,9 +109,10 @@ class HeaderFormatter: """ def __init__(self, filename, verbose=True): +...
diff --git a/astropy/io/fits/tests/test_tilde_path.py b/astropy/io/fits/tests/test_tilde_path.py deleted file mode 100644 index f5bfd0f7da..0000000000 --- a/astropy/io/fits/tests/test_tilde_path.py +++ /dev/null @@ -1,174 +0,0 @@ -# Licensed under a 3-clause BSD style license - see PYFITS.rst - -import os - -import num...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S26", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S27", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S28", "shared_functions": 1, "shared_lines": 1 } ] }
3
astropy__astropy.b0db0daa.test_tilde_path.383d7c0c.lv1
{ "spec_id": "S35", "text": "The method internally calls the close() method on the astropy.io.fits.HDUList object that was created when the FITS file was opened.", "category": "implementation_constraint", "code_mapping": [ { "file": "/testbed/astropy/io/fits/scripts/fitsheader.py", "lines": "235...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf -from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py index fac935694b..83d1f7a94b 100644 +++ a/astropy/io/fits/card.py --- b/astropy/io/fits/card.py @@ -8,7 +8,7 @@ import numpy as np from astropy.utils.exceptions import AstropyUserWarning from . import conf +from .util import _is_int, _str_to_num, _words...
diff --git a/astropy/io/fits/scripts/fitsheader.py b/astropy/io/fits/scripts/fitsheader.py index 1d6f9c7691..f4f8b9c381 100644 --- a/astropy/io/fits/scripts/fitsheader.py +++ b/astropy/io/fits/scripts/fitsheader.py @@ -232,7 +232,7 @@ class HeaderFormatter: return cards def close(self): - self._h...
diff --git a/astropy/io/fits/tests/test_tilde_path.py b/astropy/io/fits/tests/test_tilde_path.py deleted file mode 100644 index f5bfd0f7da..0000000000 --- a/astropy/io/fits/tests/test_tilde_path.py +++ /dev/null @@ -1,174 +0,0 @@ -# Licensed under a 3-clause BSD style license - see PYFITS.rst - -import os - -import num...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S26", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S27", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S28", "shared_functions": 0, "shared_lines": 0 } ] }
3
matplotlib__matplotlib.86a476d2.test_backend_registry.872ba384.lv1
{ "spec_id": "S38", "text": "This function only loads entry points if they have not already been loaded and the backend is not built-in and not of ``module://some.backend`` format.", "category": "behavioral", "code_mapping": [ { "file": "lib/matplotlib/backends/registry.py", "lines": "398-405", ...
diff --git a/lib/matplotlib/backends/registry.py b/lib/matplotlib/backends/registry.py index 7f5a53f917..55e4d8fbdf 100644 --- a/lib/matplotlib/backends/registry.py +++ b/lib/matplotlib/backends/registry.py @@ -110,94 +110,94 @@ class BackendRegistry: # Clear all dynamically-added data, used for testing only. ...
diff --git a/lib/matplotlib/backends/registry.py b/lib/matplotlib/backends/registry.py index 7f5a53f917..55e4d8fbdf 100644 +++ a/lib/matplotlib/backends/registry.py --- b/lib/matplotlib/backends/registry.py @@ -110,94 +110,94 @@ class BackendRegistry: # Clear all dynamically-added data, used for testing only. ...
diff --git a/lib/matplotlib/backends/registry.py b/lib/matplotlib/backends/registry.py index 7f5a53f917..70a6fb08a0 100644 --- a/lib/matplotlib/backends/registry.py +++ b/lib/matplotlib/backends/registry.py @@ -394,6 +394,7 @@ class BackendRegistry: framework : str or None The GUI framework, which...
diff --git a/lib/matplotlib/tests/test_backend_registry.py b/lib/matplotlib/tests/test_backend_registry.py deleted file mode 100644 index 2bd8e161bd..0000000000 --- a/lib/matplotlib/tests/test_backend_registry.py +++ /dev/null @@ -1,169 +0,0 @@ -from collections.abc import Sequence -from typing import Any - -import pyt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S37", "shared_functions": 1, "shared_lines": 8 }, { "spec_id": "S40", "shared_functions": 1, "shared_lines": 8 }, { "spec_id": "S42", "shared_functions": 1, "shared_lines": 8 }, { "spec_id"...
3
matplotlib__matplotlib.86a476d2.test_backend_registry.872ba384.lv1
{ "spec_id": "S40", "text": "Returns: backend : str - The backend name corresponding to the resolved GUI framework or backend. For GUI framework inputs, returns the preferred backend for that framework. For backend name inputs, returns the same backend name (potentially normalized). framework : str or None - The GU...
diff --git a/lib/matplotlib/backends/registry.py b/lib/matplotlib/backends/registry.py index 7f5a53f917..55e4d8fbdf 100644 --- a/lib/matplotlib/backends/registry.py +++ b/lib/matplotlib/backends/registry.py @@ -110,94 +110,94 @@ class BackendRegistry: # Clear all dynamically-added data, used for testing only. ...
diff --git a/lib/matplotlib/backends/registry.py b/lib/matplotlib/backends/registry.py index 7f5a53f917..55e4d8fbdf 100644 +++ a/lib/matplotlib/backends/registry.py --- b/lib/matplotlib/backends/registry.py @@ -110,94 +110,94 @@ class BackendRegistry: # Clear all dynamically-added data, used for testing only. ...
diff --git a/lib/matplotlib/backends/registry.py b/lib/matplotlib/backends/registry.py index 7f5a53f917..b9308b72f9 100644 --- a/lib/matplotlib/backends/registry.py +++ b/lib/matplotlib/backends/registry.py @@ -400,6 +400,9 @@ class BackendRegistry: # First check if it is a gui loop name. backend = se...
diff --git a/lib/matplotlib/tests/test_backend_registry.py b/lib/matplotlib/tests/test_backend_registry.py deleted file mode 100644 index 2bd8e161bd..0000000000 --- a/lib/matplotlib/tests/test_backend_registry.py +++ /dev/null @@ -1,169 +0,0 @@ -from collections.abc import Sequence -from typing import Any - -import pyt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S37", "shared_functions": 1, "shared_lines": 9 }, { "spec_id": "S42", "shared_functions": 1, "shared_lines": 9 }, { "spec_id": "S38", "shared_functions": 1, "shared_lines": 8 }, { "spec_id"...
3
matplotlib__matplotlib.86a476d2.test_backend_registry.872ba384.lv1
{ "spec_id": "S41", "text": "Raises RuntimeError: If the input string is not recognized as either a valid GUI framework name or a valid backend name. The error message will indicate that the string is not a recognized GUI loop or backend name.", "category": "behavioral", "code_mapping": [ { "file": "l...
diff --git a/lib/matplotlib/backends/registry.py b/lib/matplotlib/backends/registry.py index 7f5a53f917..55e4d8fbdf 100644 --- a/lib/matplotlib/backends/registry.py +++ b/lib/matplotlib/backends/registry.py @@ -110,94 +110,94 @@ class BackendRegistry: # Clear all dynamically-added data, used for testing only. ...
diff --git a/lib/matplotlib/backends/registry.py b/lib/matplotlib/backends/registry.py index 7f5a53f917..55e4d8fbdf 100644 +++ a/lib/matplotlib/backends/registry.py --- b/lib/matplotlib/backends/registry.py @@ -110,94 +110,94 @@ class BackendRegistry: # Clear all dynamically-added data, used for testing only. ...
diff --git a/lib/matplotlib/backends/registry.py b/lib/matplotlib/backends/registry.py index 7f5a53f917..738dd928f0 100644 --- a/lib/matplotlib/backends/registry.py +++ b/lib/matplotlib/backends/registry.py @@ -406,6 +406,8 @@ class BackendRegistry: try: return self.resolve_backend(gui_or_backend)...
diff --git a/lib/matplotlib/tests/test_backend_registry.py b/lib/matplotlib/tests/test_backend_registry.py deleted file mode 100644 index 2bd8e161bd..0000000000 --- a/lib/matplotlib/tests/test_backend_registry.py +++ /dev/null @@ -1,169 +0,0 @@ -from collections.abc import Sequence -from typing import Any - -import pyt...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S37", "shared_functions": 1, "shared_lines": 4 }, { "spec_id": "S38", "shared_functions": 1, "shared_lines": 4 }, { "spec_id": "S40", "shared_functions": 1, "shared_lines": 4 } ] }
3
mlflow__mlflow.93dab383.test_client_webhooks.75e39b52.lv1
{ "spec_id": "S1", "text": "Create a new webhook. This method creates a webhook that will be triggered when specified MLflow events occur. Webhooks allow you to receive HTTP notifications when events like model version creation, transition, or deletion happen in your MLflow deployment. Signature: create_webhook(sel...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/tracking/client.py b/mlflow/tracking/client.py index 8a34c23cd..203c145da 100644 --- a/mlflow/tracking/client.py +++ b/mlflow/tracking/client.py @@ -6337,6 +6337,9 @@ class MlflowClient: if status is not None: status = WebhookStatus(status) if isinstance(status, str) else statu...
diff --git a/tests/tracking/test_client_webhooks.py b/tests/tracking/test_client_webhooks.py deleted file mode 100644 index 97fd61b00..000000000 --- a/tests/tracking/test_client_webhooks.py +++ /dev/null @@ -1,219 +0,0 @@ -from pathlib import Path -from typing import Iterator - -import pytest -from cryptography.fernet ...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S3", "shared_functions": 2, "shared_lines": 28 }, { "spec_id": "S4", "shared_functions": 2, "shared_lines": 5 }, { "spec_id": "S2", "shared_functions": 1, "shared_lines": 2 }, { "spec_id": ...
3
mlflow__mlflow.93dab383.test_client_webhooks.75e39b52.lv1
{ "spec_id": "S4", "text": "Raises: MlflowException: If webhook creation fails due to invalid parameters, network issues, or server-side errors. Common causes include invalid URL format, unsupported event types, or insufficient permissions. Task statement: Implement robust error handling for webhook delivery failur...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/tracking/client.py b/mlflow/tracking/client.py index 8a34c23cd..20dc8f033 100644 --- a/mlflow/tracking/client.py +++ b/mlflow/tracking/client.py @@ -6337,14 +6337,17 @@ class MlflowClient: if status is not None: status = WebhookStatus(status) if isinstance(status, str) else sta...
diff --git a/tests/tracking/test_client_webhooks.py b/tests/tracking/test_client_webhooks.py deleted file mode 100644 index 97fd61b00..000000000 --- a/tests/tracking/test_client_webhooks.py +++ /dev/null @@ -1,219 +0,0 @@ -from pathlib import Path -from typing import Iterator - -import pytest -from cryptography.fernet ...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 2, "shared_lines": 5 }, { "spec_id": "S3", "shared_functions": 2, "shared_lines": 1 }, { "spec_id": "S2", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_client_webhooks.75e39b52.lv1
{ "spec_id": "S6", "text": "Raises: mlflow.MlflowException: If the webhook with the specified ID does not exist or if there are permission issues accessing the webhook.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/tracking/client.py", "lines": "6366", "function": "Mlflow...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/tracking/_model_registry/client.py b/mlflow/tracking/_model_registry/client.py index e1ef46902..a7e2ebea0 100644 --- a/mlflow/tracking/_model_registry/client.py +++ b/mlflow/tracking/_model_registry/client.py @@ -833,6 +833,8 @@ class ModelRegistryClient: Returns: A :py:class:`...
diff --git a/tests/tracking/test_client_webhooks.py b/tests/tracking/test_client_webhooks.py deleted file mode 100644 index 97fd61b00..000000000 --- a/tests/tracking/test_client_webhooks.py +++ /dev/null @@ -1,219 +0,0 @@ -from pathlib import Path -from typing import Iterator - -import pytest -from cryptography.fernet ...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S5", "shared_functions": 2, "shared_lines": 2 }, { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_client_webhooks.75e39b52.lv1
{ "spec_id": "S7", "text": "List webhooks. Signature: list_webhooks(self, max_results: int | None = None, page_token: str | None = None) -> PagedList[Webhook]. Args: max_results: Maximum number of webhooks to return. page_token: Token specifying the next page of results. Returns: A :py:class:`mlflow.store.entities....
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/tracking/_model_registry/client.py b/mlflow/tracking/_model_registry/client.py index e1ef46902..dbb13d2e5 100644 --- a/mlflow/tracking/_model_registry/client.py +++ b/mlflow/tracking/_model_registry/client.py @@ -851,6 +851,9 @@ class ModelRegistryClient: Returns: A :py:class:`...
diff --git a/tests/tracking/test_client_webhooks.py b/tests/tracking/test_client_webhooks.py deleted file mode 100644 index 97fd61b00..000000000 --- a/tests/tracking/test_client_webhooks.py +++ /dev/null @@ -1,219 +0,0 @@ -from pathlib import Path -from typing import Iterator - -import pytest -from cryptography.fernet ...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S11", "shared_functions": 0, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_client_webhooks.75e39b52.lv1
{ "spec_id": "S9", "text": "Only the fields you specify will be updated; other fields will remain unchanged. name: If None, the current name is preserved. description: If None, the current description is preserved. url: If None, the current URL is preserved. events: If None, the current events are preserved. secret...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/tracking/client.py b/mlflow/tracking/client.py index 8a34c23cd..cbb34f47f 100644 --- a/mlflow/tracking/client.py +++ b/mlflow/tracking/client.py @@ -6409,6 +6409,8 @@ class MlflowClient: if status is not None: status = WebhookStatus(status) if isinstance(status, str) else sta...
diff --git a/tests/tracking/test_client_webhooks.py b/tests/tracking/test_client_webhooks.py deleted file mode 100644 index 97fd61b00..000000000 --- a/tests/tracking/test_client_webhooks.py +++ /dev/null @@ -1,219 +0,0 @@ -from pathlib import Path -from typing import Iterator - -import pytest -from cryptography.fernet ...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S8", "shared_functions": 2, "shared_lines": 9 }, { "spec_id": "S12", "shared_functions": 2, "shared_lines": 7 }, { "spec_id": "S11", "shared_functions": 1, "shared_lines": 2 } ] }
3
mlflow__mlflow.93dab383.test_client_webhooks.75e39b52.lv1
{ "spec_id": "S12", "text": "Raises: mlflow.MlflowException: If the webhook with the specified ID does not exist, if the provided parameters are invalid, or if there are permission issues accessing the webhook.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/tracking/client.py", ...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/tracking/client.py b/mlflow/tracking/client.py index 8a34c23cd..e8ca4a509 100644 --- a/mlflow/tracking/client.py +++ b/mlflow/tracking/client.py @@ -6405,7 +6405,15 @@ class MlflowClient: A :py:class:`mlflow.entities.webhook.Webhook` object representing the updated webhook. """...
diff --git a/tests/tracking/test_client_webhooks.py b/tests/tracking/test_client_webhooks.py deleted file mode 100644 index 97fd61b00..000000000 --- a/tests/tracking/test_client_webhooks.py +++ /dev/null @@ -1,219 +0,0 @@ -from pathlib import Path -from typing import Iterator - -import pytest -from cryptography.fernet ...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S8", "shared_functions": 2, "shared_lines": 7 }, { "spec_id": "S9", "shared_functions": 2, "shared_lines": 7 }, { "spec_id": "S10", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_client_webhooks.75e39b52.lv1
{ "spec_id": "S13", "text": "Delete a webhook. This method removes a webhook from the MLflow Model Registry. Once deleted, the webhook will no longer receive notifications for the events it was configured to monitor. Signature: delete_webhook(self, webhook_id: str) -> None. Args: webhook_id: The unique identifier o...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/tracking/client.py b/mlflow/tracking/client.py index 8a34c23cd..a8b3833e7 100644 --- a/mlflow/tracking/client.py +++ b/mlflow/tracking/client.py @@ -6432,6 +6432,7 @@ class MlflowClient: None """ self._get_registry_client().delete_webhook(webhook_id) + return we...
diff --git a/tests/tracking/test_client_webhooks.py b/tests/tracking/test_client_webhooks.py deleted file mode 100644 index 97fd61b00..000000000 --- a/tests/tracking/test_client_webhooks.py +++ /dev/null @@ -1,219 +0,0 @@ -from pathlib import Path -from typing import Iterator - -import pytest -from cryptography.fernet ...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S14", "shared_functions": 2, "shared_lines": 2 }, { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_client_webhooks.75e39b52.lv1
{ "spec_id": "S14", "text": "Raises: MlflowException: If the webhook with the specified ID does not exist, if there are permission issues, or if the deletion operation fails for any other reason.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/tracking/client.py", "lines": "6437"...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..bd1483000 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,12 +12,12 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_util...
diff --git a/mlflow/tracking/_model_registry/client.py b/mlflow/tracking/_model_registry/client.py index e1ef46902..def9d64e8 100644 --- a/mlflow/tracking/_model_registry/client.py +++ b/mlflow/tracking/_model_registry/client.py @@ -892,6 +892,9 @@ class ModelRegistryClient: Returns: None ...
diff --git a/tests/tracking/test_client_webhooks.py b/tests/tracking/test_client_webhooks.py deleted file mode 100644 index 97fd61b00..000000000 --- a/tests/tracking/test_client_webhooks.py +++ /dev/null @@ -1,219 +0,0 @@ -from pathlib import Path -from typing import Iterator - -import pytest -from cryptography.fernet ...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S13", "shared_functions": 2, "shared_lines": 2 }, { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_databricks.cbc54e8c.lv1
{ "spec_id": "S22", "text": "MlflowException: If the request fails due to timeout, invalid URL, or other exceptions. Also raised if max_retries or backoff_factor exceed their configured limits, or if OAuth authentication is attempted without enabling Databricks SDK.", "category": "behavioral", "code_mapping": [...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 --- a/mlflow/deployments/__init__.py +++ b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 +++ a/mlflow/deployments/__init__.py --- b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/utils/rest_utils.py b/mlflow/utils/rest_utils.py index 368143ad8..d376be9eb 100644 --- a/mlflow/utils/rest_utils.py +++ b/mlflow/utils/rest_utils.py @@ -248,11 +248,7 @@ def http_request( **kwargs, ) except requests.exceptions.Timeout as to: - raise MlflowException(...
diff --git a/tests/deployments/databricks/test_databricks.py b/tests/deployments/databricks/test_databricks.py deleted file mode 100644 index db1f15091..000000000 --- a/tests/deployments/databricks/test_databricks.py +++ /dev/null @@ -1,605 +0,0 @@ -import os -import warnings -from unittest import mock - -import pytest...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S26", "shared_functions": 1, "shared_lines": 12 }, { "spec_id": "S8", "shared_functions": 1, "shared_lines": 12 }, { "spec_id": "S30", "shared_functions": 1, "shared_lines": 5 } ] }
3
mlflow__mlflow.93dab383.test_databricks.cbc54e8c.lv1
{ "spec_id": "S23", "text": "InvalidUrlException: If the constructed URL is invalid.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/utils/rest_utils.py", "lines": "254-255", "function": "http_request" } ] }
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 --- a/mlflow/deployments/__init__.py +++ b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 +++ a/mlflow/deployments/__init__.py --- b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/utils/rest_utils.py b/mlflow/utils/rest_utils.py index 368143ad8..0109d1c44 100644 --- a/mlflow/utils/rest_utils.py +++ b/mlflow/utils/rest_utils.py @@ -254,7 +254,7 @@ def http_request( f"{MLFLOW_HTTP_REQUEST_TIMEOUT!s} to a larger value." ) from to except requests.except...
diff --git a/tests/deployments/databricks/test_databricks.py b/tests/deployments/databricks/test_databricks.py deleted file mode 100644 index db1f15091..000000000 --- a/tests/deployments/databricks/test_databricks.py +++ /dev/null @@ -1,605 +0,0 @@ -import os -import warnings -from unittest import mock - -import pytest...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S26", "shared_functions": 1, "shared_lines": 2 }, { "spec_id": "S8", "shared_functions": 1, "shared_lines": 2 }, { "spec_id": "S10", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_databricks.cbc54e8c.lv1
{ "spec_id": "S26", "text": "Authentication is handled automatically based on the credentials provided in host_creds (username/password, token, client certificates, AWS SigV4, etc.).", "category": "behavioral", "code_mapping": [ { "file": "mlflow/utils/rest_utils.py", "lines": "239-268", "...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 --- a/mlflow/deployments/__init__.py +++ b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 +++ a/mlflow/deployments/__init__.py --- b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/utils/rest_utils.py b/mlflow/utils/rest_utils.py index 368143ad8..516930bee 100644 --- a/mlflow/utils/rest_utils.py +++ b/mlflow/utils/rest_utils.py @@ -207,8 +207,6 @@ def http_request( if host_creds.username and host_creds.password: basic_auth_str = f"{host_creds.username}:{host_cred...
diff --git a/tests/deployments/databricks/test_databricks.py b/tests/deployments/databricks/test_databricks.py deleted file mode 100644 index db1f15091..000000000 --- a/tests/deployments/databricks/test_databricks.py +++ /dev/null @@ -1,605 +0,0 @@ -import os -import warnings -from unittest import mock - -import pytest...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S8", "shared_functions": 1, "shared_lines": 24 }, { "spec_id": "S22", "shared_functions": 1, "shared_lines": 12 }, { "spec_id": "S30", "shared_functions": 1, "shared_lines": 5 }, { "spec_id...
3
mlflow__mlflow.93dab383.test_databricks.cbc54e8c.lv1
{ "spec_id": "S31", "text": "Validate that total retry timeout is not less than single request timeout. This function performs a validation check to ensure that the total retry timeout duration is not configured to be shorter than the timeout for a single HTTP request. When the total retry timeout is less than the ...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 --- a/mlflow/deployments/__init__.py +++ b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 +++ a/mlflow/deployments/__init__.py --- b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/utils/rest_utils.py b/mlflow/utils/rest_utils.py index 368143ad8..d270b8bec 100644 --- a/mlflow/utils/rest_utils.py +++ b/mlflow/utils/rest_utils.py @@ -393,7 +393,7 @@ def validate_deployment_timeout_config(timeout: int | None, retry_timeout_second retry_timeout_seconds: Maximum time for a...
diff --git a/tests/deployments/databricks/test_databricks.py b/tests/deployments/databricks/test_databricks.py deleted file mode 100644 index db1f15091..000000000 --- a/tests/deployments/databricks/test_databricks.py +++ /dev/null @@ -1,605 +0,0 @@ -import os -import warnings -from unittest import mock - -import pytest...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S36", "shared_functions": 1, "shared_lines": 9 }, { "spec_id": "S38", "shared_functions": 1, "shared_lines": 8 }, { "spec_id": "S35", "shared_functions": 1, "shared_lines": 2 }, { "spec_id"...
3
mlflow__mlflow.93dab383.test_databricks.cbc54e8c.lv1
{ "spec_id": "S32", "text": "timeout (int | None): Maximum time in seconds to wait for a single HTTP request to complete. If None, no single request timeout validation is performed.", "category": "structural", "code_mapping": [ { "file": "mlflow/utils/rest_utils.py", "lines": "387", "funct...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 --- a/mlflow/deployments/__init__.py +++ b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 +++ a/mlflow/deployments/__init__.py --- b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/utils/rest_utils.py b/mlflow/utils/rest_utils.py index 368143ad8..e066e8dc8 100644 --- a/mlflow/utils/rest_utils.py +++ b/mlflow/utils/rest_utils.py @@ -392,7 +392,14 @@ def validate_deployment_timeout_config(timeout: int | None, retry_timeout_second timeout: Maximum time for a single HTTP ...
diff --git a/tests/deployments/databricks/test_databricks.py b/tests/deployments/databricks/test_databricks.py deleted file mode 100644 index db1f15091..000000000 --- a/tests/deployments/databricks/test_databricks.py +++ /dev/null @@ -1,605 +0,0 @@ -import os -import warnings -from unittest import mock - -import pytest...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S31", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S33", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S34", "shared_functions": 1, "shared_lines": 0 }, { "spec_id"...
3
mlflow__mlflow.93dab383.test_databricks.cbc54e8c.lv1
{ "spec_id": "S33", "text": "retry_timeout_seconds (int | None): Maximum time in seconds to spend on all retry attempts combined. If None, no retry timeout validation is performed.", "category": "structural", "code_mapping": [ { "file": "mlflow/utils/rest_utils.py", "lines": "387", "functi...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 --- a/mlflow/deployments/__init__.py +++ b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 +++ a/mlflow/deployments/__init__.py --- b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/utils/rest_utils.py b/mlflow/utils/rest_utils.py index 368143ad8..d8ae255b0 100644 --- a/mlflow/utils/rest_utils.py +++ b/mlflow/utils/rest_utils.py @@ -392,8 +392,8 @@ def validate_deployment_timeout_config(timeout: int | None, retry_timeout_second timeout: Maximum time for a single HTTP r...
diff --git a/tests/deployments/databricks/test_databricks.py b/tests/deployments/databricks/test_databricks.py deleted file mode 100644 index db1f15091..000000000 --- a/tests/deployments/databricks/test_databricks.py +++ /dev/null @@ -1,605 +0,0 @@ -import os -import warnings -from unittest import mock - -import pytest...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S31", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S32", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S34", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_databricks.cbc54e8c.lv1
{ "spec_id": "S34", "text": "None: This function does not return any value. It only performs validation and may issue warnings.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/utils/rest_utils.py", "lines": "407", "function": "validate_deployment_timeout_config" } ] }
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 --- a/mlflow/deployments/__init__.py +++ b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 +++ a/mlflow/deployments/__init__.py --- b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/utils/rest_utils.py b/mlflow/utils/rest_utils.py index 368143ad8..8e70ecb9e 100644 --- a/mlflow/utils/rest_utils.py +++ b/mlflow/utils/rest_utils.py @@ -403,6 +403,7 @@ def validate_deployment_timeout_config(timeout: int | None, retry_timeout_second f"Recommended: Set MLFLOW_DEPLOYM...
diff --git a/tests/deployments/databricks/test_databricks.py b/tests/deployments/databricks/test_databricks.py deleted file mode 100644 index db1f15091..000000000 --- a/tests/deployments/databricks/test_databricks.py +++ /dev/null @@ -1,605 +0,0 @@ -import os -import warnings -from unittest import mock - -import pytest...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S31", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S32", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S33", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_databricks.cbc54e8c.lv1
{ "spec_id": "S37", "text": "The function uses stacklevel=2 in the warning to point to the caller's location rather than this validation function", "category": "implementation_constraint", "code_mapping": [ { "file": "mlflow/utils/rest_utils.py", "lines": "405", "function": "validate_deplo...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 --- a/mlflow/deployments/__init__.py +++ b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 +++ a/mlflow/deployments/__init__.py --- b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/utils/rest_utils.py b/mlflow/utils/rest_utils.py index 368143ad8..1cf0dbb1b 100644 --- a/mlflow/utils/rest_utils.py +++ b/mlflow/utils/rest_utils.py @@ -401,7 +401,7 @@ def validate_deployment_timeout_config(timeout: int | None, retry_timeout_second "premature failures. For long-run...
diff --git a/tests/deployments/databricks/test_databricks.py b/tests/deployments/databricks/test_databricks.py deleted file mode 100644 index db1f15091..000000000 --- a/tests/deployments/databricks/test_databricks.py +++ /dev/null @@ -1,605 +0,0 @@ -import os -import warnings -from unittest import mock - -import pytest...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S31", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S36", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S38", "shared_functions": 1, "shared_lines": 1 } ] }
3
mlflow__mlflow.93dab383.test_databricks.cbc54e8c.lv1
{ "spec_id": "S38", "text": "The warning suggests setting MLFLOW_DEPLOYMENT_PREDICT_TOTAL_TIMEOUT to at least the value of MLFLOW_DEPLOYMENT_PREDICT_TIMEOUT", "category": "behavioral", "code_mapping": [ { "file": "mlflow/utils/rest_utils.py", "lines": "399-406", "function": "validate_deplo...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 --- a/mlflow/deployments/__init__.py +++ b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 +++ a/mlflow/deployments/__init__.py --- b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/utils/rest_utils.py b/mlflow/utils/rest_utils.py index 368143ad8..b630377d1 100644 --- a/mlflow/utils/rest_utils.py +++ b/mlflow/utils/rest_utils.py @@ -400,7 +400,7 @@ def validate_deployment_timeout_config(timeout: int | None, retry_timeout_second "total retry timeout could expire...
diff --git a/tests/deployments/databricks/test_databricks.py b/tests/deployments/databricks/test_databricks.py deleted file mode 100644 index db1f15091..000000000 --- a/tests/deployments/databricks/test_databricks.py +++ /dev/null @@ -1,605 +0,0 @@ -import os -import warnings -from unittest import mock - -import pytest...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S31", "shared_functions": 1, "shared_lines": 8 }, { "spec_id": "S36", "shared_functions": 1, "shared_lines": 8 }, { "spec_id": "S37", "shared_functions": 1, "shared_lines": 1 } ] }
3
mlflow__mlflow.93dab383.test_databricks.cbc54e8c.lv1
{ "spec_id": "S48", "text": "get_workspace_client creates and caches WorkspaceClient instances with specified configuration including retry and timeout settings", "category": "behavioral", "code_mapping": [ { "file": "mlflow/utils/rest_utils.py", "lines": "265-289", "function": "get_worksp...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 --- a/mlflow/deployments/__init__.py +++ b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/deployments/__init__.py b/mlflow/deployments/__init__.py index 9d3545850..33d590fdc 100644 +++ a/mlflow/deployments/__init__.py --- b/mlflow/deployments/__init__.py @@ -19,7 +19,7 @@ import json from mlflow.deployments.base import BaseDeploymentClient from mlflow.deployments.databricks import Da...
diff --git a/mlflow/utils/rest_utils.py b/mlflow/utils/rest_utils.py index 368143ad8..64d50e488 100644 --- a/mlflow/utils/rest_utils.py +++ b/mlflow/utils/rest_utils.py @@ -259,7 +259,6 @@ def http_request( raise MlflowException(f"API request to {url} failed with exception {e}") -@lru_cache(maxsize=5) def...
diff --git a/tests/deployments/databricks/test_databricks.py b/tests/deployments/databricks/test_databricks.py deleted file mode 100644 index db1f15091..000000000 --- a/tests/deployments/databricks/test_databricks.py +++ /dev/null @@ -1,605 +0,0 @@ -import os -import warnings -from unittest import mock - -import pytest...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S26", "shared_functions": 0, "shared_lines": 4 }, { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S11", "shared_functions": 0, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S1", "text": "Extract score and justification from LLM judge model response text. This function attempts to parse a score (integer) and justification (string) from the response text of an LLM judge model. It supports both JSON format and plain text format with specific patterns. Returns: tuple[int | N...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..b82de8dcc 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -88,7 +88,7 @@ def _extract_score_and_justification(text): if (match := re.search(r"score: (\d+...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S4", "shared_functions": 1, "shared_lines": 27 }, { "spec_id": "S3", "shared_functions": 1, "shared_lines": 9 }, { "spec_id": "S6", "shared_functions": 1, "shared_lines": 7 }, { "spec_id": ...
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S5", "text": "The function first normalizes the text by converting \"score\" and \"justification\" keywords to lowercase using case-insensitive regex replacement", "category": "implementation_constraint", "code_mapping": [ { "file": "mlflow/metrics/genai/genai_metric.py", "lines": ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..771dea1bd 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -76,7 +76,7 @@ def _format_args_string(grading_context_columns: list[str] | None, eval_values, # Function t...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 1, "shared_lines": 3 }, { "spec_id": "S4", "shared_functions": 1, "shared_lines": 3 }, { "spec_id": "S2", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S6", "text": "If the extracted score is not a number or justification is not a string, returns None for score and an error message for justification. If extraction fails, returns an error message containing the raw output.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/m...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..d2b277890 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -95,6 +95,8 @@ def _extract_score_and_justification(text): justification = f"Failed to extr...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 1, "shared_lines": 7 }, { "spec_id": "S4", "shared_functions": 1, "shared_lines": 7 }, { "spec_id": "S2", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S7", "text": "def _format_args_string(grading_context_columns: list[str] | None, eval_values, indx) -> str: Format grading context columns into a structured string for LLM evaluation prompts. This function extracts values from specified grading context columns and formats them into a human-readable st...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..23b88abe3 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -67,7 +67,10 @@ def _format_args_string(grading_context_columns: list[str] | None, eval_values, els...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S8", "shared_functions": 1, "shared_lines": 11 }, { "spec_id": "S10", "shared_functions": 1, "shared_lines": 6 }, { "spec_id": "S9", "shared_functions": 1, "shared_lines": 4 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S8", "text": "Returns an empty string if grading_context_columns is None or empty. Empty or None grading_context_columns will result in an empty string return", "category": "behavioral", "code_mapping": [ { "file": "mlflow/metrics/genai/genai_metric.py", "lines": "64-74", "fu...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..c96cb7d2e 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -63,7 +63,7 @@ def _format_args_string(grading_context_columns: list[str] | None, eval_values, return...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S7", "shared_functions": 1, "shared_lines": 11 }, { "spec_id": "S10", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S9", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S9", "text": "Raises: MlflowException: If any column specified in grading_context_columns does not exist in the eval_values dictionary. The exception message will indicate which column is missing and list all available columns.", "category": "behavioral", "code_mapping": [ { "file": "mlf...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..5097476bb 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -56,7 +56,7 @@ def _format_args_string(grading_context_columns: list[str] | None, eval_values, ...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S7", "shared_functions": 1, "shared_lines": 4 }, { "spec_id": "S10", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S8", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S11", "text": "def make_genai_metric(name: str, definition: str, grading_prompt: str, examples: list[EvaluationExample] | None = None, version: str | None = _get_latest_metric_version(), model: str | None = _get_default_model(), grading_context_columns: str | list[str] | None = None, include_input: bo...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..eb1606e76 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -371,7 +371,7 @@ def make_genai_metric( include_input: bool = True, parameters: dict[str, Any] | N...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S13", "shared_functions": 1, "shared_lines": 29 }, { "spec_id": "S15", "shared_functions": 1, "shared_lines": 21 }, { "spec_id": "S14", "shared_functions": 1, "shared_lines": 16 }, { "spec_...
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S12", "text": "The full grading prompt is stored in the metric_details field of the ``EvaluationMetric`` object. metric_details: (Optional) A description of the metric and how it is calculated.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/metrics/genai/genai_metric.py"...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..4885a4619 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -665,12 +665,16 @@ def make_genai_metric( # extra params in grading_context_columns can only be passed ...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S11", "shared_functions": 1, "shared_lines": 10 }, { "spec_id": "S19", "shared_functions": 1, "shared_lines": 6 }, { "spec_id": "S31", "shared_functions": 1, "shared_lines": 1 }, { "spec_id...
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S13", "text": "Provide example-based few-shot learning for evaluation consistency. Also raised when grading context columns are malformed or when required columns are missing from example grading context.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/metrics/genai/genai...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..b2310a624 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -514,9 +514,12 @@ def make_genai_metric( elif isinstance(example.grading_context, dict): ...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S11", "shared_functions": 1, "shared_lines": 29 }, { "spec_id": "S18", "shared_functions": 1, "shared_lines": 4 }, { "spec_id": "S12", "shared_functions": 1, "shared_lines": 0 }, { "spec_id...
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S14", "text": "Raises: MlflowException: If the specified version is not supported or if there are issues with the evaluation model construction.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/metrics/genai/genai_metric.py", "lines": "530-545", "function": "ma...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..07c6f18ee 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -539,7 +539,9 @@ def make_genai_metric( if examples is not None: examples = [process_example(e...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S11", "shared_functions": 1, "shared_lines": 16 }, { "spec_id": "S12", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S13", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S15", "text": "Backward compatibility for metric serialization/deserialization across different MLflow versions. The metric configuration is serialized and stored as an artifact to enable later deserialization and result interpretation. genai_metric_args: (Optional) A dictionary containing arguments s...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..8a776aab8 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -496,7 +496,7 @@ def make_genai_metric( "aggregations": aggregations, "greater_is_better":...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S11", "shared_functions": 1, "shared_lines": 21 }, { "spec_id": "S12", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S13", "shared_functions": 1, "shared_lines": 0 }, { "spec_id...
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S17", "text": "aggregations: (Optional) The list of options to aggregate the scores. Currently supported options are: min, max, mean, median, variance, p90. Aggregate evaluation results across multiple data points. Generate structured evaluation outputs with per-row scores, justifications, and aggrega...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..35a504924 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -177,7 +177,7 @@ def _get_aggregate_results(scores, aggregations): "min": np.min, ...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S18", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S21", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S22", "shared_functions": 1, "shared_lines": 0 }, { "spec_id"...
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S19", "text": "parameters: (Optional) Parameters for the LLM used to compute the metric. By default, we set the temperature to 0.0, max_tokens to 200, and top_p to 1.0. We recommend setting the temperature to 0.0 for the LLM used as a judge to ensure consistent results.", "category": "behavioral", ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/prompts/v1.py b/mlflow/metrics/genai/prompts/v1.py index 1c86e9814..7f88b16b4 100644 --- a/mlflow/metrics/genai/prompts/v1.py +++ b/mlflow/metrics/genai/prompts/v1.py @@ -125,7 +125,7 @@ class EvaluationModel: grading_prompt=self.grading_prompt, exampl...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S11", "shared_functions": 1, "shared_lines": 7 }, { "spec_id": "S12", "shared_functions": 1, "shared_lines": 6 }, { "spec_id": "S13", "shared_functions": 1, "shared_lines": 0 }, { "spec_id"...
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S20", "text": "def make_genai_metric_from_prompt(name: str, judge_prompt: str | None = None, model: str | None = _get_default_model(), parameters: dict[str, Any] | None = None, aggregations: list[str] | None = None, greater_is_better: bool = True, max_workers: int = 10, metric_metadata: dict[str, Any]...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..41254bba9 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -288,7 +288,15 @@ def make_genai_metric_from_prompt( """ import numpy as np - prompt_template...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S23", "shared_functions": 1, "shared_lines": 2 }, { "spec_id": "S15", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S21", "text": "include_input: (Optional) Whether to include the input when computing the metric.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/metrics/genai/genai_metric.py", "lines": "515-525", "function": "make_genai_metric.process_example" }, { ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..b36efd754 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -526,7 +526,7 @@ def make_genai_metric( f" Required grading context columns: {grading_conte...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S26", "shared_functions": 1, "shared_lines": 3 }, { "spec_id": "S17", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S18", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S23", "text": "The prompt may use f-string formatting to include variables. Corresponding variables must be passed as keyword arguments into the resulting metric's eval function. Variables in the judge prompt using f-string formatting must be provided as arguments to the metric's eval function. Raises...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..dc52343cb 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -324,7 +324,7 @@ def make_genai_metric_from_prompt( kwargs["predictions"] = arg ...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S20", "shared_functions": 1, "shared_lines": 2 }, { "spec_id": "S15", "shared_functions": 1, "shared_lines": 0 }, { "spec_id": "S32", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S29", "text": "def __str__(self): Return a string representation of the EvaluationMetric instance. Returns: str: A formatted string representation of the EvaluationMetric instance in the format \"EvaluationMetric(name=<name>, greater_is_better=<boolean>, ...)\" where additional attributes like long_na...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/models/evaluation/base.py b/mlflow/models/evaluation/base.py index 75990089f..41c160b66 100644 --- a/mlflow/models/evaluation/base.py +++ b/mlflow/models/evaluation/base.py @@ -148,8 +148,7 @@ class EvaluationMetric: if self.long_name: parts.append(f"long_name={self.long_name...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S30", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S31", "shared_functions": 0, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S30", "text": "Dynamically generate a GenAIEvaluationMetric class that can be used to evaluate the metric on the given input data. The generated class is callable with a __call__ method that takes the arguments specified in the signature of the eval_fn function. Args: eval_fn: the evaluation function ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/models/evaluation/base.py b/mlflow/models/evaluation/base.py index 75990089f..984160a9c 100644 --- a/mlflow/models/evaluation/base.py +++ b/mlflow/models/evaluation/base.py @@ -275,7 +275,11 @@ def _generate_eval_metric_class(eval_fn, require_strict_signature=False): ) -> MetricValue: ...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S31", "shared_functions": 1, "shared_lines": 77 }, { "spec_id": "S10", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S29", "shared_functions": 0, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S32", "text": "extra_headers: (Optional) Additional headers to be passed to the judge model.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/metrics/genai/genai_metric.py", "lines": "620-626", "function": "make_genai_metric.eval_fn" }, { "file": ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..d577e0e11 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -333,7 +333,7 @@ def make_genai_metric_from_prompt( grading_payloads = pd.DataFrame(kwargs).to_dict...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S33", "shared_functions": 2, "shared_lines": 10 }, { "spec_id": "S22", "shared_functions": 1, "shared_lines": 7 }, { "spec_id": "S17", "shared_functions": 1, "shared_lines": 0 }, { "spec_id...
3
mlflow__mlflow.93dab383.test_genai_metrics.5f107830.lv1
{ "spec_id": "S33", "text": "proxy_url: (Optional) Proxy URL to be used for the judge model. This is useful when the judge model is served via a proxy endpoint, not directly via LLM provider services. If not specified, the default URL for the LLM provider will be used (e.g., https://api.openai.com/v1/chat/completio...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 --- a/mlflow/metrics/__init__.py +++ b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) -from mlflow.models import ( - ...
diff --git a/mlflow/metrics/__init__.py b/mlflow/metrics/__init__.py index de8928c86..56c409983 100644 +++ a/mlflow/metrics/__init__.py --- b/mlflow/metrics/__init__.py @@ -26,10 +26,10 @@ from mlflow.metrics.metric_definitions import ( _rougeLsum_eval_fn, _toxicity_eval_fn, ) +from mlflow.models import ( + ...
diff --git a/mlflow/metrics/genai/genai_metric.py b/mlflow/metrics/genai/genai_metric.py index e72e1cb5e..8a6e56321 100644 --- a/mlflow/metrics/genai/genai_metric.py +++ b/mlflow/metrics/genai/genai_metric.py @@ -333,7 +333,7 @@ def make_genai_metric_from_prompt( grading_payloads = pd.DataFrame(kwargs).to_dict...
diff --git a/tests/metrics/genai/test_genai_metrics.py b/tests/metrics/genai/test_genai_metrics.py deleted file mode 100644 index 5770256f1..000000000 --- a/tests/metrics/genai/test_genai_metrics.py +++ /dev/null @@ -1,1387 +0,0 @@ -import inspect -import re -from unittest import mock - -import numpy as np -import pand...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S32", "shared_functions": 2, "shared_lines": 10 }, { "spec_id": "S22", "shared_functions": 1, "shared_lines": 7 }, { "spec_id": "S17", "shared_functions": 1, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_presigned_url_artifact_repo.8d57288e.lv1
{ "spec_id": "S17", "text": "Returns:\n str: A JSON string representation of the Protocol Buffer message with proper formatting (indented with 2 spaces).", "category": "behavioral", "code_mapping": [ { "file": "mlflow/utils/proto_json_utils.py", "lines": "127", "function": "message_to_j...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..e0f99f4b4 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,7 +12,7 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_utils ...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..e0f99f4b4 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,7 +12,7 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_utils ...
diff --git a/mlflow/utils/proto_json_utils.py b/mlflow/utils/proto_json_utils.py index 65fb652a7..8dc288245 100644 --- a/mlflow/utils/proto_json_utils.py +++ b/mlflow/utils/proto_json_utils.py @@ -126,7 +126,7 @@ def message_to_json(message): json_dict_with_int64_as_numbers = _merge_json_dicts( json_dict_...
diff --git a/tests/store/artifact/test_presigned_url_artifact_repo.py b/tests/store/artifact/test_presigned_url_artifact_repo.py deleted file mode 100644 index 5d5de9527..000000000 --- a/tests/store/artifact/test_presigned_url_artifact_repo.py +++ /dev/null @@ -1,363 +0,0 @@ -import json -import os -import random -impo...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S16", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S18", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S19", "shared_functions": 1, "shared_lines": 1 } ] }
3
mlflow__mlflow.93dab383.test_presigned_url_artifact_repo.8d57288e.lv1
{ "spec_id": "S19", "text": "Uses Google's MessageToJson API internally but applies additional processing to handle int64 fields correctly.\n\nBy default, Google's MessageToJson converts int64 proto fields to JSON strings for compatibility reasons, but this function converts them back to numbers", "category": "im...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..e0f99f4b4 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,7 +12,7 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_utils ...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..e0f99f4b4 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,7 +12,7 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_utils ...
diff --git a/mlflow/utils/proto_json_utils.py b/mlflow/utils/proto_json_utils.py index 65fb652a7..e94358bdc 100644 --- a/mlflow/utils/proto_json_utils.py +++ b/mlflow/utils/proto_json_utils.py @@ -114,8 +114,9 @@ def message_to_json(message): # Google's MessageToJson API converts int64 proto fields to JSON strin...
diff --git a/tests/store/artifact/test_presigned_url_artifact_repo.py b/tests/store/artifact/test_presigned_url_artifact_repo.py deleted file mode 100644 index 5d5de9527..000000000 --- a/tests/store/artifact/test_presigned_url_artifact_repo.py +++ /dev/null @@ -1,363 +0,0 @@ -import json -import os -import random -impo...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S16", "shared_functions": 1, "shared_lines": 15 }, { "spec_id": "S30", "shared_functions": 1, "shared_lines": 15 }, { "spec_id": "S18", "shared_functions": 1, "shared_lines": 8 }, { "spec_i...
3
mlflow__mlflow.93dab383.test_presigned_url_artifact_repo.8d57288e.lv1
{ "spec_id": "S21", "text": "Attempt to execute a function with credential retry logic for handling expired credentials.\n\nThis function implements a retry mechanism for operations that may fail due to credential expiration. It first attempts to execute the provided function with either the original credentials (i...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..e0f99f4b4 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,7 +12,7 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_utils ...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..e0f99f4b4 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,7 +12,7 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_utils ...
diff --git a/mlflow/store/artifact/artifact_repo.py b/mlflow/store/artifact/artifact_repo.py index bc9f51a24..dd8f4e6a6 100644 --- a/mlflow/store/artifact/artifact_repo.py +++ b/mlflow/store/artifact/artifact_repo.py @@ -58,7 +58,7 @@ def _retry_with_new_creds(try_func, creds_func, orig_creds=None): provided by cr...
diff --git a/tests/store/artifact/test_presigned_url_artifact_repo.py b/tests/store/artifact/test_presigned_url_artifact_repo.py deleted file mode 100644 index 5d5de9527..000000000 --- a/tests/store/artifact/test_presigned_url_artifact_repo.py +++ /dev/null @@ -1,363 +0,0 @@ -import json -import os -import random -impo...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S23", "shared_functions": 1, "shared_lines": 6 }, { "spec_id": "S24", "shared_functions": 1, "shared_lines": 6 }, { "spec_id": "S22", "shared_functions": 1, "shared_lines": 2 }, { "spec_id"...
3
mlflow__mlflow.93dab383.test_presigned_url_artifact_repo.8d57288e.lv1
{ "spec_id": "S22", "text": "Returns:\n The return value of try_func when it executes successfully.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/store/artifact/artifact_repo.py", "lines": "62", "function": "_retry_with_new_creds" }, { "file": "mlflow/sto...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..e0f99f4b4 100644 --- a/mlflow/data/delta_dataset_source.py +++ b/mlflow/data/delta_dataset_source.py @@ -12,7 +12,7 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_utils ...
diff --git a/mlflow/data/delta_dataset_source.py b/mlflow/data/delta_dataset_source.py index a125e5400..e0f99f4b4 100644 +++ a/mlflow/data/delta_dataset_source.py --- b/mlflow/data/delta_dataset_source.py @@ -12,7 +12,7 @@ from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.utils._spark_utils ...
diff --git a/mlflow/store/artifact/artifact_repo.py b/mlflow/store/artifact/artifact_repo.py index bc9f51a24..54d16725a 100644 --- a/mlflow/store/artifact/artifact_repo.py +++ b/mlflow/store/artifact/artifact_repo.py @@ -59,14 +59,16 @@ def _retry_with_new_creds(try_func, creds_func, orig_creds=None): """ try...
diff --git a/tests/store/artifact/test_presigned_url_artifact_repo.py b/tests/store/artifact/test_presigned_url_artifact_repo.py deleted file mode 100644 index 5d5de9527..000000000 --- a/tests/store/artifact/test_presigned_url_artifact_repo.py +++ /dev/null @@ -1,363 +0,0 @@ -import json -import os -import random -impo...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S21", "shared_functions": 1, "shared_lines": 2 }, { "spec_id": "S23", "shared_functions": 1, "shared_lines": 1 }, { "spec_id": "S24", "shared_functions": 1, "shared_lines": 1 } ] }
3
mlflow__mlflow.93dab383.test_trace_manager.bb95fbcd.lv1
{ "spec_id": "S2", "text": "This method is thread-safe and can be called concurrently from multiple threads. Uses double-checked locking pattern with RLock to minimize synchronization overhead. This method implements the singleton pattern with double-checked locking. _instance_lock = threading.RLock()", "category...
diff --git a/mlflow/entities/span.py b/mlflow/entities/span.py index 90d90ab25..4b2aceada 100644 --- a/mlflow/entities/span.py +++ b/mlflow/entities/span.py @@ -117,10 +117,10 @@ class Span: """The trace ID of the span, a unique identifier for the trace it belongs to.""" return self.get_attribute(Span...
diff --git a/mlflow/entities/span.py b/mlflow/entities/span.py index 90d90ab25..4b2aceada 100644 +++ a/mlflow/entities/span.py --- b/mlflow/entities/span.py @@ -117,10 +117,10 @@ class Span: """The trace ID of the span, a unique identifier for the trace it belongs to.""" return self.get_attribute(Span...
diff --git a/mlflow/tracing/trace_manager.py b/mlflow/tracing/trace_manager.py index 9c9caa149..f75ea28d8 100644 --- a/mlflow/tracing/trace_manager.py +++ b/mlflow/tracing/trace_manager.py @@ -59,10 +59,9 @@ class InMemoryTraceManager: @classmethod def get_instance(cls): - if cls._instance is None: -...
diff --git a/tests/tracing/test_trace_manager.py b/tests/tracing/test_trace_manager.py deleted file mode 100644 index b5dfcd276..000000000 --- a/tests/tracing/test_trace_manager.py +++ /dev/null @@ -1,294 +0,0 @@ -import json -import time -from threading import Thread - -from mlflow.entities import LiveSpan, Span -from...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 1, "shared_lines": 7 }, { "spec_id": "S17", "shared_functions": 0, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_trace_manager.bb95fbcd.lv1
{ "spec_id": "S17", "text": "If the trace_id does not exist in the internal traces cache, this will raise a KeyError.", "category": "behavioral", "code_mapping": [ { "file": "mlflow/tracing/trace_manager.py", "lines": "115-125", "function": "InMemoryTraceManager.register_prompt" } ] ...
diff --git a/mlflow/entities/span.py b/mlflow/entities/span.py index 90d90ab25..4b2aceada 100644 --- a/mlflow/entities/span.py +++ b/mlflow/entities/span.py @@ -117,10 +117,10 @@ class Span: """The trace ID of the span, a unique identifier for the trace it belongs to.""" return self.get_attribute(Span...
diff --git a/mlflow/entities/span.py b/mlflow/entities/span.py index 90d90ab25..4b2aceada 100644 +++ a/mlflow/entities/span.py --- b/mlflow/entities/span.py @@ -117,10 +117,10 @@ class Span: """The trace ID of the span, a unique identifier for the trace it belongs to.""" return self.get_attribute(Span...
diff --git a/mlflow/tracing/trace_manager.py b/mlflow/tracing/trace_manager.py index 9c9caa149..d7dfa0f3e 100644 --- a/mlflow/tracing/trace_manager.py +++ b/mlflow/tracing/trace_manager.py @@ -111,6 +111,9 @@ class InMemoryTraceManager: prompt: The prompt version to be registered. """ wit...
diff --git a/tests/tracing/test_trace_manager.py b/tests/tracing/test_trace_manager.py deleted file mode 100644 index b5dfcd276..000000000 --- a/tests/tracing/test_trace_manager.py +++ /dev/null @@ -1,294 +0,0 @@ -import json -import time -from threading import Thread - -from mlflow.entities import LiveSpan, Span -from...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S1", "shared_functions": 0, "shared_lines": 0 }, { "spec_id": "S2", "shared_functions": 0, "shared_lines": 0 } ] }
3
mlflow__mlflow.93dab383.test_trace_manager.bb95fbcd.lv1
{ "spec_id": "S20", "text": "When updating the tag, if a current tag value exists, it must be parsed as JSON and validated to be a list type. Invalid JSON or non-list types should raise an MlflowException with a descriptive error message.", "category": "behavioral", "code_mapping": [ { "file": "mlflow...
diff --git a/mlflow/entities/span.py b/mlflow/entities/span.py index 90d90ab25..4b2aceada 100644 --- a/mlflow/entities/span.py +++ b/mlflow/entities/span.py @@ -117,10 +117,10 @@ class Span: """The trace ID of the span, a unique identifier for the trace it belongs to.""" return self.get_attribute(Span...
diff --git a/mlflow/entities/span.py b/mlflow/entities/span.py index 90d90ab25..4b2aceada 100644 +++ a/mlflow/entities/span.py --- b/mlflow/entities/span.py @@ -117,10 +117,10 @@ class Span: """The trace ID of the span, a unique identifier for the trace it belongs to.""" return self.get_attribute(Span...
diff --git a/mlflow/tracing/utils/prompt.py b/mlflow/tracing/utils/prompt.py index 8a9847515..3b33fddbd 100644 --- a/mlflow/tracing/utils/prompt.py +++ b/mlflow/tracing/utils/prompt.py @@ -23,10 +23,6 @@ def update_linked_prompts_tag(current_tag_value: str | None, prompt_versions: li if current_tag_value is not No...
diff --git a/tests/tracing/test_trace_manager.py b/tests/tracing/test_trace_manager.py deleted file mode 100644 index b5dfcd276..000000000 --- a/tests/tracing/test_trace_manager.py +++ /dev/null @@ -1,294 +0,0 @@ -import json -import time -from threading import Thread - -from mlflow.entities import LiveSpan, Span -from...
{ "case_contract": "Every case is a dict with exactly two keys:\n\n- `args`: a tuple or list of positional arguments for the target callable.\n- `kwargs`: a dict mapping string keys to keyword argument values for the target\n callable.\n\n`check_case(case)` must invoke the target using\n`target(*case[\"args\"], **ca...
{ "preservation_probes": [ { "spec_id": "S21", "shared_functions": 1, "shared_lines": 0 } ] }