oplnk-python-utils 1.1.2__tar.gz → 1.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {oplnk_python_utils-1.1.2/oplnk_python_utils.egg-info → oplnk_python_utils-1.1.3}/PKG-INFO +1 -1
  2. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/__init__.py +1 -1
  3. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/query/query_builder.py +18 -2
  4. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3/oplnk_python_utils.egg-info}/PKG-INFO +1 -1
  5. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/setup.py +1 -1
  6. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/LICENSE +0 -0
  7. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/MANIFEST.in +0 -0
  8. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/README.md +0 -0
  9. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/cache/__init__.py +0 -0
  10. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/cache/cache_utils.py +0 -0
  11. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/core/__init__.py +0 -0
  12. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/core/data.py +0 -0
  13. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/core/parsing.py +0 -0
  14. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/core/serialization.py +0 -0
  15. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/query/__init__.py +0 -0
  16. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/SOURCES.txt +0 -0
  17. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/dependency_links.txt +0 -0
  18. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/not-zip-safe +0 -0
  19. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/requires.txt +0 -0
  20. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/top_level.txt +0 -0
  21. {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oplnk-python-utils
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: Reusable utilities for caching, data manipulation, parsing, and MongoDB query building
5
5
  Home-page: https://github.com/openlinkspa/oplnk-python-utils
6
6
  Author: OpenLink SpA
@@ -7,7 +7,7 @@ from . import core
7
7
  from . import cache
8
8
  from . import query
9
9
 
10
- __version__ = "1.1.2"
10
+ __version__ = "1.1.3"
11
11
  __author__ = "OpenLink SpA"
12
12
 
13
13
  __all__ = ["core", "cache", "query", "__version__"]
@@ -621,8 +621,24 @@ class QueryBuilder:
621
621
  try:
622
622
  # Use utility function to build proper aggregation expression
623
623
  field_expression = build_aggregation_field_expression(field)
624
- # Use original field name as key for the result
625
- group_id[field] = field_expression
624
+
625
+ # Create nested structure for fields with dot notation
626
+ parts = field.split(".")
627
+ d = group_id
628
+ for i, part in enumerate(parts[:-1]):
629
+ # If a non-dict value is at the path, it can't be extended
630
+ if part in d and not isinstance(d[part], dict):
631
+ # To avoid overwriting, you could add a unique suffix, or handle as an error
632
+ # For now, let's just print a warning and continue
633
+ print(
634
+ f"Warning: conflicting path in distinct fields for '{field}' at part '{part}'."
635
+ )
636
+ d = d.setdefault(f"{part}_{i}", {})
637
+ else:
638
+ d = d.setdefault(part, {})
639
+
640
+ d[parts[-1]] = field_expression
641
+
626
642
  except ValueError as e:
627
643
  # Log error and skip invalid field
628
644
  print(f"Warning: Skipping invalid field '{field}' in distinct: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oplnk-python-utils
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: Reusable utilities for caching, data manipulation, parsing, and MongoDB query building
5
5
  Home-page: https://github.com/openlinkspa/oplnk-python-utils
6
6
  Author: OpenLink SpA
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="oplnk-python-utils",
5
- version="1.1.2",
5
+ version="1.1.3",
6
6
  author="OpenLink SpA",
7
7
  author_email="contacto@openlink.cl",
8
8
  description="Reusable utilities for caching, data manipulation, parsing, and MongoDB query building",