Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Travis integration #27

Closed
wants to merge 4 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+48 −26
Split
View
@@ -1,10 +1,15 @@
*.pyc
/build/
/dist/
+/bin/
+/lib/
+/include/
+/.Python
+/.tox/
+/*.egg
/doc/build/output/
/dogpile_data/
*.orig
-tox.ini
.venv
*.egg-info
.coverage
View
@@ -0,0 +1,5 @@
+language: python
+# command to install dependencies
+install: "pip install detox"
+# # command to run tests
+script: detox --recreate
View
@@ -3,6 +3,10 @@ SQLAlchemy
The Python SQL Toolkit and Object Relational Mapper
+.. image:: https://secure.travis-ci.org/zzzeek/sqlalchemy.png
+ :target: http://travis-ci.org/zzzeek/sqlalchemy
+
+
Introduction
-------------
@@ -16,47 +20,47 @@ language.
Major SQLAlchemy features include:
-* An industrial strength ORM, built
+* An industrial strength ORM, built
from the core on the identity map, unit of work,
and data mapper patterns. These patterns
- allow transparent persistence of objects
+ allow transparent persistence of objects
using a declarative configuration system.
Domain models
can be constructed and manipulated naturally,
and changes are synchronized with the
current transaction automatically.
* A relationally-oriented query system, exposing
- the full range of SQL's capabilities
- explicitly, including joins, subqueries,
- correlation, and most everything else,
+ the full range of SQL's capabilities
+ explicitly, including joins, subqueries,
+ correlation, and most everything else,
in terms of the object model.
- Writing queries with the ORM uses the same
- techniques of relational composition you use
+ Writing queries with the ORM uses the same
+ techniques of relational composition you use
when writing SQL. While you can drop into
literal SQL at any time, it's virtually never
needed.
-* A comprehensive and flexible system
+* A comprehensive and flexible system
of eager loading for related collections and objects.
Collections are cached within a session,
- and can be loaded on individual access, all
+ and can be loaded on individual access, all
at once using joins, or by query per collection
across the full result set.
-* A Core SQL construction system and DBAPI
+* A Core SQL construction system and DBAPI
interaction layer. The SQLAlchemy Core is
separate from the ORM and is a full database
abstraction layer in its own right, and includes
- an extensible Python-based SQL expression
- language, schema metadata, connection pooling,
+ an extensible Python-based SQL expression
+ language, schema metadata, connection pooling,
type coercion, and custom types.
-* All primary and foreign key constraints are
+* All primary and foreign key constraints are
assumed to be composite and natural. Surrogate
- integer primary keys are of course still the
+ integer primary keys are of course still the
norm, but SQLAlchemy never assumes or hardcodes
to this model.
* Database introspection and generation. Database
schemas can be "reflected" in one step into
Python structures representing database metadata;
- those same structures can then generate
+ those same structures can then generate
CREATE statements right back out - all within
the Core, independent of the ORM.
@@ -73,7 +77,7 @@ SQLAlchemy's philosophy:
that should be fully exposed. SQLAlchemy's
ORM provides an open-ended set of patterns
that allow a developer to construct a custom
- mediation layer between a domain model and
+ mediation layer between a domain model and
a relational schema, turning the so-called
"object relational impedance" issue into
a distant memory.
@@ -82,18 +86,18 @@ SQLAlchemy's philosophy:
of both the object model as well as the relational
schema. SQLAlchemy only provides the means
to automate the execution of these decisions.
-* With SQLAlchemy, there's no such thing as
- "the ORM generated a bad query" - you
- retain full control over the structure of
+* With SQLAlchemy, there's no such thing as
+ "the ORM generated a bad query" - you
+ retain full control over the structure of
queries, including how joins are organized,
- how subqueries and correlation is used, what
+ how subqueries and correlation is used, what
columns are requested. Everything SQLAlchemy
does is ultimately the result of a developer-
initiated decision.
* Don't use an ORM if the problem doesn't need one.
SQLAlchemy consists of a Core and separate ORM
component. The Core offers a full SQL expression
- language that allows Pythonic construction
+ language that allows Pythonic construction
of SQL constructs that render directly to SQL
strings for a target database, returning
result sets that are essentially enhanced DBAPI
@@ -105,7 +109,7 @@ SQLAlchemy's philosophy:
the start and end of a series of operations.
* Never render a literal value in a SQL statement.
Bound parameters are used to the greatest degree
- possible, allowing query optimizers to cache
+ possible, allowing query optimizers to cache
query plans effectively and making SQL injection
attacks a non-issue.
@@ -119,7 +123,7 @@ http://www.sqlalchemy.org/docs/
Installation / Requirements
---------------------------
-Full documentation for installation is at
+Full documentation for installation is at
`Installation <http://www.sqlalchemy.org/docs/intro.html#installation>`_.
Getting Help / Development / Bug reporting
@@ -111,7 +111,7 @@ def test_custom_datetime(self):
testing.db.execute("insert into t (d) values ('2004-05-21T00:00:00')")
eq_(
testing.db.execute("select * from t order by d").fetchall(),
- [(u'2004-05-21T00:00:00',), (u'2010-10-15T12:37:00',)]
+ [('2004-05-21T00:00:00',), ('2010-10-15T12:37:00',)]
)
eq_(
testing.db.execute(select([t.c.d]).order_by(t.c.d)).fetchall(),
@@ -133,7 +133,7 @@ def test_custom_date(self):
testing.db.execute("insert into t (d) values ('2004|05|21')")
eq_(
testing.db.execute("select * from t order by d").fetchall(),
- [(u'2004|05|21',), (u'2010|10|15',)]
+ [('2004|05|21',), ('2010|10|15',)]
)
eq_(
testing.db.execute(select([t.c.d]).order_by(t.c.d)).fetchall(),
View
@@ -0,0 +1,8 @@
+[tox]
+envlist=py26,py27,py32,py33
+
+[testenv]
+commands= ./sqla_nose.py
+deps=
+ mock
+ nose