-
Notifications
You must be signed in to change notification settings - Fork 71
/
HACKING
79 lines (46 loc) · 2.07 KB
/
HACKING
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Hacking Django EL(Endless) Pagination
=================================
Here are the steps needed to set up a development and testing environment.
Creating a development environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The development environment is created in a venv. The environment
creation requires the *make* program to be installed.
To install *make* under Debian/Ubuntu::
$ sudo apt-get install build-essential
Under Mac OS/X, *make* is available as part of XCode.
At this point, from the root of this branch, run the command::
$ make
This command will create a ``.venv`` directory in the branch root, ignored
by DVCSes, containing the development virtual environment with all the
dependencies.
Testing the application
~~~~~~~~~~~~~~~~~~~~~~~
Run the tests::
$ make test
The command above also runs all tests except the available integration. They use
Selenium and require Firefox to be installed. To include executing integration
tests, define the environment variable USE_SELENIUM, e.g.::
$ make test USE_SELENIUM=1
Integration tests are excluded by default when using Python 3. The test suite
requires Python >= 3.8.0.
Run the tests and lint/pep8 checks::
$ make check
Again, to exclude integration tests::
$ make check USE_SELENIUM=1
Debugging
~~~~~~~~~
Run the Django shell (Python interpreter)::
$ make shell
Run the Django development server for manual testing::
$ make server
After executing the command above, it is possible to navigate the testing
project going to <http://localhost:8000>.
See all the available make targets, including info on how to create a Python 3
development environment::
$ make help
Thanks for contributing, and have fun!
Pipy testing before bump new vervion
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Before register our package with PyPI, it is important to test if the package actually works.
pip install -e git+https://[email protected]/shtalinberg/django-el-pagination#egg=django-el-pagination
pip install -e git+https://[email protected]/shtalinberg/django-el-pagination@develop#egg=django-el-pagination