[Python-modules-commits] [python-mongoengine] 04/13: Import python-mongoengine_0.10.6.orig.tar.gz
Orestis Ioannou
oorestisime-guest at moszumanska.debian.org
Wed Mar 9 01:14:15 UTC 2016
This is an automated email from the git hooks/post-receive script.
oorestisime-guest pushed a commit to branch master
in repository python-mongoengine.
commit dee8f65c630add7886c28ec95948712fcdc6c620
Author: Orestis Ioannou <orestis at oioannou.com>
Date: Wed Mar 9 00:57:44 2016 +0100
Import python-mongoengine_0.10.6.orig.tar.gz
---
.gitignore | 17 -
.travis.yml | 12 -
AUTHORS | 138 +-
LICENSE | 8 +-
PKG-INFO | 160 +
README.rst | 63 +-
benchmark.py | 182 --
docs/_themes/nature/static/nature.css_t | 229 --
docs/_themes/nature/static/pygments.css | 54 -
docs/_themes/nature/theme.conf | 4 -
docs/_themes/sphinx_rtd_theme/__init__.py | 17 +
docs/_themes/sphinx_rtd_theme/breadcrumbs.html | 15 +
docs/_themes/sphinx_rtd_theme/footer.html | 30 +
docs/_themes/sphinx_rtd_theme/layout.html | 142 +
docs/_themes/sphinx_rtd_theme/layout_old.html | 205 ++
docs/_themes/sphinx_rtd_theme/search.html | 50 +
docs/_themes/sphinx_rtd_theme/searchbox.html | 5 +
.../sphinx_rtd_theme/static/css/badge_only.css | 1 +
docs/_themes/sphinx_rtd_theme/static/css/theme.css | 1 +
docs/_themes/sphinx_rtd_theme/static/favicon.ico | Bin 0 -> 6261 bytes
.../static/font/fontawesome_webfont.eot | Bin 0 -> 37405 bytes
.../static/font/fontawesome_webfont.svg | 399 +++
.../static/font/fontawesome_webfont.ttf | Bin 0 -> 79076 bytes
.../static/font/fontawesome_webfont.woff | Bin 0 -> 43572 bytes
docs/_themes/sphinx_rtd_theme/static/js/theme.js | 16 +
docs/_themes/sphinx_rtd_theme/theme.conf | 8 +
docs/_themes/sphinx_rtd_theme/versions.html | 37 +
docs/apireference.rst | 109 +-
docs/changelog.rst | 467 ++-
docs/code/tumblelog.py | 7 +-
docs/conf.py | 24 +-
docs/django.rst | 97 +-
docs/guide/connecting.rst | 93 +-
docs/guide/defining-documents.rst | 381 ++-
docs/guide/document-instances.rst | 55 +-
docs/guide/gridfs.rst | 26 +-
docs/guide/index.rst | 2 +
docs/guide/installing.rst | 4 +-
docs/guide/mongomock.rst | 21 +
docs/guide/querying.rst | 222 +-
docs/guide/signals.rst | 129 +-
docs/guide/text-indexes.rst | 51 +
docs/index.rst | 59 +-
docs/tutorial.rst | 96 +-
docs/upgrade.rst | 475 ++-
mongoengine.egg-info/PKG-INFO | 160 +
mongoengine.egg-info/SOURCES.txt | 70 +
mongoengine.egg-info/dependency_links.txt | 1 +
mongoengine.egg-info/requires.txt | 1 +
mongoengine.egg-info/top_level.txt | 1 +
mongoengine/__init__.py | 15 +-
mongoengine/base.py | 1336 --------
mongoengine/base/__init__.py | 8 +
mongoengine/base/common.py | 26 +
mongoengine/base/datastructures.py | 481 +++
mongoengine/base/document.py | 1022 ++++++
mongoengine/base/fields.py | 624 ++++
mongoengine/base/metaclasses.py | 442 +++
mongoengine/common.py | 55 +
mongoengine/connection.py | 129 +-
mongoengine/context_managers.py | 221 ++
mongoengine/dereference.py | 138 +-
mongoengine/django/__init__.py | 0
mongoengine/django/auth.py | 159 -
mongoengine/django/sessions.py | 74 -
mongoengine/django/shortcuts.py | 46 -
mongoengine/django/storage.py | 112 -
mongoengine/django/tests.py | 21 -
mongoengine/document.py | 768 ++++-
mongoengine/errors.py | 143 +
mongoengine/fields.py | 1203 +++++--
mongoengine/python_support.py | 37 +
mongoengine/queryset.py | 1886 -----------
mongoengine/queryset/__init__.py | 11 +
mongoengine/queryset/base.py | 1822 +++++++++++
mongoengine/queryset/field_list.py | 85 +
mongoengine/queryset/manager.py | 57 +
mongoengine/queryset/queryset.py | 163 +
mongoengine/queryset/transform.py | 384 +++
mongoengine/queryset/visitor.py | 159 +
mongoengine/signals.py | 7 +-
mongoengine/tests.py | 59 -
python-mongoengine.spec | 54 -
requirements.txt | 1 -
setup.cfg | 19 +-
setup.py | 53 +-
tests/__init__.py | 0
tests/fixtures.py | 23 -
tests/mongoengine.png | Bin 8313 -> 0 bytes
tests/test_connection.py | 98 -
tests/test_dereference.py | 843 -----
tests/test_django.py | 110 -
tests/test_document.py | 3142 ------------------
tests/test_dynamic_document.py | 502 ---
tests/test_fields.py | 2119 ------------
tests/test_queryset.py | 3366 --------------------
tests/test_replicaset_connection.py | 32 -
tests/test_signals.py | 230 --
98 files changed, 11005 insertions(+), 15624 deletions(-)
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 7c0a917..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-.*
-!.gitignore
-*~
-*.py[co]
-.*.sw[po]
-*.egg
-docs/.build
-docs/_build
-build/
-dist/
-mongoengine.egg-info/
-env/
-.settings
-.project
-.pydevproject
-tests/test_bugfix.py
-htmlcov/
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index e38053f..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-# http://travis-ci.org/#!/MongoEngine/mongoengine
-language: python
-python:
- - 2.6
- - 2.7
-install:
- - sudo apt-get install zlib1g zlib1g-dev
- - sudo ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib/
- - pip install PIL --use-mirrors ; true
- - python setup.py install
-script:
- - python setup.py test
\ No newline at end of file
diff --git a/AUTHORS b/AUTHORS
index 90dadcf..b087f41 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -8,15 +8,14 @@ Florian Schlachter <flori at n-schlachter.de>
Steve Challis <steve at stevechallis.com>
Wilson Júnior <wilsonpjunior at gmail.com>
Dan Crosta https://github.com/dcrosta
+Laine Herron https://github.com/LaineHerron
CONTRIBUTORS
-Dervived from the git logs, inevitably incomplete but all of whom and others
+Derived from the git logs, inevitably incomplete but all of whom and others
have submitted patches, reported bugs and generally helped make MongoEngine
that much better:
- * Harry Marr
- * Ross Lawley
* blackbrrr
* Florian Schlachter
* Vincent Driessen
@@ -24,7 +23,7 @@ that much better:
* flosch
* Deepak Thukral
* Colin Howe
- * Wilson Júnior
+ * Wilson Júnior (https://github.com/wpjunior)
* Alistair Roche
* Dan Crosta
* Viktor Kerkez
@@ -76,7 +75,7 @@ that much better:
* Adam Parrish
* jpfarias
* jonrscott
- * Alice Zoë Bevan-McGregor
+ * Alice Zoë Bevan-McGregor (https://github.com/amcgregor/)
* Stephen Young
* tkloc
* aid
@@ -105,8 +104,133 @@ that much better:
* Adam Reeve
* Anthony Nemitz
* deignacio
- * shaunduncan
+ * Shaun Duncan
* Meir Kriheli
* Andrey Fedoseev
* aparajita
- * Tristan Escalada
\ No newline at end of file
+ * Tristan Escalada
+ * Alexander Koshelev
+ * Jaime Irurzun
+ * Alexandre González
+ * Thomas Steinacher
+ * Tommi Komulainen
+ * Peter Landry
+ * biszkoptwielki
+ * Anton Kolechkin
+ * Sergey Nikitin
+ * psychogenic
+ * Stefan Wójcik (https://github.com/wojcikstefan)
+ * dimonb
+ * Garry Polley
+ * James Slagle
+ * Adrian Scott
+ * Peter Teichman
+ * Jakub Kot
+ * Jorge Bastida
+ * Aleksandr Sorokoumov
+ * Yohan Graterol
+ * bool-dev
+ * Russ Weeks
+ * Paul Swartz
+ * Sundar Raman
+ * Benoit Louy
+ * Loic Raucy (https://github.com/lraucy)
+ * hellysmile
+ * Jaepil Jeong
+ * Daniil Sharou
+ * Pete Campton
+ * Martyn Smith
+ * Marcelo Anton
+ * Aleksey Porfirov (https://github.com/lexqt)
+ * Nicolas Trippar
+ * Manuel Hermann
+ * Gustavo Gawryszewski
+ * Max Countryman
+ * caitifbrito
+ * lcya86 刘春洋
+ * Martin Alderete (https://github.com/malderete)
+ * Nick Joyce
+ * Jared Forsyth
+ * Kenneth Falck
+ * Lukasz Balcerzak
+ * Nicolas Cortot
+ * Alex (https://github.com/kelsta)
+ * Jin Zhang
+ * Daniel Axtens
+ * Leo-Naeka
+ * Ryan Witt (https://github.com/ryanwitt)
+ * Jiequan (https://github.com/Jiequan)
+ * hensom (https://github.com/hensom)
+ * zhy0216 (https://github.com/zhy0216)
+ * istinspring (https://github.com/istinspring)
+ * Massimo Santini (https://github.com/mapio)
+ * Nigel McNie (https://github.com/nigelmcnie)
+ * ygbourhis (https://github.com/ygbourhis)
+ * Bob Dickinson (https://github.com/BobDickinson)
+ * Michael Bartnett (https://github.com/michaelbartnett)
+ * Alon Horev (https://github.com/alonho)
+ * Kelvin Hammond (https://github.com/kelvinhammond)
+ * Jatin Chopra (https://github.com/jatin)
+ * Paul Uithol (https://github.com/PaulUithol)
+ * Thom Knowles (https://github.com/fleat)
+ * Paul (https://github.com/squamous)
+ * Olivier Cortès (https://github.com/Karmak23)
+ * crazyzubr (https://github.com/crazyzubr)
+ * FrankSomething (https://github.com/FrankSomething)
+ * Alexandr Morozov (https://github.com/LK4D4)
+ * mishudark (https://github.com/mishudark)
+ * Joe Friedl (https://github.com/grampajoe)
+ * Daniel Ward (https://github.com/danielward)
+ * Aniket Deshpande (https://github.com/anicake)
+ * rfkrocktk (https://github.com/rfkrocktk)
+ * Gustavo Andrés Angulo (https://github.com/woakas)
+ * Dmytro Popovych (https://github.com/drudim)
+ * Tom (https://github.com/tomprimozic)
+ * j0hnsmith (https://github.com/j0hnsmith)
+ * Damien Churchill (https://github.com/damoxc)
+ * Jonathan Simon Prates (https://github.com/jonathansp)
+ * Thiago Papageorgiou (https://github.com/tmpapageorgiou)
+ * Omer Katz (https://github.com/thedrow)
+ * Falcon Dai (https://github.com/falcondai)
+ * Polyrabbit (https://github.com/polyrabbit)
+ * Sagiv Malihi (https://github.com/sagivmalihi)
+ * Dmitry Konishchev (https://github.com/KonishchevDmitry)
+ * Martyn Smith (https://github.com/martynsmith)
+ * Andrei Zbikowski (https://github.com/b1naryth1ef)
+ * Ronald van Rij (https://github.com/ronaldvanrij)
+ * François Schmidts (https://github.com/jaesivsm)
+ * Eric Plumb (https://github.com/professorplumb)
+ * Damien Churchill (https://github.com/damoxc)
+ * Aleksandr Sorokoumov (https://github.com/Gerrrr)
+ * Clay McClure (https://github.com/claymation)
+ * Bruno Rocha (https://github.com/rochacbruno)
+ * Norberto Leite (https://github.com/nleite)
+ * Bob Cribbs (https://github.com/bocribbz)
+ * Jay Shirley (https://github.com/jshirley)
+ * David Bordeynik (https://github.com/DavidBord)
+ * Axel Haustant (https://github.com/noirbizarre)
+ * David Czarnecki (https://github.com/czarneckid)
+ * Vyacheslav Murashkin (https://github.com/a4tunado)
+ * André Ericson https://github.com/aericson)
+ * Mikhail Moshnogorsky (https://github.com/mikhailmoshnogorsky)
+ * Diego Berrocal (https://github.com/cestdiego)
+ * Matthew Ellison (https://github.com/seglberg)
+ * Jimmy Shen (https://github.com/jimmyshen)
+ * J. Fernando Sánchez (https://github.com/balkian)
+ * Michael Chase (https://github.com/rxsegrxup)
+ * Eremeev Danil (https://github.com/elephanter)
+ * Catstyle Lee (https://github.com/Catstyle)
+ * Kiryl Yermakou (https://github.com/rma4ok)
+ * Matthieu Rigal (https://github.com/MRigal)
+ * Charanpal Dhanjal (https://github.com/charanpald)
+ * Emmanuel Leblond (https://github.com/touilleMan)
+ * Breeze.Kay (https://github.com/9nix00)
+ * Vicki Donchenko (https://github.com/kivistein)
+ * Emile Caron (https://github.com/emilecaron)
+ * Amit Lichtenberg (https://github.com/amitlicht)
+ * Lars Butler (https://github.com/larsbutler)
+ * George Macon (https://github.com/gmacon)
+ * Ashley Whetter (https://github.com/AWhetter)
+ * Paul-Armand Verhaegen (https://github.com/paularmand)
+ * Steven Rossiter (https://github.com/BeardedSteve)
+ * Luo Peng (https://github.com/RussellLuo)
diff --git a/LICENSE b/LICENSE
index e33b2c5..45f233c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,5 @@
-Copyright (c) 2009-2010 Harry Marr
-
+Copyright (c) 2009 See AUTHORS
+
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
@@ -8,10 +8,10 @@ copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
-
+
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..e1e1e88
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,160 @@
+Metadata-Version: 1.0
+Name: mongoengine
+Version: 0.10.6
+Summary: MongoEngine is a Python Object-Document Mapper for working with MongoDB.
+Home-page: http://mongoengine.org/
+Author: Ross Lawley
+Author-email: ross.lawley@{nospam}gmail.com
+License: MIT
+Download-URL: https://github.com/MongoEngine/mongoengine/tarball/master
+Description: ===========
+ MongoEngine
+ ===========
+ :Info: MongoEngine is an ORM-like layer on top of PyMongo.
+ :Repository: https://github.com/MongoEngine/mongoengine
+ :Author: Harry Marr (http://github.com/hmarr)
+ :Maintainer: Ross Lawley (http://github.com/rozza)
+
+ .. image:: https://secure.travis-ci.org/MongoEngine/mongoengine.png?branch=master
+ :target: http://travis-ci.org/MongoEngine/mongoengine
+
+ .. image:: https://coveralls.io/repos/MongoEngine/mongoengine/badge.png?branch=master
+ :target: https://coveralls.io/r/MongoEngine/mongoengine?branch=master
+
+ .. image:: https://landscape.io/github/MongoEngine/mongoengine/master/landscape.png
+ :target: https://landscape.io/github/MongoEngine/mongoengine/master
+ :alt: Code Health
+
+ About
+ =====
+ MongoEngine is a Python Object-Document Mapper for working with MongoDB.
+ Documentation available at http://mongoengine-odm.rtfd.org - there is currently
+ a `tutorial <http://readthedocs.org/docs/mongoengine-odm/en/latest/tutorial.html>`_, a `user guide
+ <https://mongoengine-odm.readthedocs.org/en/latest/guide/index.html>`_ and an `API reference
+ <http://readthedocs.org/docs/mongoengine-odm/en/latest/apireference.html>`_.
+
+ Installation
+ ============
+ We recommend the use of `virtualenv <https://virtualenv.pypa.io/>`_ and of
+ `pip <https://pip.pypa.io/>`_. You can then use ``pip install -U mongoengine``.
+ You may also have `setuptools <http://peak.telecommunity.com/DevCenter/setuptools>`_ and thus
+ you can use ``easy_install -U mongoengine``. Otherwise, you can download the
+ source from `GitHub <http://github.com/MongoEngine/mongoengine>`_ and run ``python
+ setup.py install``.
+
+ Dependencies
+ ============
+ - pymongo>=2.7.1
+ - sphinx (optional - for documentation generation)
+
+ Optional Dependencies
+ ---------------------
+ - **Image Fields**: Pillow>=2.0.0
+ - dateutil>=2.1.0
+
+ .. note
+ MongoEngine always runs it's test suite against the latest patch version of each dependecy. e.g.: PyMongo 3.0.1
+
+ Examples
+ ========
+ Some simple examples of what MongoEngine code looks like:
+
+ .. code :: python
+
+ class BlogPost(Document):
+ title = StringField(required=True, max_length=200)
+ posted = DateTimeField(default=datetime.datetime.now)
+ tags = ListField(StringField(max_length=50))
+
+ class TextPost(BlogPost):
+ content = StringField(required=True)
+
+ class LinkPost(BlogPost):
+ url = StringField(required=True)
+
+ # Create a text-based post
+ >>> post1 = TextPost(title='Using MongoEngine', content='See the tutorial')
+ >>> post1.tags = ['mongodb', 'mongoengine']
+ >>> post1.save()
+
+ # Create a link-based post
+ >>> post2 = LinkPost(title='MongoEngine Docs', url='hmarr.com/mongoengine')
+ >>> post2.tags = ['mongoengine', 'documentation']
+ >>> post2.save()
+
+ # Iterate over all posts using the BlogPost superclass
+ >>> for post in BlogPost.objects:
+ ... print '===', post.title, '==='
+ ... if isinstance(post, TextPost):
+ ... print post.content
+ ... elif isinstance(post, LinkPost):
+ ... print 'Link:', post.url
+ ... print
+ ...
+
+ >>> len(BlogPost.objects)
+ 2
+ >>> len(TextPost.objects)
+ 1
+ >>> len(LinkPost.objects)
+ 1
+
+ # Find tagged posts
+ >>> len(BlogPost.objects(tags='mongoengine'))
+ 2
+ >>> len(BlogPost.objects(tags='mongodb'))
+ 1
+
+ Tests
+ =====
+ To run the test suite, ensure you are running a local instance of MongoDB on
+ the standard port, and run: ``python setup.py nosetests``.
+
+ To run the test suite on every supported Python version and every supported PyMongo version,
+ you can use ``tox``.
+ tox and each supported Python version should be installed in your environment:
+
+ .. code-block:: shell
+
+ # Install tox
+ $ pip install tox
+ # Run the test suites
+ $ tox
+
+ If you wish to run one single or selected tests, use the nosetest convention. It will find the folder,
+ eventually the file, go to the TestClass specified after the colon and eventually right to the single test.
+ Also use the -s argument if you want to print out whatever or access pdb while testing.
+
+ .. code-block:: shell
+
+ $ python setup.py nosetests --tests tests/fields/fields.py:FieldTest.test_cls_field -s
+
+ Community
+ =========
+ - `MongoEngine Users mailing list
+ <http://groups.google.com/group/mongoengine-users>`_
+ - `MongoEngine Developers mailing list
+ <http://groups.google.com/group/mongoengine-dev>`_
+ - `#mongoengine IRC channel <http://webchat.freenode.net/?channels=mongoengine>`_
+
+ Contributing
+ ============
+ We welcome contributions! see the `Contribution guidelines <https://github.com/MongoEngine/mongoengine/blob/master/CONTRIBUTING.rst>`_
+
+Platform: any
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Database
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/README.rst b/README.rst
index 548737c..08e9502 100644
--- a/README.rst
+++ b/README.rst
@@ -2,35 +2,55 @@
MongoEngine
===========
:Info: MongoEngine is an ORM-like layer on top of PyMongo.
+:Repository: https://github.com/MongoEngine/mongoengine
:Author: Harry Marr (http://github.com/hmarr)
:Maintainer: Ross Lawley (http://github.com/rozza)
.. image:: https://secure.travis-ci.org/MongoEngine/mongoengine.png?branch=master
:target: http://travis-ci.org/MongoEngine/mongoengine
+.. image:: https://coveralls.io/repos/MongoEngine/mongoengine/badge.png?branch=master
+ :target: https://coveralls.io/r/MongoEngine/mongoengine?branch=master
+
+.. image:: https://landscape.io/github/MongoEngine/mongoengine/master/landscape.png
+ :target: https://landscape.io/github/MongoEngine/mongoengine/master
+ :alt: Code Health
+
About
=====
MongoEngine is a Python Object-Document Mapper for working with MongoDB.
Documentation available at http://mongoengine-odm.rtfd.org - there is currently
a `tutorial <http://readthedocs.org/docs/mongoengine-odm/en/latest/tutorial.html>`_, a `user guide
-<http://readthedocs.org/docs/mongoengine-odm/en/latest/userguide.html>`_ and an `API reference
+<https://mongoengine-odm.readthedocs.org/en/latest/guide/index.html>`_ and an `API reference
<http://readthedocs.org/docs/mongoengine-odm/en/latest/apireference.html>`_.
Installation
============
-If you have `setuptools <http://peak.telecommunity.com/DevCenter/setuptools>`_
+We recommend the use of `virtualenv <https://virtualenv.pypa.io/>`_ and of
+`pip <https://pip.pypa.io/>`_. You can then use ``pip install -U mongoengine``.
+You may also have `setuptools <http://peak.telecommunity.com/DevCenter/setuptools>`_ and thus
you can use ``easy_install -U mongoengine``. Otherwise, you can download the
source from `GitHub <http://github.com/MongoEngine/mongoengine>`_ and run ``python
setup.py install``.
Dependencies
============
-- pymongo 2.1.1+
+- pymongo>=2.7.1
- sphinx (optional - for documentation generation)
+Optional Dependencies
+---------------------
+- **Image Fields**: Pillow>=2.0.0
+- dateutil>=2.1.0
+
+.. note
+ MongoEngine always runs it's test suite against the latest patch version of each dependecy. e.g.: PyMongo 3.0.1
+
Examples
========
-Some simple examples of what MongoEngine code looks like::
+Some simple examples of what MongoEngine code looks like:
+
+.. code :: python
class BlogPost(Document):
title = StringField(required=True, max_length=200)
@@ -62,15 +82,10 @@ Some simple examples of what MongoEngine code looks like::
... print 'Link:', post.url
... print
...
- === Using MongoEngine ===
- See the tutorial
-
- === MongoEngine Docs ===
- Link: hmarr.com/mongoengine
>>> len(BlogPost.objects)
2
- >>> len(HtmlPost.objects)
+ >>> len(TextPost.objects)
1
>>> len(LinkPost.objects)
1
@@ -84,7 +99,26 @@ Some simple examples of what MongoEngine code looks like::
Tests
=====
To run the test suite, ensure you are running a local instance of MongoDB on
-the standard port, and run ``python setup.py test``.
+the standard port, and run: ``python setup.py nosetests``.
+
+To run the test suite on every supported Python version and every supported PyMongo version,
+you can use ``tox``.
+tox and each supported Python version should be installed in your environment:
+
+.. code-block:: shell
+
+ # Install tox
+ $ pip install tox
+ # Run the test suites
+ $ tox
+
+If you wish to run one single or selected tests, use the nosetest convention. It will find the folder,
+eventually the file, go to the TestClass specified after the colon and eventually right to the single test.
+Also use the -s argument if you want to print out whatever or access pdb while testing.
+
+.. code-block:: shell
+
+ $ python setup.py nosetests --tests tests/fields/fields.py:FieldTest.test_cls_field -s
Community
=========
@@ -92,11 +126,8 @@ Community
<http://groups.google.com/group/mongoengine-users>`_
- `MongoEngine Developers mailing list
<http://groups.google.com/group/mongoengine-dev>`_
-- `#mongoengine IRC channel <irc://irc.freenode.net/mongoengine>`_
+- `#mongoengine IRC channel <http://webchat.freenode.net/?channels=mongoengine>`_
Contributing
============
-The source is available on `GitHub <http://github.com/MongoEngine/mongoengine>`_ - to
-contribute to the project, fork it on GitHub and send a pull request, all
-contributions and suggestions are welcome!
-
+We welcome contributions! see the `Contribution guidelines <https://github.com/MongoEngine/mongoengine/blob/master/CONTRIBUTING.rst>`_
diff --git a/benchmark.py b/benchmark.py
deleted file mode 100644
index 247baeb..0000000
--- a/benchmark.py
+++ /dev/null
@@ -1,182 +0,0 @@
-#!/usr/bin/env python
-
-import timeit
-
-
-def cprofile_main():
- from pymongo import Connection
- connection = Connection()
- connection.drop_database('timeit_test')
- connection.disconnect()
-
- from mongoengine import Document, DictField, connect
- connect("timeit_test")
-
- class Noddy(Document):
- fields = DictField()
-
- for i in xrange(1):
- noddy = Noddy()
- for j in range(20):
- noddy.fields["key" + str(j)] = "value " + str(j)
- noddy.save()
-
-
-def main():
- """
- 0.4 Performance Figures ...
-
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - Pymongo
- 1.1141769886
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - MongoEngine
- 2.37724113464
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - MongoEngine, safe=False, validate=False
- 1.92479610443
-
- 0.5.X
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - Pymongo
- 1.10552310944
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - MongoEngine
- 16.5169169903
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - MongoEngine, safe=False, validate=False
- 14.9446101189
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - MongoEngine, safe=False, validate=False, cascade=False
- 14.912801981
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - MongoEngine, force=True
- 14.9617750645
-
- Performance
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - Pymongo
- 1.10072994232
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - MongoEngine
- 5.27341103554
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - MongoEngine, safe=False, validate=False
- 4.49365401268
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - MongoEngine, safe=False, validate=False, cascade=False
- 4.43459296227
- ----------------------------------------------------------------------------------------------------
- Creating 10000 dictionaries - MongoEngine, force=True
- 4.40114378929
- """
-
- setup = """
-from pymongo import Connection
-connection = Connection()
-connection.drop_database('timeit_test')
-"""
-
- stmt = """
-from pymongo import Connection
-connection = Connection()
-
-db = connection.timeit_test
-noddy = db.noddy
-
-for i in xrange(10000):
- example = {'fields': {}}
- for j in range(20):
- example['fields']["key"+str(j)] = "value "+str(j)
-
- noddy.insert(example)
-
-myNoddys = noddy.find()
-[n for n in myNoddys] # iterate
-"""
-
- print "-" * 100
- print """Creating 10000 dictionaries - Pymongo"""
- t = timeit.Timer(stmt=stmt, setup=setup)
- print t.timeit(1)
-
- setup = """
-from pymongo import Connection
-connection = Connection()
-connection.drop_database('timeit_test')
-connection.disconnect()
-
-from mongoengine import Document, DictField, connect
-connect("timeit_test")
-
-class Noddy(Document):
- fields = DictField()
-"""
-
- stmt = """
-for i in xrange(10000):
- noddy = Noddy()
- for j in range(20):
- noddy.fields["key"+str(j)] = "value "+str(j)
- noddy.save()
-
-myNoddys = Noddy.objects()
-[n for n in myNoddys] # iterate
-"""
-
- print "-" * 100
- print """Creating 10000 dictionaries - MongoEngine"""
- t = timeit.Timer(stmt=stmt, setup=setup)
- print t.timeit(1)
-
- stmt = """
-for i in xrange(10000):
- noddy = Noddy()
- for j in range(20):
- noddy.fields["key"+str(j)] = "value "+str(j)
- noddy.save(safe=False, validate=False)
-
-myNoddys = Noddy.objects()
-[n for n in myNoddys] # iterate
-"""
-
- print "-" * 100
- print """Creating 10000 dictionaries - MongoEngine, safe=False, validate=False"""
- t = timeit.Timer(stmt=stmt, setup=setup)
- print t.timeit(1)
-
-
- stmt = """
-for i in xrange(10000):
- noddy = Noddy()
- for j in range(20):
- noddy.fields["key"+str(j)] = "value "+str(j)
- noddy.save(safe=False, validate=False, cascade=False)
-
-myNoddys = Noddy.objects()
-[n for n in myNoddys] # iterate
-"""
-
- print "-" * 100
- print """Creating 10000 dictionaries - MongoEngine, safe=False, validate=False, cascade=False"""
- t = timeit.Timer(stmt=stmt, setup=setup)
- print t.timeit(1)
-
- stmt = """
-for i in xrange(10000):
- noddy = Noddy()
- for j in range(20):
- noddy.fields["key"+str(j)] = "value "+str(j)
- noddy.save(force_insert=True, safe=False, validate=False, cascade=False)
-
-myNoddys = Noddy.objects()
-[n for n in myNoddys] # iterate
-"""
-
- print "-" * 100
- print """Creating 10000 dictionaries - MongoEngine, force=True"""
- t = timeit.Timer(stmt=stmt, setup=setup)
- print t.timeit(1)
-
-if __name__ == "__main__":
- main()
diff --git a/docs/_themes/nature/static/nature.css_t b/docs/_themes/nature/static/nature.css_t
deleted file mode 100644
index 03b0379..0000000
--- a/docs/_themes/nature/static/nature.css_t
+++ /dev/null
@@ -1,229 +0,0 @@
-/**
- * Sphinx stylesheet -- default theme
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- */
-
- at import url("basic.css");
-
-/* -- page layout ----------------------------------------------------------- */
-
-body {
- font-family: Arial, sans-serif;
- font-size: 100%;
- background-color: #111;
- color: #555;
- margin: 0;
- padding: 0;
-}
-
-div.documentwrapper {
- float: left;
- width: 100%;
-}
-
-div.bodywrapper {
- margin: 0 0 0 230px;
-}
-
-hr{
- border: 1px solid #B1B4B6;
-}
-
-div.document {
- background-color: #eee;
-}
-
-div.body {
- background-color: #ffffff;
- color: #3E4349;
- padding: 0 30px 30px 30px;
- font-size: 0.8em;
-}
-
-div.footer {
- color: #555;
- width: 100%;
- padding: 13px 0;
- text-align: center;
- font-size: 75%;
-}
-
-div.footer a {
- color: #444;
- text-decoration: underline;
-}
-
-div.related {
- background-color: #6BA81E;
- line-height: 32px;
- color: #fff;
- text-shadow: 0px 1px 0 #444;
- font-size: 0.80em;
-}
-
-div.related a {
- color: #E2F3CC;
-}
-
-div.sphinxsidebar {
- font-size: 0.75em;
- line-height: 1.5em;
-}
-
-div.sphinxsidebarwrapper{
- padding: 20px 0;
-}
-
-div.sphinxsidebar h3,
-div.sphinxsidebar h4 {
- font-family: Arial, sans-serif;
- color: #222;
- font-size: 1.2em;
- font-weight: normal;
- margin: 0;
- padding: 5px 10px;
- background-color: #ddd;
- text-shadow: 1px 1px 0 white
-}
-
-div.sphinxsidebar h4{
- font-size: 1.1em;
-}
-
-div.sphinxsidebar h3 a {
- color: #444;
-}
-
-
-div.sphinxsidebar p {
- color: #888;
- padding: 5px 20px;
-}
-
-div.sphinxsidebar p.topless {
-}
-
-div.sphinxsidebar ul {
- margin: 10px 20px;
- padding: 0;
- color: #000;
-}
-
-div.sphinxsidebar a {
- color: #444;
-}
-
-div.sphinxsidebar input {
- border: 1px solid #ccc;
- font-family: sans-serif;
- font-size: 1em;
-}
-
-div.sphinxsidebar input[type=text]{
- margin-left: 20px;
-}
-
-/* -- body styles ----------------------------------------------------------- */
-
-a {
- color: #005B81;
- text-decoration: none;
-}
-
-a:hover {
- color: #E32E00;
- text-decoration: underline;
-}
-
-div.body h1,
-div.body h2,
-div.body h3,
-div.body h4,
-div.body h5,
-div.body h6 {
- font-family: Arial, sans-serif;
- background-color: #BED4EB;
- font-weight: normal;
- color: #212224;
- margin: 30px 0px 10px 0px;
- padding: 5px 0 5px 10px;
- text-shadow: 0px 1px 0 white
-}
-
-div.body h1 { border-top: 20px solid white; margin-top: 0; font-size: 200%; }
-div.body h2 { font-size: 150%; background-color: #C8D5E3; }
-div.body h3 { font-size: 120%; background-color: #D8DEE3; }
-div.body h4 { font-size: 110%; background-color: #D8DEE3; }
-div.body h5 { font-size: 100%; background-color: #D8DEE3; }
-div.body h6 { font-size: 100%; background-color: #D8DEE3; }
-
-a.headerlink {
- color: #c60f0f;
- font-size: 0.8em;
- padding: 0 4px 0 4px;
- text-decoration: none;
-}
-
... 28460 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-mongoengine.git
More information about the Python-modules-commits
mailing list