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

Remove empty artifact as vertex (PR #149) #153

Closed
clhunsen opened this issue Dec 20, 2018 · 2 comments
Closed

Remove empty artifact as vertex (PR #149) #153

clhunsen opened this issue Dec 20, 2018 · 2 comments

Comments

@clhunsen
Copy link
Collaborator

Description

With the proposed changes in PR #149 (see this comment), there is an issue when constructing artifact networks while not filtering out empty/untracked artifacts (see MWE below): The empty/untracked artifact is added as a vertex to the artifact networks!

Steps to Reproduce or Minimal Working Example (MWE)

Before running the code below, I checked out the code of PR #149!

git fetch upstream pull/149/head:pr149
git checkout pr149

Then, I added the following line to the file tests/codeface-data/results/testing/test_feature/feature/commits.list:

42;"2018-01-01 15:00:00";"Claus";"[email protected]";"2018-01-01 15:00:00";"Claus";"[email protected]";"foobar5c523d835459c42f33e863623138555e25";1;1;0;1;"";"";"";0

Afterwards, I ran the following code:

## / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
## Initialization ----------------------------------------------------------

source("util-init.R")

## / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
## Case-study configuration ------------------------------------------------

CF.DATA = "tests/codeface-data" # path to codeface data

CF.SELECTION.PROCESS = "testing" # releases, threemonth(, testing)

CASESTUDY = "test"
ARTIFACT = "feature" # function, feature, file, featureexpression (only relevant for cochange)

AUTHOR.RELATION = "mail" # mail, cochange, issue
ARTIFACT.RELATION = "cochange" # cochange, callgraph, mail, issue


## / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
## Project and network configuration ---------------------------------------

## initialize project configuration
proj.conf = ProjectConf$new(CF.DATA, CF.SELECTION.PROCESS, CASESTUDY, ARTIFACT)
proj.conf$update.value("commits.filter.base.artifact", FALSE)
proj.conf$update.value("commits.filter.untracked.files", FALSE)
# proj.conf$print()

## initialize network configuration
net.conf = NetworkConf$new()
net.conf$update.values(updated.values = list(
    author.relation = AUTHOR.RELATION,
    artifact.relation = ARTIFACT.RELATION
))

## construct data object and network (builder)
x.data = ProjectData$new(project.conf = proj.conf)
x = NetworkBuilder$new(project.data = x.data, network.conf = net.conf)

print(
    UNTRACKED.FILE.EMPTY.ARTIFACT %in% igraph::V(x$get.artifact.network())$name
)

Expected output: [1] FALSE

Actual output: [1] TRUE

Reproduces how often: Every time.

Versions

This is only relevant to the changes from PR #149.

Additional Information

We definitely need a test case for this in tests/test-networks-artifact.R, i.e., adding commit data on untracked files to the commit list of the test suite (as proposed above). In particular, we need a line of commit information for the test cases (in the files tests/codeface-data/results/testing/test_feature/feature/commits.list and
tests/codeface-data/results/testing/test_proximity/proximity/commits.list and the corresponding range-folder data, respectively).

Note: We should aim for filtering untracked files in most test cases (which is the default for now) so that we do not need to change that many tests. 😉

@clhunsen
Copy link
Collaborator Author

clhunsen commented Jan 6, 2019

A short addendum/clarification: We need to talk about proper tests for the changes in PR #149 (involving all new/changed configuration parameters), then we automatically revisit this issue. 😉

@clhunsen
Copy link
Collaborator Author

As PR #158 is merged now, I will close this issue.

@clhunsen clhunsen mentioned this issue Jun 7, 2019
fehnkera pushed a commit to fehnkera/coronet that referenced this issue Sep 23, 2020
To properly test the changes introduced in PR se-sic#149 (configuration
parameter 'commits.filter.untracked.files'), commit information on
untracked files is added to the test suite (in detail, two commits by
two distinct authors). The test suite is adapted accordingly.

This is a first step for issue se-sic#153.

Signed-off-by: Claus Hunsen <[email protected]>
fehnkera pushed a commit to fehnkera/coronet that referenced this issue Sep 23, 2020
Augmenting the changes from PR se-sic#149, the empty artifact, which results
from untracked files, is not a part of any network type anymore.

This is change is based on commit d9f527c
and fixes se-sic#153.

This is a preliminary implementation with regard to issue se-sic#154.

Signed-off-by: Claus Hunsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants