Renamed mwwrdb to wrmwdb.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 13 Feb 2011 19:08:02 +0000 (19:08 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 13 Feb 2011 19:08:02 +0000 (19:08 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/trunk/wrpylib@775 7aebc617-e5e2-0310-91dc-80fb5f6d2477

setup.py
tests/test_mwwrdb.py [deleted file]
tests/test_wrmwdb.py [new file with mode: 0644]
wrpylib/mwwrdb.py [deleted file]
wrpylib/wrmwdb.py [new file with mode: 0644]

index e1aedd36936db6616288f864da44e87397b1e0b7..fd7c21bfd3e23797df232de6ee03777306dbd421 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
 from setuptools import setup
 
 setup(name='wrpylib',
-    version='0.0.7',
+    version='0.0.8',
     description='Winterrodeln Python Library',
     author='Philipp Spitzer',
     author_email='philipp.spitzer@winterrodeln.org',
diff --git a/tests/test_mwwrdb.py b/tests/test_mwwrdb.py
deleted file mode 100644 (file)
index 6a42157..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/python2.6
-# -*- coding: iso-8859-15 -*-
-import wrpylib.mwwrdb
-import sqlalchemy
-
-
-def test_wrreport_table():
-    metadata = sqlalchemy.MetaData()
-    wrreport_table = wrpylib.mwwrdb.wrreport_table(metadata)
-
-
-def test_wrsledruncache_table():
-    metadata = sqlalchemy.MetaData()
-    wrsledruncache_table = wrpylib.mwwrdb.wrsledruncache_table(metadata)
-
-
-def test_wrinncache_table():
-    metadata = sqlalchemy.MetaData()
-    wrinncache_table = wrpylib.mwwrdb.wrinncache_table(metadata)
-
diff --git a/tests/test_wrmwdb.py b/tests/test_wrmwdb.py
new file mode 100644 (file)
index 0000000..cdaa257
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/python2.6
+# -*- coding: iso-8859-15 -*-
+import wrpylib.wrmwdb
+import sqlalchemy
+
+
+def test_wrreport_table():
+    metadata = sqlalchemy.MetaData()
+    wrreport_table = wrpylib.wrmwdb.wrreport_table(metadata)
+
+
+def test_wrsledruncache_table():
+    metadata = sqlalchemy.MetaData()
+    wrsledruncache_table = wrpylib.wrmwdb.wrsledruncache_table(metadata)
+
+
+def test_wrinncache_table():
+    metadata = sqlalchemy.MetaData()
+    wrinncache_table = wrpylib.wrmwdb.wrinncache_table(metadata)
+
diff --git a/wrpylib/mwwrdb.py b/wrpylib/mwwrdb.py
deleted file mode 100644 (file)
index 5a0879b..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/python2.6
-# -*- coding: iso-8859-15 -*-
-# $Id$
-# $HeadURL$
-"""This module contains code to make tha access of winterrodeln
-tables in MediaWiki easy. The module uses sqlalchemy to access the database.
-"""
-from sqlalchemy import Table, Column, types, schema
-
-
-def wrreport_table(metadata):
-    """Returns the sqlalchemy Table representing the "wrreport" Winterrodeln table in MediaWiki.
-    Current table definition.
-    * version 1.2
-    * version 1.3 (no changes)
-    * version 1.4 (no changes)
-    :param metadata: metadata = sqlalchemy.MetaData()
-    """
-    return Table("wrreport", metadata,
-    Column("id", types.Integer, primary_key=True),
-    Column("page_id", types.Integer, schema.ForeignKey('wrsleddingcache.page_id')),
-    Column("page_title", types.Unicode(255), nullable=False),
-    Column("date_report", types.Date),
-    Column("date_entry", types.DateTime, nullable=False),
-    Column("date_invalid", types.DateTime),
-    Column("condition", types.Integer),
-    Column("description", types.Unicode),
-    Column("author_name", types.Unicode(30)),
-    Column("author_ip", types.Unicode(15)),
-    Column("author_userid", types.Integer),
-    Column("author_username", types.Unicode(30)),
-    Column("delete_date", types.DateTime),
-    Column("delete_person_name", types.Unicode(30)),
-    Column("delete_person_ip", types.Unicode(15)),
-    Column("delete_person_userid", types.Integer),
-    Column("delete_person_username", types.Unicode(30)),
-    Column("delete_reason_public", types.Unicode),
-    )
-
-
-def wrsledruncache_table(metadata):
-    """Returns the sqlalchemy Table representing the "wrsledruncache" Winterrodeln table in MediaWiki.
-    Current table definition
-    * version 1.4 (renamed table and added column walkup_possible)
-    :param metadata: metadata = sqlalchemy.MetaData()
-    """
-    return Table("wrsledruncache", metadata,
-    Column("page_id", types.Integer, primary_key=True),
-    Column("page_title", types.Unicode(255)),
-    Column("position_latitude", types.Float),
-    Column("position_longitude", types.Float),
-    Column("top_latitude", types.Float),
-    Column("top_longitude", types.Float),
-    Column("top_elevation", types.Integer),
-    Column("bottom_latitude", types.Float),
-    Column("bottom_longitude", types.Float),
-    Column("bottom_elevation", types.Integer),
-    Column("length", types.Integer),
-    Column("difficulty", types.Integer),
-    Column("avalanches", types.Integer),
-    Column("operator", types.Unicode(255)),
-    Column("public_transport", types.Integer),
-    Column("walkup_possible", types.Boolean),
-    Column("walkup_time", types.Integer),
-    Column("walkup_separate", types.Float),
-    Column("walkup_separate_comment", types.Unicode(255)),
-    Column("lift", types.Boolean),
-    Column("lift_details", types.Unicode(255)),
-    Column("night_light", types.Float),
-    Column("night_light_comment", types.Unicode(255)),
-    Column("night_light_days", types.Integer),
-    Column("night_light_days_comment", types.Unicode(255)),
-    Column("sled_rental", types.Boolean),
-    Column("sled_rental_comment", types.Unicode(255)),
-    Column("cachet", types.Unicode(255)),
-    Column("information_web", types.Unicode(255)),
-    Column("information_phone", types.Unicode(255)),
-    Column("image", types.Unicode(255)),
-    Column("show_in_overview", types.Boolean),
-    Column("forum_id", types.Integer),
-    Column("under_construction", types.Boolean),
-    )
-
-
-def wrinncache_table(metadata):
-    """Returns the sqlalchemy Table representing the "wrinncache" Winterrodeln table in MediaWiki.
-    Current table definition
-    * version 1.3 (changes made from version 1.2)
-    * version 1.4 (no changes)
-    :param metadata: metadata = sqlalchemy.MetaData()
-    """
-    return Table("wrinncache", metadata,
-    Column("page_id", types.Integer, primary_key=True),
-    Column("page_title", types.Unicode(255)),
-    Column("position_latitude", types.Float),
-    Column("position_longitude", types.Float),
-    Column("position_elevation", types.Integer),
-    Column("seats", types.Integer),
-    Column("overnight", types.Boolean),
-    Column("overnight_comment", types.Unicode(255)),
-    Column("smoker_area", types.Boolean),
-    Column("nonsmoker_area", types.Boolean),
-    Column("sled_rental", types.Boolean),
-    Column("sled_rental_comment", types.Unicode(255)),
-    Column("mobile_provider", types.Unicode),
-    Column("homepage", types.Unicode(255)),
-    Column("email_list", types.Unicode),
-    Column("phone_list", types.Unicode),
-    Column("image", types.Unicode(255)),
-    Column("sledding_list", types.Unicode),
-    Column("under_construction", types.Boolean),
-    )
-
-
diff --git a/wrpylib/wrmwdb.py b/wrpylib/wrmwdb.py
new file mode 100644 (file)
index 0000000..5a0879b
--- /dev/null
@@ -0,0 +1,114 @@
+#!/usr/bin/python2.6
+# -*- coding: iso-8859-15 -*-
+# $Id$
+# $HeadURL$
+"""This module contains code to make tha access of winterrodeln
+tables in MediaWiki easy. The module uses sqlalchemy to access the database.
+"""
+from sqlalchemy import Table, Column, types, schema
+
+
+def wrreport_table(metadata):
+    """Returns the sqlalchemy Table representing the "wrreport" Winterrodeln table in MediaWiki.
+    Current table definition.
+    * version 1.2
+    * version 1.3 (no changes)
+    * version 1.4 (no changes)
+    :param metadata: metadata = sqlalchemy.MetaData()
+    """
+    return Table("wrreport", metadata,
+    Column("id", types.Integer, primary_key=True),
+    Column("page_id", types.Integer, schema.ForeignKey('wrsleddingcache.page_id')),
+    Column("page_title", types.Unicode(255), nullable=False),
+    Column("date_report", types.Date),
+    Column("date_entry", types.DateTime, nullable=False),
+    Column("date_invalid", types.DateTime),
+    Column("condition", types.Integer),
+    Column("description", types.Unicode),
+    Column("author_name", types.Unicode(30)),
+    Column("author_ip", types.Unicode(15)),
+    Column("author_userid", types.Integer),
+    Column("author_username", types.Unicode(30)),
+    Column("delete_date", types.DateTime),
+    Column("delete_person_name", types.Unicode(30)),
+    Column("delete_person_ip", types.Unicode(15)),
+    Column("delete_person_userid", types.Integer),
+    Column("delete_person_username", types.Unicode(30)),
+    Column("delete_reason_public", types.Unicode),
+    )
+
+
+def wrsledruncache_table(metadata):
+    """Returns the sqlalchemy Table representing the "wrsledruncache" Winterrodeln table in MediaWiki.
+    Current table definition
+    * version 1.4 (renamed table and added column walkup_possible)
+    :param metadata: metadata = sqlalchemy.MetaData()
+    """
+    return Table("wrsledruncache", metadata,
+    Column("page_id", types.Integer, primary_key=True),
+    Column("page_title", types.Unicode(255)),
+    Column("position_latitude", types.Float),
+    Column("position_longitude", types.Float),
+    Column("top_latitude", types.Float),
+    Column("top_longitude", types.Float),
+    Column("top_elevation", types.Integer),
+    Column("bottom_latitude", types.Float),
+    Column("bottom_longitude", types.Float),
+    Column("bottom_elevation", types.Integer),
+    Column("length", types.Integer),
+    Column("difficulty", types.Integer),
+    Column("avalanches", types.Integer),
+    Column("operator", types.Unicode(255)),
+    Column("public_transport", types.Integer),
+    Column("walkup_possible", types.Boolean),
+    Column("walkup_time", types.Integer),
+    Column("walkup_separate", types.Float),
+    Column("walkup_separate_comment", types.Unicode(255)),
+    Column("lift", types.Boolean),
+    Column("lift_details", types.Unicode(255)),
+    Column("night_light", types.Float),
+    Column("night_light_comment", types.Unicode(255)),
+    Column("night_light_days", types.Integer),
+    Column("night_light_days_comment", types.Unicode(255)),
+    Column("sled_rental", types.Boolean),
+    Column("sled_rental_comment", types.Unicode(255)),
+    Column("cachet", types.Unicode(255)),
+    Column("information_web", types.Unicode(255)),
+    Column("information_phone", types.Unicode(255)),
+    Column("image", types.Unicode(255)),
+    Column("show_in_overview", types.Boolean),
+    Column("forum_id", types.Integer),
+    Column("under_construction", types.Boolean),
+    )
+
+
+def wrinncache_table(metadata):
+    """Returns the sqlalchemy Table representing the "wrinncache" Winterrodeln table in MediaWiki.
+    Current table definition
+    * version 1.3 (changes made from version 1.2)
+    * version 1.4 (no changes)
+    :param metadata: metadata = sqlalchemy.MetaData()
+    """
+    return Table("wrinncache", metadata,
+    Column("page_id", types.Integer, primary_key=True),
+    Column("page_title", types.Unicode(255)),
+    Column("position_latitude", types.Float),
+    Column("position_longitude", types.Float),
+    Column("position_elevation", types.Integer),
+    Column("seats", types.Integer),
+    Column("overnight", types.Boolean),
+    Column("overnight_comment", types.Unicode(255)),
+    Column("smoker_area", types.Boolean),
+    Column("nonsmoker_area", types.Boolean),
+    Column("sled_rental", types.Boolean),
+    Column("sled_rental_comment", types.Unicode(255)),
+    Column("mobile_provider", types.Unicode),
+    Column("homepage", types.Unicode(255)),
+    Column("email_list", types.Unicode),
+    Column("phone_list", types.Unicode),
+    Column("image", types.Unicode(255)),
+    Column("sledding_list", types.Unicode),
+    Column("under_construction", types.Boolean),
+    )
+
+