Permalink
Browse files

Initial submission.

Base versions of dbtoyaml and yamltodb handle schemas, sequences,
tables, columns, check constraints, primary keys, foreign keys, unique
constraints and indexes.
  • Loading branch information...
0 parents commit 76254e8840e67ab4c5602ae77d871c834c6550f0 @jmafc jmafc committed Apr 5, 2011
@@ -0,0 +1,6 @@
+*.pyc
+*~
+MANIFEST
+dist
+docs/_build
+Pyrseas.egg-info
@@ -0,0 +1,11 @@
+Pyrseas was started in 2010.
+
+The PRIMARY AUTHORS are (and/or have been):
+
+ * Joe Abbate
+
+A big THANK YOU goes to:
+
+ * Ken Downs for creating the Andromeda project.
+
+ * Robert Brewer for Post-Facto.
@@ -0,0 +1,29 @@
+Copyright (c) 2010 by Joe Abbate, see AUTHORS for more details.
+
+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 the Pyrseas project 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"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 THE COPYRIGHT
+OWNER OR CONTRIBUTORS 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.
@@ -0,0 +1,4 @@
+include AUTHORS ChangeLog LICENSE NEWS
+recursive-include tests *.py
+recursive-include docs *
+prune docs/_build
@@ -0,0 +1,7 @@
+0.1.0 (5-Apr-2011)
+
+ * Initial release
+
+ - dbtoyaml and yamltodb support PostgreSQL schemas, tables,
+ sequences, check constraints, primary keys, foreign keys, unique
+ constraints and indexes.
@@ -0,0 +1,15 @@
+=======
+Pyrseas
+=======
+
+Pyrseas provides a framework and utilities to upgrade and maintain a
+relational database. Its purpose is to enhance and follow through on
+the concepts of the `Andromeda Project
+<http://www.andromeda-project.org/>`_.
+
+Pyrseas currently includes the dbtoyaml utility to create a `YAML
+<http://yaml.org/>`_ description of a PostgreSQL database's tables,
+and the yamltodb utility to generate SQL statements to modify a
+database to match an input YAML specification.
+
+Pyrseas is distributed under the BSD license.
@@ -0,0 +1,89 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Pyrseas.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Pyrseas.qhc"
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+ "run these through (pdf)latex."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
@@ -0,0 +1,45 @@
+Columns
+=======
+
+.. module:: pyrseas.column
+
+The :mod:`column` module defines two classes, :class:`Column` derived
+from :class:`DbSchemaObject` and :class:`ColumnDict`, derived from
+:class:`DbObjectDict`.
+
+Column
+------
+
+:class:`Column` is derived from
+:class:`~pyrseas.dbobject.DbSchemaObject` and represents a column in a
+table. Its :attr:`keylist` attributes are the schema name and the
+table name.
+
+A :class:`Column` has the following attributes: :attr:`name`,
+:attr:`type`, :attr:`not_null` and :attr:`default`. The :attr:`number`
+attribute is also present but is not made visible externally.
+
+.. autoclass:: Column
+
+.. automethod:: Column.to_map
+
+.. automethod:: Column.add
+
+.. automethod:: Column.drop
+
+.. automethod:: Column.set_sequence_default
+
+.. automethod:: Column.diff_map
+
+Column Dictionary
+-----------------
+
+Class :class:`ColumnDict` is a dictionary derived from
+:class:`~pyrseas.dbobject.DbObjectDict` and represents the collection
+of columns in a database, across multiple tables. It is indexed by the
+schema name and table name, and each value is a list of
+:class:`Column` objects.
+
+.. autoclass:: ColumnDict
+
+.. automethod:: ColumnDict.from_map
Oops, something went wrong.

0 comments on commit 76254e8

Please sign in to comment.