Easier and more self documenting patterns for loading/saving Persistent
[python_utils.git] / README
1
2 To set up a new testing environment:
3
4 1. Create a python virtual environment:
5
6    python3 -m venv /path/to/your/venv --system-site-packages
7
8 2. Checkout a copy of the utils project.
9
10    git clone ssh://[email protected]/usr/local/git/base/python_utils.git
11
12    Your SSH identity will need to be authorized by the [email protected] user.
13
14 3. Make the virtual environment "exclusive" by editing bin/activate to
15    clear PYTHONPATH, if set, by adding this:
16
17    if [ -n "${PYTHONPATH}" ] ; then
18        unset PYTHONPATH
19    fi
20    export PYTHONPATH=<your venv>/<your dev root>
21
22 4. Install the dependencies:
23
24    cd <your venv>/<your dev root>
25    for file in $( cat ./requirements.txt ); do
26        pip install $file
27    done
28
29 5. Run the unittests to make sure they all work:
30
31    cd <your venv>/<your dev root>/tests
32    ./run_tests.py -a
33
34 6. Create a local git branch
35
36    git checkout -b your_dev
37
38 7. Install git pre-commit hooks from master:
39
40    [s]cp /home/scott/lib/python_modules/.git/hooks/pre-commit .
41
42 That's it.