summaryrefslogtreecommitdiff
path: root/README
blob: e94da3bfcd429f999c142729315b9037ec08e3b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

To set up a new testing environment:

1. Create a python virtual environment:

   python3 -m venv /path/to/your/venv --system-site-packages

2. Checkout a copy of the utils project.

   git clone ssh://[email protected]/usr/local/git/base/python_utils.git

   Your SSH identity will need to be authorized by the [email protected] user.

3. Make the virtual environment "exclusive" by editing bin/activate to
   clear PYTHONPATH, if set, by adding this:

   if [ -n "${PYTHONPATH}" ] ; then
       unset PYTHONPATH
   fi
   export PYTHONPATH=<your venv>/<your dev root>

4. Install the dependencies:

   cd <your venv>/<your dev root>
   for file in $( cat ./requirements.txt ); do
       pip install $file
   done

5. Run the unittests to make sure they all work:

   cd <your venv>/<your dev root>/tests
   ./run_tests -a

6. Create a local git branch

   git checkout -b your_dev

7. Install git pre-commit hooks from master:

   [s]cp /home/scott/lib/python_modules/.git/hooks/pre-commit .

That's it.