-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'vara-dev' of github.com:se-sic/VaRA-Tool-Suite into f-G…
…enerateFeatureBlameReport
- Loading branch information
Showing
35 changed files
with
1,152 additions
and
202 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
vara-cs-gui | ||
=========== | ||
|
||
This gui tool provides functionality to create :ref:`case studies<Module: case_study>`. | ||
Detailed information about how case studies work can be found :ref:`here<How to use case studies>`. | ||
|
||
The gui is started by:: | ||
|
||
vara-cs-gui | ||
|
||
The gui provides 3 Strategies to generate case studies: | ||
- Manual revision selection: Select revision from the revision history of a project. Multiple revisions can be selected by holding `ctrl` and ranges by holding `shift`. Revisions which are blocked because of bugs in the compilation of the project are marked blue. | ||
.. figure:: vara-cs-gui-manual.png | ||
|
||
- Random Sampling: Sample a number of revisions using a random a Normal or HalfNormal Distribution. | ||
|
||
.. figure:: vara-cs-gui-sample.png | ||
|
||
- Sampling by Year: Sample a number of revisions per Year using a NormalDistribution. | ||
|
||
.. figure:: vara-cs-gui-yearly.png | ||
|
||
The command line tool :ref:`vara-cs gen<vara-cs gen>` provides additional functionality. |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
import unittest | ||
|
||
from varats.mapping.author_map import generate_author_map, Author, AuthorMap | ||
from varats.projects.discover_projects import initialize_projects | ||
|
||
|
||
class TestAuthor(unittest.TestCase): | ||
|
||
def test_merge(self) -> None: | ||
author_one = Author(1, "Jon Doe", "jon_doe@jon_doe.com") | ||
author_two = Author(4, "J. Doe", "jon_doe@jon_doe.com") | ||
author_three = Author(2, "Jon Doe", "[email protected]") | ||
merge_one = author_one.merge(author_two) | ||
self.assertEqual(merge_one.author_id, 1) | ||
self.assertEqual(merge_one.names, {"Jon Doe", "J. Doe"}) | ||
self.assertEqual(merge_one.mail_addresses, {"jon_doe@jon_doe.com"}) | ||
merge_two = author_three.merge(author_one) | ||
self.assertEqual(merge_two.author_id, 1) | ||
self.assertEqual(merge_two.names, {"Jon Doe", "J. Doe"}) | ||
self.assertEqual( | ||
merge_two.mail_addresses, | ||
{"jon_doe@jon_doe.com", "[email protected]"} | ||
) | ||
|
||
|
||
class TestAuthorMap(unittest.TestCase): | ||
|
||
def test_get_author_by_email(self) -> None: | ||
initialize_projects() | ||
amap = generate_author_map("xz") | ||
test_author = amap.get_author_by_email("[email protected]") | ||
self.assertEqual( | ||
test_author.mail_addresses, | ||
{"[email protected]", "[email protected]"} | ||
) | ||
self.assertEqual(test_author.names, {"Jim Meyering"}) | ||
|
||
def test_get_author_by_name(self) -> None: | ||
initialize_projects() | ||
amap = generate_author_map("xz") | ||
test_author = amap.get_author_by_name("Jia Cheong Tan") | ||
self.assertEqual( | ||
test_author.names, {"Jia Cheong Tan", "Jia Tan", "jiat75"} | ||
) | ||
self.assertEqual( | ||
test_author.mail_addresses, | ||
{"[email protected]", "[email protected]"} | ||
) | ||
|
||
def test_get_author(self) -> None: | ||
initialize_projects() | ||
amap = generate_author_map("xz") | ||
test_author = amap.get_author("Jia Cheong Tan", "[email protected]") | ||
self.assertEqual( | ||
test_author.names, {"Jia Cheong Tan", "Jia Tan", "jiat75"} | ||
) | ||
self.assertEqual( | ||
test_author.mail_addresses, | ||
{"[email protected]", "[email protected]"} | ||
) | ||
|
||
def test_get_author_ambiguous(self) -> None: | ||
initialize_projects() | ||
amap = generate_author_map("xz") | ||
self.assertIsNone(amap.get_author("Jia Cheong Tan", "[email protected]")) | ||
|
||
def test_get_author_missing_mail(self) -> None: | ||
initialize_projects() | ||
amap = generate_author_map("xz") | ||
self.assertIsNone( | ||
amap.get_author("Jia Cheong Tan", "[email protected]") | ||
) | ||
|
||
def test_get_author_missing_name(self) -> None: | ||
initialize_projects() | ||
amap = generate_author_map("xz") | ||
self.assertIsNone(amap.get_author("Not Present", "[email protected]")) | ||
|
||
def test_get_author_missing(self) -> None: | ||
initialize_projects() | ||
amap = generate_author_map("xz") | ||
self.assertIsNone(amap.get_author("Not Present", "[email protected]")) | ||
|
||
def test_author_merging(self) -> None: | ||
amap = AuthorMap() | ||
amap.add_entry("Jon Doe", "jon_doe@jon_doe.com") | ||
amap.add_entry("JD", "[email protected]") | ||
amap.add_entry("Jon Doe", "[email protected]") | ||
disambiguated_author = amap.get_author("JD", "jon_doe@jon_doe.com") | ||
self.assertEqual(disambiguated_author.author_id, 0) | ||
self.assertEqual(disambiguated_author.names, {"Jon Doe", "JD"}) | ||
self.assertEqual( | ||
disambiguated_author.mail_addresses, | ||
{"jon_doe@jon_doe.com", "[email protected]"} | ||
) | ||
|
||
def test_author_merging_generate(self) -> None: | ||
initialize_projects() | ||
amap = generate_author_map("brotli") | ||
test_author = amap.get_author("eustas", "[email protected]") | ||
self.assertEqual( | ||
test_author.names, { | ||
"eustas", "Eugene Kliuchnikov", "Eugene Klyuchnikov", | ||
"Evgenii Kliuchnikov" | ||
} | ||
) | ||
self.assertEqual( | ||
test_author.mail_addresses, { | ||
"[email protected]", "[email protected]", | ||
"[email protected]" | ||
} | ||
) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.