-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b4d773
commit f064176
Showing
61 changed files
with
25,135 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
AUTHORS | ||
ChangeLog | ||
|
||
#### Python | ||
*.py[co] | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
.eggs/ | ||
parts | ||
bin | ||
develop-eggs | ||
.installed.cfg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
.achievements | ||
.cache/ | ||
|
||
#### Eclipse | ||
*.pydevproject | ||
.project | ||
.metadata | ||
|
||
# Intellij project files | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea | ||
|
||
#### Emacs | ||
\#*\# | ||
.#* | ||
|
||
#### C/C++ | ||
*.o | ||
|
||
#### Haskell | ||
*.hi | ||
flycheck-* | ||
.DS_Store | ||
.env | ||
|
||
### vim | ||
.ropeproject/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
language: python | ||
cache: pip | ||
os: linux | ||
dist: focal # OS+dist should be kept in sync with Dockerfile and UBUNTU_VERSION below. | ||
env: | ||
global: | ||
# Ubuntu version, keep in sync with os + dist above. | ||
- UBUNTU_VERSION=2004 | ||
# MongoDB version should be kept in sync with docker-compose image and mongomock/__init__.py | ||
- MONGODB=5.0.5 | ||
jobs: | ||
include: | ||
- python: pypy3 | ||
env: TOX_ENV=pypy3-pymongo-pyexecjs | ||
- python: 3.6 | ||
env: TOX_ENV=py36-pymongo-pyexecjs | ||
- python: 3.7 | ||
env: TOX_ENV=py37-pymongo-pyexecjs | ||
- python: 3.8 | ||
env: TOX_ENV=py38-pymongo-pyexecjs | ||
- python: 3.9 | ||
env: TOX_ENV=py39-pymongo361-pyexecjs | ||
- python: 3.9 | ||
env: TOX_ENV=py39-pymongo-pyexecjs | ||
- python: "3.10" | ||
env: TOX_ENV=py310 | ||
- python: "3.10" | ||
env: TOX_ENV=py310-pymongo | ||
- python: "3.10" | ||
env: TOX_ENV=py310-pyexecjs | ||
- python: "3.10" | ||
env: TOX_ENV=py310-pymongo-pyexecjs | ||
- python: "3.10" | ||
env: TOX_ENV=pep8 | ||
- python: "3.10" | ||
env: TOX_ENV=pylint | ||
- python: "3.10" | ||
env: TOX_ENV=mypy | ||
- python: "3.10" | ||
env: TOX_ENV=py310-pymongo-pyexecjs-mongodb4 MONGODB=4.4.0 | ||
script: | ||
- tox -e $TOX_ENV | ||
before_install: | ||
- "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10" | ||
- "sudo apt-get update" | ||
- "sudo apt-get install libcurl4 -y" | ||
before_script: | ||
- mkdir ${PWD}/mongodb-linux-x86_64-ubuntu${UBUNTU_VERSION}-${MONGODB}/data | ||
- ${PWD}/mongodb-linux-x86_64-ubuntu${UBUNTU_VERSION}-${MONGODB}/bin/mongod --dbpath ${PWD}/mongodb-linux-x86_64-ubuntu${UBUNTU_VERSION}-${MONGODB}/data --logpath ${PWD}/mongodb-linux-x86_64-ubuntu${UBUNTU_VERSION}-${MONGODB}/mongodb.log --fork | ||
- "until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done" | ||
after_script: | ||
- pkill mongod | ||
install: | ||
- wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu${UBUNTU_VERSION}-${MONGODB}.tgz | ||
- tar xzf mongodb-linux-x86_64-ubuntu${UBUNTU_VERSION}-${MONGODB}.tgz | ||
- ${PWD}/mongodb-linux-x86_64-ubuntu${UBUNTU_VERSION}-${MONGODB}/bin/mongod --version | ||
- pip install tox | ||
deploy: | ||
provider: pypi | ||
username: __token__ | ||
distributions: "bdist_wheel sdist" | ||
password: | ||
secure: "V77o/nLMWGzQ83Ilpb7zqLmQZAGWRScAQDqloBFeriJXrjh8IFETjl4euWYNbFPzlImXb/ujxYoW0Jd3IdWY/WNTgWaasW++RRBSguwhMzAYZrL2xLOMw23zFOtvOuQ9JEKSJyS3G3GvadUdzQC1Wt/H6LPOuclxJF5oIgQUVU9T4mXpr6xMhw1D86joLCFD | ||
juzvZux02CDfUryRmcNqVd8KDYcs7JCLC9bgJxEB/7nBJEdICONZ8J/kGaiMEFDfplgdpAfR1KX/sVBEMYBCG5eDin1S2Bi22mgJ6FRsTegd5dy1sj+sT+sATmWJ8IlCpnkCszg/psQRmSiSkNEpH2mSUp3KZLspUSS+E9gWwbOyYGR+5OwHQ0NQzfCyPf8nADP/l1v3Wxdw | ||
4gqZUynAmV4cWmGP1tnKCpgkGvTr3QRCLmjQGXPnhgYOcJpu6TT5UhmdB5dhdVWYgYqGu27pjAVy+grK9GmtHYAg5MmZC0v6GClEsxeA/qXe9McyFU13YHKppmAelzIcewy+tJxwFmFSPvscHK8Q/j58C5NIOBqVT9GR3jWQqtsvA8yCxmp/KD1sPSF1KSHHUHlCMlmOpmzc | ||
ZLkLaskRWqznM6wxiLs8UeuyaEEA5R/BdZs4oNZFm9ls0gsf5GPZA6r+8GI5OrSWs6uun/+Th+Xys9yNiMU=" | ||
on: | ||
condition: "$TOX_ENV = py310" | ||
python: "3.10" | ||
tags: true | ||
all_branches: true | ||
repo: mongomock/mongomock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# OS+dist should be kept in sync with .travis.yml | ||
FROM ubuntu:focal | ||
|
||
RUN apt-get update && apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev git netcat | ||
RUN curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash | ||
|
||
ENV PYENV_ROOT /root/.pyenv | ||
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH | ||
|
||
RUN eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" | ||
RUN pyenv install 3.6.15 | ||
RUN pyenv install 3.7.9 | ||
RUN pyenv install 3.8.12 | ||
RUN pyenv install 3.9.10 | ||
RUN pyenv install pypy3.8-7.3.7 | ||
RUN pyenv install 3.10.2 | ||
RUN pyenv local 3.6.15 3.7.9 3.8.12 3.9.10 3.10.2 pypy3.8-7.3.7 | ||
|
||
RUN pip install tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Copyright (c) 2012, Rotem Yaari <vmalloc@gmail.com> | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name of organization nor the | ||
names of its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY Rotem Yaari ''AS IS'' AND ANY | ||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL Rotem Yaari BE LIABLE FOR ANY | ||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
include tox.ini | ||
include tests/*.py | ||
include *.rst | ||
include *.txt | ||
include AUTHORS | ||
include Changelog | ||
include LICENSE | ||
include Makefile | ||
recursive-include tests *.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
default: test | ||
|
||
detox-test: | ||
detox | ||
|
||
travis-test: test | ||
|
||
test: env | ||
.env/bin/nosetests -w tests | ||
|
||
coverage-test: env | ||
.env/bin/coverage run .env/bin/nosetests -w tests | ||
|
||
env: .env/.up-to-date | ||
|
||
.env/.up-to-date: setup.py Makefile | ||
virtualenv .env | ||
.env/bin/pip install -e . | ||
.env/bin/pip install nose coverage PyExecJS pymongo | ||
touch .env/.up-to-date | ||
|
||
.PHONY: doc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
What is this? | ||
------------- | ||
This document lists down the features missing in mongomock library. PRs for these features are highly appreciated. | ||
|
||
If I miss to include a feature in the below list, Please feel free to add to the below list and raise a PR. | ||
|
||
* $rename complex operations - https://docs.mongodb.com/manual/reference/operator/update/rename/ | ||
* create_collection options - https://docs.mongodb.com/v3.2/reference/method/db.createCollection/#definition | ||
* bypass_document_validation options | ||
* session options | ||
* codec options | ||
* Operations of the aggregate pipeline: | ||
* `$bucketAuto <https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/>`_ | ||
* `$collStats <https://docs.mongodb.com/manual/reference/operator/aggregation/collStats/>`_ | ||
* `$currentOp <https://docs.mongodb.com/manual/reference/operator/aggregation/currentOp/>`_ | ||
* `$geoNear <https://docs.mongodb.com/manual/reference/operator/aggregation/geoNear/>`_ | ||
* `$indexStats <https://docs.mongodb.com/manual/reference/operator/aggregation/indexStats/>`_ | ||
* `$listLocalSessions <https://docs.mongodb.com/manual/reference/operator/aggregation/listLocalSessions/>`_ | ||
* `$listSessions <https://docs.mongodb.com/manual/reference/operator/aggregation/listSessions/>`_ | ||
* `$merge <https://docs.mongodb.com/manual/reference/operator/aggregation/merge/>`_ | ||
* `$planCacheStats <https://docs.mongodb.com/manual/reference/operator/aggregation/planCacheStats/>`_ | ||
* `$redact <https://docs.mongodb.com/manual/reference/operator/aggregation/redact/>`_ | ||
* `$replaceWith <https://docs.mongodb.com/manual/reference/operator/aggregation/replaceWith/>`_ | ||
* `$sortByCount <https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/>`_ | ||
* `$unset <https://docs.mongodb.com/manual/reference/operator/aggregation/unset/>` _ | ||
* Operators within the aggregate pipeline: | ||
* Arithmetic operations on dates: | ||
* `$add <https://docs.mongodb.com/manual/reference/operator/aggregation/add/>`_ | ||
* Some date operators ($isoDayOfWeek, $isoWeekYear, …) | ||
* Some set operators ($setIntersection, $setDifference, …) | ||
* Some string operators ($indexOfBytes, $trim, …) | ||
* Text search operator ($meta) | ||
* Projection operator $map | ||
* Array operators ($isArray, $indexOfArray, …) | ||
* `$mergeObjects <https://docs.mongodb.com/manual/reference/operator/aggregation/mergeObjects/>`_ | ||
* Some type conversion operators ($convert, …) | ||
* Operators within the query language (find): | ||
* `$jsonSchema <https://docs.mongodb.com/manual/reference/operator/query/jsonSchema/>`_ | ||
* `$text <https://docs.mongodb.com/manual/reference/operator/query/text/>`_ search | ||
* `$where <https://docs.mongodb.com/manual/reference/operator/query/where/>`_ | ||
* `map_reduce <https://docs.mongodb.com/manual/reference/command/mapReduce/>`_ options (``scope`` and ``finalize``) | ||
* Database `command <https://docs.mongodb.com/manual/reference/command/>`_ method except for the ``ping`` command. | ||
* Raw Batch BSON operations (`aggregate_raw_batches` and `find_raw_batches`) | ||
* `Expiring Data <https://docs.mongodb.com/manual/tutorial/expire-data/>`_ |
Oops, something went wrong.