Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 95cdf0a

Browse files
committed
Update dev docs, especially Dev Guide
1 parent 493515a commit 95cdf0a

24 files changed

+3429
-2862
lines changed

‎devel/DeveloperGuide.html‎

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,13 @@ <h1 class="pudge-member-page-heading">SQLObject Developer Guide</h1>
3535
<p class="topic-title first">Contents</p>
3636
<ul class="simple">
3737
<li><a href="#development-installation" class="reference internal" id="id1">Development Installation</a></li>
38-
<li><a href="#style-guide" class="reference internal" id="id2">Style Guide</a></li>
39-
<li><a href="#testing" class="reference internal" id="id3">Testing</a></li>
40-
<li><a href="#documentation" class="reference internal" id="id4">Documentation</a></li>
38+
<li><a href="#architecture" class="reference internal" id="id2">Architecture</a></li>
39+
<li><a href="#style-guide" class="reference internal" id="id3">Style Guide</a></li>
40+
<li><a href="#testing" class="reference internal" id="id4">Testing</a></li>
41+
<li><a href="#documentation" class="reference internal" id="id5">Documentation</a></li>
4142
</ul>
4243
</div>
43-
<p id="start">These are some notes on developing SQLObject. I'll try to expand them
44-
as things come up.</p>
45-
<blockquote>
46-
-- Ian Bicking</blockquote>
44+
<p id="start">These are some notes on developing SQLObject.</p>
4745
<div class="section" id="development-installation">
4846
<h1>Development Installation</h1>
4947
<p>First install <a href="http://www.formencode.org/en/latest/download.html" class="reference external">FormEncode</a>:</p>
@@ -54,13 +52,41 @@ <h1>Development Installation</h1>
5452
</pre>
5553
<p>Then do the same for SQLObject:</p>
5654
<pre class="literal-block">
57-
$ git clone git clone git://git.code.sf.net/p/sqlobject/sqlobject
55+
$ git clone git clone git://github.com/sqlobject/sqlobject
5856
$ cd sqlobject
5957
$ sudo python setup.py develop
6058
</pre>
59+
<p>Or rather fork it and clone your fork. To develop a feature or a bugfix
60+
create a separate branch, push it to your fork and create a pull request
61+
to the original repo. That way CI will be triggered to test your code.</p>
6162
<p>Voila! The packages are globally installed, but the files from the
6263
checkout were not copied into <tt class="docutils literal"><span class="pre">site-packages</span></tt>. See <a href="http://pythonhosted.org/setuptools/" class="reference external">setuptools</a> for more.</p>
6364
</div>
65+
<div class="section" id="architecture">
66+
<h1>Architecture</h1>
67+
<p>There are four main kinds of objects in SQLObject: tables, columns,
68+
connections and converters.</p>
69+
<p>Tables-related objects are in sqlobject/main.py module. There are two
70+
main classes: SQLObject and sqlmeta; the latter is not a metaclass but a
71+
parent class for sqlmeta attribute in every class - the authors tried to
72+
move there all attributes and methods not directly related to columns to
73+
avoid cluttering table namespace.</p>
74+
<p>Columns are instances of classes from sqlobject/col.py. There are two
75+
classes for every column: one is for user to include into an instance of
76+
SQLObject, an instance of the other is automatically created by
77+
SQLObject metaclass. The two classes are names SOCol and Col; for
78+
example, SOBoolCol and BoolCol.</p>
79+
<p>Connections are instances of DBConnection class (from
80+
sqlobject/dbconnection.py ) and its concrete descendants. DBConnection
81+
contains generic code for generating SQL, working with transactions and
82+
so on. Concrete connection classes (like PostgresConnection and
83+
SQLiteConnection) provides backend-specific functionality.</p>
84+
<p>Converters from sqlobject/converters.py aren't visible to the user. They
85+
are used behind the scene to convert object to SQL strings. The most
86+
elaborated converter there is StringConverters. Yes, it converts strings
87+
to strings. It converts python strings to SQL strings using
88+
backend-specific quoting rules.</p>
89+
</div>
6490
<div class="section" id="style-guide">
6591
<h1>Style Guide</h1>
6692
<p>Generally you should follow the recommendations in <a href="http://www.python.org/peps/pep-0008.html" class="reference external">PEP 8</a>, the
@@ -175,7 +201,7 @@ <h1>Testing</h1>
175201
<p>Tests are important. Tests keep everything from falling apart. All
176202
new additions should have tests.</p>
177203
<p>Testing uses py.test, an alternative to <tt class="docutils literal">unittest</tt>. It is available at
178-
<a href="http://pytest.org/" class="reference external">http://pytest.org/</a> and <a href="http://pypi.python.org/pypi/pytest" class="reference external">http://pypi.python.org/pypi/pytest</a>. Read its <a href="http://pytest.org/latest/getting-started.html" class="reference external">getting
204+
<a href="http://pytest.org/" class="reference external">http://pytest.org/</a> and <a href="https://pypi.python.org/pypi/pytest" class="reference external">https://pypi.python.org/pypi/pytest</a>. Read its <a href="http://pytest.org/latest/getting-started.html" class="reference external">getting
179205
started</a> document for more.</p>
180206
<p>To actually run the test, you have to give it a database to connect to.
181207
You do so with the option <tt class="docutils literal"><span class="pre">-D</span></tt>. You can either give a complete URI or
@@ -206,8 +232,8 @@ <h1>Testing</h1>
206232
<h1>Documentation</h1>
207233
<p>Please write documentation. Documentation should live in the docs/
208234
directory. Pudge converts documentation from Restructured Text to
209-
HTML. It presently requires kid 0.9.3, which must be obtained
210-
separately (for instance, from <a href="http://pypi.python.org/pypi/kid/0.9.3" class="reference external">http://pypi.python.org/pypi/kid/0.9.3</a>)</p>
235+
HTML. It presently requires kid 0.9.6, which must be obtained
236+
separately (for instance, from <a href="https://pypi.python.org/pypi/kid/0.9.6" class="reference external">https://pypi.python.org/pypi/kid/0.9.6</a>).</p>
211237
<a href="https://sourceforge.net/projects/sqlobject" class="reference external image-reference"><img src="https://sourceforge.net/sflogo.php?group_id=74338&amp;type=10" alt="Get SQLObject at SourceForge.net. Fast, secure and Free Open Source software downloads" style="width: 80px; height: 15px;" class="noborder align-center"></a>
212238
</div>
213239
</div></div>

‎devel/News.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ <h1 class="pudge-member-page-heading">News</h1>
145145
</div>
146146
<div class="section" id="sqlobject-3-0-0-master">
147147
<span id="start"></span><h1>SQLObject 3.0.0 (master)</h1>
148+
<p>Released 1 Jun 2016.</p>
148149
<div class="section" id="features">
149150
<h2>Features</h2>
150151
<ul class="simple">

‎devel/download.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h1 class="doc-title"><a></a></h1>
3131
<hr>
3232
<div id="content"><div class="rst-doc">
3333
<h1 class="pudge-member-page-heading">Download SQLObject</h1>
34-
<p>The latest releases are always available on the <a href="http://pypi.python.org/pypi/SQLObject" class="reference external">Python Package Index</a>, and is installable
34+
<p>The latest releases are always available on the <a href="https://pypi.python.org/pypi/SQLObject" class="reference external">Python Package Index</a>, and is installable
3535
with <a href="http://pythonhosted.org/setuptools/easy_install.html" class="reference external">easy_install</a>.</p>
3636
<p>You can install the latest release with:</p>
3737
<pre class="literal-block">

‎devel/layout.css‎

100644100755
File mode changed.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /