[pypy-svn] rev 1004 - pypy/trunk/doc/devel
anna at codespeak.net
anna at codespeak.net
Mon Jun 23 17:01:32 CEST 2003
Author: anna
Date: Mon Jun 23 17:01:32 2003
New Revision: 1004
Modified:
pypy/trunk/doc/devel/coding-style.txt
Log:
formatted for reST
Modified: pypy/trunk/doc/devel/coding-style.txt
==============================================================================
--- pypy/trunk/doc/devel/coding-style.txt (original)
+++ pypy/trunk/doc/devel/coding-style.txt Mon Jun 23 17:01:32 2003
@@ -1,17 +1,23 @@
+=====================================
+Coding Style
+=====================================
+
+
Directory Structure (example sketch)
------------------------------------
+Here is an example of the directory structure::
-trunk/
+ trunk/
src/
pypy/
interpreter/
pyframe.py
opcodes.py
opcodes_app.py
- baseobjspace.py
+ baseobjspace.py
module/ # mixed interpreter/app-code
- builtin.py
+ builtin.py
builtin_app.py
struct.py
struct_app.py
@@ -39,11 +45,13 @@
util/ -> used for internal deployment (not visible to outside)
doc/ # meta-documents about pypy (unordered)
-naming and environment
+end of example.
+
+Naming and environment
-----------------------------
-- the PYTHONPATH should be set to the filesytstem equivalent of
- http://codespeak.net:8080/svn/pypy/trunk/src
+- the PYTHONPATH should be set to the filesytstem equivalent of
+ http://codespeak.net:8080/svn/pypy/trunk/src
in fact the "autopath" module does this for you.
- __init__.py is always empty except for "pypy/objspace/*"
@@ -55,7 +63,7 @@
- functions/methods are lowercase and '_'-separated (if
you need to separate at all)
-Object Spaces
+Object Spaces
---------------
- objectspace classes are always spelled "ObjSpace"
@@ -69,32 +77,33 @@
- not more than 4 directory nesting levels
-- never use plural names in directory and file names
+- never use plural names in directory and file names
Test conventions
--------------------
-- each module has a canonical test-script (using the "unittests"
+- each module has a canonical test-script (using the "unittests"
package if feasible)
- test/test_exactmodulename.py
+ test/test_exactmodulename.py
+
+- each TestCase is named after the class it tests
-- each TestCase is named after the class it tests
-
class TestExactClass(unittest.TestCase):
- all other testcases are assumed to test single/more functions
or something that spans more than one class
-- every non-test file is forbidden to start with "t"
+- every non-test file is forbidden to start with "t"
- each test directory needs a copy of testsupport.py. see doc/using-testsupport.txt for more information.
+- see information at [[pypydoc test-design.html]]
-Miscallenous stuff
-------------------
+Miscellaneous stuff
+---------------------
- to edit wiki pages do
- svn co http://codespeak.net:8080/svn/pypy/trunk/www/moininstance/data/text wiki-pages
+ svn co http://codespeak.net/svn/pypy/trunk/www/moininstance/data/text wiki-pages
More information about the Pypy-commit
mailing list