Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: Add counts for projects and contexts #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrshu
Copy link

@mrshu mrshu commented Oct 25, 2018

  • Add projects_counts and contexts_counts functions to
    TodoListBase that return a dict of all projects/contexts along with
    their counts.

  • Add command line flags to lsproj and lscont that allow
    project/contexts to be listed with their respective counts, while also
    being sorted by this count.

  • Add tests for all new functionality.

Signed-off-by: mr.Shu mr@shu.io

@mrshu
Copy link
Author

mrshu commented Oct 25, 2018

@bram85 First of all, thanks a ton for such a nice project!

I am not sure if you'd be interested in an addition like this one, but I would very much appreciate it.

I am also not sure what the preferred output format of these "counts" should be, so I am happy to refactor this to meet the overall vision of topydo.

Thanks!

@mrshu mrshu force-pushed the mrshu/counts-for-projects-contexts branch from facacf7 to 56b1954 Compare October 25, 2018 20:52
@codecov
Copy link

codecov bot commented Oct 25, 2018

Codecov Report

Merging #249 into master will decrease coverage by 0.01%.
The diff coverage is 96.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #249      +/-   ##
==========================================
- Coverage   96.98%   96.96%   -0.02%     
==========================================
  Files          51       51              
  Lines        2915     2962      +47     
  Branches      454      472      +18     
==========================================
+ Hits         2827     2872      +45     
  Misses         61       61              
- Partials       27       29       +2
Impacted Files Coverage Δ
topydo/lib/TodoListBase.py 98.83% <100%> (+0.11%) ⬆️
topydo/commands/ListContextCommand.py 96.55% <94.44%> (-3.45%) ⬇️
topydo/commands/ListProjectCommand.py 96.55% <94.44%> (-3.45%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4f843d...f007b1b. Read the comment docs.

* Add `projects_counts` and `contexts_counts` functions to
  `TodoListBase` that return a dict of all projects/contexts along with
  their counts.

* Add command line flags to `lsproj` and `lscont` that allow
  project/contexts to be listed with their respective counts, while also
  being sorted by this count.

* Add tests for all new functionality.

Signed-off-by: mr.Shu <mr@shu.io>
@mrshu mrshu force-pushed the mrshu/counts-for-projects-contexts branch from 56b1954 to f007b1b Compare October 25, 2018 21:08
@mrshu
Copy link
Author

mrshu commented Oct 25, 2018

@bram85 Sadly, I was not able to increase coverage of the changes I introduced here, despite trying fairly hard.

If you'd have any pointers as to how to do that, please let me know -- I'll gladly do that.

Thanks!

@mrshu
Copy link
Author

mrshu commented Nov 10, 2018

@bram85 Would you happen to have a quick moment to take a look at this?

Thanks!

@mrshu
Copy link
Author

mrshu commented Dec 1, 2018

@bram85 Please feel free to let me know what I can do to move this forward.

Thanks!

@davesteele
Copy link
Contributor

A couple of comments:

  • There would need to be documentation in the TiddlyWiki
  • The various ...with_counts... have a smell

Beyond that, as long as it is optional, I could see adding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants