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

[Test] Integration tests #158

Merged

Conversation

hrishikesh-dahiya
Copy link
Member

@hrishikesh-dahiya hrishikesh-dahiya commented Feb 21, 2018

Description

Motivation

  • To increase the code coverage

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checks

  • Squash your commits down to one, or a few, discreet changesets before submitting a pull request
  • Read the contributing guide
  • PR should be motivated, i.e. what does it fix, why, and if relevant how
  • If possible, include an example in the description, that could help all readers (including project members) to get a better picture of the change
  • Avoid other runtime dependencies unless absolutely necessary
  • Rebase your commit history so that each commit is meaningful and states the intention behind the change
  • Ensure that your pull request follows the style guidelines
  • At least one commit should mention Fixes #152 and #155 if relevant

Notify reviewers

@prasadtalasila

@codecov-io
Copy link

codecov-io commented Feb 21, 2018

Codecov Report

Merging #158 into development will increase coverage by 5.15%.
The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #158      +/-   ##
===============================================
+ Coverage        14.23%   19.38%   +5.15%     
===============================================
  Files               42       45       +3     
  Lines             2958     2992      +34     
===============================================
+ Hits               421      580     +159     
+ Misses            2537     2412     -125
Impacted Files Coverage Δ
...ion_test/lib/input/mbox/test_keyword_clustering.py 100% <100%> (ø)
...st/integration_test/lib/input/test_data_cleanup.py 100% <100%> (ø)
lib/analysis/author/graph/generate.py 100% <100%> (+100%) ⬆️
...on_test/lib/analysis/author/graph/test_generate.py 100% <100%> (ø)
lib/input/mbox/keyword_clustering.py 21.92% <0%> (+21.92%) ⬆️
lib/input/data_cleanup.py 68.88% <0%> (+68.88%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4030bc...40ad6f6. Read the comment docs.

@hrishikesh-dahiya
Copy link
Member Author

@prasadtalasila any solution to codeclimate issue for now? Because we need all 5 param for testing it. I think refactoring work can be done later.

@@ -70,8 +74,8 @@ def author_interaction():
json_data[json_obj['Message-ID']] = json_obj
print("JSON data loaded.")
else:
lone_author_threads = get_lone_author_threads(False)
with open('clean_data.json', 'r') as json_file:
lone_author_threads = get_lone_author_threads(nodelist_filename=graph_nodes, edgelist_filename=graph_edges)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use positional arguments here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_lone_author_threads() is a function of read.py, which was to be refactored afterward.

@@ -0,0 +1,279 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

short test data files are preferable to long ones. If you can reduce the number of entries in this file and still have the test coverage, that would be a good thing.

@hrishikesh-dahiya
Copy link
Member Author

Data input size reduced for test_data_cleanup.py.
nx.is_isomorphic(G1, G2) used in test_generate.py for asserting two graphs.
nx.read_pajek(filename) used to read a .net file to a graph.
Previous tests' output files added for reference.
Travis CI Build Passing, same codeclimate issue(to be refactored later).

Copy link
Member

@prasadtalasila prasadtalasila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hrishikesh-dahiya one minor change in the sphinx docs

:param graph_nodes: Path to graph_nodes.csv file
:param graph_edges: Path to graph_edges.csv file
:param pajek_file: Path to author_graph.net(pajek file) which is used by write_to_pajek()
:param ignore_lat: True
"""
# Time limit can be specified here in the form of a timestamp in one of the identifiable formats and all messages
# that have arrived after this timestamp will be ignored.
time_limit = None
# If true, then messages that belong to threads that have only a single author are ignored.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move this description to sphinx docs of ignore_lat variable.

@prasadtalasila prasadtalasila merged commit 00815fd into dev-cap:development Feb 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants