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

Version 4.3 #243

Merged
merged 63 commits into from
Apr 17, 2023
Merged

Version 4.3 #243

merged 63 commits into from
Apr 17, 2023

Conversation

bockthom
Copy link
Collaborator

4.3

Added

Changed/Improved

Fixed

maxloeffler and others added 30 commits December 24, 2022 17:21
Add the 'verify.data.frame.column' to the miscellaneous utilities to check the existence and welltypedness of columns in a dataframe.

This works towards fixing #208.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Add call to 'verify.data.frame.columns' to relevant setters and read functions

This works towards fixing #208.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Change most internal types from numeric to integer; also in related tests.
Add sufficient checks for empty input-files in read functions.
Close previously unlocked parenthesis in util-data.
Change dummy fill of author email from NA to null-string
to comply with character type of column.

This fixes #208.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Add copyright header to updated utility and test files.

This fixes #208.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Add check that input is a list in 'set.custom.event.timestamps' and verify
correct input structure in 'read.custom.event.timestamps'. Concretize unclear
comments, fix punctuation and spelling mistakes. Update copyright headers.

This fixes feedback on #208.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Remove check on first column of timestamp data in 'read.custom.event.timestamps'
as non-character fields will be cast to character anyways by call to 'names'.
Simplify POSIXct format check on second column using 'get.date.from.string'
function. Wrap overly long line in 'verify.data.frame.columns'.

This fixes feedback on #208.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Add changes and additions reguarding dataframe verification to 'NEWS.md'.

This completes checklist on #208.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Indent line-wrapped string according to convention.

This fixes feedback on #208.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
In  change issue number to pull-request number and add comma after.

This fixes feedback on #208.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Replace 'expect_no_error(expr, message)' by 'expect_error(expr, NA, message)'.

This fixes feedback on #208.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Add input validation for setter and read functions

Reviewed-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Reviewed-by: Christian Hechtl <hechtl@cs.uni-saarland.de>
argument and use it in setters

The function in util-read.R now uses a vector containing the columns to
check for deleted and ampty users. This is important for commits, because
there, the column "committer.name" is also relevant.

Also use the function in the setter methods of util.data for mails,
issues, commits, and authors right after input validation.

This addresses #213.

Signed-off-by: Niklas Schneider <s8nlschn@stud.ui-saarlad.de>
Signed-off-by: Niklas Schneider <s8nlschn@stud.uni-saarland.de>
If not all columns exist, print an error message and stop the
program. Also change some minor comment and documentation issues
as well as update the NEWS.md

Signed-off-by: Niklas Schneider <s8nlschn@stud.uni-saarland.de>
Also add empty user entries into the test data of feature and proximity.

Refers to #235

Signed-off-by: Niklas Schneider <s8nlschn@stud.uni-saarland.de>
The recently added commits now have unique ids and hashes.

Refers to PR #235

Signed-off-by: Niklas Schneider <s8nlschn@stud.uni-saarland.de>
Only events with empty/deleted users in the author.name column are removed,
irgnoring any events with deleted/empty user in the event.info.1 column, i.e. those
are kept.

Referencing PR #235

Signed-off-by: Niklas Schneider <s8nlschn@stud.uni-saarland.de>
This addresses PR #235

Signed-off-by: Niklas Schneider <s8nlschn@stud.uni-saarland.de>
Make removal of empty/deleted users consistent

Reviewed-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Reviewed-by: Christian Hechtl <hechtl@cs.uni-saarland.de>
Add 'pull_request.yml' to automatically trigger, build, run tests and run
showcase file when a pull request is opened or updated against 'dev' branch.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Remove dependency caching action from workflow. Include pullrequesting onto
master and pushing to master and dev as triggers for workflow. Include
updating badges to 'CONTRIBUTING.md' indicating build status on master
and dev branch.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
The column access `data[column]` is invalid (at least, in specific R versions).
Therefore, use a valid way to access the column: `data[, column]`

In addition, also remove some trailing white spaces.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Add GitHub Actions CI support

Reviewed-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Reviewed-by: Christian Hechtl <hechtl@cs.uni-saarland.de>
As of igraph version 1.4.0, the classes of edge attributes are respected in
igraph. Therefore, dates in the expected outcomes of our tests need to be of
class `POSIXct`. As the `I()` operator prevents an automatic conversion, we need
to manually convert the dates to the correct class. However, as `I()` adds the
`AsIs` class, we need to remove this class from the affected edge attributes
again, as otherwise the expected network and the built network would not be
equal.

To make this test succeed in both, igraph versions < 1.4.0 and igraph versions
>= 1.4.0, the expected class is derived from the class of the date attribute in
the built network. This way, the test is able to pass independent of the used
igraph version.

This fix addresses #236.

Signed-off-by: Christian Hechtl <hechtl@cs.uni-saarland.de>
Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
As of igraph version 1.4.0, igraph respects the classes of edge and vertex
attributes. Therefore, we have to make sure that we add the correct classes when
we add new edge or vertex attributes to a (possibly empty) network.

To do so, in function `add.attributes.to.network`, we need to set the
`default.value` (for which we have already set the correct class before) instead
of `NA` (which is interpreted as `logical` if no concrete class is given).

In addition, if the attribute is of class `POSIXct`, an additional time zone
attribute is necessary. We use the default time zone that is set in
`util-init.R` in this case.

This fix addresses #236.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
When edge or vertex attributes are added via `add.attributes.to.network`, as of
igraph version 1.4.0, existing attributes are not re-added or re-ordered. That
is, if attributes `name` and `type` already exist and ones adds the new
attributes `kind` and `type`, then `kind` is added after `type` as `type`
already existed. However, this breaks the ordering of the attributes and leads
to failing tests, as the order of the attributes is also tested in some of our
tests. To fix this problem, remove and re-add an attribute that was already
present before. This way, we make sure that the new attributes are added in the
expected order. (The only exception is the `name` attribute: This attribute is
expected to be the first attribute, and it should not be removed and readded as
this could lead to serious problems.)

This addresses #236.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
…n igraph)

As of igraph version 1.4.0, igraph respects the classes of edge and vertex
attributes. However, the function `igraph::disjoint_union` does not respect
their classes and converts `POSIXct` attributes to numeric attributes, for
instance. This is a bug in igraph that is expected to be fixed in later igraph
versions. For now, we temporarily fix this problem on our own by converting the
`date` attribute of the union back to `POSIXct`.
Note: Also other attributes could be affected! However, for convenience reasons,
we only apply our temporary fix to the `date` attribute.

This addresses #236.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
bockthom and others added 27 commits April 12, 2023 21:13
Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
The bug in igraph, which we describe in a comment, affects not only igraph
versions 1.4.0 and 1.4.1, but also affects igraph version 1.4.2, as the bug
was reported after the release of version 1.4.2.
Therefore, adjust our comment accordingly.

This is a follow-up commit for commit a953555.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Due to using the wrong indexing operator for a data.frame column, the warning
`In xtfrm.data.frame(x) : cannot xtfrm data frames` was printed during the
filtering of patchstack mails. This is fixed by using the `[[` operator
instead of the `[` operator to access the column.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
There can be multiple vertices with maximum degree. This is clarified now in
the documentation of the return value of `metrics.hub.degree`. In addition,
also document that `NA` is returned if the network is empty (instead of
a data.frame).

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Break comment lines that are longer than 120 characters and adjust the
indentation of parameter descriptions.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
If a provided value for a configuration attribute is of length < 1,
throw an error.

In addition, adjust wrong error messages: Error messages are used generically,
independent of the concrete instance of the Conf class.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Fix R warnings and replace deprecated R function calls

Reviewed-by: Christian Hechtl <hechtl@cs.uni-saarland.de>
In artifact networks, artifacts should not be able to create edges,
but authors should. Remove 'artifact' attribute from edges of artifact
networks and append 'author.name' instead. This solves the issue of
duplicate edges between two artifacts that are only differentiable by the
'artifact' attribute.

This fixes #232.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Remove redundant 'artifact' attribute from edges of artifact networks then
remove duplicate edges and add 'author.name' attribute.

This works towards #232.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Clarify that edges in issue-based artifact-networks are not available.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Replace 'artifact' edge attribute with 'author.name' edge attribute
independant of edge construction algorithm. Fix minor code-style problems.

This works towards fixing #232.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Remove 'artifact' attribute from edges of artifact networks, append 'author.name' instead

Reviewed-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Reviewed-by: Christian Hechtl <hechtl@cs.uni-saarland.de>
Currently, we get a couple of warnings in `update.commit.message.data()`,
`update.pasta.data()`, `update.synchronicity.data()`, and
`get.first.activity.data()` of the following form (or similar):

'length(x) = 2 > 1' in coercion to 'logical(1)'

As the the warning will be turned into an error in future R versions, fix this
by making sure that there is only one TRUE/FALSE value used in the affected if
conditions instead of a vector of TRUE/FALSE values.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
The 'sep' argument belongs to the 'paste' function, not to the 'logging'
function. Move the wrongly placed bracket to the right place (also to
prevent a warning being printed).

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
The previously used statements to initiate sparse matrices are deprecated or
disfunct in the recent versions of the Matrix package. Therefore, update the
way of how we initiate a 'dgTMatrix' (i.e., a matrix with numeric values in
triplet form). The new syntax requires, at least, Matrix version 1.3.0
(which has already been released in December 2020). Therefore, add a
corresponding warning to the install script if older versions of package
Matrix would be installed.

In addition, fix two bugs related to our expanded adjacency matrices:
- We have to call the 'which' function from the Matrix package (and not the
  'which' function of the base package).
- Replace '1:nrow' by 'seq_len' to corretly handle empty adjacency
  matrices.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
The empty test data contain empty files for every data source, except for the
bot data. To stay consistent with the other data sources and to also check in
the test that empty bot data are handled correctly, add empty bot data.
(This also reduces the number of warnings in the test runs.)

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Since version 3.3.4 of package ggplot2, ggsave does not automatically
choose a white background any more. To stay consistent with the previously
provided example plot in the repo and keep this plot reproducible,
manually add a white background in our showcase.R.

In addition, update the example plot as there have been some slight
improvements on the legend arrows in ggplot2. The content of the example
plot has not changed, though.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
…too old

As package Matrix is part of r-recommended, it might be installed by default.
However, the default version could be older than the version of Matrix that is
necessary for coronet. Therefore, in 'install.R', automatically try
reinstalling package Matrix once if it is installed in an older version.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Fix more R warnings, update and fix initiation of sparse matrices, and update example plot in showcase.R

Reviewed-by: Christian Hechtl <hechtl@cs.uni-saarland.de>
Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Signed-off-by: Christian Hechtl <hechtl@cs.uni-saarland.de>
@bockthom bockthom added this to the v4.3 milestone Apr 17, 2023
@hechtlC hechtlC merged commit a0c3a52 into master Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants