Update showcase.R and add minor bug fixes#207
Merged
hechtlC merged 21 commits intose-sic:devfrom Jul 21, 2021
Merged
Conversation
- There is no function `get.network.conf.variable` in the NetworkBuilder class. Instead, use `get.network.conf.entry`. - The functions `get.author.class.activity` and `get.author.class.activity.overview` have already been removed from coronet a long time ago (in version 3.5, see 61b344a). - The parameter `data` of function `get.author.class.by.type` has already been renamed to `proj.data` a long time ago (in version 3.5, see 587ef99). - When updating edge attributes in the NetworkConf, the edge attributes are specified as a vector, not as a list. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
The `motifs.count` function takes a `motifs` parameter containing a list of motifs instead of separate parameters for different motifs. This has already been changed in version 3.0 of coronet (see f3876dc). Fix the outdated function call in the showcase.R file. In addition, as the specified motifs are defined on undirected networks, the network `g` which is passed to the `motifs.count` function needs to undirected, too. Therefore, update the network configuration accordingly before building the multi-network `g`. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Add example statements on how to retrieve commit messages or synchronicity data on ProjectData or RangeData objects. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Fix inconsistent function documentation which I stumbled over while updating the showcase file. In addition, as all the optional example statements in the showcase.R are stated as a comment, also do this for EDCPTD-related example statements, for consistency reasons. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
When printing a Conf object, the info "Network configuration:" was printed in the first line. However, this is actually wrong as this print function is used from both the `NetworkConf` and the `ProjectConf` object, as well as the `Conf` class itself. To avoid printing wrong information and also to avoid code duplication, just print "Configuration:" from now on, as the `Conf` class does not know which actual class the object at which this function is called belongs to. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Directory names for Codeface ranges can be generated via revision names or commit hashes. If commit hashes are used (which are 40 characters long), Codeface only uses the first 6 characters in the directory names. This was already implemented correctly, but the check has used the wrong function: To check if the revision name is 40 characters long, use the `nchar` function instead of the `length` function (as the latter always returns 1 in this case). This is a follow-up commit for b3e2947, which has already been introduced with version 3.5 of coronet. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
If an empty network is passed to the plot function `plot.network`, vertex attributes `kind` and `vertex.type` have not been present in the created empty network. As both attributes are used during the plotting function, this lets plotting an empty network fail. This commit adjusts the plotting function such that we can plot empty networks without any errors. In addition, fix a wrong comment in function `add.attributes.to.network`. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
The description of the function `set.network.conf.entry` in the NetworkBuilder class already stated that the environment will be reset. However, the function actually did not perform the reset. Therefore, this commit adds the missing function call to reset the environment. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
When not passing a specific value for parameter `issue.type` to all the
`add.vertex.attribute.issue.*` functions, the vector `c("all", "pull.requests",
"issues")` is automatically used as default. However, as only one of the
vector's elements is allowed, this leads to problems when passing this parameter
to other functions in turn. To fix this, add some missing `match.arg` calls that
make sure that only one value (the actual default "all") is used for the
`issue.type` parameter.
This is a follow-up commit for PR se-sic#194 and commit
eb4f649.
Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Within functions `set.project.conf.entry` and `update.project.conf`, the synchronicity data is updated via calling the setter and the getter for the synchronicity data. As both getter and setter are public functions onf the ProjectData class, calling `private$...` does not work. Instead, we have to use `self$...`, which holds for public functions. This is a follow-up commit for PR se-sic#201 and commit 73009d9. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
When resetting a ProjectConf entry that is related to the synchronicity data, the corresponding update function is called. However, sometimes, the update function is called multiple times when synchronicity data is already cached: - The setter calls the update function (if synchronicity is configured). - The getter calls the update function (if synchronicity is configured). - The update function is called manually. So, the manual function call is not necessary if the getter was already called before (and both synchronicity data is configured and cached). This is another follow-up commit for PR se-sic#201 and commit 73009d9. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
…e file Also add a corresponding statement to the contribution guide. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
As `update.commit.message.data()` is a private function, we need to call `private$update.commit.message.data()`. This is another follow-up commit for PR se-sic#201. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
When only 2 revisions are provided to the function `construct.ranges` via parameter `revs` and `sliding.window` was `TRUE`, then `offset + 1` exceeds the number of elements in `revs`, resulting in choosing elements `3:2` as end elements of ranges. Instead of just constructing one range, two ranges are constructed, which is obviously wrong. To prevent this, a check is added whether `offset + 1` exceeds the length of `revs` and if so, just return the last element to just construct one range. In addition, as we are already handling corner cases, add a check at the beginning of the function for checking whether, at least, two revisions are specified. If there is only one revision given, no range can be constructed, and therefore throw an error in this situation. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
As module `util-plot-evolution.R` uses the `melt` function from package `reshape2`, we need to add this package to the install script in order to install this package properly. This has been overlooked in PR se-sic#175. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
The function `metrics.vertex.centralities` contained a lot of bugs since it has been introduced in PR se-sic#195. - `get.authors.by.data.source` is a public function of `ProjectData` and, therefore, needs to be called on a data object instead of providing the data object as parameter. - `get.artifacts` also needs to be called on a data object. - If both network and data are provided, but the network has either no vertex or no edge, the previous implementation caused errors. Therefore, add a check whether the network is empty before accessing vertex information. - When ordering the centrality values, use the constant `VERTEX.CENTRALITIES.COLUMN.NAMES` instead of accessing columns by using outdated column names. - Fix inconsistent indentation. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
To be able to use the showcase file in our CI pipeline, the following
changes to the showcase file are done:
(1) Uncomment all the statements to execute them automatically.
(2) Use project "test" from the test data as default, as the test data
is part of the repository and, therefore, acessible within the CI
pipeline. (The recommendation to use project BusyBox still is part
of the showcase file, but commented out.)
(3) Adjust some of the statements which relied on certain
characteristics of BusyBox such that they are executed differently
for projects BusyBox and test data.
Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Now we have two pipelines, one for the test suite and one for running the showcase file. Each of these pipelines has a separate step for each of the supported R versions. Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
dev.Description
The showcase file
showcase.Ris not up to date any more. This PR updates the showcase file and adds a couple of bug fixes for bugs which I stumbled over while updating the showcase file. (Some of the outdated statements in the showcase file date back to version 3.5 or even 3.0 ofcoronet, whereas some other bug fixes are related to the recently merged pull requests #194 and #201.)Changelog
showcase.R: 473c094, 287fbfa, 0a5cce4, 3393cae, 03aadacadd.vertex.attribute.issue.*functions: 5eb7161update.synchronicity.data(): bba7376reshape2, which is used for quite a while but has never been added to theinstall.R: 7bb4e7bmetrics.vertex.centralities: e7182e7