Merge lp:~jkakar/todo/project-skeleton into lp:todo

Proposed by Jamu Kakar
Status: Needs review
Proposed branch: lp:~jkakar/todo/project-skeleton
Merge into: lp:todo
Diff against target: 422 lines (+381/-0)
8 files modified
.bzrignore (+1/-0)
Makefile (+29/-0)
README.rst (+227/-0)
TODO (+7/-0)
bin/td (+14/-0)
setup.py (+42/-0)
todo/__init__.py (+18/-0)
todo/entry_point.py (+43/-0)
To merge this branch: bzr merge lp:~jkakar/todo/project-skeleton
Reviewer Review Type Date Requested Status
Nicholas Tollervey Needs Fixing
Review via email: mp+46898@code.launchpad.net

Description of the change

This branch introduces the following changes:

- A README.rst file has been added with ideas about the command line
  UI sketched out. There is still more to describe, but we have
  enough of a basic design to start writing some code.

- A Makefile and setup.py are in place with basic support for running
  tests, generating API documentation, etc.

- A mostly empty top-level 'todo' package has been added. It has an
  'entry_point' module with glue to wire up Commandant. A bin/td
  executable invokes entery point code. At present it just displays
  the stock 'basic' help topic and the stock builtin 'help' and
  'version' commands.

To post a comment you must log in.
Revision history for this message
Nicholas Tollervey (ntoll) wrote :

OK... The only reason I put that it needs fixing is because of the following relatively trivial items:

1) Please list authors alphabetically - it's a nice precedent that everyone understands.
2) The setup.py file needs to reference commandant in some way. The simplest thing to do would be to upload commandant to PyPI and add the following line in setup.py:

     requires=['commandant',]

Instructions for how to do this can be found in the Python docs. I'm more than happy to help with this process (it's very easy).

Other than that +10000000 from me. :-)

review: Needs Fixing
lp:~jkakar/todo/project-skeleton updated
9. By Jamu Kakar

- Reorder authors to be alphabetic.

10. By Jamu Kakar

- Added 'commandant' to the requires list in setup.py.

Revision history for this message
Jamu Kakar (jkakar) wrote :

I've pushed new revisions with the fixes you've requested. Thanks for
the review!

Unmerged revisions

10. By Jamu Kakar

- Added 'commandant' to the requires list in setup.py.

9. By Jamu Kakar

- Reorder authors to be alphabetic.

8. By Jamu Kakar

- Added information about dependencies to the README file.

7. By Jamu Kakar

- Added a Makefile with basic targets to run tests, generate API
  documentation, etc.
- Added a setup.py to generate releases.
- Added _trial_temp to Bazaar's ignore list.

6. By Jamu Kakar

- Added a bin/td executable to invoke Todo.

5. By Jamu Kakar

- Added a 'todo' package with a simple entry point to wire up
  Commandant.

4. By Jamu Kakar

- Added a 'License' section.

3. By Jamu Kakar

- Added more details to the README and TODO files.

2. By Jamu Kakar

- Start writing README and TODO files to design the user interface and
  capture questions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2011-01-22 10:00:09 +0000
4@@ -0,0 +1,1 @@
5+_trial_temp
6
7=== added file 'Makefile'
8--- Makefile 1970-01-01 00:00:00 +0000
9+++ Makefile 2011-01-22 10:00:09 +0000
10@@ -0,0 +1,29 @@
11+clean:
12+ find . -name \*pyc -exec rm {} \;
13+ rm -rf _trial_temp
14+
15+check:
16+ trial todo
17+
18+release:
19+ python setup.py sdist
20+
21+doc:
22+ pydoctor \
23+ --project-name Todo \
24+ --project-url "http://launchpad.net/todo" \
25+ --project-base-dir `pwd` \
26+ --add-package todo \
27+ --make-html
28+
29+info:
30+ @bzr info
31+ @echo
32+ @echo "Revision:"
33+ @bzr revno
34+ @echo
35+ @echo "Lines of application code:"
36+ @find todo -name \*py | grep -v test_ | xargs cat | wc -l
37+ @echo
38+ @echo "Lines of test code:"
39+ @find todo -name \*py | grep test_ | xargs cat | wc -l
40
41=== added file 'README.rst'
42--- README.rst 1970-01-01 00:00:00 +0000
43+++ README.rst 2011-01-22 10:00:09 +0000
44@@ -0,0 +1,227 @@
45+Todo is a task tracker for teams!
46+
47+
48+License
49+-------
50+
51+Todo is a task tracker for teams!
52+Copyright (C) 2011 Jamshed Kakar <jkakar@kakar.ca> and Nicholas Tollervey
53+<ntoll@ntoll.com>.
54+
55+This program is free software: you can redistribute it and/or modify it under
56+the terms of the GNU General Public License as published by the Free Software
57+Foundation, either version 3 of the License, or (at your option) any later
58+version.
59+
60+This program is distributed in the hope that it will be useful, but WITHOUT
61+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
62+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
63+details.
64+
65+You should have received a copy of the GNU General Public License along with
66+this program. If not, see <http://www.gnu.org/licenses/>. On Ubuntu systems,
67+the complete text of the GNU General Public Version 2 License is in
68+`/usr/share/common-licenses/GPL-3'.
69+
70+
71+Dependencies
72+------------
73+
74+Todo requires Python 2.6+ and has the following package dependencies:
75+
76+ python-commandant
77+ python-testtools (to run the test suite)
78+
79+The python-commandant package is available from a PPA:
80+
81+ https://launchpad.net/~jkakar/+archive/commandant
82+
83+
84+Use cases
85+---------
86+
87+ - Manager assigns task to employee
88+ - Employee receives notification of task (via Twitter or Jabber or IRC)
89+ - I can {un,}assign a task to myself
90+ - Into a category, (eg. personal task, Fluidinfo task, etc.)
91+ - I can view someone elses task list
92+ - I can add a person to a category I'm in
93+
94+
95+Using Todo
96+----------
97+
98+Logging in
99+~~~~~~~~~~
100+
101+::
102+ $ td login $fluiddb-username $fluiddb-password
103+
104+Todo will write a credentials file to ~/.config/todo/credentials.txt. These
105+will be used whenever you use Todo. When you login for the first time a
106+default category is created with the same name as your FluidDB username.
107+
108+Creating and deleting categories
109+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110+
111+::
112+ $ td create-category fluidinfo
113+
114+A category is a container for related tasks. When a category is created, the
115+creator is the only person who has access to tasks in that category.
116+
117+::
118+ $ td delete-category fluidinfo
119+
120+When a category is deleted, so are all tasks in the category.
121+
122+
123+Granting and revoking access to a category
124+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125+
126+::
127+ $ td grant ntoll fluidinfo
128+
129+The grant command gives a user access to tasks in a category. The user is
130+capable of reading and modify all tasks in the category, including adding or
131+removing users from the category itself.
132+
133+::
134+ $ td revoke ntoll fluidinfo
135+
136+The revoke command removes a user from a category. The user is unassigned
137+from any tasks they may be linked to in the category.
138+
139+
140+Creating a new task
141+~~~~~~~~~~~~~~~~~~~
142+
143+::
144+ $ td add "Do laundry"
145+ OK
146+
147+This item is automatically assigned to you and the creation time is stored.
148+It starts life in a 'pending' state. The task ID is printed out. The -c
149+option can be passed to specify a category::
150+
151+ $ td add -c fluidinfo "Deploy sandbox"
152+
153+Assigning a task to a category makes it visible to people that have been
154+granted access to see and modify tasks in that category. Tasks are assigned
155+to you, by default.
156+
157+Showing tasks
158+~~~~~~~~~~~~~
159+
160+::
161+ $ td list
162+ ID Task Created Status
163+ ---- -------------------------------------------- ------- -------
164+ 1 Buy dirty socks Jan 18 started
165+ 2 Buy laundry soap Jan 19 started
166+ 3 Do laundry Jan 19 pending
167+
168+By default, 'list' shows tasks that are started and pending. Items are sorted
169+by state, then by time with the newest first::
170+
171+ $ td list --started
172+ ID Task Created Status
173+ ---- -------------------------------------------- ------- -------
174+ 1 Buy dirty socks Jan 18 started
175+
176+The --started option can be passed to limit output to only those tasks that
177+are in progress. Other options include --pending, --done and --dropped::
178+
179+ $ td list --all
180+ ID Task Creator Created Status
181+ ---- ----------------------------------- ------- ------- -------
182+ 1 Buy dirty socks jkakar Jan 18 started
183+ 2 Buy laundry soap Jan 19 started
184+ 3 Do laundry Jan 19 pending
185+ 4 Buy washing machine Jan 17 done
186+ 5 Buy dirty underwear Jan 17 dropped
187+
188+The --all option displays all tasks, including completed and dropped ones.
189+The options can be used in conjunction with the -c option to show tasks from a
190+specific category::
191+
192+ $ td list -u ntoll
193+ ID Task Creator Created Status
194+ ---- ----------------------------------- ------- ------- -------
195+ 1 Phone kids ntoll Jan 19 pending
196+
197+Starting a task
198+~~~~~~~~~~~~~~~
199+
200+::
201+ $ td start 1
202+
203+A task can be started using the short ID. It can also be started using the
204+object ID of the task object in FluidDB::
205+
206+ $ td start 8ec67dc7-3477-4ea1-9e01-d0c06f1ba444
207+
208+Completing a task
209+~~~~~~~~~~~~~~~~~
210+
211+::
212+ $ td done 1
213+
214+A task can be completed using the short ID. It can also be completed using
215+the object ID of the task object in FluidDB::
216+
217+ $ td done 8ec67dc7-3477-4ea1-9e01-d0c06f1ba444
218+
219+Dropping a task
220+~~~~~~~~~~~~~~~
221+
222+::
223+ $ td drop 1
224+
225+A task can be dropped using the short ID. It can also be dropped using the
226+object ID of the task object in FluidDB::
227+
228+ $ td drop 8ec67dc7-3477-4ea1-9e01-d0c06f1ba444
229+
230+Assigning and unassigning a task
231+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232+
233+::
234+ $ td assign 1 ntoll
235+
236+A task can be assigned to another user.
237+
238+::
239+ $ td unassign 1
240+
241+A task can be unassigned.
242+
243+
244+FluidDB data model
245+------------------
246+
247+Representing categories and tasks
248+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
249+
250+Categories are represented as namespaces in FluidDB, like::
251+
252+ todo/<category>
253+
254+Tags within a category are used to track details related to a task, one object
255+per task::
256+
257+ todo/<category>
258+ description -> "foo"
259+ owner -> "jkakar"
260+ ...
261+
262+The tags in a category have a closed policy with a list of exceptions, that
263+are the users who have access to read or modify data about the tasks.
264+
265+
266+Deleting a category
267+~~~~~~~~~~~~~~~~~~~
268+
269+When a category is deleted, the tags on tasks (represented as objects) are
270+first deleted. The tags on the namespace object that represents the category
271+are then removed.
272
273=== added file 'TODO'
274--- TODO 1970-01-01 00:00:00 +0000
275+++ TODO 2011-01-22 10:00:09 +0000
276@@ -0,0 +1,7 @@
277+- Figure out what to do for the about tag.
278+
279+- If categories are namespaces and data is stored as tags in those
280+ namespaces, how do we:
281+ - Querying across categories. One solution would be to add
282+ wildcards to FluidDB so we could do: todo/*/owner = "ntoll"
283+
284
285=== added directory 'bin'
286=== added file 'bin/td'
287--- bin/td 1970-01-01 00:00:00 +0000
288+++ bin/td 2011-01-22 10:00:09 +0000
289@@ -0,0 +1,14 @@
290+#!/usr/bin/python
291+
292+"""Use Todo interactively from a text prompt."""
293+
294+import os
295+import sys
296+
297+if os.path.isdir("todo"):
298+ sys.path.insert(0, "./")
299+
300+from todo.entry_point import main
301+
302+
303+main(sys.argv)
304
305=== added file 'setup.py'
306--- setup.py 1970-01-01 00:00:00 +0000
307+++ setup.py 2011-01-22 10:00:09 +0000
308@@ -0,0 +1,42 @@
309+#!/usr/bin/env python
310+
311+# Todo is a task tracker for teams!
312+# Copyright (C) 2011 Jamshed Kakar <jkakar@kakar.ca> and Nicholas Tollervey
313+# <ntoll@ntoll.com>.
314+#
315+# This program is free software: you can redistribute it and/or modify it
316+# under the terms of the GNU General Public License as published by the Free
317+# Software Foundation, either version 3 of the License, or (at your option)
318+# any later version.
319+#
320+# This program is distributed in the hope that it will be useful, but WITHOUT
321+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
322+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
323+# more details.
324+
325+from distutils.core import setup
326+import os
327+
328+from todo import __version__ as version
329+
330+
331+def find_packages():
332+ """Find installable packages in the L{todo} source tree."""
333+ packages = []
334+ for directory, subdirectories, files in os.walk("todo"):
335+ if "__init__.py" in files:
336+ packages.append(directory.replace(os.sep, "."))
337+ return [package for package in packages if "tests" not in package]
338+
339+
340+setup(name="todo",
341+ version=version,
342+ description="Todo is a task tracker for teams!",
343+ author="Nicholas Tollervey, Jamshed Kakar",
344+ author_email="ntoll@ntoll.org, jkakar@kakar.ca",
345+ url="http://launchpad.net/todo",
346+ license="GPLv3",
347+ url="https://launchpad.net/todo",
348+ packages=find_packages(),
349+ requires=["commandant"],
350+ scripts=["bin/td"])
351
352=== added directory 'todo'
353=== added file 'todo/__init__.py'
354--- todo/__init__.py 1970-01-01 00:00:00 +0000
355+++ todo/__init__.py 2011-01-22 10:00:09 +0000
356@@ -0,0 +1,18 @@
357+# Todo is a task tracker for teams!
358+# Copyright (C) 2011 Jamshed Kakar <jkakar@kakar.ca> and Nicholas Tollervey
359+# <ntoll@ntoll.com>.
360+#
361+# This program is free software: you can redistribute it and/or modify it
362+# under the terms of the GNU General Public License as published by the Free
363+# Software Foundation, either version 3 of the License, or (at your option)
364+# any later version.
365+#
366+# This program is distributed in the hope that it will be useful, but WITHOUT
367+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
368+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
369+# more details.
370+
371+"""Todo is a task tracker for teams!"""
372+
373+__version_info__ = (0, 1, 0)
374+__version__ = ".".join(str(part) for part in __version_info__)
375
376=== added file 'todo/entry_point.py'
377--- todo/entry_point.py 1970-01-01 00:00:00 +0000
378+++ todo/entry_point.py 2011-01-22 10:00:09 +0000
379@@ -0,0 +1,43 @@
380+# Todo is a task tracker for teams!
381+# Copyright (C) 2011 Jamshed Kakar <jkakar@kakar.ca> and Nicholas Tollervey
382+# <ntoll@ntoll.com>.
383+#
384+# This program is free software: you can redistribute it and/or modify it
385+# under the terms of the GNU General Public License as published by the Free
386+# Software Foundation, either version 3 of the License, or (at your option)
387+# any later version.
388+#
389+# This program is distributed in the hope that it will be useful, but WITHOUT
390+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
391+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
392+# more details.
393+
394+"""Bootstrap code starts and runs Todo."""
395+
396+from commandant import builtins
397+from commandant.controller import CommandController
398+
399+from todo import __version__
400+
401+
402+def main(argv):
403+ """Run the command named in C{argv}.
404+
405+ If a command name isn't provided the C{help} command is shown.
406+
407+ @param argv: A list command-line arguments. The first argument should be
408+ the name of the command to run. Any further arguments are passed to
409+ the command.
410+ """
411+ if len(argv) < 2:
412+ argv.append("help")
413+
414+ controller = CommandController("todo", __version__,
415+ "Todo is a task tracker for teams!",
416+ "https://launchpad.net/todo")
417+ controller.load_module(builtins)
418+ controller.install_bzrlib_hooks()
419+ try:
420+ controller.run(argv[1:])
421+ except StandardError, e:
422+ print e

Subscribers

People subscribed via source and target branches

to all changes: