Skip to content

Conversation

@wilke0818
Copy link
Contributor

Specific testing for instance_distance.py to increase coverage.

Uses the small test files so that all of the statistics and numbers are correct/can be done by hand. Was going to extend coverage on other files, though, I wasn't sure how to calculate those values by hand.

…st_distance

get_highest_distance had an incorrect specification for its return value; the simpler fix was to change the specification but a better fix for later would be to switch the tuple order to be what we originally wanted
Copy link
Contributor

@MBJean MBJean left a comment

Choose a reason for hiding this comment

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

The new tests LGTM, thanks for taking care of that! The one thing I'll want to consider is: we're duplicating the common testing constants and texts that are currently in corpus_analysis/testing. Could we just use what already exists and so reduce the amount of additional material we're adding in this PR?

I spiked out a rearchitecture in PR #163 that might make using these existing files make more sense, as they're brought into a 'testing' module separate from 'corpus_analysis' and what is currently in 'gender_analysis'.


# Get all of the medians for the documents
for document in results:
for gender in results['document']:
Copy link
Contributor

Choose a reason for hiding this comment

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

Great catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that makes sense in terms of not reduplicating. Might be best to just hold off merging this until that PR is merged and then any changes that need to be made to this PR can be fixed and merged in.

@codecov-commenter
Copy link

Codecov Report

Merging #162 (217ec98) into master (910b00c) will increase coverage by 3.51%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #162      +/-   ##
==========================================
+ Coverage   60.64%   64.16%   +3.51%     
==========================================
  Files          13       13              
  Lines        1649     1649              
  Branches      436      436              
==========================================
+ Hits         1000     1058      +58     
+ Misses        575      515      -60     
- Partials       74       76       +2     
Impacted Files Coverage Δ
gender_analysis/analysis/instance_distance.py 93.47% <100.00%> (+60.86%) ⬆️
corpus_analysis/document.py 85.63% <0.00%> (+1.14%) ⬆️

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 910b00c...217ec98. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants