idx int64 2 7.85k | idx_lca int64 0 223 | offset int64 165 54.4k | repo stringclasses 54
values | commit_hash stringclasses 100
values | target_file stringclasses 118
values | line_type_lca stringclasses 6
values | ground_truth stringlengths 1 40 | in_completions bool 1
class | completion_type stringclasses 6
values | non_dunder_count_intellij int64 1 127 | non_dunder_count_jedi int64 1 128 | start_with_ bool 1
class | first_occurrence bool 2
classes | intellij_completions listlengths 1 149 | jedi_completions listlengths 3 148 | prefix stringlengths 165 54.4k | intellij_completions_filtered listlengths 1 123 | prefix_truncated stringlengths 165 1.92k | __index_level_0__ int64 1 5.53k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | 0 | 1,333 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | MergedProjectProfile | true | class | 14 | 19 | false | true | [
"FuzzerProfile",
"List",
"MergedProjectProfile",
"logger",
"None",
"add_func_to_reached_and_clone",
"FunctionProfile",
"load_all_profiles",
"read_fuzzer_data_file_to_profile",
"Any",
"Dict",
"Optional",
"Set",
"Tuple"
] | [
{
"name": "add_func_to_reached_and_clone",
"type": "function"
},
{
"name": "Any",
"type": "class"
},
{
"name": "copy",
"type": "module"
},
{
"name": "Dict",
"type": "class"
},
{
"name": "FunctionProfile",
"type": "class"
},
{
"name": "fuzz_cfg_load",
... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"FuzzerProfile",
"List",
"MergedProjectProfile",
"logger",
"None",
"add_func_to_reached_and_clone",
"FunctionProfile",
"load_all_profiles",
"read_fuzzer_data_file_to_profile",
"Any",
"Dict",
"Optional",
"Set",
"Tuple"
] | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 1 |
3 | 0 | 1,409 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | FuzzerProfile | true | class | 14 | 19 | false | true | [
"FuzzerProfile",
"MergedProjectProfile",
"List",
"logger",
"None",
"add_func_to_reached_and_clone",
"FunctionProfile",
"load_all_profiles",
"read_fuzzer_data_file_to_profile",
"Any",
"Dict",
"Optional",
"Set",
"Tuple"
] | [
{
"name": "add_func_to_reached_and_clone",
"type": "function"
},
{
"name": "Any",
"type": "class"
},
{
"name": "copy",
"type": "module"
},
{
"name": "Dict",
"type": "class"
},
{
"name": "FunctionProfile",
"type": "class"
},
{
"name": "fuzz_cfg_load",
... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"FuzzerProfile",
"MergedProjectProfile",
"List",
"logger",
"None",
"add_func_to_reached_and_clone",
"FunctionProfile",
"load_all_profiles",
"read_fuzzer_data_file_to_profile",
"Any",
"Dict",
"Optional",
"Set",
"Tuple"
] | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 2 |
5 | 0 | 2,009 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | extract_all_callsites | true | function | 8 | 9 | false | true | [
"extract_all_callsites",
"CalltreeCallsite",
"List",
"logger",
"Optional",
"data_file_read_calltree",
"extract_all_callsites_recursive",
"print_ctcs_tree"
] | [
{
"name": "CalltreeCallsite",
"type": "class"
},
{
"name": "data_file_read_calltree",
"type": "function"
},
{
"name": "extract_all_callsites",
"type": "function"
},
{
"name": "extract_all_callsites_recursive",
"type": "function"
},
{
"name": "List",
"type": "c... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"extract_all_callsites",
"CalltreeCallsite",
"List",
"logger",
"Optional",
"data_file_read_calltree",
"extract_all_callsites_recursive",
"print_ctcs_tree"
] | 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASI... | 4 |
7 | 0 | 2,166 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | demangle_cpp_func | true | function | 13 | 18 | false | true | [
"List",
"logger",
"Optional",
"demangle_cpp_func",
"scan_executables_for_fuzz_introspector_logs",
"data_file_read_yaml",
"get_all_files_in_tree_with_regex",
"get_target_coverage_url",
"longest_common_prefix",
"normalise_str",
"safe_decode",
"Any",
"Dict"
] | [
{
"name": "Any",
"type": "class"
},
{
"name": "cxxfilt",
"type": "module"
},
{
"name": "data_file_read_yaml",
"type": "function"
},
{
"name": "demangle_cpp_func",
"type": "function"
},
{
"name": "Dict",
"type": "class"
},
{
"name": "get_all_files_in_tr... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"List",
"logger",
"Optional",
"demangle_cpp_func",
"scan_executables_for_fuzz_introspector_logs",
"data_file_read_yaml",
"get_all_files_in_tree_with_regex",
"get_target_coverage_url",
"longest_common_prefix",
"normalise_str",
"safe_decode",
"Any",
"Dict"
] | .org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitat... | 5 |
8 | 0 | 2,189 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | dst_function_name | true | statement | 17 | 17 | false | true | [
"depth",
"cov_ct_idx",
"cov_forward_reds",
"cov_largest_blocked_func",
"cov_link",
"children",
"cov_callsite_link",
"cov_color",
"cov_hitcount",
"cov_parent",
"dst_function_name",
"dst_function_source_file",
"hitcount",
"parent_calltree_callsite",
"src_function_name",
"src_function_sou... | [
{
"name": "children",
"type": "statement"
},
{
"name": "cov_callsite_link",
"type": "statement"
},
{
"name": "cov_color",
"type": "statement"
},
{
"name": "cov_ct_idx",
"type": "statement"
},
{
"name": "cov_forward_reds",
"type": "statement"
},
{
"name... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"depth",
"cov_ct_idx",
"cov_forward_reds",
"cov_largest_blocked_func",
"cov_link",
"children",
"cov_callsite_link",
"cov_color",
"cov_hitcount",
"cov_parent",
"dst_function_name",
"dst_function_source_file",
"hitcount",
"parent_calltree_callsite",
"src_function_name",
"src_function_sou... | .0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.... | 6 |
10 | 0 | 2,668 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | random | cov_callsite_link | true | statement | 17 | 17 | false | true | [
"cov_link",
"depth",
"cov_color",
"cov_ct_idx",
"cov_callsite_link",
"children",
"cov_forward_reds",
"cov_hitcount",
"cov_largest_blocked_func",
"cov_parent",
"dst_function_name",
"dst_function_source_file",
"hitcount",
"parent_calltree_callsite",
"src_function_name",
"src_function_sou... | [
{
"name": "children",
"type": "statement"
},
{
"name": "cov_callsite_link",
"type": "statement"
},
{
"name": "cov_color",
"type": "statement"
},
{
"name": "cov_ct_idx",
"type": "statement"
},
{
"name": "cov_forward_reds",
"type": "statement"
},
{
"name... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"cov_link",
"depth",
"cov_color",
"cov_ct_idx",
"cov_callsite_link",
"children",
"cov_forward_reds",
"cov_hitcount",
"cov_largest_blocked_func",
"cov_parent",
"dst_function_name",
"dst_function_source_file",
"hitcount",
"parent_calltree_callsite",
"src_function_name",
"src_function_sou... | z_analysis
import fuzz_data_loader
import fuzz_utils
import fuzz_cfg_load
import fuzz_html_helpers
# For pretty printing the html code:
from bs4 import BeautifulSoup as bs
logger = logging.getLogger(name=__name__)
class FuzzCalltreeAnalysis(fuzz_analysis.AnalysisInterface):
def __init__(self):
self.name... | 8 |
12 | 0 | 2,749 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | infile | create_str_node_ctx_idx | true | function | 7 | 7 | false | true | [
"create_str_node_ctx_idx",
"get_fuzz_blockers",
"name",
"create_fuzz_blocker_table",
"html_create_dedicated_calltree_file",
"__init__",
"analysis_func",
"create_calltree",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
... | [
{
"name": "analysis_func",
"type": "function"
},
{
"name": "create_calltree",
"type": "function"
},
{
"name": "create_fuzz_blocker_table",
"type": "function"
},
{
"name": "create_str_node_ctx_idx",
"type": "function"
},
{
"name": "get_fuzz_blockers",
"type": "... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"create_str_node_ctx_idx",
"get_fuzz_blockers",
"name",
"create_fuzz_blocker_table",
"html_create_dedicated_calltree_file",
"analysis_func",
"create_calltree"
] | fuzz_html_helpers
# For pretty printing the html code:
from bs4 import BeautifulSoup as bs
logger = logging.getLogger(name=__name__)
class FuzzCalltreeAnalysis(fuzz_analysis.AnalysisInterface):
def __init__(self):
self.name = "FuzzCalltreeAnalysis"
logger.info("Creating FuzzCalltreeAnalysis")
... | 10 |
13 | 0 | 2,782 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | infile | cov_ct_idx | true | statement | 17 | 17 | false | true | [
"cov_ct_idx",
"depth",
"dst_function_name",
"cov_forward_reds",
"cov_link",
"children",
"cov_callsite_link",
"cov_color",
"cov_hitcount",
"cov_largest_blocked_func",
"cov_parent",
"dst_function_source_file",
"hitcount",
"parent_calltree_callsite",
"src_function_name",
"src_function_sou... | [
{
"name": "children",
"type": "statement"
},
{
"name": "cov_callsite_link",
"type": "statement"
},
{
"name": "cov_color",
"type": "statement"
},
{
"name": "cov_ct_idx",
"type": "statement"
},
{
"name": "cov_forward_reds",
"type": "statement"
},
{
"name... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"cov_ct_idx",
"depth",
"dst_function_name",
"cov_forward_reds",
"cov_link",
"children",
"cov_callsite_link",
"cov_color",
"cov_hitcount",
"cov_largest_blocked_func",
"cov_parent",
"dst_function_source_file",
"hitcount",
"parent_calltree_callsite",
"src_function_name",
"src_function_sou... | rinting the html code:
from bs4 import BeautifulSoup as bs
logger = logging.getLogger(name=__name__)
class FuzzCalltreeAnalysis(fuzz_analysis.AnalysisInterface):
def __init__(self):
self.name = "FuzzCalltreeAnalysis"
logger.info("Creating FuzzCalltreeAnalysis")
def analysis_func(self,
... | 11 |
28 | 0 | 5,388 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | FuzzerProfile | true | class | 14 | 19 | false | false | [
"FuzzerProfile",
"MergedProjectProfile",
"None",
"List",
"logger",
"add_func_to_reached_and_clone",
"FunctionProfile",
"load_all_profiles",
"read_fuzzer_data_file_to_profile",
"Any",
"Dict",
"Optional",
"Set",
"Tuple"
] | [
{
"name": "add_func_to_reached_and_clone",
"type": "function"
},
{
"name": "Any",
"type": "class"
},
{
"name": "copy",
"type": "module"
},
{
"name": "Dict",
"type": "class"
},
{
"name": "FunctionProfile",
"type": "class"
},
{
"name": "fuzz_cfg_load",
... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"FuzzerProfile",
"MergedProjectProfile",
"None",
"List",
"logger",
"add_func_to_reached_and_clone",
"FunctionProfile",
"load_all_profiles",
"read_fuzzer_data_file_to_profile",
"Any",
"Dict",
"Optional",
"Set",
"Tuple"
] | " * (int(depth_diff) + 1)
calltree_html_string += closing_divs
calltree_html_string += f"""
<div class="{color_to_be}-background coverage-line">
<span class="coverage-line-inner" data-calltree-idx="{ct_idx_str}">
{node.depth}
<code class="language-cli... | 19 |
29 | 0 | 5,761 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | html_get_header | true | function | 9 | 9 | false | true | [
"html_create_table_head",
"html_table_add_row",
"html_get_header",
"html_get_navbar",
"List",
"html_add_header_with_link",
"html_get_table_of_contents",
"Any",
"Tuple"
] | [
{
"name": "Any",
"type": "class"
},
{
"name": "html_add_header_with_link",
"type": "function"
},
{
"name": "html_create_table_head",
"type": "function"
},
{
"name": "html_get_header",
"type": "function"
},
{
"name": "html_get_navbar",
"type": "function"
},
... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"html_create_table_head",
"html_table_add_row",
"html_get_header",
"html_get_navbar",
"List",
"html_add_header_with_link",
"html_get_table_of_contents",
"Any",
"Tuple"
] | ode>
<span class="coverage-line-filename">
{func_href}
<a href="{callsite_link}">
[call site2]
</a>
<span class="calltree-idx">[calltree idx: {ct_idx_str}]</span>
</span>
</span>
"""
i... | 20 |
32 | 0 | 6,201 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | infile | create_fuzz_blocker_table | true | function | 7 | 7 | false | true | [
"get_fuzz_blockers",
"name",
"create_fuzz_blocker_table",
"create_str_node_ctx_idx",
"html_create_dedicated_calltree_file",
"__init__",
"analysis_func",
"create_calltree",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
... | [
{
"name": "analysis_func",
"type": "function"
},
{
"name": "create_calltree",
"type": "function"
},
{
"name": "create_fuzz_blocker_table",
"type": "function"
},
{
"name": "create_str_node_ctx_idx",
"type": "function"
},
{
"name": "get_fuzz_blockers",
"type": "... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"get_fuzz_blockers",
"name",
"create_fuzz_blocker_table",
"create_str_node_ctx_idx",
"html_create_dedicated_calltree_file",
"analysis_func",
"create_calltree"
] | calltree_html_string += f"""<div
class="calltree-line-wrapper open level-{int(node.depth)}"
style="padding-left: 16px">"""
elif next_node.depth < node.depth:
depth_diff = int(node.depth - next_node.depth)
calltree_html_string += "</div... | 22 |
33 | 0 | 6,814 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | infile | create_str_node_ctx_idx | true | function | 7 | 7 | false | false | [
"get_fuzz_blockers",
"name",
"create_fuzz_blocker_table",
"create_str_node_ctx_idx",
"create_calltree",
"__init__",
"analysis_func",
"html_create_dedicated_calltree_file",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
... | [
{
"name": "analysis_func",
"type": "function"
},
{
"name": "create_calltree",
"type": "function"
},
{
"name": "create_fuzz_blocker_table",
"type": "function"
},
{
"name": "create_str_node_ctx_idx",
"type": "function"
},
{
"name": "get_fuzz_blockers",
"type": "... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"get_fuzz_blockers",
"name",
"create_fuzz_blocker_table",
"create_str_node_ctx_idx",
"create_calltree",
"analysis_func",
"html_create_dedicated_calltree_file"
] | while os.path.isfile(calltree_html_file):
calltree_file_idx += 1
calltree_html_file = f"calltree_view_{calltree_file_idx}.html"
self.html_create_dedicated_calltree_file(
calltree_html_string,
calltree_html_file,
profile,
)
return cal... | 23 |
34 | 0 | 6,847 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | infile | cov_ct_idx | true | statement | 17 | 17 | false | false | [
"cov_ct_idx",
"depth",
"cov_forward_reds",
"dst_function_name",
"dst_function_source_file",
"children",
"cov_callsite_link",
"cov_color",
"cov_hitcount",
"cov_largest_blocked_func",
"cov_link",
"cov_parent",
"hitcount",
"parent_calltree_callsite",
"src_function_name",
"src_function_sou... | [
{
"name": "children",
"type": "statement"
},
{
"name": "cov_callsite_link",
"type": "statement"
},
{
"name": "cov_color",
"type": "statement"
},
{
"name": "cov_ct_idx",
"type": "statement"
},
{
"name": "cov_forward_reds",
"type": "statement"
},
{
"name... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"cov_ct_idx",
"depth",
"cov_forward_reds",
"dst_function_name",
"dst_function_source_file",
"children",
"cov_callsite_link",
"cov_color",
"cov_hitcount",
"cov_largest_blocked_func",
"cov_link",
"cov_parent",
"hitcount",
"parent_calltree_callsite",
"src_function_name",
"src_function_sou... | tml_file):
calltree_file_idx += 1
calltree_html_file = f"calltree_view_{calltree_file_idx}.html"
self.html_create_dedicated_calltree_file(
calltree_html_string,
calltree_html_file,
profile,
)
return calltree_html_file
def html_cre... | 24 |
35 | 0 | 7,754 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | FuzzerProfile | true | class | 14 | 19 | false | false | [
"FuzzerProfile",
"MergedProjectProfile",
"List",
"None",
"logger",
"add_func_to_reached_and_clone",
"FunctionProfile",
"load_all_profiles",
"read_fuzzer_data_file_to_profile",
"Any",
"Dict",
"Optional",
"Set",
"Tuple"
] | [
{
"name": "add_func_to_reached_and_clone",
"type": "function"
},
{
"name": "Any",
"type": "class"
},
{
"name": "copy",
"type": "module"
},
{
"name": "Dict",
"type": "class"
},
{
"name": "FunctionProfile",
"type": "class"
},
{
"name": "fuzz_cfg_load",
... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"FuzzerProfile",
"MergedProjectProfile",
"List",
"None",
"logger",
"add_func_to_reached_and_clone",
"FunctionProfile",
"load_all_profiles",
"read_fuzzer_data_file_to_profile",
"Any",
"Dict",
"Optional",
"Set",
"Tuple"
] | ospector: { profile.get_key() }"
)
html_header += '<div class="content-section calltree-content-section">'
complete_html_string += html_header
# Display fuzz blocker at top of page
fuzz_blockers = self.get_fuzz_blockers(
profile,
max_blockers_to_extract=1... | 25 |
36 | 0 | 7,895 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | CalltreeCallsite | true | class | 9 | 9 | false | true | [
"extract_all_callsites",
"List",
"None",
"logger",
"Optional",
"CalltreeCallsite",
"data_file_read_calltree",
"extract_all_callsites_recursive",
"print_ctcs_tree"
] | [
{
"name": "CalltreeCallsite",
"type": "class"
},
{
"name": "data_file_read_calltree",
"type": "function"
},
{
"name": "extract_all_callsites",
"type": "function"
},
{
"name": "extract_all_callsites_recursive",
"type": "function"
},
{
"name": "List",
"type": "c... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"extract_all_callsites",
"List",
"None",
"logger",
"Optional",
"CalltreeCallsite",
"data_file_read_calltree",
"extract_all_callsites_recursive",
"print_ctcs_tree"
] | tml_string += html_header
# Display fuzz blocker at top of page
fuzz_blockers = self.get_fuzz_blockers(
profile,
max_blockers_to_extract=12
)
fuzz_blocker_table = self.create_fuzz_blocker_table(profile, [], "", fuzz_blockers)
if fuzz_blocker_table is not... | 26 |
37 | 0 | 8,028 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | extract_all_callsites | true | function | 8 | 9 | false | false | [
"extract_all_callsites",
"CalltreeCallsite",
"List",
"logger",
"extract_all_callsites_recursive",
"data_file_read_calltree",
"print_ctcs_tree",
"Optional"
] | [
{
"name": "CalltreeCallsite",
"type": "class"
},
{
"name": "data_file_read_calltree",
"type": "function"
},
{
"name": "extract_all_callsites",
"type": "function"
},
{
"name": "extract_all_callsites_recursive",
"type": "function"
},
{
"name": "List",
"type": "c... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"extract_all_callsites",
"CalltreeCallsite",
"List",
"logger",
"extract_all_callsites_recursive",
"data_file_read_calltree",
"print_ctcs_tree",
"Optional"
] | profile,
max_blockers_to_extract=12
)
fuzz_blocker_table = self.create_fuzz_blocker_table(profile, [], "", fuzz_blockers)
if fuzz_blocker_table is not None:
complete_html_string += "<div class=\"report-box\">"
complete_html_string += "<h1>Fuzz blockers</h1>"
... | 27 |
41 | 0 | 9,121 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | infile | get_fuzz_blockers | true | function | 7 | 7 | false | false | [
"get_fuzz_blockers",
"create_fuzz_blocker_table",
"name",
"create_str_node_ctx_idx",
"html_create_dedicated_calltree_file",
"__init__",
"analysis_func",
"create_calltree",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
... | [
{
"name": "analysis_func",
"type": "function"
},
{
"name": "create_calltree",
"type": "function"
},
{
"name": "create_fuzz_blocker_table",
"type": "function"
},
{
"name": "create_str_node_ctx_idx",
"type": "function"
},
{
"name": "get_fuzz_blockers",
"type": "... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"get_fuzz_blockers",
"create_fuzz_blocker_table",
"name",
"create_str_node_ctx_idx",
"html_create_dedicated_calltree_file",
"analysis_func",
"create_calltree"
] | ee.js\"></script>"
complete_html_string += html_end
complete_html_string += "</body></html>"
# Beautify and write HTML
soup = bs(complete_html_string, 'lxml')
pretty_html = soup.prettify()
with open(filename, "w+") as cf:
cf.write(pretty_html)
def creat... | 30 |
42 | 0 | 9,537 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | html_create_table_head | true | function | 9 | 9 | false | true | [
"html_table_add_row",
"html_get_header",
"html_create_table_head",
"html_get_table_of_contents",
"html_get_navbar",
"html_add_header_with_link",
"Any",
"List",
"Tuple"
] | [
{
"name": "Any",
"type": "class"
},
{
"name": "html_add_header_with_link",
"type": "function"
},
{
"name": "html_create_table_head",
"type": "function"
},
{
"name": "html_get_header",
"type": "function"
},
{
"name": "html_get_navbar",
"type": "function"
},
... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"html_table_add_row",
"html_get_header",
"html_create_table_head",
"html_get_table_of_contents",
"html_get_navbar",
"html_add_header_with_link",
"Any",
"List",
"Tuple"
] | idx))
return f"{prefixed_zeros}{cov_ct_idx}"
def get_fuzz_blockers(
self,
profile: fuzz_data_loader.FuzzerProfile,
max_blockers_to_extract=999):
"""Gets a list of fuzz blockers"""
blocker_list: List[fuzz_cfg_load.CalltreeCallsite] = list()
# Extr... | 31 |
45 | 0 | 10,653 | ossf__fuzz-introspector | 4867924b714a7789f94fbcde53713a29ceab7272 | post-processing/analyses/fuzz_calltree_analysis.py | inproject | html_table_add_row | true | function | 9 | 9 | false | true | [
"html_create_table_head",
"html_get_header",
"List",
"html_get_table_of_contents",
"html_table_add_row",
"html_add_header_with_link",
"html_get_navbar",
"Any",
"Tuple"
] | [
{
"name": "Any",
"type": "class"
},
{
"name": "html_add_header_with_link",
"type": "function"
},
{
"name": "html_create_table_head",
"type": "function"
},
{
"name": "html_get_header",
"type": "function"
},
{
"name": "html_get_navbar",
"type": "function"
},
... | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"html_create_table_head",
"html_get_header",
"List",
"html_get_table_of_contents",
"html_table_add_row",
"html_add_header_with_link",
"html_get_navbar",
"Any",
"Tuple"
] | : fuzz_data_loader.FuzzerProfile,
tables: List[str],
calltree_file_name: str,
fuzz_blockers=None) -> Optional[str]:
"""
Creates HTML string for table showing fuzz blockers.
"""
logger.info("Creating fuzz blocker table")
# Get the fuzz blockers... | 34 |
64 | 1 | 4,330 | vanheeringen-lab__seq2science | d5ff9782c8f6c4cd989f74684154c508b7c65127 | docs/scripts/clean_dags.py | infile | type | true | statement | 17 | 16 | false | true | [
"edges",
"nodes",
"label2id",
"name",
"type",
"__init__",
"_get_node_id",
"_order_edges",
"color_node",
"edge_style",
"graph_style",
"hide_node",
"node_style",
"remove_edge",
"remove_node",
"transitive_reduction",
"write",
"for",
"__annotations__",
"__class__",
"__delattr__",... | [
{
"name": "color_node",
"type": "function"
},
{
"name": "edge_style",
"type": "statement"
},
{
"name": "edges",
"type": "statement"
},
{
"name": "graph_style",
"type": "statement"
},
{
"name": "hide_node",
"type": "function"
},
{
"name": "label2id",
... | import re
import networkx as nx
rules_to_keep = {
# "0.13 0.6 0.85", # yellow
# "0.09 0.6 0.85", # brown
# "0.28 0.6 0.85", # green
# "0.04 0.6 0.85", # red
# "0.00 0.6 0.85", # cherry
# "0.63 0.6 0.85", # purple
# "0.59 0.6 0.85", # dark blue
# "0.58 0.6 0.85", # blue
# "0.... | [
"edges",
"nodes",
"label2id",
"name",
"type",
"color_node",
"edge_style",
"graph_style",
"hide_node",
"node_style",
"remove_edge",
"remove_node",
"transitive_reduction",
"write",
"for"
] | 8 0.6 0.85", # green
"deseq2": "0.28 0.6 0.85", # green
"dexseq_count_matrix": "0.28 0.6 0.85", # green
}
class Digraph:
def __init__(self, infile):
with open(infile) as f:
lines = f.readlines()
self.type, self.name = lines[0].split()[0:2]
self.graph_style = lines[1]... | 45 |
65 | 1 | 4,341 | vanheeringen-lab__seq2science | d5ff9782c8f6c4cd989f74684154c508b7c65127 | docs/scripts/clean_dags.py | infile | name | true | statement | 17 | 16 | false | true | [
"name",
"type",
"edges",
"nodes",
"label2id",
"__init__",
"_get_node_id",
"_order_edges",
"color_node",
"edge_style",
"graph_style",
"hide_node",
"node_style",
"remove_edge",
"remove_node",
"transitive_reduction",
"write",
"for",
"__annotations__",
"__class__",
"__delattr__",... | [
{
"name": "color_node",
"type": "function"
},
{
"name": "edge_style",
"type": "statement"
},
{
"name": "edges",
"type": "statement"
},
{
"name": "graph_style",
"type": "statement"
},
{
"name": "hide_node",
"type": "function"
},
{
"name": "label2id",
... | import re
import networkx as nx
rules_to_keep = {
# "0.13 0.6 0.85", # yellow
# "0.09 0.6 0.85", # brown
# "0.28 0.6 0.85", # green
# "0.04 0.6 0.85", # red
# "0.00 0.6 0.85", # cherry
# "0.63 0.6 0.85", # purple
# "0.59 0.6 0.85", # dark blue
# "0.58 0.6 0.85", # blue
# "0.... | [
"name",
"type",
"edges",
"nodes",
"label2id",
"color_node",
"edge_style",
"graph_style",
"hide_node",
"node_style",
"remove_edge",
"remove_node",
"transitive_reduction",
"write",
"for"
] | , # green
"deseq2": "0.28 0.6 0.85", # green
"dexseq_count_matrix": "0.28 0.6 0.85", # green
}
class Digraph:
def __init__(self, infile):
with open(infile) as f:
lines = f.readlines()
self.type, self.name = lines[0].split()[0:2]
self.graph_style = lines[1]
se... | 46 |
66 | 1 | 4,381 | vanheeringen-lab__seq2science | d5ff9782c8f6c4cd989f74684154c508b7c65127 | docs/scripts/clean_dags.py | infile | graph_style | true | statement | 16 | 16 | false | true | [
"edges",
"nodes",
"label2id",
"edge_style",
"node_style",
"__init__",
"_get_node_id",
"_order_edges",
"color_node",
"graph_style",
"hide_node",
"name",
"remove_edge",
"remove_node",
"transitive_reduction",
"type",
"write",
"__annotations__",
"__class__",
"__delattr__",
"__dic... | [
{
"name": "color_node",
"type": "function"
},
{
"name": "edge_style",
"type": "statement"
},
{
"name": "edges",
"type": "statement"
},
{
"name": "graph_style",
"type": "statement"
},
{
"name": "hide_node",
"type": "function"
},
{
"name": "label2id",
... | import re
import networkx as nx
rules_to_keep = {
# "0.13 0.6 0.85", # yellow
# "0.09 0.6 0.85", # brown
# "0.28 0.6 0.85", # green
# "0.04 0.6 0.85", # red
# "0.00 0.6 0.85", # cherry
# "0.63 0.6 0.85", # purple
# "0.59 0.6 0.85", # dark blue
# "0.58 0.6 0.85", # blue
# "0.... | [
"edges",
"nodes",
"label2id",
"edge_style",
"node_style",
"color_node",
"graph_style",
"hide_node",
"name",
"remove_edge",
"remove_node",
"transitive_reduction",
"type",
"write"
] | , # green
"dexseq_count_matrix": "0.28 0.6 0.85", # green
}
class Digraph:
def __init__(self, infile):
with open(infile) as f:
lines = f.readlines()
self.type, self.name = lines[0].split()[0:2]
self.graph_style = lines[1]
self.node_style = lines[2]
self.ed... | 47 |
67 | 1 | 4,419 | vanheeringen-lab__seq2science | d5ff9782c8f6c4cd989f74684154c508b7c65127 | docs/scripts/clean_dags.py | infile | node_style | true | statement | 16 | 16 | false | true | [
"edges",
"nodes",
"label2id",
"edge_style",
"graph_style",
"__init__",
"_get_node_id",
"_order_edges",
"color_node",
"hide_node",
"name",
"node_style",
"remove_edge",
"remove_node",
"transitive_reduction",
"type",
"write",
"__annotations__",
"__class__",
"__delattr__",
"__dic... | [
{
"name": "color_node",
"type": "function"
},
{
"name": "edge_style",
"type": "statement"
},
{
"name": "edges",
"type": "statement"
},
{
"name": "graph_style",
"type": "statement"
},
{
"name": "hide_node",
"type": "function"
},
{
"name": "label2id",
... | import re
import networkx as nx
rules_to_keep = {
# "0.13 0.6 0.85", # yellow
# "0.09 0.6 0.85", # brown
# "0.28 0.6 0.85", # green
# "0.04 0.6 0.85", # red
# "0.00 0.6 0.85", # cherry
# "0.63 0.6 0.85", # purple
# "0.59 0.6 0.85", # dark blue
# "0.58 0.6 0.85", # blue
# "0.... | [
"edges",
"nodes",
"label2id",
"edge_style",
"graph_style",
"color_node",
"hide_node",
"name",
"node_style",
"remove_edge",
"remove_node",
"transitive_reduction",
"type",
"write"
] | "0.28 0.6 0.85", # green
}
class Digraph:
def __init__(self, infile):
with open(infile) as f:
lines = f.readlines()
self.type, self.name = lines[0].split()[0:2]
self.graph_style = lines[1]
self.node_style = lines[2]
self.edge_style = lines[3]
self.node... | 48 |
68 | 1 | 4,456 | vanheeringen-lab__seq2science | d5ff9782c8f6c4cd989f74684154c508b7c65127 | docs/scripts/clean_dags.py | infile | edge_style | true | statement | 16 | 16 | false | true | [
"edges",
"nodes",
"label2id",
"node_style",
"graph_style",
"__init__",
"_get_node_id",
"_order_edges",
"color_node",
"edge_style",
"hide_node",
"name",
"remove_edge",
"remove_node",
"transitive_reduction",
"type",
"write",
"__annotations__",
"__class__",
"__delattr__",
"__dic... | [
{
"name": "color_node",
"type": "function"
},
{
"name": "edge_style",
"type": "statement"
},
{
"name": "edges",
"type": "statement"
},
{
"name": "graph_style",
"type": "statement"
},
{
"name": "hide_node",
"type": "function"
},
{
"name": "label2id",
... | import re
import networkx as nx
rules_to_keep = {
# "0.13 0.6 0.85", # yellow
# "0.09 0.6 0.85", # brown
# "0.28 0.6 0.85", # green
# "0.04 0.6 0.85", # red
# "0.00 0.6 0.85", # cherry
# "0.63 0.6 0.85", # purple
# "0.59 0.6 0.85", # dark blue
# "0.58 0.6 0.85", # blue
# "0.... | [
"edges",
"nodes",
"label2id",
"node_style",
"graph_style",
"color_node",
"edge_style",
"hide_node",
"name",
"remove_edge",
"remove_node",
"transitive_reduction",
"type",
"write"
] | igraph:
def __init__(self, infile):
with open(infile) as f:
lines = f.readlines()
self.type, self.name = lines[0].split()[0:2]
self.graph_style = lines[1]
self.node_style = lines[2]
self.edge_style = lines[3]
self.nodes = dict()
self.edges = set()... | 49 |
72 | 1 | 5,014 | vanheeringen-lab__seq2science | d5ff9782c8f6c4cd989f74684154c508b7c65127 | docs/scripts/clean_dags.py | common | label2id | true | statement | 16 | 16 | false | false | [
"nodes",
"edges",
"node_style",
"name",
"type",
"__init__",
"_get_node_id",
"_order_edges",
"color_node",
"edge_style",
"graph_style",
"hide_node",
"label2id",
"remove_edge",
"remove_node",
"transitive_reduction",
"write",
"__annotations__",
"__class__",
"__delattr__",
"__dic... | [
{
"name": "color_node",
"type": "function"
},
{
"name": "edge_style",
"type": "statement"
},
{
"name": "edges",
"type": "statement"
},
{
"name": "graph_style",
"type": "statement"
},
{
"name": "hide_node",
"type": "function"
},
{
"name": "label2id",
... | import re
import networkx as nx
rules_to_keep = {
# "0.13 0.6 0.85", # yellow
# "0.09 0.6 0.85", # brown
# "0.28 0.6 0.85", # green
# "0.04 0.6 0.85", # red
# "0.00 0.6 0.85", # cherry
# "0.63 0.6 0.85", # purple
# "0.59 0.6 0.85", # dark blue
# "0.58 0.6 0.85", # blue
# "0.... | [
"nodes",
"edges",
"node_style",
"name",
"type",
"color_node",
"edge_style",
"graph_style",
"hide_node",
"label2id",
"remove_edge",
"remove_node",
"transitive_reduction",
"write"
] | ead edges
edge = tuple(line.split(" -> "))
if len(edge) == 2:
self.edges.add(edge)
# read nodes
elif "[" in line[:5]:
node_id = line.split("[")[0]
label = l.search(line).groups()[0]
color = c.search(line).gr... | 53 |
87 | 1 | 6,374 | vanheeringen-lab__seq2science | d5ff9782c8f6c4cd989f74684154c508b7c65127 | docs/scripts/clean_dags.py | infile | remove_node | true | function | 16 | 16 | false | true | [
"edges",
"nodes",
"type",
"label2id",
"node_style",
"__init__",
"_get_node_id",
"_order_edges",
"color_node",
"edge_style",
"graph_style",
"hide_node",
"name",
"remove_edge",
"remove_node",
"transitive_reduction",
"write",
"__annotations__",
"__class__",
"__delattr__",
"__dic... | [
{
"name": "color_node",
"type": "function"
},
{
"name": "edge_style",
"type": "statement"
},
{
"name": "edges",
"type": "statement"
},
{
"name": "graph_style",
"type": "statement"
},
{
"name": "hide_node",
"type": "function"
},
{
"name": "label2id",
... | import re
import networkx as nx
rules_to_keep = {
# "0.13 0.6 0.85", # yellow
# "0.09 0.6 0.85", # brown
# "0.28 0.6 0.85", # green
# "0.04 0.6 0.85", # red
# "0.00 0.6 0.85", # cherry
# "0.63 0.6 0.85", # purple
# "0.59 0.6 0.85", # dark blue
# "0.58 0.6 0.85", # blue
# "0.... | [
"edges",
"nodes",
"type",
"label2id",
"node_style",
"color_node",
"edge_style",
"graph_style",
"hide_node",
"name",
"remove_edge",
"remove_node",
"transitive_reduction",
"write"
] | f.edge_style)
for k, v in self.nodes.items():
l = v["label"]
c = v["color"]
s = v["style"]
line = f' {k}[label = "{l}", color = "{c}", style="{s}"];\n'
f.write(line)
for a, b in self._order_edges():
... | 68 |
99 | 4 | 2,249 | Significant-Gravitas__Auto-GPT | 0569d6652fbffa665de6e42403a48783fbede8ce | autogpt/commands.py | inproject | add | true | function | 12 | 12 | false | true | [
"get",
"cfg",
"get_stats",
"data",
"index",
"add",
"clear",
"dimension",
"filename",
"get_relevant",
"redis",
"vec_num",
"__init__",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init_subcl... | [
{
"name": "add",
"type": "function"
},
{
"name": "cfg",
"type": "statement"
},
{
"name": "clear",
"type": "function"
},
{
"name": "data",
"type": "statement"
},
{
"name": "dimension",
"type": "statement"
},
{
"name": "filename",
"type": "statement"... | from autogpt import browse
import json
from autogpt.memory import get_memory
import datetime
import autogpt.agent_manager as agents
from autogpt import speak
from autogpt.config import Config
import autogpt.ai_functions as ai
from autogpt.file_operations import read_file, write_to_file, append_to_file, delete_file, sea... | [
"get",
"cfg",
"get_stats",
"data",
"index",
"add",
"clear",
"dimension",
"filename",
"get_relevant",
"redis",
"vec_num"
] |
from autogpt.execute_code import execute_python_file, execute_shell
from autogpt.json_parser import fix_and_parse_json
from autogpt.image_gen import generate_image
from duckduckgo_search import ddg
from googleapiclient.discovery import build
from googleapiclient.errors import HttpError
cfg = Config()
def is_valid_i... | 74 |
106 | 4 | 10,947 | Significant-Gravitas__Auto-GPT | 0569d6652fbffa665de6e42403a48783fbede8ce | autogpt/commands.py | random | speak_mode | true | statement | 63 | 63 | false | false | [
"google_api_key",
"speak_mode",
"execute_local_commands",
"fast_llm_model",
"custom_search_engine_id",
"ai_settings_file",
"AZURE_CONFIG_FILE",
"azure_model_to_deployment_id_map",
"browse_chunk_max_length",
"browse_summary_max_token",
"continuous_limit",
"continuous_mode",
"debug_mode",
"e... | [
{
"name": "ai_settings_file",
"type": "statement"
},
{
"name": "AZURE_CONFIG_FILE",
"type": "statement"
},
{
"name": "azure_model_to_deployment_id_map",
"type": "statement"
},
{
"name": "browse_chunk_max_length",
"type": "statement"
},
{
"name": "browse_summary_ma... | from autogpt import browse
import json
from autogpt.memory import get_memory
import datetime
import autogpt.agent_manager as agents
from autogpt import speak
from autogpt.config import Config
import autogpt.ai_functions as ai
from autogpt.file_operations import read_file, write_to_file, append_to_file, delete_file, sea... | [
"google_api_key",
"speak_mode",
"execute_local_commands",
"fast_llm_model",
"custom_search_engine_id",
"ai_settings_file",
"AZURE_CONFIG_FILE",
"azure_model_to_deployment_id_map",
"browse_chunk_max_length",
"browse_summary_max_token",
"continuous_limit",
"continuous_mode",
"debug_mode",
"e... | ry[key_int] = string
print(_text)
return _text
else:
print(f"Invalid key '{key}', out of range.")
return None
# Check if the key is a valid string
elif isinstance(key, str):
_text = "Overwriting memory with key " + key + " and string " + string
... | 81 |
116 | 6 | 1,280 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | inproject | toolbox | true | statement | 15 | 17 | false | true | [
"toolbox",
"offspring",
"_vocs",
"population",
"children",
"__init__",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"n_pop",
"update_data",
"data",
"is_done",
"options",
"vocs",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__d... | [
{
"name": "children",
"type": "statement"
},
{
"name": "create_children",
"type": "function"
},
{
"name": "crossover_probability",
"type": "statement"
},
{
"name": "data",
"type": "property"
},
{
"name": "generate",
"type": "function"
},
{
"name": "is_... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"toolbox",
"offspring",
"population",
"children",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"n_pop",
"update_data",
"data",
"is_done",
"options",
"vocs"
] |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | 82 |
118 | 6 | 1,435 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | inproject | vocs | true | property | 15 | 17 | false | true | [
"children",
"toolbox",
"n_pop",
"offspring",
"population",
"__init__",
"_vocs",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__d... | [
{
"name": "children",
"type": "statement"
},
{
"name": "create_children",
"type": "function"
},
{
"name": "crossover_probability",
"type": "statement"
},
{
"name": "data",
"type": "property"
},
{
"name": "generate",
"type": "function"
},
{
"name": "is_... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"children",
"toolbox",
"n_pop",
"offspring",
"population",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs"
] |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | 84 |
119 | 6 | 1,476 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | inproject | n_pop | true | statement | 15 | 17 | false | true | [
"children",
"offspring",
"population",
"_vocs",
"n_pop",
"__init__",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"toolbox",
"update_data",
"data",
"is_done",
"options",
"vocs",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__d... | [
{
"name": "children",
"type": "statement"
},
{
"name": "create_children",
"type": "function"
},
{
"name": "crossover_probability",
"type": "statement"
},
{
"name": "data",
"type": "property"
},
{
"name": "generate",
"type": "function"
},
{
"name": "is_... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"children",
"offspring",
"population",
"n_pop",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"toolbox",
"update_data",
"data",
"is_done",
"options",
"vocs"
] |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | 85 |
120 | 6 | 1,567 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | inproject | population | true | statement | 15 | 17 | false | false | [
"children",
"data",
"offspring",
"n_pop",
"toolbox",
"__init__",
"_vocs",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"population",
"update_data",
"is_done",
"options",
"vocs",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__d... | [
{
"name": "children",
"type": "statement"
},
{
"name": "create_children",
"type": "function"
},
{
"name": "crossover_probability",
"type": "statement"
},
{
"name": "data",
"type": "property"
},
{
"name": "generate",
"type": "function"
},
{
"name": "is_... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"children",
"data",
"offspring",
"n_pop",
"toolbox",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"population",
"update_data",
"is_done",
"options",
"vocs"
] |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | 86 |
121 | 6 | 1,584 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | inproject | vocs | true | property | 15 | 17 | false | false | [
"vocs",
"children",
"population",
"toolbox",
"offspring",
"__init__",
"_vocs",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"n_pop",
"update_data",
"data",
"is_done",
"options",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__d... | [
{
"name": "children",
"type": "statement"
},
{
"name": "create_children",
"type": "function"
},
{
"name": "crossover_probability",
"type": "statement"
},
{
"name": "data",
"type": "property"
},
{
"name": "generate",
"type": "function"
},
{
"name": "is_... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"vocs",
"children",
"population",
"toolbox",
"offspring",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"n_pop",
"update_data",
"data",
"is_done",
"options"
] |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | 87 |
122 | 6 | 1,595 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | inproject | toolbox | true | statement | 15 | 17 | false | false | [
"toolbox",
"children",
"population",
"offspring",
"n_pop",
"__init__",
"_vocs",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__d... | [
{
"name": "children",
"type": "statement"
},
{
"name": "create_children",
"type": "function"
},
{
"name": "crossover_probability",
"type": "statement"
},
{
"name": "data",
"type": "property"
},
{
"name": "generate",
"type": "function"
},
{
"name": "is_... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"toolbox",
"children",
"population",
"offspring",
"n_pop",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs"
] |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | 88 |
139 | 6 | 2,283 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | inproject | n_pop | true | statement | 15 | 17 | false | false | [
"population",
"toolbox",
"offspring",
"n_pop",
"children",
"__init__",
"_vocs",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__d... | [
{
"name": "children",
"type": "statement"
},
{
"name": "create_children",
"type": "function"
},
{
"name": "crossover_probability",
"type": "statement"
},
{
"name": "data",
"type": "property"
},
{
"name": "generate",
"type": "function"
},
{
"name": "is_... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"population",
"toolbox",
"offspring",
"n_pop",
"children",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs"
] | rt logging
logger = logging.getLogger(__name__)
from typing import List, Dict
class CNSGAGenerator(Generator):
def __init__(self, vocs, *,
n_pop,
data = None,
crossover_probability = 0.9,
mutation_probability = 1.0
):
self._vocs = vocs # TODO: use proper options
self.n_p... | 101 |
140 | 6 | 2,295 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | inproject | vocs | true | property | 15 | 17 | false | false | [
"vocs",
"population",
"toolbox",
"offspring",
"n_pop",
"__init__",
"_vocs",
"children",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__d... | [
{
"name": "children",
"type": "statement"
},
{
"name": "create_children",
"type": "function"
},
{
"name": "crossover_probability",
"type": "statement"
},
{
"name": "data",
"type": "property"
},
{
"name": "generate",
"type": "function"
},
{
"name": "is_... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"vocs",
"population",
"toolbox",
"offspring",
"n_pop",
"children",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options"
] | ogger = logging.getLogger(__name__)
from typing import List, Dict
class CNSGAGenerator(Generator):
def __init__(self, vocs, *,
n_pop,
data = None,
crossover_probability = 0.9,
mutation_probability = 1.0
):
self._vocs = vocs # TODO: use proper options
self.n_pop = n_pop
... | 102 |
141 | 6 | 2,306 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | inproject | toolbox | true | statement | 15 | 17 | false | false | [
"toolbox",
"population",
"offspring",
"n_pop",
"children",
"__init__",
"_vocs",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__d... | [
{
"name": "children",
"type": "statement"
},
{
"name": "create_children",
"type": "function"
},
{
"name": "crossover_probability",
"type": "statement"
},
{
"name": "data",
"type": "property"
},
{
"name": "generate",
"type": "function"
},
{
"name": "is_... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"toolbox",
"population",
"offspring",
"n_pop",
"children",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs"
] | ging.getLogger(__name__)
from typing import List, Dict
class CNSGAGenerator(Generator):
def __init__(self, vocs, *,
n_pop,
data = None,
crossover_probability = 0.9,
mutation_probability = 1.0
):
self._vocs = vocs # TODO: use proper options
self.n_pop = n_pop
self... | 103 |
145 | 6 | 2,678 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | infile | children | true | statement | 15 | 17 | false | false | [
"n_pop",
"toolbox",
"offspring",
"population",
"children",
"__init__",
"_vocs",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__d... | [
{
"name": "children",
"type": "statement"
},
{
"name": "create_children",
"type": "function"
},
{
"name": "crossover_probability",
"type": "statement"
},
{
"name": "data",
"type": "property"
},
{
"name": "generate",
"type": "function"
},
{
"name": "is_... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"n_pop",
"toolbox",
"offspring",
"population",
"children",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs"
] | self.mutation_probability = mutation_probability
# Internal data structures
self.children = [] # unevaluated inputs. This should be a list of dicts.
self.population = None # The latest population (fully evaluated)
self.offspring = None # Newly evaluated data, but not yet added to pop... | 105 |
146 | 6 | 2,699 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | infile | create_children | true | function | 15 | 17 | false | true | [
"children",
"n_pop",
"offspring",
"population",
"toolbox",
"__init__",
"_vocs",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__d... | [
{
"name": "children",
"type": "statement"
},
{
"name": "create_children",
"type": "function"
},
{
"name": "crossover_probability",
"type": "statement"
},
{
"name": "data",
"type": "property"
},
{
"name": "generate",
"type": "function"
},
{
"name": "is_... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"children",
"n_pop",
"offspring",
"population",
"toolbox",
"create_children",
"crossover_probability",
"generate",
"mutation_probability",
"update_data",
"data",
"is_done",
"options",
"vocs"
] | ability = mutation_probability
# Internal data structures
self.children = [] # unevaluated inputs. This should be a list of dicts.
self.population = None # The latest population (fully evaluated)
self.offspring = None # Newly evaluated data, but not yet added to population
# DE... | 106 |
149 | 6 | 4,085 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | common | create | true | function | 6 | 11 | false | true | [
"create",
"MetaCreator",
"meta_create",
"class_replacers",
"_array",
"_numpy_array"
] | [
{
"name": "array",
"type": "module"
},
{
"name": "class_replacers",
"type": "statement"
},
{
"name": "copy",
"type": "module"
},
{
"name": "copyreg",
"type": "module"
},
{
"name": "create",
"type": "function"
},
{
"name": "meta_create",
"type": "fu... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"create",
"MetaCreator",
"meta_create",
"class_replacers"
] | idates = pd.concat([self.population, self.offspring])
self.population = cnsga_select(candidates, self.n_pop, self.vocs, self.toolbox)
self.children = [] # reset children
self.offspring = None # reset offspring
def generate(self, n_candidates) -> List[Dict]:
"... | 108 |
150 | 6 | 4,226 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | common | create | true | function | 6 | 11 | false | false | [
"create",
"MetaCreator",
"meta_create",
"class_replacers",
"_array",
"_numpy_array"
] | [
{
"name": "array",
"type": "module"
},
{
"name": "class_replacers",
"type": "statement"
},
{
"name": "copy",
"type": "module"
},
{
"name": "copyreg",
"type": "module"
},
{
"name": "create",
"type": "function"
},
{
"name": "meta_create",
"type": "fu... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"create",
"MetaCreator",
"meta_create",
"class_replacers"
] | toolbox)
self.children = [] # reset children
self.offspring = None # reset offspring
def generate(self, n_candidates) -> List[Dict]:
"""
generate `n_candidates` candidates
"""
# Make sure we have enough children to fulfill the request
while ... | 109 |
152 | 6 | 4,500 | christophermayes__xopt | 683fd0c3af2f0fc12a598932b20e3afe8070112b | xopt/generators/ga/cnsga.py | common | create | true | function | 6 | 11 | false | false | [
"create",
"MetaCreator",
"meta_create",
"class_replacers",
"_array",
"_numpy_array"
] | [
{
"name": "array",
"type": "module"
},
{
"name": "class_replacers",
"type": "statement"
},
{
"name": "copy",
"type": "module"
},
{
"name": "copyreg",
"type": "module"
},
{
"name": "create",
"type": "function"
},
{
"name": "meta_create",
"type": "fu... |
from xopt.generators.ga import deap_creator
from xopt.generators.ga.deap_fitness_with_constraints import FitnessWithConstraints
from xopt import Generator
from deap import base as deap_base
from deap import tools as deap_tools
from deap import algorithms as deap_algorithms
import pandas as pd
import random
import ... | [
"create",
"MetaCreator",
"meta_create",
"class_replacers"
] | children to fulfill the request
while len(self.children) < n_candidates:
self.children.extend(self.create_children())
return [self.children.pop() for _ in range(n_candidates)]
def uniform(low, up, size=None):
"""
"""
try:
return [random.uniform(a, b) ... | 110 |
157 | 7 | 2,688 | cerfacs-globc__icclim | 7d571ec4d1e1b1fcc1433bb178de2bc0f2f2f0b7 | icclim/tests/unit_tests/test_input_parsing.py | inproject | WW | true | instance | 53 | 62 | false | true | [
"TX90P",
"name",
"CD",
"CW",
"SD",
"CDD",
"CFD",
"CSDI",
"CSU",
"CWD",
"DTR",
"ETR",
"FD",
"GD4",
"HD17",
"ID",
"lookup",
"PRCPTOT",
"R10MM",
"R20MM",
"R75P",
"R75PTOT",
"R95P",
"R95PTOT",
"R99P",
"R99PTOT",
"RR1",
"RX1DAY",
"RX5DAY",
"SD1",
"SD5CM",
"SD... | [
{
"name": "CD",
"type": "instance"
},
{
"name": "CDD",
"type": "instance"
},
{
"name": "CFD",
"type": "instance"
},
{
"name": "CSDI",
"type": "instance"
},
{
"name": "CSU",
"type": "instance"
},
{
"name": "CW",
"type": "instance"
},
{
"name... | import os
import shutil
import numpy as np
import pandas as pd
import pytest
import xarray as xr
from icclim.icclim_exceptions import InvalidIcclimArgumentError
from icclim.models.ecad_indices import EcadIndex
from icclim.pre_processing.input_parsing import read_dataset, update_to_standard_coords
def test_update_to... | [
"TX90P",
"name",
"CD",
"CW",
"SD",
"CDD",
"CFD",
"CSDI",
"CSU",
"CWD",
"DTR",
"ETR",
"FD",
"GD4",
"HD17",
"ID",
"lookup",
"PRCPTOT",
"R10MM",
"R20MM",
"R75P",
"R75PTOT",
"R95P",
"R95PTOT",
"R99P",
"R99PTOT",
"RR1",
"RX1DAY",
"RX5DAY",
"SD1",
"SD5CM",
"SD... | s={"units": "kg m-2 d-1"},
)
}
)
# WHEN
res, revert = update_to_standard_coords(ds)
# THEN
assert "lat" in res.coords
assert "time" in res.coords
assert "lon" in res.coords
assert res.rename(revert).coords.keys() == ds.coords.keys()
class Test_ReadDataset:
OUTPU... | 115 |
158 | 7 | 3,183 | cerfacs-globc__icclim | 7d571ec4d1e1b1fcc1433bb178de2bc0f2f2f0b7 | icclim/tests/unit_tests/test_input_parsing.py | inproject | TX90P | true | instance | 53 | 62 | false | true | [
"WW",
"name",
"CD",
"CW",
"SD",
"CDD",
"CFD",
"CSDI",
"CSU",
"CWD",
"DTR",
"ETR",
"FD",
"GD4",
"HD17",
"ID",
"lookup",
"PRCPTOT",
"R10MM",
"R20MM",
"R75P",
"R75PTOT",
"R95P",
"R95PTOT",
"R99P",
"R99PTOT",
"RR1",
"RX1DAY",
"RX5DAY",
"SD1",
"SD5CM",
"SD50C... | [
{
"name": "CD",
"type": "instance"
},
{
"name": "CDD",
"type": "instance"
},
{
"name": "CFD",
"type": "instance"
},
{
"name": "CSDI",
"type": "instance"
},
{
"name": "CSU",
"type": "instance"
},
{
"name": "CW",
"type": "instance"
},
{
"name... | import os
import shutil
import numpy as np
import pandas as pd
import pytest
import xarray as xr
from icclim.icclim_exceptions import InvalidIcclimArgumentError
from icclim.models.ecad_indices import EcadIndex
from icclim.pre_processing.input_parsing import read_dataset, update_to_standard_coords
def test_update_to... | [
"WW",
"name",
"CD",
"CW",
"SD",
"CDD",
"CFD",
"CSDI",
"CSU",
"CWD",
"DTR",
"ETR",
"FD",
"GD4",
"HD17",
"ID",
"lookup",
"PRCPTOT",
"R10MM",
"R20MM",
"R75P",
"R75PTOT",
"R95P",
"R95PTOT",
"R99P",
"R99PTOT",
"RR1",
"RX1DAY",
"RX5DAY",
"SD1",
"SD5CM",
"SD50C... | f cleanup(self):
# setup
yield
# teardown
shutil.rmtree(self.OUTPUT_ZARR_STORE, ignore_errors=True)
for f in [
self.OUTPUT_NC_FILE,
self.OUTPUT_NC_FILE_2,
self.OUTPUT_UNKNOWN_FORMAT,
]:
try:
os.remove(f)
... | 116 |
160 | 7 | 5,234 | cerfacs-globc__icclim | 7d571ec4d1e1b1fcc1433bb178de2bc0f2f2f0b7 | icclim/tests/unit_tests/test_input_parsing.py | inproject | OUTPUT_NC_FILE | true | statement | 14 | 14 | false | false | [
"OUTPUT_NC_FILE",
"OUTPUT_ZARR_STORE",
"OUTPUT_NC_FILE_2",
"test_read_dataset_xr_ds_success",
"OUTPUT_UNKNOWN_FORMAT",
"cleanup",
"test_read_dataset_multi_netcdf_success",
"test_read_dataset_netcdf_success",
"test_read_dataset_not_implemented_error",
"test_read_dataset_xr_da_ecad_index_error",
"... | [
{
"name": "cleanup",
"type": "function"
},
{
"name": "OUTPUT_NC_FILE",
"type": "statement"
},
{
"name": "OUTPUT_NC_FILE_2",
"type": "statement"
},
{
"name": "OUTPUT_UNKNOWN_FORMAT",
"type": "statement"
},
{
"name": "OUTPUT_ZARR_STORE",
"type": "statement"
},... | import os
import shutil
import numpy as np
import pandas as pd
import pytest
import xarray as xr
from icclim.icclim_exceptions import InvalidIcclimArgumentError
from icclim.models.ecad_indices import EcadIndex
from icclim.pre_processing.input_parsing import read_dataset, update_to_standard_coords
def test_update_to... | [
"OUTPUT_NC_FILE",
"OUTPUT_ZARR_STORE",
"OUTPUT_NC_FILE_2",
"test_read_dataset_xr_ds_success",
"OUTPUT_UNKNOWN_FORMAT",
"cleanup",
"test_read_dataset_multi_netcdf_success",
"test_read_dataset_netcdf_success",
"test_read_dataset_not_implemented_error",
"test_read_dataset_xr_da_ecad_index_error",
"... | dex_success(self):
da = xr.DataArray(
data=np.full(10, 42).reshape((10, 1, 1)),
coords=dict(
latitude=[42],
longitude=[42],
t=pd.date_range("2042-01-01", periods=10, freq="D"),
),
dims=["t", "latitude", "longitude"],... | 118 |
163 | 7 | 6,104 | cerfacs-globc__icclim | 7d571ec4d1e1b1fcc1433bb178de2bc0f2f2f0b7 | icclim/tests/unit_tests/test_input_parsing.py | inproject | OUTPUT_NC_FILE | true | statement | 15 | 14 | false | false | [
"OUTPUT_NC_FILE",
"test_read_dataset_xr_ds_success",
"OUTPUT_NC_FILE_2",
"OUTPUT_ZARR_STORE",
"test_read_dataset_netcdf_success",
"cleanup",
"OUTPUT_UNKNOWN_FORMAT",
"test_read_dataset_multi_netcdf_success",
"test_read_dataset_not_implemented_error",
"test_read_dataset_xr_da_ecad_index_error",
"... | [
{
"name": "cleanup",
"type": "function"
},
{
"name": "OUTPUT_NC_FILE",
"type": "statement"
},
{
"name": "OUTPUT_NC_FILE_2",
"type": "statement"
},
{
"name": "OUTPUT_UNKNOWN_FORMAT",
"type": "statement"
},
{
"name": "OUTPUT_ZARR_STORE",
"type": "statement"
},... | import os
import shutil
import numpy as np
import pandas as pd
import pytest
import xarray as xr
from icclim.icclim_exceptions import InvalidIcclimArgumentError
from icclim.models.ecad_indices import EcadIndex
from icclim.pre_processing.input_parsing import read_dataset, update_to_standard_coords
def test_update_to... | [
"OUTPUT_NC_FILE",
"test_read_dataset_xr_ds_success",
"OUTPUT_NC_FILE_2",
"OUTPUT_ZARR_STORE",
"test_read_dataset_netcdf_success",
"cleanup",
"OUTPUT_UNKNOWN_FORMAT",
"test_read_dataset_multi_netcdf_success",
"test_read_dataset_not_implemented_error",
"test_read_dataset_xr_da_ecad_index_error",
"... | _range("2042-01-01", periods=10, freq="D"),
),
dims=["t", "latitude", "longitude"],
name="pr",
attrs={"units": "kg m-2 d-1"},
)
}
)
ds_res, chunk_it = read_dataset(ds)
xr.testing.assert_eq... | 121 |
164 | 7 | 6,125 | cerfacs-globc__icclim | 7d571ec4d1e1b1fcc1433bb178de2bc0f2f2f0b7 | icclim/tests/unit_tests/test_input_parsing.py | inproject | OUTPUT_NC_FILE_2 | true | statement | 15 | 14 | false | false | [
"OUTPUT_NC_FILE_2",
"OUTPUT_NC_FILE",
"OUTPUT_UNKNOWN_FORMAT",
"OUTPUT_ZARR_STORE",
"test_read_dataset_xr_ds_success",
"cleanup",
"test_read_dataset_multi_netcdf_success",
"test_read_dataset_netcdf_success",
"test_read_dataset_not_implemented_error",
"test_read_dataset_xr_da_ecad_index_error",
"... | [
{
"name": "cleanup",
"type": "function"
},
{
"name": "OUTPUT_NC_FILE",
"type": "statement"
},
{
"name": "OUTPUT_NC_FILE_2",
"type": "statement"
},
{
"name": "OUTPUT_UNKNOWN_FORMAT",
"type": "statement"
},
{
"name": "OUTPUT_ZARR_STORE",
"type": "statement"
},... | import os
import shutil
import numpy as np
import pandas as pd
import pytest
import xarray as xr
from icclim.icclim_exceptions import InvalidIcclimArgumentError
from icclim.models.ecad_indices import EcadIndex
from icclim.pre_processing.input_parsing import read_dataset, update_to_standard_coords
def test_update_to... | [
"OUTPUT_NC_FILE_2",
"OUTPUT_NC_FILE",
"OUTPUT_UNKNOWN_FORMAT",
"OUTPUT_ZARR_STORE",
"test_read_dataset_xr_ds_success",
"cleanup",
"test_read_dataset_multi_netcdf_success",
"test_read_dataset_netcdf_success",
"test_read_dataset_not_implemented_error",
"test_read_dataset_xr_da_ecad_index_error",
"... | periods=10, freq="D"),
),
dims=["t", "latitude", "longitude"],
name="pr",
attrs={"units": "kg m-2 d-1"},
)
}
)
ds_res, chunk_it = read_dataset(ds)
xr.testing.assert_equal(ds_res.pouet, ds.... | 122 |
166 | 7 | 6,996 | cerfacs-globc__icclim | 7d571ec4d1e1b1fcc1433bb178de2bc0f2f2f0b7 | icclim/tests/unit_tests/test_input_parsing.py | inproject | OUTPUT_ZARR_STORE | true | statement | 14 | 14 | false | false | [
"OUTPUT_ZARR_STORE",
"OUTPUT_NC_FILE",
"OUTPUT_NC_FILE_2",
"test_read_dataset_xr_ds_success",
"OUTPUT_UNKNOWN_FORMAT",
"cleanup",
"test_read_dataset_multi_netcdf_success",
"test_read_dataset_netcdf_success",
"test_read_dataset_not_implemented_error",
"test_read_dataset_xr_da_ecad_index_error",
"... | [
{
"name": "cleanup",
"type": "function"
},
{
"name": "OUTPUT_NC_FILE",
"type": "statement"
},
{
"name": "OUTPUT_NC_FILE_2",
"type": "statement"
},
{
"name": "OUTPUT_UNKNOWN_FORMAT",
"type": "statement"
},
{
"name": "OUTPUT_ZARR_STORE",
"type": "statement"
},... | import os
import shutil
import numpy as np
import pandas as pd
import pytest
import xarray as xr
from icclim.icclim_exceptions import InvalidIcclimArgumentError
from icclim.models.ecad_indices import EcadIndex
from icclim.pre_processing.input_parsing import read_dataset, update_to_standard_coords
def test_update_to... | [
"OUTPUT_ZARR_STORE",
"OUTPUT_NC_FILE",
"OUTPUT_NC_FILE_2",
"test_read_dataset_xr_ds_success",
"OUTPUT_UNKNOWN_FORMAT",
"cleanup",
"test_read_dataset_multi_netcdf_success",
"test_read_dataset_netcdf_success",
"test_read_dataset_not_implemented_error",
"test_read_dataset_xr_da_ecad_index_error",
"... | trs={"units": "kg m-2 d-1"},
)
}
)
ds.to_netcdf(self.OUTPUT_NC_FILE)
ds_res, chunk_it = read_dataset(self.OUTPUT_NC_FILE)
xr.testing.assert_equal(ds_res.pouet, ds.pouet)
assert chunk_it is True
def test_read_dataset_multi_netcdf_success(self):
... | 124 |
181 | 12 | 3,068 | googlecloudplatform__dataproc-templates | 4d63cf08165dbee145ce8b26d7aa0b11ff4c5a8f | python/dataproc_templates/jdbc/jdbc_to_jdbc.py | random | JDBCTOJDBC_OUTPUT_URL | true | statement | 75 | 75 | false | true | [
"JDBC_URL",
"JDBC_TABLE",
"FORMAT_JDBC",
"JDBC_DRIVER",
"JDBC_NUMPARTITIONS",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"CSV_HEADER",
"CSV_INFER_SCHEMA",
"FORMAT_AVRO",
"FORMAT_AVRO_EXTD",
"FORMAT_BIGQUERY",
"FORMAT_CSV",
"FORMAT_HBAS... | [
{
"name": "BQ_GCS_INPUT_TABLE",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_FORMAT",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_LOCATION",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_MODE",
"type": "statement"
},
{
"name": "CSV_HEADER",
"type": "s... | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | [
"JDBC_URL",
"JDBC_TABLE",
"FORMAT_JDBC",
"JDBC_DRIVER",
"JDBC_NUMPARTITIONS",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"CSV_HEADER",
"CSV_INFER_SCHEMA",
"FORMAT_AVRO",
"FORMAT_AVRO_EXTD",
"FORMAT_BIGQUERY",
"FORMAT_CSV",
"FORMAT_HBAS... | ()
parser.add_argument(
f'--{constants.JDBCTOJDBC_INPUT_URL}',
dest=constants.JDBCTOJDBC_INPUT_URL,
required=True,
help='JDBC input URL'
)
parser.add_argument(
f'--{constants.JDBCTOJDBC_INPUT_DRIVER}',
dest=constants.JDBCTO... | 139 |
193 | 12 | 4,480 | googlecloudplatform__dataproc-templates | 4d63cf08165dbee145ce8b26d7aa0b11ff4c5a8f | python/dataproc_templates/jdbc/jdbc_to_jdbc.py | random | OUTPUT_MODE_APPEND | true | statement | 76 | 75 | false | false | [
"OUTPUT_MODE_IGNORE",
"JDBC_URL",
"JDBC_TABLE",
"OUTPUT_MODE_ERRORIFEXISTS",
"FORMAT_JDBC",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"CSV_HEADER",
"CSV_INFER_SCHEMA",
"FORMAT_AVRO",
"FORMAT_AVRO_EXTD",
"FORMAT_BIGQUERY",
"FORMAT_CSV",
... | [
{
"name": "BQ_GCS_INPUT_TABLE",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_FORMAT",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_LOCATION",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_MODE",
"type": "statement"
},
{
"name": "CSV_HEADER",
"type": "s... | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | [
"OUTPUT_MODE_IGNORE",
"JDBC_URL",
"JDBC_TABLE",
"OUTPUT_MODE_ERRORIFEXISTS",
"FORMAT_JDBC",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"CSV_HEADER",
"CSV_INFER_SCHEMA",
"FORMAT_AVRO",
"FORMAT_AVRO_EXTD",
"FORMAT_BIGQUERY",
"FORMAT_CSV",
... | help='JDBC input table partition column upper bound which is used to decide the partition stride'
)
parser.add_argument(
f'--{constants.JDBCTOJDBC_NUMPARTITIONS}',
dest=constants.JDBCTOJDBC_NUMPARTITIONS,
required=False,
default=10,
... | 151 |
198 | 12 | 5,124 | googlecloudplatform__dataproc-templates | 4d63cf08165dbee145ce8b26d7aa0b11ff4c5a8f | python/dataproc_templates/jdbc/jdbc_to_jdbc.py | inproject | get_logger | true | function | 4 | 4 | false | true | [
"parse_args",
"run",
"get_logger",
"build",
"__str__",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__"... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | [
"parse_args",
"run",
"get_logger",
"build"
] |
)
parser.add_argument(
f'--{constants.JDBCTOJDBC_OUTPUT_DRIVER}',
dest=constants.JDBCTOJDBC_OUTPUT_DRIVER,
required=True,
help='JDBC output driver name'
)
parser.add_argument(
f'--{constants.JDBCTOJDBC_OUTPUT_TABLE}',
... | 156 |
230 | 13 | 1,013 | googlecloudplatform__dataproc-templates | bba5da698a8aa144c73d4d2a90e84c6a577ce7f4 | python/test/jdbc/test_jdbc_to_gcs.py | inproject | parse_args | true | function | 4 | 4 | false | true | [
"parse_args",
"run",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"parse_args",
"run",
"build",
"get_logger"
] | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 187 |
258 | 13 | 8,329 | googlecloudplatform__dataproc-templates | bba5da698a8aa144c73d4d2a90e84c6a577ce7f4 | python/test/jdbc/test_jdbc_to_gcs.py | random | JDBC_DRIVER | true | statement | 86 | 86 | false | false | [
"FORMAT_JDBC",
"JDBC_URL",
"JDBC_TABLE",
"JDBC_NUMPARTITIONS",
"JDBC_DRIVER",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"CSV_HEADER",
"CSV_INFER_SCHEMA",
"FORMAT_AVRO",
"FORMAT_AVRO_EXTD",
"FORMAT_BIGQUERY",
"FORMAT_CSV",
"FORMAT_HBAS... | [
{
"name": "BQ_GCS_INPUT_TABLE",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_FORMAT",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_LOCATION",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_MODE",
"type": "statement"
},
{
"name": "CSV_HEADER",
"type": "s... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"FORMAT_JDBC",
"JDBC_URL",
"JDBC_TABLE",
"JDBC_NUMPARTITIONS",
"JDBC_DRIVER",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"CSV_HEADER",
"CSV_INFER_SCHEMA",
"FORMAT_AVRO",
"FORMAT_AVRO_EXTD",
"FORMAT_BIGQUERY",
"FORMAT_CSV",
"FORMAT_HBAS... | ssert_called_with(constants.JDBC_UPPERBOUND, "2")
mock_spark_session.read.format().option().option().option().option().option().option().option.assert_called_with(constants.JDBC_NUMPARTITIONS, "5")
mock_spark_session.read.format().option().option().option().option().option().option().option().load()
... | 215 |
263 | 13 | 9,015 | googlecloudplatform__dataproc-templates | bba5da698a8aa144c73d4d2a90e84c6a577ce7f4 | python/test/jdbc/test_jdbc_to_gcs.py | non_informative | JDBC_NUMPARTITIONS | true | statement | 86 | 86 | false | false | [
"FORMAT_JDBC",
"JDBC_URL",
"JDBC_TABLE",
"JDBC_DRIVER",
"JDBC_LOWERBOUND",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"CSV_HEADER",
"CSV_INFER_SCHEMA",
"FORMAT_AVRO",
"FORMAT_AVRO_EXTD",
"FORMAT_BIGQUERY",
"FORMAT_CSV",
"FORMAT_HBASE",... | [
{
"name": "BQ_GCS_INPUT_TABLE",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_FORMAT",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_LOCATION",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_MODE",
"type": "statement"
},
{
"name": "CSV_HEADER",
"type": "s... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"FORMAT_JDBC",
"JDBC_URL",
"JDBC_TABLE",
"JDBC_DRIVER",
"JDBC_LOWERBOUND",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"CSV_HEADER",
"CSV_INFER_SCHEMA",
"FORMAT_AVRO",
"FORMAT_AVRO_EXTD",
"FORMAT_BIGQUERY",
"FORMAT_CSV",
"FORMAT_HBASE",... | pyspark.sql, 'SparkSession')
def test_run_pass_args4(self, mock_spark_session):
"""Tests JDBCToGCSTemplate write csv"""
jdbc_to_gcs_template = JDBCToGCSTemplate()
mock_parsed_args = jdbc_to_gcs_template.parse_args(
["--jdbctogcs.input.url=url",
"--jdbctogcs.input.d... | 220 |
267 | 13 | 10,457 | googlecloudplatform__dataproc-templates | bba5da698a8aa144c73d4d2a90e84c6a577ce7f4 | python/test/jdbc/test_jdbc_to_gcs.py | common | run | true | function | 4 | 4 | false | false | [
"run",
"parse_args",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"run",
"parse_args",
"build",
"get_logger"
] | option.assert_called_with(constants.JDBC_PARTITIONCOLUMN, "column")
mock_spark_session.read.format().option().option().option().option().option.assert_called_with(constants.JDBC_LOWERBOUND, "1")
mock_spark_session.read.format().option().option().option().option().option().option.assert_called_with(const... | 224 |
277 | 13 | 12,062 | googlecloudplatform__dataproc-templates | bba5da698a8aa144c73d4d2a90e84c6a577ce7f4 | python/test/jdbc/test_jdbc_to_gcs.py | inproject | parse_args | true | function | 4 | 4 | false | false | [
"parse_args",
"run",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"parse_args",
"run",
"build",
"get_logger"
] | n=gs://test",
"--jdbctogcs.output.format=json",
"--jdbctogcs.output.mode=ignore"
])
mock_spark_session.read.format().option().option().option().option().option().option().option().load.return_value = mock_spark_session.dataframe.DataFrame
jdbc_to_gcs_template.run(m... | 234 |
295 | 14 | 1,013 | googlecloudplatform__dataproc-templates | d62560011b069690d01cf2db563788bf81029623 | python/test/jdbc/test_jdbc_to_gcs.py | inproject | parse_args | true | function | 4 | 4 | false | false | [
"parse_args",
"run",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"parse_args",
"run",
"build",
"get_logger"
] | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 252 |
303 | 14 | 3,983 | googlecloudplatform__dataproc-templates | d62560011b069690d01cf2db563788bf81029623 | python/test/jdbc/test_jdbc_to_gcs.py | random | JDBC_LOWERBOUND | true | statement | 103 | 103 | false | false | [
"FORMAT_JDBC",
"JDBC_URL",
"JDBC_TABLE",
"JDBC_DRIVER",
"FORMAT_AVRO",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"COMPRESSION_BZIP2",
"COMPRESSION_DEFLATE",
"COMPRESSION_GZIP",
"COMPRESSION_LZ4",
"COMPRESSION_NONE",
"FORMAT_AVRO_EXTD",
... | [
{
"name": "BQ_GCS_INPUT_TABLE",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_FORMAT",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_LOCATION",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_MODE",
"type": "statement"
},
{
"name": "COMPRESSION_BZIP2",
"ty... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"FORMAT_JDBC",
"JDBC_URL",
"JDBC_TABLE",
"JDBC_DRIVER",
"FORMAT_AVRO",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"COMPRESSION_BZIP2",
"COMPRESSION_DEFLATE",
"COMPRESSION_GZIP",
"COMPRESSION_LZ4",
"COMPRESSION_NONE",
"FORMAT_AVRO_EXTD",
... | ed_args["jdbctogcs.output.location"] == "gs://test"
assert parsed_args["jdbctogcs.output.format"] == "csv"
assert parsed_args["jdbctogcs.output.mode"] == "append"
assert parsed_args["jdbctogcs.output.partitioncolumn"] == "column"
@mock.patch.object(pyspark.sql, 'SparkSession')
d... | 260 |
320 | 14 | 8,026 | googlecloudplatform__dataproc-templates | d62560011b069690d01cf2db563788bf81029623 | python/test/jdbc/test_jdbc_to_gcs.py | common | run | true | function | 4 | 4 | false | false | [
"run",
"parse_args",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"run",
"parse_args",
"build",
"get_logger"
] | ion().option.assert_called_with(constants.JDBC_PARTITIONCOLUMN, "column")
mock_spark_session.read.format().option().option().option().option().option.assert_called_with(constants.JDBC_LOWERBOUND, "1")
mock_spark_session.read.format().option().option().option().option().option().option.assert_called_with... | 277 |
330 | 14 | 9,758 | googlecloudplatform__dataproc-templates | d62560011b069690d01cf2db563788bf81029623 | python/test/jdbc/test_jdbc_to_gcs.py | inproject | parse_args | true | function | 4 | 4 | false | false | [
"parse_args",
"run",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"parse_args",
"run",
"build",
"get_logger"
] | mock_spark_session.read.format().option().option().option().option().option().option().option().load.return_value = mock_spark_session.dataframe.DataFrame
jdbc_to_gcs_template.run(mock_spark_session, mock_parsed_args)
mock_spark_session.read.format.assert_called_with(constants.FORMAT_JDBC)
m... | 287 |
357 | 15 | 1,021 | googlecloudplatform__dataproc-templates | 8b291caed55509d56d36f03c1c25762350b6f905 | python/test/mongo/test_mongo_to_gcs.py | inproject | parse_args | true | function | 4 | 4 | false | true | [
"parse_args",
"run",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"parse_args",
"run",
"build",
"get_logger"
] | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 314 |
359 | 15 | 2,559 | googlecloudplatform__dataproc-templates | 8b291caed55509d56d36f03c1c25762350b6f905 | python/test/mongo/test_mongo_to_gcs.py | common | run | true | function | 4 | 4 | false | true | [
"run",
"parse_args",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"run",
"parse_args",
"build",
"get_logger"
] | lates.mongo.mongo_to_gcs import MongoToGCSTemplate
import dataproc_templates.util.template_constants as constants
class TestMongoToGCSTemplate:
"""
Test suite for MongoToGCSTemplate
"""
def test_parse_args(self):
"""Tests MongoToGCSTemplate.parse_args()"""
mongo_to_gcs_template = Mon... | 316 |
361 | 15 | 2,830 | googlecloudplatform__dataproc-templates | 8b291caed55509d56d36f03c1c25762350b6f905 | python/test/mongo/test_mongo_to_gcs.py | random | MONGO_DATABASE | true | statement | 123 | 123 | false | true | [
"FORMAT_MONGO",
"MONGO_COLLECTION",
"MONGO_DATABASE",
"HEADER",
"FORMAT_AVRO",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"COMPRESSION_BZIP2",
"COMPRESSION_DEFLATE",
"COMPRESSION_GZIP",
"COMPRESSION_LZ4",
"COMPRESSION_NONE",
"FORMAT_AVRO... | [
{
"name": "BQ_GCS_INPUT_TABLE",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_FORMAT",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_LOCATION",
"type": "statement"
},
{
"name": "BQ_GCS_OUTPUT_MODE",
"type": "statement"
},
{
"name": "COMPRESSION_BZIP2",
"ty... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"FORMAT_MONGO",
"MONGO_COLLECTION",
"MONGO_DATABASE",
"HEADER",
"FORMAT_AVRO",
"BQ_GCS_INPUT_TABLE",
"BQ_GCS_OUTPUT_FORMAT",
"BQ_GCS_OUTPUT_LOCATION",
"BQ_GCS_OUTPUT_MODE",
"COMPRESSION_BZIP2",
"COMPRESSION_DEFLATE",
"COMPRESSION_GZIP",
"COMPRESSION_LZ4",
"COMPRESSION_NONE",
"FORMAT_AVRO... | se_args()"""
mongo_to_gcs_template = MongoToGCSTemplate()
parsed_args = mongo_to_gcs_template.parse_args(
["--mongo.gcs.input.uri=mongodb://host:port",
"--mongo.gcs.input.database=database",
"--mongo.gcs.input.collection=collection",
"--mongo.gcs.outpu... | 318 |
371 | 15 | 5,597 | googlecloudplatform__dataproc-templates | 8b291caed55509d56d36f03c1c25762350b6f905 | python/test/mongo/test_mongo_to_gcs.py | inproject | parse_args | true | function | 4 | 4 | false | false | [
"parse_args",
"run",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"parse_args",
"run",
"build",
"get_logger"
] | = MongoToGCSTemplate()
mock_parsed_args = mongo_to_gcs_template.parse_args(
["--mongo.gcs.input.uri=mongodb://host:port",
"--mongo.gcs.input.database=database",
"--mongo.gcs.input.collection=collection",
"--mongo.gcs.output.format=avro",
"--mongo.g... | 328 |
384 | 16 | 990 | googlecloudplatform__dataproc-templates | 49e82f63f0e49578ce6451902da57a095bc02b5d | python/test/gcs/test_gcs_to_gcs.py | inproject | parse_args | true | function | 4 | 4 | false | true | [
"parse_args",
"run",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"parse_args",
"run",
"build",
"get_logger"
] | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 341 |
388 | 16 | 3,797 | googlecloudplatform__dataproc-templates | 49e82f63f0e49578ce6451902da57a095bc02b5d | python/test/gcs/test_gcs_to_gcs.py | inproject | parse_args | true | function | 4 | 4 | false | false | [
"parse_args",
"run",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"parse_args",
"run",
"build",
"get_logger"
] | put.partition.column"] == "column"
assert parsed_args["gcs.to.gcs.output.location"] == "gs://output"
@mock.patch.object(pyspark.sql, 'SparkSession')
def test_run_parquet(self, mock_spark_session):
"""Tests GCSToBigqueryTemplate runs with parquet format"""
gcs_to_gcs_template = GCST... | 345 |
396 | 16 | 6,585 | googlecloudplatform__dataproc-templates | 49e82f63f0e49578ce6451902da57a095bc02b5d | python/test/gcs/test_gcs_to_gcs.py | common | run | true | function | 4 | 4 | false | false | [
"run",
"parse_args",
"build",
"get_logger",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
"__init__",
"__init_subclass__",
"__ne__",
"__new__",
"__reduce__",
"__reduce_ex__",
"__repr__",
"__setatt... | [
{
"name": "build",
"type": "function"
},
{
"name": "get_logger",
"type": "function"
},
{
"name": "parse_args",
"type": "function"
},
{
"name": "run",
"type": "function"
},
{
"name": "__annotations__",
"type": "statement"
},
{
"name": "__class__",
"... | """
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | [
"run",
"parse_args",
"build",
"get_logger"
] |
.option.assert_called_once_with(constants.INFER_SCHEMA, True)
mock_spark_session.read.format() \
.option() \
.option() \
.load.assert_called_once_with("gs://input")
mock_spark_session.read.format() \
.option() \
.option() \
... | 353 |
415 | 17 | 1,692 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | infile | create_empty_array | true | function | 17 | 17 | false | true | [
"attr_name",
"col_dim_name",
"row_dim_name",
"ingest_data_rows_chunked",
"ingest_data_whole",
"__init__",
"create_empty_array",
"from_matrix",
"ingest_data",
"to_csr_matrix",
"ctx",
"exists",
"indent",
"name",
"object_type",
"soma_options",
"uri",
"verbose",
"__annotations__",
... | [
{
"name": "attr_name",
"type": "statement"
},
{
"name": "col_dim_name",
"type": "statement"
},
{
"name": "create_empty_array",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_matri... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"attr_name",
"col_dim_name",
"row_dim_name",
"ingest_data_rows_chunked",
"ingest_data_whole",
"create_empty_array",
"from_matrix",
"ingest_data",
"to_csr_matrix",
"ctx",
"exists",
"indent",
"name",
"object_type",
"soma_options",
"uri",
"verbose"
] | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | 369 |
416 | 17 | 1,752 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | infile | ingest_data | true | function | 17 | 17 | false | true | [
"row_dim_name",
"attr_name",
"col_dim_name",
"uri",
"indent",
"__init__",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"to_csr_matrix",
"ctx",
"exists",
"name",
"object_type",
"soma_options",
"verbose",
"__annotations__",
... | [
{
"name": "attr_name",
"type": "statement"
},
{
"name": "col_dim_name",
"type": "statement"
},
{
"name": "create_empty_array",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_matri... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"row_dim_name",
"attr_name",
"col_dim_name",
"uri",
"indent",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"to_csr_matrix",
"ctx",
"exists",
"name",
"object_type",
"soma_options",
"verbose"
] | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | 370 |
424 | 17 | 2,387 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | random | col_dim_name | true | statement | 17 | 17 | false | true | [
"attr_name",
"row_dim_name",
"col_dim_name",
"name",
"ctx",
"__init__",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"to_csr_matrix",
"exists",
"indent",
"object_type",
"soma_options",
"uri",
"verbose",
"__annotations__",
... | [
{
"name": "attr_name",
"type": "statement"
},
{
"name": "col_dim_name",
"type": "statement"
},
{
"name": "create_empty_array",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_matri... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"attr_name",
"row_dim_name",
"col_dim_name",
"name",
"ctx",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"to_csr_matrix",
"exists",
"indent",
"object_type",
"soma_options",
"uri",
"verbose"
] | obsp; var_id_i for varp
col_dim_name: str # var_id for X, obs_id_j for obsp; var_id_j for varp
attr_name: str
# ----------------------------------------------------------------
def __init__(
self,
uri: str,
name: str,
row_dim_name: str,
col_dim_name: str,
... | 378 |
435 | 17 | 3,112 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | common | uri | true | statement | 17 | 17 | false | false | [
"attr_name",
"uri",
"indent",
"col_dim_name",
"row_dim_name",
"__init__",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"to_csr_matrix",
"ctx",
"exists",
"name",
"object_type",
"soma_options",
"verbose",
"__annotations__",
... | [
{
"name": "attr_name",
"type": "statement"
},
{
"name": "col_dim_name",
"type": "statement"
},
{
"name": "create_empty_array",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_matri... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"attr_name",
"uri",
"indent",
"col_dim_name",
"row_dim_name",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"to_csr_matrix",
"ctx",
"exists",
"name",
"object_type",
"soma_options",
"verbose"
] | ames, col_names) -> None:
"""
Imports a matrix -- nominally scipy.sparse.csr_matrix or numpy.ndarray -- into a TileDB
array which is used for X, obsp members, and varp members.
"""
if self.verbose:
s = util.get_start_stamp()
print(f"{self.indent}START WR... | 389 |
436 | 17 | 3,131 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | common | ctx | true | statement | 17 | 17 | false | false | [
"ctx",
"uri",
"col_dim_name",
"row_dim_name",
"soma_options",
"__init__",
"attr_name",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"to_csr_matrix",
"exists",
"indent",
"name",
"object_type",
"verbose",
"__annotations__",
... | [
{
"name": "attr_name",
"type": "statement"
},
{
"name": "col_dim_name",
"type": "statement"
},
{
"name": "create_empty_array",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_matri... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"ctx",
"uri",
"col_dim_name",
"row_dim_name",
"soma_options",
"attr_name",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"to_csr_matrix",
"exists",
"indent",
"name",
"object_type",
"verbose"
] | None:
"""
Imports a matrix -- nominally scipy.sparse.csr_matrix or numpy.ndarray -- into a TileDB
array which is used for X, obsp members, and varp members.
"""
if self.verbose:
s = util.get_start_stamp()
print(f"{self.indent}START WRITING {self.uri}")
... | 390 |
437 | 17 | 3,387 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | random | soma_options | true | statement | 17 | 17 | false | false | [
"to_csr_matrix",
"from_matrix",
"col_dim_name",
"row_dim_name",
"attr_name",
"__init__",
"create_empty_array",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"ctx",
"exists",
"indent",
"name",
"object_type",
"soma_options",
"uri",
"verbose",
"__annotations__",
... | [
{
"name": "attr_name",
"type": "statement"
},
{
"name": "col_dim_name",
"type": "statement"
},
{
"name": "create_empty_array",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_matri... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"to_csr_matrix",
"from_matrix",
"col_dim_name",
"row_dim_name",
"attr_name",
"create_empty_array",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"ctx",
"exists",
"indent",
"name",
"object_type",
"soma_options",
"uri",
"verbose"
] | ()
print(f"{self.indent}START WRITING {self.uri}")
if self.exists():
if self.verbose:
print(f"{self.indent}Re-using existing array {self.uri}")
else:
self.create_empty_array(matrix_dtype=matrix.dtype)
self.ingest_data(matrix, row_names, col_... | 391 |
438 | 17 | 3,400 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | random | write_X_chunked_if_csr | true | statement | 8 | 8 | false | true | [
"X_capacity",
"X_cell_order",
"X_tile_order",
"goal_chunk_nnz",
"string_dim_zstd_level",
"obs_extent",
"var_extent",
"write_X_chunked_if_csr",
"__init__",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
... | [
{
"name": "goal_chunk_nnz",
"type": "statement"
},
{
"name": "obs_extent",
"type": "statement"
},
{
"name": "string_dim_zstd_level",
"type": "statement"
},
{
"name": "var_extent",
"type": "statement"
},
{
"name": "write_X_chunked_if_csr",
"type": "statement"
... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"X_capacity",
"X_cell_order",
"X_tile_order",
"goal_chunk_nnz",
"string_dim_zstd_level",
"obs_extent",
"var_extent",
"write_X_chunked_if_csr"
] | print(f"{self.indent}START WRITING {self.uri}")
if self.exists():
if self.verbose:
print(f"{self.indent}Re-using existing array {self.uri}")
else:
self.create_empty_array(matrix_dtype=matrix.dtype)
self.ingest_data(matrix, row_names, col_names)
... | 392 |
439 | 17 | 3,441 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | infile | ingest_data_rows_chunked | true | function | 17 | 17 | false | true | [
"attr_name",
"ingest_data_whole",
"col_dim_name",
"row_dim_name",
"create_empty_array",
"__init__",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"to_csr_matrix",
"ctx",
"exists",
"indent",
"name",
"object_type",
"soma_options",
"uri",
"verbose",
"__annotations__",
... | [
{
"name": "attr_name",
"type": "statement"
},
{
"name": "col_dim_name",
"type": "statement"
},
{
"name": "create_empty_array",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_matri... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"attr_name",
"ingest_data_whole",
"col_dim_name",
"row_dim_name",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"to_csr_matrix",
"ctx",
"exists",
"indent",
"name",
"object_type",
"soma_options",
"uri",
"verbose"
] | lf.uri}")
if self.exists():
if self.verbose:
print(f"{self.indent}Re-using existing array {self.uri}")
else:
self.create_empty_array(matrix_dtype=matrix.dtype)
self.ingest_data(matrix, row_names, col_names)
if self.verbose:
print(util... | 393 |
440 | 17 | 3,527 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | infile | ingest_data_whole | true | function | 17 | 17 | false | true | [
"ingest_data_rows_chunked",
"attr_name",
"col_dim_name",
"row_dim_name",
"create_empty_array",
"__init__",
"from_matrix",
"ingest_data",
"ingest_data_whole",
"to_csr_matrix",
"ctx",
"exists",
"indent",
"name",
"object_type",
"soma_options",
"uri",
"verbose",
"__annotations__",
... | [
{
"name": "attr_name",
"type": "statement"
},
{
"name": "col_dim_name",
"type": "statement"
},
{
"name": "create_empty_array",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_matri... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"ingest_data_rows_chunked",
"attr_name",
"col_dim_name",
"row_dim_name",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_whole",
"to_csr_matrix",
"ctx",
"exists",
"indent",
"name",
"object_type",
"soma_options",
"uri",
"verbose"
] | t(f"{self.indent}Re-using existing array {self.uri}")
else:
self.create_empty_array(matrix_dtype=matrix.dtype)
self.ingest_data(matrix, row_names, col_names)
if self.verbose:
print(util.format_elapsed(s, f"{self.indent}FINISH WRITING {self.uri}"))
# ---------------... | 394 |
443 | 17 | 6,382 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | inproject | get_sort_and_permutation | true | function | 6 | 12 | false | true | [
"get_start_stamp",
"format_elapsed",
"find_csr_chunk_size",
"Optional",
"get_sort_and_permutation",
"_to_tiledb_supported_array_type"
] | [
{
"name": "ad",
"type": "module"
},
{
"name": "find_csr_chunk_size",
"type": "function"
},
{
"name": "format_elapsed",
"type": "function"
},
{
"name": "get_sort_and_permutation",
"type": "function"
},
{
"name": "get_start_stamp",
"type": "function"
},
{
... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"get_start_stamp",
"format_elapsed",
"find_csr_chunk_size",
"Optional",
"get_sort_and_permutation"
] | ach
# but written in sorted order.
#
# Original Sorted Permutation
# data row names
#
# X Y Z
# C 0 1 2 A 1
# A 4 0 5 B 2
# B 7 0 0 C 0
# D 0 8 9 D 3
#
# First chunk:
# * Row indices 0,1 ... | 397 |
444 | 17 | 6,605 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | inproject | get_start_stamp | true | function | 6 | 12 | false | false | [
"get_start_stamp",
"format_elapsed",
"find_csr_chunk_size",
"get_sort_and_permutation",
"Optional",
"_to_tiledb_supported_array_type"
] | [
{
"name": "ad",
"type": "module"
},
{
"name": "find_csr_chunk_size",
"type": "function"
},
{
"name": "format_elapsed",
"type": "function"
},
{
"name": "get_sort_and_permutation",
"type": "function"
},
{
"name": "get_start_stamp",
"type": "function"
},
{
... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"get_start_stamp",
"format_elapsed",
"find_csr_chunk_size",
"get_sort_and_permutation",
"Optional"
] | 0
# D 0 8 9 D 3
#
# First chunk:
# * Row indices 0,1 map to permutation indices 1,2
# * i,i2 are 0,2
# * chunk_coo is original matrix rows 1,2
# * chunk_coo.row is [0,1]
# * chunk_coo.row + i is [0,1]
# * sorted_row_names: ['A', 'B']
#
# Second chu... | 398 |
448 | 17 | 7,001 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | inproject | find_csr_chunk_size | true | function | 6 | 12 | false | true | [
"get_start_stamp",
"format_elapsed",
"get_sort_and_permutation",
"find_csr_chunk_size",
"Optional",
"_to_tiledb_supported_array_type"
] | [
{
"name": "ad",
"type": "module"
},
{
"name": "find_csr_chunk_size",
"type": "function"
},
{
"name": "format_elapsed",
"type": "function"
},
{
"name": "get_sort_and_permutation",
"type": "function"
},
{
"name": "get_start_stamp",
"type": "function"
},
{
... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"get_start_stamp",
"format_elapsed",
"get_sort_and_permutation",
"find_csr_chunk_size",
"Optional"
] | 2,4
# * chunk_coo is original matrix rows 0,3
# * chunk_coo.row is [0,1]
# * chunk_coo.row + i is [2,3]
# * sorted_row_names: ['C', 'D']
#
# See README-csr-ingest.md for important information of using this ingestor.
# ----------------------------------------------------------------
def ... | 402 |
449 | 17 | 7,050 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | inproject | soma_options | true | statement | 17 | 17 | false | false | [
"to_csr_matrix",
"from_matrix",
"row_dim_name",
"ingest_data",
"col_dim_name",
"__init__",
"attr_name",
"create_empty_array",
"ingest_data_rows_chunked",
"ingest_data_whole",
"ctx",
"exists",
"indent",
"name",
"object_type",
"soma_options",
"uri",
"verbose",
"__annotations__",
... | [
{
"name": "attr_name",
"type": "statement"
},
{
"name": "col_dim_name",
"type": "statement"
},
{
"name": "create_empty_array",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_matri... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"to_csr_matrix",
"from_matrix",
"row_dim_name",
"ingest_data",
"col_dim_name",
"attr_name",
"create_empty_array",
"ingest_data_rows_chunked",
"ingest_data_whole",
"ctx",
"exists",
"indent",
"name",
"object_type",
"soma_options",
"uri",
"verbose"
] |
# * chunk_coo.row is [0,1]
# * chunk_coo.row + i is [2,3]
# * sorted_row_names: ['C', 'D']
#
# See README-csr-ingest.md for important information of using this ingestor.
# ----------------------------------------------------------------
def ingest_data_rows_chunked(self, matrix, row_names,... | 403 |
450 | 17 | 7,063 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | inproject | goal_chunk_nnz | true | statement | 8 | 8 | false | true | [
"goal_chunk_nnz",
"write_X_chunked_if_csr",
"X_capacity",
"X_cell_order",
"X_tile_order",
"obs_extent",
"string_dim_zstd_level",
"var_extent",
"__init__",
"__annotations__",
"__class__",
"__delattr__",
"__dict__",
"__dir__",
"__eq__",
"__format__",
"__getattribute__",
"__hash__",
... | [
{
"name": "goal_chunk_nnz",
"type": "statement"
},
{
"name": "obs_extent",
"type": "statement"
},
{
"name": "string_dim_zstd_level",
"type": "statement"
},
{
"name": "var_extent",
"type": "statement"
},
{
"name": "write_X_chunked_if_csr",
"type": "statement"
... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"goal_chunk_nnz",
"write_X_chunked_if_csr",
"X_capacity",
"X_cell_order",
"X_tile_order",
"obs_extent",
"string_dim_zstd_level",
"var_extent"
] | k_coo.row is [0,1]
# * chunk_coo.row + i is [2,3]
# * sorted_row_names: ['C', 'D']
#
# See README-csr-ingest.md for important information of using this ingestor.
# ----------------------------------------------------------------
def ingest_data_rows_chunked(self, matrix, row_names, col_names) -... | 404 |
451 | 17 | 7,258 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | inproject | get_start_stamp | true | function | 6 | 12 | false | false | [
"get_start_stamp",
"find_csr_chunk_size",
"format_elapsed",
"get_sort_and_permutation",
"Optional",
"_to_tiledb_supported_array_type"
] | [
{
"name": "ad",
"type": "module"
},
{
"name": "find_csr_chunk_size",
"type": "function"
},
{
"name": "format_elapsed",
"type": "function"
},
{
"name": "get_sort_and_permutation",
"type": "function"
},
{
"name": "get_start_stamp",
"type": "function"
},
{
... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"get_start_stamp",
"find_csr_chunk_size",
"format_elapsed",
"get_sort_and_permutation",
"Optional"
] | -----------------------------------------------------
def ingest_data_rows_chunked(self, matrix, row_names, col_names) -> None:
"""
Convert csr_matrix to coo_matrix chunkwise and ingest into TileDB.
:param uri: TileDB URI of the array to be written.
:param matrix: csr_matrix.
... | 405 |
464 | 17 | 9,422 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/assay_matrix.py | random | uri | true | statement | 17 | 17 | false | false | [
"uri",
"attr_name",
"col_dim_name",
"row_dim_name",
"indent",
"__init__",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"to_csr_matrix",
"ctx",
"exists",
"name",
"object_type",
"soma_options",
"verbose",
"__annotations__",
... | [
{
"name": "attr_name",
"type": "statement"
},
{
"name": "col_dim_name",
"type": "statement"
},
{
"name": "create_empty_array",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_matri... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
from .tiledb_object import TileDBObject
import tiledbsc.util as util
import scipy
import numpy as np
from typing import Optional
class AssayMatrix(TileDBArray):
"""
Wraps a TileDB s... | [
"uri",
"attr_name",
"col_dim_name",
"row_dim_name",
"indent",
"create_empty_array",
"from_matrix",
"ingest_data",
"ingest_data_rows_chunked",
"ingest_data_whole",
"to_csr_matrix",
"ctx",
"exists",
"name",
"object_type",
"soma_options",
"verbose"
] | # Python ranges are (lo, hi) with lo inclusive and hi exclusive. But saying that
# makes us look buggy if we say we're ingesting chunk 0:18 and then 18:32.
# Instead, print doubly-inclusive lo..hi like 0..17 and 18..31.
if self.verbose:
print("%... | 418 |
474 | 18 | 966 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/uns_array.py | inproject | get_start_stamp | true | function | 6 | 12 | false | true | [
"get_start_stamp",
"format_elapsed",
"_to_tiledb_supported_array_type",
"Optional",
"find_csr_chunk_size",
"get_sort_and_permutation"
] | [
{
"name": "ad",
"type": "module"
},
{
"name": "find_csr_chunk_size",
"type": "function"
},
{
"name": "format_elapsed",
"type": "function"
},
{
"name": "get_sort_and_permutation",
"type": "function"
},
{
"name": "get_start_stamp",
"type": "function"
},
{
... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | [
"get_start_stamp",
"format_elapsed",
"Optional",
"find_csr_chunk_size",
"get_sort_and_permutation"
] | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | 428 |
475 | 18 | 1,010 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/uns_array.py | non_informative | indent | true | statement | 15 | 15 | false | true | [
"uri",
"indent",
"from_numpy_ndarray",
"ctx",
"verbose",
"__init__",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options",
"__annotations__",
"__c... | [
{
"name": "create_empty_array_for_csr",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_numpy_ndarray",
"type": "function"
},
{
"name": "from_pandas_dataframe",
"type": "function"
},
{... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | [
"uri",
"indent",
"from_numpy_ndarray",
"ctx",
"verbose",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options"
] | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | 429 |
476 | 18 | 1,055 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/uns_array.py | non_informative | uri | true | statement | 15 | 15 | false | true | [
"indent",
"uri",
"from_numpy_ndarray",
"ctx",
"verbose",
"__init__",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options",
"__annotations__",
"__c... | [
{
"name": "create_empty_array_for_csr",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_numpy_ndarray",
"type": "function"
},
{
"name": "from_pandas_dataframe",
"type": "function"
},
{... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | [
"indent",
"uri",
"from_numpy_ndarray",
"ctx",
"verbose",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options"
] | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | 430 |
479 | 18 | 1,257 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/uns_array.py | random | verbose | true | statement | 15 | 15 | false | false | [
"verbose",
"uri",
"from_numpy_ndarray",
"ctx",
"indent",
"__init__",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options",
"__annotations__",
"__c... | [
{
"name": "create_empty_array_for_csr",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_numpy_ndarray",
"type": "function"
},
{
"name": "from_pandas_dataframe",
"type": "function"
},
{... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | [
"verbose",
"uri",
"from_numpy_ndarray",
"ctx",
"indent",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options"
] | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | 433 |
486 | 18 | 2,268 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/uns_array.py | infile | from_numpy_ndarray | true | function | 15 | 15 | false | false | [
"from_numpy_ndarray",
"uri",
"ctx",
"indent",
"ingest_data_from_csr",
"__init__",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options",
"verbose",
"__annotations__",
"__c... | [
{
"name": "create_empty_array_for_csr",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_numpy_ndarray",
"type": "function"
},
{
"name": "from_pandas_dataframe",
"type": "function"
},
{... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | [
"from_numpy_ndarray",
"uri",
"ctx",
"indent",
"ingest_data_from_csr",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options",
"verbose"
] | .uns` field.
"""
# ----------------------------------------------------------------
def __init__(
self,
uri: str,
name: str,
parent: Optional[TileDBGroup] = None,
):
"""
See the TileDBObject constructor.
"""
super().__init__(uri=uri, name... | 440 |
508 | 18 | 4,731 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/uns_array.py | infile | create_empty_array_for_csr | true | function | 15 | 15 | false | true | [
"uri",
"from_numpy_ndarray",
"ctx",
"indent",
"ingest_data_from_csr",
"__init__",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options",
"verbose",
"__annotations__",
"__c... | [
{
"name": "create_empty_array_for_csr",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_numpy_ndarray",
"type": "function"
},
{
"name": "from_pandas_dataframe",
"type": "function"
},
{... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | [
"uri",
"from_numpy_ndarray",
"ctx",
"indent",
"ingest_data_from_csr",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options",
"verbose"
] | ----------------------------------------------------
def from_numpy_ndarray(self, arr: np.ndarray) -> None:
"""
Writes a numpy.ndarray to a TileDB array, nominally for ingest of `uns` nested data from anndata
objects. Mostly tiledb.from_numpy, but with some necessary handling for data with U... | 462 |
509 | 18 | 4,805 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/uns_array.py | infile | ingest_data_from_csr | true | function | 15 | 15 | false | true | [
"from_numpy_ndarray",
"uri",
"indent",
"ctx",
"verbose",
"__init__",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options",
"__annotations__",
"__c... | [
{
"name": "create_empty_array_for_csr",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_numpy_ndarray",
"type": "function"
},
{
"name": "from_pandas_dataframe",
"type": "function"
},
{... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | [
"from_numpy_ndarray",
"uri",
"indent",
"ctx",
"verbose",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options"
] | array(self, arr: np.ndarray) -> None:
"""
Writes a numpy.ndarray to a TileDB array, nominally for ingest of `uns` nested data from anndata
objects. Mostly tiledb.from_numpy, but with some necessary handling for data with UTF-8 values.
"""
if self.verbose:
s = util.ge... | 463 |
517 | 18 | 6,290 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/uns_array.py | common | uri | true | statement | 15 | 15 | false | false | [
"uri",
"ctx",
"from_numpy_ndarray",
"indent",
"verbose",
"__init__",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options",
"__annotations__",
"__c... | [
{
"name": "create_empty_array_for_csr",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_numpy_ndarray",
"type": "function"
},
{
"name": "from_pandas_dataframe",
"type": "function"
},
{... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | [
"uri",
"ctx",
"from_numpy_ndarray",
"indent",
"verbose",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options"
] | atrix.
"""
if self.verbose:
s = util.get_start_stamp()
print(f"{self.indent}START WRITING FROM SCIPY.SPARSE.CSR {self.uri}")
nrows, ncols = csr.shape
if self.exists():
if self.verbose:
print(f"{self.indent}Re-using existing array {se... | 471 |
518 | 18 | 6,309 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/uns_array.py | common | ctx | true | statement | 15 | 15 | false | false | [
"ctx",
"uri",
"from_numpy_ndarray",
"indent",
"verbose",
"__init__",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options",
"__annotations__",
"__c... | [
{
"name": "create_empty_array_for_csr",
"type": "function"
},
{
"name": "ctx",
"type": "statement"
},
{
"name": "exists",
"type": "function"
},
{
"name": "from_numpy_ndarray",
"type": "function"
},
{
"name": "from_pandas_dataframe",
"type": "function"
},
{... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | [
"ctx",
"uri",
"from_numpy_ndarray",
"indent",
"verbose",
"create_empty_array_for_csr",
"from_pandas_dataframe",
"from_scipy_csr",
"ingest_data_from_csr",
"maybe_from_numpyable_object",
"to_matrix",
"exists",
"name",
"object_type",
"soma_options"
] |
if self.verbose:
s = util.get_start_stamp()
print(f"{self.indent}START WRITING FROM SCIPY.SPARSE.CSR {self.uri}")
nrows, ncols = csr.shape
if self.exists():
if self.verbose:
print(f"{self.indent}Re-using existing array {self.uri}")
e... | 472 |
522 | 18 | 7,410 | single-cell-data__tiledb-soma | 0a9b47f0d37d4e309d85897423bcea947086b39a | apis/python/src/tiledbsc/uns_array.py | inproject | get_start_stamp | true | function | 6 | 12 | false | false | [
"get_start_stamp",
"format_elapsed",
"_to_tiledb_supported_array_type",
"Optional",
"find_csr_chunk_size",
"get_sort_and_permutation"
] | [
{
"name": "ad",
"type": "module"
},
{
"name": "find_csr_chunk_size",
"type": "function"
},
{
"name": "format_elapsed",
"type": "function"
},
{
"name": "get_sort_and_permutation",
"type": "function"
},
{
"name": "get_start_stamp",
"type": "function"
},
{
... | import tiledb
from .soma_options import SOMAOptions
from .tiledb_array import TileDBArray
from .tiledb_group import TileDBGroup
import tiledbsc.util as util
import numpy as np
import scipy
import pandas as pd
from typing import Optional
class UnsArray(TileDBArray):
"""
Holds TileDB storage for an array obtai... | [
"get_start_stamp",
"format_elapsed",
"Optional",
"find_csr_chunk_size",
"get_sort_and_permutation"
] | dom = tiledb.Domain(
tiledb.Dim(name="dim0", domain=(0, nrows-1), dtype="int32", filters=[tiledb.RleFilter()]),
tiledb.Dim(name="dim1", domain=(0, ncols-1), dtype="int32", filters=[tiledb.ZstdFilter()]),
ctx=self.ctx
)
att = tiledb.Attr(attr_name, dtype=matrix... | 476 |
540 | 19 | 649 | single-cell-data__tiledb-soma | e64f89e6251f221bd91c49a997d7fb67de3ed349 | apis/python/src/tiledbsc/io/anndata.py | inproject | util | true | module | 33 | 35 | false | false | [
"util",
"soma",
"SOMA",
"util_ann",
"soma_options",
"annotation_matrix",
"annotation_matrix_group",
"annotation_pairwise_matrix_group",
"AnnotationMatrix",
"AnnotationMatrixGroup",
"AnnotationPairwiseMatrixGroup",
"assay_matrix",
"assay_matrix_group",
"AssayMatrix",
"AssayMatrixGroup",
... | [
{
"name": "annotation_dataframe",
"type": "module"
},
{
"name": "annotation_matrix",
"type": "module"
},
{
"name": "annotation_matrix_group",
"type": "module"
},
{
"name": "annotation_pairwise_matrix_group",
"type": "module"
},
{
"name": "AnnotationMatrix",
"t... | import tiledbsc
import tiledbsc.util
import tiledbsc.util_ann
import anndata as ad
# ----------------------------------------------------------------
def from_h5ad(soma: tiledbsc.SOMA, input_path: str) -> None:
"""
Reads an .h5ad file and writes to a TileDB group structure.
"""
if soma._verbose:
... | [
"util",
"soma",
"SOMA",
"util_ann",
"soma_options",
"annotation_matrix",
"annotation_matrix_group",
"annotation_pairwise_matrix_group",
"AnnotationMatrix",
"AnnotationMatrixGroup",
"AnnotationPairwiseMatrixGroup",
"assay_matrix",
"assay_matrix_group",
"AssayMatrix",
"AssayMatrixGroup",
... | import tiledbsc
import tiledbsc.util
import tiledbsc.util_ann
import anndata as ad
# ----------------------------------------------------------------
def from_h5ad(soma: tiledbsc.SOMA, input_path: str) -> None:
"""
Reads an .h5ad file and writes to a TileDB group structure.
"""
if soma._verbose:
... | 489 |
541 | 19 | 654 | single-cell-data__tiledb-soma | e64f89e6251f221bd91c49a997d7fb67de3ed349 | apis/python/src/tiledbsc/io/anndata.py | inproject | format_elapsed | true | function | 10 | 16 | false | true | [
"format_elapsed",
"get_start_stamp",
"List",
"Optional",
"ETATracker",
"_find_csc_chunk_size",
"_find_csr_chunk_size",
"_get_sort_and_permutation",
"_to_tiledb_supported_array_type",
"_X_and_ids_to_coo"
] | [
{
"name": "ad",
"type": "module"
},
{
"name": "ETATracker",
"type": "class"
},
{
"name": "format_elapsed",
"type": "function"
},
{
"name": "get_start_stamp",
"type": "function"
},
{
"name": "List",
"type": "class"
},
{
"name": "numpy",
"type": "mod... | import tiledbsc
import tiledbsc.util
import tiledbsc.util_ann
import anndata as ad
# ----------------------------------------------------------------
def from_h5ad(soma: tiledbsc.SOMA, input_path: str) -> None:
"""
Reads an .h5ad file and writes to a TileDB group structure.
"""
if soma._verbose:
... | [
"format_elapsed",
"get_start_stamp",
"List",
"Optional",
"ETATracker"
] | import tiledbsc
import tiledbsc.util
import tiledbsc.util_ann
import anndata as ad
# ----------------------------------------------------------------
def from_h5ad(soma: tiledbsc.SOMA, input_path: str) -> None:
"""
Reads an .h5ad file and writes to a TileDB group structure.
"""
if soma._verbose:
... | 490 |
569 | 19 | 2,547 | single-cell-data__tiledb-soma | e64f89e6251f221bd91c49a997d7fb67de3ed349 | apis/python/src/tiledbsc/io/anndata.py | inproject | util_ann | true | module | 33 | 35 | false | true | [
"soma",
"util",
"SOMA",
"util_ann",
"soma_options",
"annotation_matrix",
"annotation_matrix_group",
"annotation_pairwise_matrix_group",
"AnnotationMatrix",
"AnnotationMatrixGroup",
"AnnotationPairwiseMatrixGroup",
"assay_matrix",
"assay_matrix_group",
"AssayMatrix",
"AssayMatrixGroup",
... | [
{
"name": "annotation_dataframe",
"type": "module"
},
{
"name": "annotation_matrix",
"type": "module"
},
{
"name": "annotation_matrix_group",
"type": "module"
},
{
"name": "annotation_pairwise_matrix_group",
"type": "module"
},
{
"name": "AnnotationMatrix",
"t... | import tiledbsc
import tiledbsc.util
import tiledbsc.util_ann
import anndata as ad
# ----------------------------------------------------------------
def from_h5ad(soma: tiledbsc.SOMA, input_path: str) -> None:
"""
Reads an .h5ad file and writes to a TileDB group structure.
"""
if soma._verbose:
... | [
"soma",
"util",
"SOMA",
"util_ann",
"soma_options",
"annotation_matrix",
"annotation_matrix_group",
"annotation_pairwise_matrix_group",
"AnnotationMatrix",
"AnnotationMatrixGroup",
"AnnotationPairwiseMatrixGroup",
"assay_matrix",
"assay_matrix_group",
"AssayMatrix",
"AssayMatrixGroup",
... |
tiledbsc.util.format_elapsed(
s, f"{soma._indent}FINISH READING {input_path}"
)
)
from_anndata(soma, anndata)
if soma._verbose:
print(
tiledbsc.util.format_elapsed(
s, f"FINISH SOMA.from_h5ad {input_path} -> {soma.uri}"
... | 505 |
572 | 19 | 2,641 | single-cell-data__tiledb-soma | e64f89e6251f221bd91c49a997d7fb67de3ed349 | apis/python/src/tiledbsc/io/anndata.py | inproject | util | true | module | 33 | 35 | false | false | [
"soma",
"util",
"SOMA",
"util_ann",
"soma_options",
"annotation_matrix",
"annotation_matrix_group",
"annotation_pairwise_matrix_group",
"AnnotationMatrix",
"AnnotationMatrixGroup",
"AnnotationPairwiseMatrixGroup",
"assay_matrix",
"assay_matrix_group",
"AssayMatrix",
"AssayMatrixGroup",
... | [
{
"name": "annotation_dataframe",
"type": "module"
},
{
"name": "annotation_matrix",
"type": "module"
},
{
"name": "annotation_matrix_group",
"type": "module"
},
{
"name": "annotation_pairwise_matrix_group",
"type": "module"
},
{
"name": "AnnotationMatrix",
"t... | import tiledbsc
import tiledbsc.util
import tiledbsc.util_ann
import anndata as ad
# ----------------------------------------------------------------
def from_h5ad(soma: tiledbsc.SOMA, input_path: str) -> None:
"""
Reads an .h5ad file and writes to a TileDB group structure.
"""
if soma._verbose:
... | [
"soma",
"util",
"SOMA",
"util_ann",
"soma_options",
"annotation_matrix",
"annotation_matrix_group",
"annotation_pairwise_matrix_group",
"AnnotationMatrix",
"AnnotationMatrixGroup",
"AnnotationPairwiseMatrixGroup",
"assay_matrix",
"assay_matrix_group",
"AssayMatrix",
"AssayMatrixGroup",
... | input_path}"
)
)
from_anndata(soma, anndata)
if soma._verbose:
print(
tiledbsc.util.format_elapsed(
s, f"FINISH SOMA.from_h5ad {input_path} -> {soma.uri}"
)
)
# ----------------------------------------------------------------
def fr... | 507 |
573 | 19 | 2,646 | single-cell-data__tiledb-soma | e64f89e6251f221bd91c49a997d7fb67de3ed349 | apis/python/src/tiledbsc/io/anndata.py | inproject | format_elapsed | true | function | 10 | 16 | false | false | [
"format_elapsed",
"get_start_stamp",
"List",
"Optional",
"ETATracker",
"_find_csc_chunk_size",
"_find_csr_chunk_size",
"_get_sort_and_permutation",
"_to_tiledb_supported_array_type",
"_X_and_ids_to_coo"
] | [
{
"name": "ad",
"type": "module"
},
{
"name": "ETATracker",
"type": "class"
},
{
"name": "format_elapsed",
"type": "function"
},
{
"name": "get_start_stamp",
"type": "function"
},
{
"name": "List",
"type": "class"
},
{
"name": "numpy",
"type": "mod... | import tiledbsc
import tiledbsc.util
import tiledbsc.util_ann
import anndata as ad
# ----------------------------------------------------------------
def from_h5ad(soma: tiledbsc.SOMA, input_path: str) -> None:
"""
Reads an .h5ad file and writes to a TileDB group structure.
"""
if soma._verbose:
... | [
"format_elapsed",
"get_start_stamp",
"List",
"Optional",
"ETATracker"
] | _path}"
)
)
from_anndata(soma, anndata)
if soma._verbose:
print(
tiledbsc.util.format_elapsed(
s, f"FINISH SOMA.from_h5ad {input_path} -> {soma.uri}"
)
)
# ----------------------------------------------------------------
def from_10... | 508 |
576 | 19 | 2,762 | single-cell-data__tiledb-soma | e64f89e6251f221bd91c49a997d7fb67de3ed349 | apis/python/src/tiledbsc/io/anndata.py | inproject | util | true | module | 33 | 35 | false | false | [
"soma",
"util",
"SOMA",
"util_ann",
"soma_options",
"annotation_matrix",
"annotation_matrix_group",
"annotation_pairwise_matrix_group",
"AnnotationMatrix",
"AnnotationMatrixGroup",
"AnnotationPairwiseMatrixGroup",
"assay_matrix",
"assay_matrix_group",
"AssayMatrix",
"AssayMatrixGroup",
... | [
{
"name": "annotation_dataframe",
"type": "module"
},
{
"name": "annotation_matrix",
"type": "module"
},
{
"name": "annotation_matrix_group",
"type": "module"
},
{
"name": "annotation_pairwise_matrix_group",
"type": "module"
},
{
"name": "AnnotationMatrix",
"t... | import tiledbsc
import tiledbsc.util
import tiledbsc.util_ann
import anndata as ad
# ----------------------------------------------------------------
def from_h5ad(soma: tiledbsc.SOMA, input_path: str) -> None:
"""
Reads an .h5ad file and writes to a TileDB group structure.
"""
if soma._verbose:
... | [
"soma",
"util",
"SOMA",
"util_ann",
"soma_options",
"annotation_matrix",
"annotation_matrix_group",
"annotation_pairwise_matrix_group",
"AnnotationMatrix",
"AnnotationMatrixGroup",
"AnnotationPairwiseMatrixGroup",
"assay_matrix",
"assay_matrix_group",
"AssayMatrix",
"AssayMatrixGroup",
... | iledbsc.util.format_elapsed(
s, f"FINISH SOMA.from_h5ad {input_path} -> {soma.uri}"
)
)
# ----------------------------------------------------------------
def from_10x(soma: tiledbsc.SOMA, input_path: str) -> None:
"""
Reads a 10X file and writes to a TileDB group structure... | 509 |
577 | 19 | 2,767 | single-cell-data__tiledb-soma | e64f89e6251f221bd91c49a997d7fb67de3ed349 | apis/python/src/tiledbsc/io/anndata.py | inproject | get_start_stamp | true | function | 10 | 16 | false | false | [
"format_elapsed",
"get_start_stamp",
"List",
"Optional",
"ETATracker",
"_find_csc_chunk_size",
"_find_csr_chunk_size",
"_get_sort_and_permutation",
"_to_tiledb_supported_array_type",
"_X_and_ids_to_coo"
] | [
{
"name": "ad",
"type": "module"
},
{
"name": "ETATracker",
"type": "class"
},
{
"name": "format_elapsed",
"type": "function"
},
{
"name": "get_start_stamp",
"type": "function"
},
{
"name": "List",
"type": "class"
},
{
"name": "numpy",
"type": "mod... | import tiledbsc
import tiledbsc.util
import tiledbsc.util_ann
import anndata as ad
# ----------------------------------------------------------------
def from_h5ad(soma: tiledbsc.SOMA, input_path: str) -> None:
"""
Reads an .h5ad file and writes to a TileDB group structure.
"""
if soma._verbose:
... | [
"format_elapsed",
"get_start_stamp",
"List",
"Optional",
"ETATracker"
] | sc.util.format_elapsed(
s, f"FINISH SOMA.from_h5ad {input_path} -> {soma.uri}"
)
)
# ----------------------------------------------------------------
def from_10x(soma: tiledbsc.SOMA, input_path: str) -> None:
"""
Reads a 10X file and writes to a TileDB group structure.
... | 510 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.