Skip to content

Commit 215aa3d

Browse files
author
Rebecca
committed
Fixes based on feedback from @dpoirier
1 parent a60ac35 commit 215aa3d

File tree

7 files changed

+42
-25
lines changed

7 files changed

+42
-25
lines changed

README.rst

+24-10
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Requirements
3333
django-timepiece is compatible with Django 1.6 (on Python 2.7 and Python 3.3),
3434
and Django 1.7 (on Python 2.7 and Python 3.4). PostgreSQL is the only
3535
officially supported backend. For a full list of required libraries, see
36-
the `requirements`_.
36+
the `requirements/base.txt` from the project source on `GitHub`_.
3737

3838
We actively support desktop versions of Chrome and Firefox, as well as common
3939
mobile platforms. We do not support most versions of Internet Explorer. We
@@ -44,19 +44,31 @@ Documentation
4444

4545
Documentation is hosted on `Read The Docs`_.
4646

47-
To build the documentation locally, install the `documentation requirements`_.
48-
A makefile is included with the documentation so you can run `make html` in
49-
the `doc/` directory to build docs as HTML.
47+
To build the documentation locally:
48+
49+
#. Download a copy of the `django-timepiece` source, either through
50+
use of `git clone` or by downloading a zipfile from `GitHub`_.
51+
52+
#. Make sure that the top-level directory is on your Python path. If you're
53+
using a virtual environment, this can be accomplished via::
54+
55+
cd /path/to/django-timepiece/ && add2virtualenv .
56+
57+
#. Install the requirements in `requirements/docs.txt` from the project
58+
source on `GitHub`_.
59+
60+
#. Run ``make html`` from within the `docs/` directory. HTML files will be
61+
output in the `docs/_build/html/` directory.
5062

5163
Installation
5264
------------
5365

5466
#. django-timepiece is available on `PyPI`_, so the easiest way to
55-
install it and its dependencies is to use `pip <http://pip.openplans.org/>`_::
67+
install it and its dependencies is to use `pip`_::
5668

5769
$ pip install django-timepiece
5870

59-
#. Ensure that `less <http://lesscss.org>`_ is installed on your machine::
71+
#. Ensure that `less`_ is installed on your machine::
6072

6173
# Install node.js and npm:
6274
$ sudo apt-get install python-software-properties
@@ -172,10 +184,12 @@ Installation
172184
...
173185
)
174186

175-
Development sponsored by `Caktus Consulting Group, LLC
176-
<http://www.caktusgroup.com/services>`_.
187+
Development sponsored by `Caktus Group`_.
188+
177189

190+
.. _Caktus Group: https://www.caktusgroup.com/services
191+
.. _GitHub: https://github.com/caktus/django-timepiece
192+
.. _less: http://lesscss.org
193+
.. _pip: http://pip.openplans.org/
178194
.. _PyPI: http://pypi.python.org/pypi/django-timepiece
179195
.. _Read The Docs: http://django-timepiece.readthedocs.org
180-
.. _requirements: requirements/base.txt
181-
.. _documentation requirements: requirements/docs.txt

docs/_static/.gitkeep

Whitespace-only changes.

docs/releasenotes.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Release Notes
44
0.10.0 (Unreleased)
55
-------------------
66

7-
* Compatibility with Django 1.6/1.7 and Python 2.7/3
7+
* Compatibility with Django 1.6 with Python 2.7 or Python 3.3
8+
* Compatibility with Django 1.7 with Python 2.7 or Python 3.4
89
* Flake8 compliance
910
* Drops support for testing with Jenkins
1011

docs/testing.rst

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
Testing
22
=======
33

4-
Test requirements are listed `here <../requirements/tests.txt>`_.
4+
Test requirements are listed in `requirements/tests.txt` file in the `project
5+
source <https://github.com/caktus/django-timepiece>`_. These requirements are
6+
in addition to the main project requirements in `requirements/base.html`.
57

6-
You can run tests against your installation of django-timepiece using the
7-
Django test runner::
8+
After you have installed `django-timepiece` in your project, you can use the
9+
Django test runner to run tests against your installation::
810

9-
python manage.py test
11+
python manage.py test timepiece timepiece.contracts timepiece.crm timepiece.entries timepiece.reports
1012

11-
Or with specific apps::
13+
Tests in Development
14+
====================
1215

13-
python manage.py test timepiece timepiece.crm timepiece.reports
14-
15-
You can also use tox to run tests against a specific environment::
16+
To easily run tests against different environments that `django-timepiece`
17+
supports, download the source and navigate to the `django-timepiece`
18+
directory. From there, you can use tox to run tests against a specific
19+
environment::
1620

1721
tox -e py3.4-django1.7
1822

1923
Or omit the `-e` argument to run tests against all combinations of Python
20-
and Django that django-timepiece supports. By default tox uses the example
24+
and Django that `django-timepiece` supports. By default tox uses the example
2125
project test settings, but you can specify different test settings using the
22-
``--settings`` flag. You can also specify which apps to test against.
26+
``--settings`` flag. You can also specify a subset of apps to test against.

requirements/docs.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ docutils>=0.12
22
Sphinx>=1.2.3
33
Jinja2>=2.7.3
44
MarkupSafe>=0.23
5+
Pygments>=2.0.2

timepiece/crm/tests/test_users.py

-3
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ def test_post_valid(self):
9898
self.assertEquals(obj.is_active, self.post_data['is_active']),
9999
self.assertEquals(obj.is_staff, self.post_data['is_staff']),
100100
groups = obj.groups.values_list('pk', flat=True)
101-
self.assertEqual(len(groups), len(self.post_data['groups']))
102101
self.assertEqual(sorted(groups), sorted(self.post_data['groups']))
103102
self.assertTrue(obj.check_password(self.post_data['password1']))
104103

@@ -212,7 +211,6 @@ def _assert_no_change(self):
212211
self.assertEquals(obj.is_staff, self.obj.is_staff)
213212
groups1 = obj.groups.values_list('pk', flat=True)
214213
groups2 = self.obj.groups.values_list('pk', flat=True)
215-
self.assertEqual(len(groups1), len(groups2))
216214
self.assertEqual(sorted(groups1), sorted(groups2))
217215

218216
def test_get_no_permission(self):
@@ -260,7 +258,6 @@ def test_post_valid(self):
260258
self.assertEquals(obj.is_active, self.post_data['is_active'])
261259
self.assertEquals(obj.is_staff, self.post_data['is_staff'])
262260
groups = obj.groups.values_list('pk', flat=True)
263-
self.assertEqual(len(groups), len(self.post_data['groups']))
264261
self.assertEqual(sorted(groups), sorted(self.post_data['groups']))
265262

266263
def test_post_invalid(self):

timepiece/entries/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def pause_all(self):
405405
"""
406406
Pause all open entries
407407
"""
408-
entries = self.user.timepiece_entries.filter(end_time__isnull=True).all()
408+
entries = self.user.timepiece_entries.filter(end_time__isnull=True)
409409
for entry in entries:
410410
entry.pause()
411411
entry.save()

0 commit comments

Comments
 (0)