How should multiple (related) projects be arranged (structured) and configured so that they can share code, have a related package structure and enable proper unittesting, and ensuring no namespace collisions
alisonken1
alisonken1 at gmail.com
Thu Apr 20 16:40:32 EDT 2006
I believe that Paddy was referencing his second point about keeping
"production code" and "test code" clearly delimited, so was
recommending that a version control system be used rather than the
local disk structure required by python for building module packages.
Although, I have found that symlinks work fine for delimiting file
structure - ex.:
$BASEDIR/<production files>
$TESTDIR/<test files>
$TESTDIR/<link to $BASEDIR>
Using an example program that I wrote, the following directory
structure snippet works for me (where 'bin' is a directory to shared
modules of production code):
-rw-r--r-- 1 ken users 509 2004-11-30 13:35 label.ini
lrwxrwxrwx 1 ken users 9 2004-12-29 01:54 bin -> ../../bin/
drwxr-xr-x 3 ken users 72 2004-12-10 16:01 data/
drwxr-xr-x 2 ken users 80 2004-12-10 16:46 disp/
drwxr-xr-x 2 ken users 48 2004-12-10 16:01 etc/
drwxr-xr-x 2 ken users 80 2004-12-10 16:27 prn/
drwxr-xr-x 2 ken users 208 2004-12-10 16:14 test/
drwxr-xr-x 2 ken users 1208 2004-12-10 17:15 label.py
More information about the Python-list
mailing list