Commit 327d0a04 by Jörg Stucke

removed deprecated function

parent 8252bde4
default_stages: [commit, push]
exclude: ^src/bin/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
......@@ -19,9 +18,6 @@ repos:
- id: fix-encoding-pragma
args: [--remove]
- id: file-contents-sorter
files: src/unpacker/passwords|.gitignore|_list.txt
- id: flake8
args: [--ignore="E501,W503", --select=W504]
......
from .aggregate import (get_field_average, get_field_execute_operation,
get_field_sum, get_list_of_all_values,
get_objects_and_count_of_occurrence)
from .gridfs import overwrite_file
from .aggregate import get_objects_and_count_of_occurrence, get_field_average, get_field_sum, get_field_execute_operation, get_list_of_all_values, get_list_of_all_values_and_collect_information_of_additional_field
__all__ = [
'overwrite_file',
......@@ -8,5 +10,4 @@ __all__ = [
'get_field_sum',
'get_field_execute_operation',
'get_list_of_all_values',
'get_list_of_all_values_and_collect_information_of_additional_field'
]
......@@ -2,7 +2,6 @@ import logging
from typing import List, Optional
from bson.son import SON
from pymongo.command_cursor import CommandCursor
def get_list_of_all_values(collection, object_path, unwind=False, match=None):
......@@ -27,28 +26,6 @@ def get_list_of_all_values(collection, object_path, unwind=False, match=None):
return result
def get_list_of_all_values_and_collect_information_of_additional_field(
collection, object_path, additional_information_object_path, unwind=False, match=None):
'''
Get a list of unique values and a collection of additional information on a specific object path in a collection.
An Optional search string (match) can be added.
:param collection: mongo collection to look at
:type collection: pymongo.collection.Collection
:param object_path: mongo object path
:type object_path: str
:param additional_information_object_path: field of the additional information
:type additional_information_object_path: str
:param unwind: if true: handle list entries as single values
:type unwind: bool
:param match: mongo search string
:type match: dict, optional
:return: {<VALUE>:[<ADDITIONAL_INFORMATION_1>, ...], ...}
'''
logging.warning('deprecation warning: this method will be removed in a future release')
return get_all_value_combinations_of_fields(collection, object_path, additional_information_object_path, unwind, match)
def get_all_value_combinations_of_fields(collection, primary_field, secondary_field, unwind=False, match=None):
'''
Get a dictionary with all unique values of a field as keys and a list of all unique values that a second field takes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment