dapritchard / workloganalyzer Goto Github PK
View Code? Open in Web Editor NEWAnalyze Worklog Records
Home Page: https://dapritchard.github.io/worklogAnalyzer/
License: GNU General Public License v3.0
Analyze Worklog Records
Home Page: https://dapritchard.github.io/worklogAnalyzer/
License: GNU General Public License v3.0
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).
I'm planning to try converting to S4 for the following reasons.
Something like
partition_by_intervals(
worklogs = wkls,
period = period,
start = start,
directions = "both"
)
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.
Many of the tests in tests/testthat/test-constructor-new.R
are commented out because they fail.
It may be convenient to filter worklogs by one or more regular expressions.
Possible features:
See how other applications like find
, ld
, rsync
, etc. handle this.
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:
new
extract_worklogs
pointing towards a worklogs_leaf
Some potential approaches:
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.
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.worklofs_leaf
in a worklogs_node
. But if we've already programmed around the special case everywhere is this even helpful?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:
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.
The error message is the following.
ℹ In index: 1.
ℹ With name: personal.
Caused by error in `validObject()`:
! invalid class “worklogs_node” object: parent prototype must be consistent with children
Run `�]8;;rstudio:run:rlang::last_trace()�rlang::last_trace()�]8;;�` to see where the error occurred.
The error message I'm seeing is the following:
Caused by error in `validObject()`:
! invalid class “worklogs_leaf” object: the tags field must be a character vector without NAs
Set up a GitHub actions specification to run R CMD check
It feels like the labels
belong with the worklogs_leafs
since they don't change and it saves us from having to pass them in later.
A few idea of things to check:
new
for worklogs_leaf
throws an error for invalid input
new(...)
did not throw the expected error.
Currently I am thinking there could be three options:
10%
4:10 (10%)
4:10
Use the Collate
field in DESCRIPTION to specify the order in which the files are read in.
See:
If present, the collate specification must list all R code files in the package [...] as a whitespace separated list of file paths relative to the R subdirectory.
The full error message is the following:
Caused by error in `validObject()`:
! invalid class “worklogs_leaf” object: the start, end, and duration columns must be consistent
Run `�]8;;rstudio:run:rlang::last_trace()�rlang::last_trace()�]8;;�` to see where the error occurred.
The following error message is given:
child prototypes must be consistent
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.
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
.
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.
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%
This is related to #23 so that we can treat a sole worklogs_leaf
the same way as we would a worklogs_node
with a single child worklogs_leaf
.
Some of the config@labels
elements are not required. To signal this option, allow the values to be NULL
.
Should we force worklogs to be represented using a data frame, or could we alternatively allow arbitrary nested structures?
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.
[
that keep the metadata up-to-date.Represent hierarchy by using a list representation. Possibly the leaves of the hierarchy (individual tasks) could be represented using a data frame.
The main part of the error message is the following:
trying to get slot "children" from an object of a basic class ("NULL") with no slots
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.