kanban-python 0.3.5__tar.gz → 0.3.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. {kanban-python-0.3.5 → kanban-python-0.3.6}/CHANGELOG.md +5 -0
  2. {kanban-python-0.3.5/src/kanban_python.egg-info → kanban-python-0.3.6}/PKG-INFO +1 -1
  3. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python/controls.py +9 -1
  4. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python/interface.py +44 -25
  5. {kanban-python-0.3.5 → kanban-python-0.3.6/src/kanban_python.egg-info}/PKG-INFO +1 -1
  6. {kanban-python-0.3.5 → kanban-python-0.3.6}/.coveragerc +0 -0
  7. {kanban-python-0.3.5 → kanban-python-0.3.6}/.github/workflows/ci.yml +0 -0
  8. {kanban-python-0.3.5 → kanban-python-0.3.6}/.gitignore +0 -0
  9. {kanban-python-0.3.5 → kanban-python-0.3.6}/.isort.cfg +0 -0
  10. {kanban-python-0.3.5 → kanban-python-0.3.6}/.pre-commit-config.yaml +0 -0
  11. {kanban-python-0.3.5 → kanban-python-0.3.6}/.readthedocs.yml +0 -0
  12. {kanban-python-0.3.5 → kanban-python-0.3.6}/AUTHORS.md +0 -0
  13. {kanban-python-0.3.5 → kanban-python-0.3.6}/CONTRIBUTING.md +0 -0
  14. {kanban-python-0.3.5 → kanban-python-0.3.6}/LICENSE.txt +0 -0
  15. {kanban-python-0.3.5 → kanban-python-0.3.6}/README.md +0 -0
  16. {kanban-python-0.3.5 → kanban-python-0.3.6}/docs/Makefile +0 -0
  17. {kanban-python-0.3.5 → kanban-python-0.3.6}/docs/_static/.gitignore +0 -0
  18. {kanban-python-0.3.5 → kanban-python-0.3.6}/docs/authors.md +0 -0
  19. {kanban-python-0.3.5 → kanban-python-0.3.6}/docs/changelog.md +0 -0
  20. {kanban-python-0.3.5 → kanban-python-0.3.6}/docs/conf.py +0 -0
  21. {kanban-python-0.3.5 → kanban-python-0.3.6}/docs/contributing.md +0 -0
  22. {kanban-python-0.3.5 → kanban-python-0.3.6}/docs/index.md +0 -0
  23. {kanban-python-0.3.5 → kanban-python-0.3.6}/docs/license.md +0 -0
  24. {kanban-python-0.3.5 → kanban-python-0.3.6}/docs/readme.md +0 -0
  25. {kanban-python-0.3.5 → kanban-python-0.3.6}/docs/requirements.txt +0 -0
  26. {kanban-python-0.3.5 → kanban-python-0.3.6}/images/image_config.PNG +0 -0
  27. {kanban-python-0.3.5 → kanban-python-0.3.6}/images/image_header.PNG +0 -0
  28. {kanban-python-0.3.5 → kanban-python-0.3.6}/images/image_kanban.PNG +0 -0
  29. {kanban-python-0.3.5 → kanban-python-0.3.6}/images/image_kanban_configure.PNG +0 -0
  30. {kanban-python-0.3.5 → kanban-python-0.3.6}/images/image_kanban_init.PNG +0 -0
  31. {kanban-python-0.3.5 → kanban-python-0.3.6}/images/image_scan_table.PNG +0 -0
  32. {kanban-python-0.3.5 → kanban-python-0.3.6}/images/image_scan_view.PNG +0 -0
  33. {kanban-python-0.3.5 → kanban-python-0.3.6}/images/image_task_example.PNG +0 -0
  34. {kanban-python-0.3.5 → kanban-python-0.3.6}/pyproject.toml +0 -0
  35. {kanban-python-0.3.5 → kanban-python-0.3.6}/setup.cfg +0 -0
  36. {kanban-python-0.3.5 → kanban-python-0.3.6}/setup.py +0 -0
  37. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python/__init__.py +0 -0
  38. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python/app.py +0 -0
  39. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python/cli_parser.py +0 -0
  40. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python/config.py +0 -0
  41. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python/constants.py +0 -0
  42. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python/utils.py +0 -0
  43. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python.egg-info/SOURCES.txt +0 -0
  44. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python.egg-info/dependency_links.txt +0 -0
  45. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python.egg-info/entry_points.txt +0 -0
  46. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python.egg-info/not-zip-safe +0 -0
  47. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python.egg-info/requires.txt +0 -0
  48. {kanban-python-0.3.5 → kanban-python-0.3.6}/src/kanban_python.egg-info/top_level.txt +0 -0
  49. {kanban-python-0.3.5 → kanban-python-0.3.6}/tests/conftest.py +0 -0
  50. {kanban-python-0.3.5 → kanban-python-0.3.6}/tests/test_config.py +0 -0
  51. {kanban-python-0.3.5 → kanban-python-0.3.6}/tests/test_interface.py +0 -0
  52. {kanban-python-0.3.5 → kanban-python-0.3.6}/tests/test_utils.py +0 -0
  53. {kanban-python-0.3.5 → kanban-python-0.3.6}/tox.ini +0 -0
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 0.3.6
4
+ - Add an `Overview` of Task amounts when changing boards, to get an overview over all Boards
5
+ - Behind the boardname you now have something like `Ready: 05 | Doing: 02 | Done: 10`
6
+ - only tasks amount of columns set as visible are displayed
7
+
3
8
  ## Version 0.3.5
4
9
  - Bug Fix: Datatype `Welcome Task` Duration: str -> int
5
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kanban-python
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: Terminal Kanban App written in Python
5
5
  Home-page: https://github.com/Zaloog/kanban-python
6
6
  Author: Zaloog
@@ -112,6 +112,12 @@ def read_db(path: str = None) -> dict:
112
112
  if not path:
113
113
  path = cfg.active_board_path
114
114
 
115
+ if path == "all":
116
+ board_dict = {
117
+ b: read_single_board(b_path) for b, b_path in cfg.kanban_boards_dict.items()
118
+ }
119
+ return board_dict
120
+
115
121
  try:
116
122
  data = read_single_board(path)
117
123
  return data
@@ -120,6 +126,7 @@ def read_db(path: str = None) -> dict:
120
126
  console.print(f":warning: No [orange3]{TASK_FILE_NAME}[/] file here anymore.")
121
127
  console.print("Please change to another board.")
122
128
  change_kanban_board()
129
+
123
130
  console.print(f"[red]Seems like the previous {TASK_FILE_NAME} file was deleted[/]")
124
131
  console.print(f"Create new [orange3]{TASK_FILE_NAME}[/] file here.")
125
132
  create_new_db()
@@ -163,7 +170,8 @@ def update_task_from_db():
163
170
 
164
171
  # Action 3
165
172
  def change_kanban_board():
166
- new_active_board = input_ask_for_change_board()
173
+ boards_dict = read_db(path="all")
174
+ new_active_board = input_ask_for_change_board(boards_dict)
167
175
  cfg.active_board = new_active_board
168
176
 
169
177
 
@@ -47,6 +47,7 @@ def create_table(data: dict) -> Table:
47
47
  return table
48
48
 
49
49
 
50
+ # Board Action selection
50
51
  def input_ask_for_action():
51
52
  console.print(
52
53
  "[yellow]Whats up!?[/], how can I help you being productive today :rocket:?"
@@ -81,6 +82,7 @@ def input_ask_for_action():
81
82
  return action
82
83
 
83
84
 
85
+ # Action 1: New Task
84
86
  def input_create_new_task() -> dict:
85
87
  title = Prompt.ask(
86
88
  prompt="[1/4] Add Task Title",
@@ -121,6 +123,19 @@ def input_create_new_task() -> dict:
121
123
  return new_task
122
124
 
123
125
 
126
+ # Option 2
127
+ def input_ask_which_task_to_update(data: dict) -> str:
128
+ choice_task_ids = [
129
+ id for id, task in data.items() if task["Status"] in cfg.vis_cols
130
+ ]
131
+ task_id_to_update = IntPrompt.ask(
132
+ prompt="Which Task to update? Select an [[cyan]Id[/]]",
133
+ choices=choice_task_ids,
134
+ show_choices=False,
135
+ )
136
+ return str(task_id_to_update)
137
+
138
+
124
139
  def input_update_task_title(current_title) -> str:
125
140
  return Prompt.ask(
126
141
  prompt="[1/4] Update Task Title",
@@ -185,18 +200,6 @@ def input_update_task(current_task: dict) -> dict:
185
200
  return current_task
186
201
 
187
202
 
188
- def input_ask_which_task_to_update(data: dict) -> str:
189
- choice_task_ids = [
190
- id for id, task in data.items() if task["Status"] in cfg.vis_cols
191
- ]
192
- task_id_to_update = IntPrompt.ask(
193
- prompt="Which Task to update? Select an [[cyan]Id[/]]",
194
- choices=choice_task_ids,
195
- show_choices=False,
196
- )
197
- return str(task_id_to_update)
198
-
199
-
200
203
  def input_ask_to_what_status_to_move(task_title):
201
204
  possible_status = [cat for cat in cfg.kanban_columns_dict]
202
205
 
@@ -227,16 +230,29 @@ def input_ask_for_new_board_name() -> str:
227
230
  )
228
231
 
229
232
 
230
- def input_ask_for_change_board() -> str:
233
+ # Action 3 Change Boards
234
+ def input_ask_for_change_board(boards_dict: dict) -> str:
231
235
  boards = cfg.kanban_boards
236
+ max_board_len = max([len(b) for b in cfg.kanban_boards])
237
+
232
238
  # if active Board is not in Board List dont show default
233
239
  try:
234
240
  active_board_idx = boards.index(cfg.active_board) + 1
235
241
  except ValueError:
236
242
  active_board_idx = None
237
243
 
238
- for idx, board in enumerate(boards, start=1):
239
- console.print(f"[{idx}] {board}")
244
+ for idx, (board, board_data) in enumerate(boards_dict.items(), start=1):
245
+ status_dict = create_status_dict_for_rows(board_data, cfg.vis_cols)
246
+ console.print(
247
+ f"[{idx}] {board}"
248
+ + " " * ((max_board_len - len(board) + 1))
249
+ + " | ".join(
250
+ [
251
+ f"{COLOR_DICT[col]}: {len(status_dict[col]):02d}"
252
+ for col in cfg.vis_cols
253
+ ]
254
+ )
255
+ )
240
256
 
241
257
  answer = IntPrompt.ask(
242
258
  prompt="Which board to activate",
@@ -248,6 +264,18 @@ def input_ask_for_change_board() -> str:
248
264
  return boards[int(answer) - 1]
249
265
 
250
266
 
267
+ # Action 4 Show Tasks
268
+ def input_ask_which_tasks_to_show(choices):
269
+ return Prompt.ask(
270
+ prompt="What Task/s to show? Select an [[cyan]Id[/]] or ([orange3]Tag[/])?",
271
+ default=False,
272
+ show_default=False,
273
+ choices=choices,
274
+ show_choices=False,
275
+ )
276
+
277
+
278
+ # Action 5 Delete Boards
251
279
  def input_ask_for_delete_board() -> str:
252
280
  boards = [b for b in cfg.kanban_boards]
253
281
  for idx, board in enumerate(boards, start=1):
@@ -267,6 +295,7 @@ def input_confirm_delete_board(name) -> bool:
267
295
  )
268
296
 
269
297
 
298
+ # Scanner options
270
299
  def input_confirm_show_all_todos() -> bool:
271
300
  return Confirm.ask(
272
301
  prompt="Do you want to list all of them?",
@@ -301,16 +330,6 @@ def input_confirm_add_todos_to_board(todos) -> bool:
301
330
  )
302
331
 
303
332
 
304
- def input_ask_which_tasks_to_show(choices):
305
- return Prompt.ask(
306
- prompt="What Task/s to show? Select an [[cyan]Id[/]] or ([orange3]Tag[/])?",
307
- default=False,
308
- show_default=False,
309
- choices=choices,
310
- show_choices=False,
311
- )
312
-
313
-
314
333
  # Config Settings
315
334
  #####################################################################################
316
335
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kanban-python
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: Terminal Kanban App written in Python
5
5
  Home-page: https://github.com/Zaloog/kanban-python
6
6
  Author: Zaloog
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes