Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c2c2178
update docs
VianneyMI Apr 24, 2025
8bb8a33
Move to uv
VianneyMI Apr 24, 2025
de6eb4b
Syncing readme and index
VianneyMI Apr 24, 2025
e82bc71
Synced docs
VianneyMI Apr 24, 2025
bae9537
Updated mongodb-umbrella page
VianneyMI Apr 24, 2025
e527778
Improved the why-use-monggregate page
VianneyMI Apr 24, 2025
a09519d
Update doc
VianneyMI Apr 26, 2025
1075741
Improved how to guides
VianneyMI Apr 26, 2025
276d917
Docs improvements
VianneyMI Apr 26, 2025
8e418e6
Improved look and feel
VianneyMI Apr 26, 2025
6a16f6a
Promote one level up the common pipelines use cases
VianneyMI Apr 26, 2025
da23dce
Added context about dollar sign
VianneyMI Apr 26, 2025
1794ca7
Updated changelog
VianneyMI Apr 26, 2025
e156c81
WIP improving code snippets look and feel
VianneyMI Apr 26, 2025
38da957
Improved look and feel of code snippets
VianneyMI Apr 26, 2025
28112f6
Refactoring tests
VianneyMI Apr 26, 2025
ebd6b5a
Move old test to test_legacy
VianneyMI Apr 26, 2025
0ce4cab
Covering each module with a dedicated test file
VianneyMI Apr 26, 2025
07c0d17
Add test on base
VianneyMI May 9, 2025
3515271
Test dollar
VianneyMI May 9, 2025
6fb46e7
Add tests on fields
VianneyMI May 9, 2025
f0a5e8f
Add test on pipeline
VianneyMI May 9, 2025
a0e7f69
test utils
VianneyMI May 9, 2025
833d38f
Add tests bucket auto
VianneyMI May 10, 2025
efc3057
Tests bucket
VianneyMI May 11, 2025
e7b102c
test for count, group and limit
VianneyMI May 11, 2025
6a16660
Renamed stages in tests as tests_stages
VianneyMI May 11, 2025
bab561b
test -> tests for tests folders
VianneyMI May 11, 2025
cb0948b
Tests lookup
VianneyMI May 11, 2025
3ca02bf
Tests on match and lookup
VianneyMI May 11, 2025
da46f70
Tests out and replace_root
VianneyMI May 15, 2025
114408b
Tests fir sample, set, skip, sort_by_count, sort, stage, union_with, …
VianneyMI May 15, 2025
e95f96a
test vector search
VianneyMI May 15, 2025
5499a55
Fixed tests
VianneyMI May 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
venv
.venv
.coverage
.env
notes.md
**/*~
**/notebook.ipynb
**/report.html
.mypy_cache
.vscode
**/__pycache__/
tracker.xlsx
~$tracker.xlsx
monggregate.egg-info
UNKNOWN.egg-info
dist
test.py
site/
.pypirc
venv
.venv
.coverage
.env
notes.md
**/*~
**/notebook.ipynb
**/report.html
.mypy_cache
.vscode
**/__pycache__/
tracker.xlsx
~$tracker.xlsx
monggregate.egg-info
UNKNOWN.egg-info
dist
test.py
site/
.pypirc
clean_pycache.ps1
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
323 changes: 212 additions & 111 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,111 +1,212 @@
# Release Notes

## 0.18.0

### Fixes

* Fixed bug preventing to use `Compound` operator with `Search` and `SearchMeta` classes.

### New Features

* Pipelinized `Search` and `SearchMeta` classes. That is complex expressions can be built step by step by chaining operators.
* Updated `search` method in `¨Pipeline` class to ease the use of the search stages.
* Clarified and simplified faceted search

### Refactoring

* Use operators rather than statement in `Compound` class
* Factorized `Search` and `SearchMeta` classes by creating a `SearchBase` class
* Use `CountOptions` rather than raw dicts
* Created `AnyStage` union type

### Docs

* Spelling and grammar fixes

## 0.17.0

### Docs

* First version of the documentation :champagne: !

## 0.16.2

### Fixes

* Allow to use iterable and dicts to group by in Group class and pipeline group function

## 0.16.1

### Fixes

* Fixed replace_root by passing document argument to ReplaceRoot class


## 0.16.0

### New Features

* Created S object (represents $ sign since it is not a valid variable name in python) to store all MongoDB operators and to create references to fields
* Created SS object (represents $$) to store aggregation variables and referenes to user variables
* Interfaced a chunk of new operators(add, divide, multiply, pow, substract, cond, if_null, switch, millisecond, date_from_string, date_to_string, type_)
* Integrated new operators in Expressions class


### Refactoring

* Redefined Expressions completely. Simplified and clarified how they can be used when using this package.
* Removed index module that was at the root of the package (monggregate.index.py -> ø)
* Removed expressions subpackage (monggregate.expression -> ø)
* Moved expressions fields module to the root of the package (monggregate.expressions.fields.py -> monggregate.fields.py)
* Removed expressions aggregation_variables module (monggregate.expression.aggregation_variables.py -> ø)
* Moved the enums that were defined in index to a more relevant place. Ex OperatorEnum is now in monggregate.operators.py

### Breaking Changes

* Operators now return python objects rather than expressions/statements.
NOTE: The wording might change for clarification purposes.
statement might be renamed expression and resolve might renamed express
To do so, some arguments might need to be renamed in the operators
* Expressions subpackage has been exploded and some parts have been deleted

### Documentation

* Updated readme to reflect changes in the packge. Readme now focuses on the recommended way to use the package and clarifies how to use MongoDB operators.

## 0.15.0

### Fixes

* Fixed bug in `Search.from_operator()` classmethod due to recent change in operator type in `Search` class
* Fixed misspelled operators in constructors map in `Search` class
* Fixed missing aliases and missing kwargs reduction in some `Search` operators


## 0.14.1

### Fixes

* Fixed autocompletion

### Refactoring

* Import pydantic into base.py and using base.py to access pydantic features


## 0.14.0

### Upgrades

* Make package compatible with pydantic V2

### Refactoring

* Use an import trick to still use pydantic V1 even on environments using pydantic V2
* Centralized pydantic import into base.py in order to avoid having to use import trick on multiple files

### Documentation

* Updated readme to better reflect current state of the pacakge.
* Started a changelog ! :champagne:
* Major change in the doc
# Changelog

All notable changes to this project will be documented in this file.

---

## 🚀 [0.21.0](https://github.com/monggregate/monggregate/releases/tag/v0.21.0) - 2024-04-17
<details>
<summary>Details</summary>
<br>
Identical to 0.21.0b1.
</details>

## 🧪 [0.21.0b1](https://github.com/monggregate/monggregate/releases/tag/v0.21.0b1) - 2024-04-17
<details>
<summary>Details</summary>
<br>
<h3>📖 Documentation</h3>
<p>Improved docstrings in stages and operators.</p>
</details>

## 🧪 [0.21.0b0](https://github.com/monggregate/monggregate/releases/tag/v0.21.0b0) - 2024-01-30
<details>
<summary>Details</summary>
<br>
<h3>✨ New Features</h3>
<p>Implemented <code>VectorSearch</code> pipeline stage.</p>
</details>

---

## 🚀 [0.20.0](https://github.com/monggregate/monggregate/releases/tag/v0.20.0) - 2024-01-27
<details>
<summary>Details</summary>
<br>
<h3>🐛 Bug Fixes</h3>
<p>Fixed bug in <code>Search</code> where some arguments were not properly forwarded to the appropriate operators.</p>

<h3>📖 Documentation</h3>
<p>Added documentation for <code>search</code> and <code>search_meta</code> pipeline stages.</p>
</details>

---

## 🚀 [0.19.1](https://github.com/monggregate/monggregate/releases/tag/v0.19.1) - 2023-12-28
<details>
<summary>Details</summary>
<br>
<h3>🐛 Bug Fixes</h3>
<p>Fixed build, packaging and release process.</p>
</details>

---

## 🚀 [0.19.0](https://github.com/monggregate/monggregate/releases/tag/v0.19.0) - 2023-12-20
<details>
<summary>Details</summary>
<br>
Failed attempt to fix previously broken release.
</details>

---

## 🚀 [0.18.0](https://github.com/monggregate/monggregate/releases/tag/v0.18.0) - 2023-11-12
<details>
<summary>Details</summary>
<br>
<blockquote>⚠️ This release is not available on PyPI as it was broken.</blockquote>

<h3>🐛 Bug Fixes</h3>
<p>Fixed bug preventing use of <code>Compound</code> operator with <code>Search</code> and <code>SearchMeta</code> classes.</p>

<h3>✨ New Features</h3>
<ul>
<li>Pipelinized <code>Search</code> and <code>SearchMeta</code> classes. Complex expressions can now be built step by step by chaining operators.</li>
<li>Updated <code>search</code> method in <code>Pipeline</code> class to ease the use of search stages.</li>
<li>Clarified and simplified faceted search.</li>
</ul>

<h3>♻️ Refactoring</h3>
<ul>
<li>Use operators rather than statement in <code>Compound</code> class.</li>
<li>Factorized <code>Search</code> and <code>SearchMeta</code> classes by creating a <code>SearchBase</code> class.</li>
<li>Use <code>CountOptions</code> rather than raw dicts.</li>
<li>Created <code>AnyStage</code> union type.</li>
</ul>

<h3>📖 Documentation</h3>
<p>Spelling and grammar fixes.</p>
</details>

---

## 🚀 [0.17.0](https://github.com/monggregate/monggregate/releases/tag/v0.17.0) - 2023-10-26
<details>
<summary>Details</summary>
<br>
<h3>📖 Documentation</h3>
<p>First version of the documentation 🍾!</p>
</details>

---

## 🚀 [0.16.2](https://github.com/monggregate/monggregate/releases/tag/v0.16.2) - 2023-09-17
<details>
<summary>Details</summary>
<br>
<h3>🐛 Bug Fixes</h3>
<p>Allow use of iterables and dicts to group by in <code>Group</code> class and pipeline group function.</p>
</details>

---

## 🚀 [0.16.1](https://github.com/monggregate/monggregate/releases/tag/v0.16.1) - 2023-09-08
<details>
<summary>Details</summary>
<br>
<h3>🐛 Bug Fixes</h3>
<p>Fixed <code>replace_root</code> by passing document argument to <code>ReplaceRoot</code> class.</p>
</details>

---

## 🚀 [0.16.0](https://github.com/monggregate/monggregate/releases/tag/v0.16.0) - 2023-08-29
<details>
<summary>Details</summary>
<br>
<h3>✨ New Features</h3>
<ul>
<li>Created <code>S</code> object (represents <code>$</code> sign since it is not a valid variable name in Python) to store all MongoDB operators and to create references to fields.</li>
<li>Created <code>SS</code> object (represents <code>$$</code>) to store aggregation variables and references to user variables.</li>
<li>Interfaced new operators: <code>add</code>, <code>divide</code>, <code>multiply</code>, <code>pow</code>, <code>subtract</code>, <code>cond</code>, <code>if_null</code>, <code>switch</code>, <code>millisecond</code>, <code>date_from_string</code>, <code>date_to_string</code>, <code>type_</code>.</li>
<li>Integrated new operators in <code>Expressions</code> class.</li>
</ul>

<h3>♻️ Refactoring</h3>
<ul>
<li>Redefined <code>Expressions</code> completely. Simplified and clarified how they can be used.</li>
<li>Removed index module from the root of the package (<code>monggregate.index.py</code> → ∅).</li>
<li>Removed expressions subpackage (<code>monggregate.expression</code> → ∅).</li>
<li>Moved expressions fields module to the root (<code>monggregate.expressions.fields.py</code> → <code>monggregate.fields.py</code>).</li>
<li>Removed expressions aggregation_variables module (<code>monggregate.expression.aggregation_variables.py</code> → ∅).</li>
<li>Moved enums to more relevant locations (e.g., <code>OperatorEnum</code> is now in <code>monggregate.operators.py</code>).</li>
</ul>

<h3>💥 Breaking Changes</h3>
<ul>
<li>Operators now return Python objects rather than expressions/statements.</li>
<blockquote><strong>Note</strong>: The wording might change for clarification purposes.
"statement" might be renamed "expression" and "resolve" might be renamed "express".
Some argument names in operators might need to be renamed.</blockquote>
<li>Expressions subpackage has been restructured with some parts being removed.</li>
</ul>

<h3>📖 Documentation</h3>
<p>Updated README to reflect changes in the package, focusing on the recommended usage and clarifying MongoDB operators.</p>
</details>

---

## 🚀 [0.15.0](https://github.com/monggregate/monggregate/releases/tag/v0.15.0) - 2023-08-09
<details>
<summary>Details</summary>
<br>
<h3>🐛 Bug Fixes</h3>
<ul>
<li>Fixed bug in <code>Search.from_operator()</code> classmethod due to recent change in operator type in <code>Search</code> class.</li>
<li>Fixed misspelled operators in constructors map in <code>Search</code> class.</li>
<li>Fixed missing aliases and missing kwargs reduction in some <code>Search</code> operators.</li>
</ul>
</details>

---

## 🚀 [0.14.1](https://github.com/monggregate/monggregate/releases/tag/v0.14.1) - 2023-08-06
<details>
<summary>Details</summary>
<br>
<h3>🐛 Bug Fixes</h3>
<p>Fixed autocompletion.</p>

<h3>♻️ Refactoring</h3>
<p>Import pydantic into <code>base.py</code> and use <code>base.py</code> to access pydantic features.</p>
</details>

---

## 🚀 [0.14.0](https://github.com/monggregate/monggregate/releases/tag/v0.14.0) - 2023-07-23
<details>
<summary>Details</summary>
<br>
<h3>⬆️ Upgrades</h3>
<p>Made package compatible with Pydantic V2.</p>

<h3>♻️ Refactoring</h3>
<ul>
<li>Used an import trick to still use Pydantic V1 even in environments using Pydantic V2.</li>
<li>Centralized pydantic import into <code>base.py</code> to avoid having to use import trick in multiple files.</li>
</ul>

<h3>📖 Documentation</h3>
<ul>
<li>Updated README to better reflect current state of the package.</li>
<li>Started a changelog! 🍾</li>
<li>Major improvements to documentation.</li>
</ul>
</details>


## What about previous versions?

Prior to 0.14.0, the changelog was not kept.
Loading