Debian Codegraph @

README_development.rst

raw
1 ================================
2 JayDeBeApi - Development notes
3 ================================
4
5 Some notes for development.
6
7 .. contents::
8
9 Setup test requirements
10 =======================
11
12 ::
13
14 sudo apt-get install python2.7-dev python3-dev python3-venv \
15 build-essentials g++ maven
16 cd <JAYDEBEAPI_WORKDIR>
17 python3 -m venv env
18 . env/bin/activate
19 pip install -rdev-requirements.txt
20
21 # Install Jython 2.7
22 ci/mvnget.sh org.python:jython-installer:2.7.2
23 java -jar jython-installer-2.7.2.jar && rm jython-installer-2.7.2.jar
24 # add jython to your path
25
26 # run tests for all supported envs
27 tox
28
29 # execute stuff on specific env (examples)
30 tox -e py3-driver-mock -- python
31 tox -e py3-driver-mock -- python test/testsuite.py test_mock.MockTest.test_sql_exception_on_commit
32
33 # activate and work on specific env
34 . .tox/py35-driver-mock/bin/activate
35 export CLASSPATH=$VIRTUAL_ENV/javalib/*
36 python test/testsuite.py
37
38 Build a new release
39 ===================
40
41 1. Sync the branch. ::
42
43 $ git checkout master
44 $ git pull
45
46 2. Do your changes.
47
48 3. Add a changelog entry to ``README.rst`` below ``Next version``.
49
50 4. Commit and push your changes. ::
51
52 $ git commit -m "my comment"
53 $ git push
54
55 5. Wait for travis CI build to finish successfully.
56
57 6. Bump version ::
58
59 $ bumpversion [major|minor|patch]
60
61 7. Run setuptools to ensure everything is working as expected. ::
62
63 $ python setup.py sdist bdist_wheel
64 $ twine upload dist/* -r pypitest
65
66 8. Check the files in ``dist/`` for unwanted or missing files.
67
68 9. Send new version and tags to github origin. ::
69
70 $ git push --follow-tags && git push --tags