Giter VIP home page Giter VIP logo

workloganalyzer's People

Contributors

dapritchard avatar

Watchers

 avatar

workloganalyzer's Issues

Add an overall summary to `effort_summary` report

Currently the sum of the top-level hours are not reported. This would only be useful when effort_style is "effort" or "effort_and_percent" since the percentage effort would always be 100% at the top level (but it could still be reported).

Convert worklog nodes to S4 representation

I'm planning to try converting to S4 for the following reasons.

  • S4 gives some added type support so that it will make it easier to ensure that the data structures are valid (e.g. all of the children are of the right type, etc.). Normally I find S4 classes less convenient to work with as a user so I don't tend to use them, but... (see next bullet)
  • I want the trees to be an more "opaque" type, that is to say I want users to only interact with them via the functions/methods provided by the library rather than manipulating the nodes directly, which using S4 I believe will encourage.

Fix 'worklogs_from_parents' error: @children names must be unique'

The following is the error message from running worklogs_from_parents:

Error in `map2()` at �]8;line = 116:col = 4;file:///Users/david.pritchard/Dev/worklogAnalyzer/R/add-hierarchy.R�worklogAnalyzer/R/add-hierarchy.R:116:4�]8;;�:
ℹ In index: 1.
ℹ With name: personal.
Caused by error in `validObject()`:
! invalid class “worklogs_node” object: @children names must be unique
Run `�]8;;rstudio:run:rlang::last_trace()�rlang::last_trace()�]8;;�` to see where the error occurred.

Add a function to filter worklogs by using regular expressions

It may be convenient to filter worklogs by one or more regular expressions.

Possible features:

  • You could choose to filter by node names, leaf names, or both
  • Multiple regular expressions would be additive
  • Maybe include an "exclude" like option?

See how other applications like find, ld, rsync, etc. handle this.

Do we allow a worklogs tree to be just a leaf?

Right now we think of a worklogs tree with a single task as being a worklogs_node with a single child worklogs_leaf. But we could potentially end up with a situation where we have a tree that's just a worklogs_leaf. For example:

  1. By calling new
  2. By calling extract_worklogs pointing towards a worklogs_leaf

Some potential approaches:

  1. We could potentially treat this as a special case that's effectively the same as a worklogs_node with a single child worklogs_leaf. We could give it the name as the description from the internal data frame. But then we'd have to program around this everywhere.
    1. If the leaf doesn't contain any worklog entries then we won't be able to extract a name.
      1. We could throw an error in this case
      2. We could make the name of the worklogs be an argument to new and store it with the object. Since we don't really want users to call new directly this might not be a big deal. Furthermore, it might be convenient to store the name of the worklogs along with the object (presumably as duplicated information in lockstep with the names of the parents @children slot.
  2. As a variant of (1) we could try to "fix" the situation whenever we encounter it and wrap worklofs_leaf in a worklogs_node. But if we've already programmed around the special case everywhere is this even helpful?
  3. We could throw an error when we do encounter it.
    1. We'd have to create top-level versions of functions to catch this case
    2. Would this be annoying to the user?

Should 'worklogs' know the "schema" of the tree and ensure it is consistent?

When a 'worklogs' object is first created, we should probably check consistency of the data frames stored in the leafs.

There may be situations where we'd like to return an "empty" worklogs tree, such as for the following:

  1. We filter out all of the worklog entries out of the tree
  2. We extract a subtree without any worklogs in it
  3. We delete the last worklogs leaf

In such situations we'd like as_tibble and friends to return a data frame with 0 rows and the correct names and types of the columns. We could search around and find a leaf to get the schema, but maybe we'd prefer to get that information at creation time and store that information in every element of the tree.

We might also want to require that the information is provided at at creation time.

More complete testing for 'worklogs' routines

A few idea of things to check:

  • Worklog data frames with 0 rows
  • Worklog data frames with differing types
  • Worklogs where the name of a leaf child doesn't match the name of a task
  • Worklog data frames with more than 1 task description

Add README file

Create a README.md file. Probably it will be useful to create a README.Rmd file and then convert that to Markdown. I'm not sure yet if that conversion should be automated in some way.

Add 'subtree_remove' routine

Consider taking a character vector as input specifying the subtree to delete. Alternatively we could try to do something a little bit more akin to purrr::chuck.

Change structure to give each task it's own subtree

I think it's necessary to include each task in it's own subtree so that we can identify tasks with 0 worklogs in them. If they are rows in a data frame then we can't do so. Also I suspect that it will eliminate some programming around special cases.

Create summary method

What I am currently thinking is to do something like the show method, i.e. something that prints out the data like a tree, but with effort proportion included.

Perhaps we could have an option for dropping levels that are 0%.

Here's a first pass at what I am imagining.

                                                  Effort proportion
.                                                 -----------------
├── Development projects                                   88% 
│  ├── (+4) A-team                                               3%
│  ├── (+26) asclepias                                          28%
│  ├── (+4) codelist                                             5%
│  ├── (+1) data pipeline orchestration layer                    2%
│  ├── (+8) event-data-model                                    15%
│  ├── (+7) interval-algebra                                     8%
│  ├── (+1) noviverse-site                                       7%
│  ├── (+20) nsBuild                                            17%
│  └── (+1) nsProjects                                           3%
└── Research projects                                      12%
   ├── (+2) P0024 Fracture Prediction                            2%
   ├── (+1) P0025 Osteoporosis Negative Control                  3%
   ├── (+1) P0036                                                0%
   ├── (+3) P0053 Osteoporosis Comparative Effectiveness         3%
   ├── (+5) P0073 Migraine NCO                                   3%
   └── (+1) P0076 market insight PHRs                            1%
   

How to represent worklogs?

Top level representation

Should we force worklogs to be represented using a data frame, or could we alternatively allow arbitrary nested structures?

Representation as a data frame

Suppose we have a constructor that creates a tibble with attached metadata about how to obtain start time, end time, tags, description, etc. How do we ensure that the information is up-to-date whenever we try to use one of the package functions/methods on a possibly modified version the object?

The following are some possible strategies to handle the issue described in the preceding paragraph.

  1. We don't ensure that the attached metadata is up-to-date, but instead perform runtime checks to make sure that the information makes sense (is of the right types, etc).
  2. The constructor transforms the input data into a data frame with a standardized form (standard column names and types, etc.). Then runtime checks are performed as in (1).
  3. We try to create wrappers for data frame methods like [ that keep the metadata up-to-date.
  4. Create some type of abstract class that can be exported to a data frame as needed.
  5. Take a hash using digest or similar of the object at construction time to ensure that it hasn't changed.

Representation as a list-of-lists

Represent hierarchy by using a list representation. Possibly the leaves of the hierarchy (individual tasks) could be represented using a data frame.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.