Skip to content

Commit 407030a

Browse files
committed
Spring Cleaning for New Development
1 parent f576976 commit 407030a

File tree

8 files changed

+111
-89
lines changed

8 files changed

+111
-89
lines changed

AUTHORS

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
The PRIMARY AUTHORS are (or have previously been):
2+
3+
* Stanislav Heller <[email protected]>
4+
* Matthew Ellison <[email protected]>
5+
6+
7+
CONTRIBUTORS under the BSD-2 License prior to
8+
version 0.1:
9+
10+
* Manfred Touron
11+
* Kelly Caylor
12+
13+
14+
15+
CONTRIBUTORS
16+
17+
The below list is not authoratative nor considered
18+
a complete and comprehensive list. The git logs
19+
are considered the authoratative list of contributors.
20+
21+
Below is a list of individuals whom have submitted
22+
patches, reported bugs, and helped to improve the
23+
project:
24+
25+

LICENSE

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
Copyright (c) 2013, Stanislav Heller
2-
All rights reserved.
1+
Copyright (c) 2015 See AUTHORS
32

4-
Redistribution and use in source and binary forms, with or without modification,
5-
are permitted provided that the following conditions are met:
3+
Versions and contributions released prior to v0.1 were
4+
released under the BSD-2 license.
5+
Please download a previous version of the project to
6+
view the BSD-2 license used.
67

7-
Redistributions of source code must retain the above copyright notice, this
8-
list of conditions and the following disclaimer.
8+
Permission is hereby granted, free of charge, to any person
9+
obtaining a copy of this software and associated documentation
10+
files (the "Software"), to deal in the Software without
11+
restriction, including without limitation the rights to use,
12+
copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
copies of the Software, and to permit persons to whom the
14+
Software is furnished to do so, subject to the following
15+
conditions:
916

10-
Redistributions in binary form must reproduce the above copyright notice, this
11-
list of conditions and the following disclaimer in the documentation and/or
12-
other materials provided with the distribution.
17+
The above copyright notice and this permission notice shall be
18+
included in all copies or substantial portions of the Software.
1319

14-
Neither the name of the {organization} nor the names of its
15-
contributors may be used to endorse or promote products derived from
16-
this software without specific prior written permission.
17-
18-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27+
OTHER DEALINGS IN THE SOFTWARE.

README.rst

Lines changed: 28 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,31 @@ Eve-MongoEngine
44
:Info: Eve-MongoEngine provides MongoEngine integration with `Eve <http://python-eve.org/>`_.
55
:Repository: https://github.com/hellerstanislav/eve-mongoengine
66
:Author: Stanislav Heller (https://github.com/hellerstanislav)
7+
:Maintainer: Matthew Ellison (https://github.com/seglberg)
8+
9+
----
10+
11+
.. |travis-master| image:: https://api.travis-ci.org/seglberg/eve-mongoengine.png?branch=master
12+
:target: https://travis-ci.org/seglberg/eve-mongoengine
13+
14+
.. |travis-develop| image:: https://api.travis-ci.org/seglberg/eve-mongoengine.png?branch=develop
15+
:target: https://travis-ci.org/seglberg/eve-mongoengine/branches
16+
17+
.. list-table::
18+
:widths: 50 50
19+
:header-rows: 1
20+
21+
* - Production
22+
- Development
23+
* - |travis-master|
24+
- |travis-develop|
25+
26+
**THE DEVELOP BRANCH CONTAINS POST-LEGACY WORK**
27+
28+
See the `legacy` tag for the last legacy release (0.0.10).
29+
30+
Do not use `develop` in production code. Instead, the `master` branch always points to the latest production release, and should be used instead.
731

8-
.. image:: https://api.travis-ci.org/hellerstanislav/eve-mongoengine.png?branch=master
9-
:target: https://travis-ci.org/hellerstanislav/eve-mongoengine/
10-
11-
.. image:: https://requires.io/github/hellerstanislav/eve-mongoengine/requirements.png?branch=master
12-
:target: https://requires.io/github/hellerstanislav/eve-mongoengine/requirements/?branch=master
1332

1433
About
1534
=====
@@ -40,53 +59,8 @@ Optional Dependencies
4059

4160
- *None*
4261

43-
Examples
44-
========
45-
46-
A simple example of what Eve-MongoEngine code looks like:
47-
48-
.. code:: python
49-
50-
import mongoengine
51-
from eve import Eve
52-
from eve_mongoengine import EveMongoengine
53-
54-
# Example MongoEngine ODM Model
55-
class Person(mongoengine.Document):
56-
name = mongoengine.StringField()
57-
age = mongoengine.IntField()
58-
59-
# Set up Eve Settings
60-
my_settings = {
61-
'MONGO_HOST': 'localhost',
62-
'MONGO_PORT': 27017,
63-
'MONGO_DBNAME': 'eve_mongoengine_test'
64-
'DOMAIN': {'eve-mongoengine': {}} # Must add a "Dummy" Domain for Eve
65-
}
66-
67-
# Eve Initialization
68-
app = Eve(settings=my_settings)
69-
ext = EveMongoengine(app)
70-
# Register Models with Eve
71-
ext.add_model([Person,])
72-
73-
# Start Eve
74-
app.run()
75-
76-
77-
Validation
78-
----------
79-
80-
By default, Eve validates against the Cerberus schema. With the Eve-MongoEngine extension, all validation is processed by Eve first (if possible) and then processed by the corresponding MongoEngine validation layer. If the MongoEngine validation layer throws an exception, it is caught and returned in the Cerberus error format.
81-
82-
83-
Fields
84-
------
85-
86-
Eve automatically maintains fields in the database named ``_updated`` and ``_created``. To maintain compatibility with Eve, Eve-MongoEngine automatically inserts MongoEngine fields called ``updated`` and ``created`` (with database names of ``_updated`` and ``_created`` respectively) into any registered models.
87-
88-
89-
Options and Limitations
90-
-----------------------
62+
Legacy Release
63+
==============
9164

92-
See more tuning options and current limitations on `Read the Docs`_.
65+
The legacy version of the extension can be found under the 'legacy' tag.
66+
The legacy version of the extension was released under the BSD-2 license and originally authored by Stanislav Heller. See AUTHORS for more information about the legacy authors and ownership.

eve_mongoengine/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
from ._compat import itervalues, iteritems
2525

2626

27-
__version__ = "0.0.10"
27+
from .__version__ import get_version
28+
__version__ = get_version()
2829

2930

3031
def get_utc_time():

eve_mongoengine/__version__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Project Version
2+
3+
VERSION = (0, 1, 0) # 0.1.0
4+
5+
def get_version():
6+
if isinstance(VERSION[-1], basestring):
7+
return '.'.join(map(str, VERSION[:-1])) + VERSION[-1]
8+
return '.'.join(map(str, VERSION))

release.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
eve>=0.5.3
22
blinker
33
mongoengine>=0.8.7,<=0.9
4-
pymongo>=2.7.1,<3.0

setup.py

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,38 @@
22

33
from setuptools import setup, find_packages
44

5+
LONG_DESCRIPTION = None
6+
try:
7+
LONG_DESCRIPTION = open('README.rst').read()
8+
except:
9+
pass
10+
11+
# Version Information
12+
execfile('eve_mongoengine/__version__.py')
13+
VERSION = get_version()
14+
15+
extra_opts = dict()
16+
17+
# Project Setup
518
setup(
6-
name='Eve-Mongoengine',
7-
version='0.0.10',
8-
url='https://github.com/hellerstanislav/eve-mongoengine',
19+
name='eve-mongoengine',
20+
version=VERSION,
21+
url='https://github.com/seglberg/eve-mongoengine',
922
author='Stanislav Heller',
10-
author_email='[email protected]',
23+
author_email='heller.stanislav@{nospam}gmail.com',
24+
maintainer="Matthew Ellison",
25+
maintainer_email="[email protected]",
1126
description='An Eve extension for Mongoengine ODM support',
12-
packages=['eve_mongoengine'],
13-
zip_safe=False,
27+
long_description=LONG_DESCRIPTION,
28+
platforms=['any'],
29+
packages=find_packages(exclude=["test*"]),
1430
test_suite="tests",
31+
license='MIT',
1532
include_package_data=True,
16-
platforms='any',
1733
install_requires=[
1834
'Eve>=0.5.3',
1935
'Blinker',
2036
'Mongoengine>=0.8.7,<=0.9',
21-
'pymongo>=2.7.1,<3.0'
22-
]
37+
],
38+
**extra_opts
2339
)

0 commit comments

Comments
 (0)