Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

[5] Improve test coverage in fabric8-analytics/fabric8-analytics-data-model repository #2256

Closed
3 tasks done
msrb opened this issue Feb 14, 2018 · 17 comments
Closed
3 tasks done

Comments

@msrb
Copy link
Collaborator

msrb commented Feb 14, 2018

Description

Data importer is a very important piece in data ingestion pipeline, but @tuxdna recently discovered a lot of bugs there. Test coverage seems to be rather low. We want to add more tests, especially for parts which directly deal with data transformation and gremlin queries.

Acceptance criteria

@sivaavkd
Copy link
Collaborator

sivaavkd commented Mar 8, 2018

@msrb @tisnik - please estimate story points for this

@msrb
Copy link
Collaborator Author

msrb commented Mar 8, 2018

I think it would be the best if somebody who is familiar with the codebase could start and add at least some tests so others can then join and help. Unfortunately, the only person in the stream that is really familiar with the codebase si Saleem.

@tuxdna Do you think you could give up one of the Sentry integration tasks and focus on this issue instead? I think one of the barriers why people tend to avoid graph ingestion is that it's very easy to break something as there are currently no (or very few?) tests. I think having the codebase covered by tests would lower the barrier significantly.

@tisnik
Copy link
Collaborator

tisnik commented Mar 8, 2018

@msrb 👍

@tuxdna
Copy link
Collaborator

tuxdna commented Mar 21, 2018

Let me revisit the test setup for Data Model Importer now.

@tuxdna
Copy link
Collaborator

tuxdna commented Mar 22, 2018

@msrb
Copy link
Collaborator Author

msrb commented Mar 27, 2018

@tisnik what's the desired threshold here?

@tuxdna do you plan to push more tests?

@msrb msrb modified the milestones: Sprint 146, Sprint 147 Mar 28, 2018
@msrb
Copy link
Collaborator Author

msrb commented Mar 28, 2018

Moving to the current sprint.

@tuxdna
Copy link
Collaborator

tuxdna commented Mar 28, 2018

We are at 76% in Data Model Importer - https://ci.centos.org/job/devtools-fabric8-analytics-data-model-fabric8-analytics/152/console

Earlier it was 65%.

@tuxdna
Copy link
Collaborator

tuxdna commented Mar 29, 2018

Overall the code coverage has been improved from 24% to 83% as a part of current task.

@tuxdna
Copy link
Collaborator

tuxdna commented Mar 29, 2018

@tuxdna
Copy link
Collaborator

tuxdna commented Mar 29, 2018

@tuxdna
Copy link
Collaborator

tuxdna commented Mar 29, 2018

@tisnik What is the threshold for us to move past this task ?

@tuxdna
Copy link
Collaborator

tuxdna commented Mar 29, 2018

@tisnik
Copy link
Collaborator

tisnik commented Mar 29, 2018

Code coverage so far:

Name                                      Stmts   Miss  Cover   Missing
-----------------------------------------------------------------------
src/__init__.py                               2      0   100%
src/config.py                                22      0   100%
src/data_importer.py                        195     32    84%   86, 97, 120-131, 158, 177-178, 215-217, 264-266, 274-275, 282-295, 307, 312, 317, 322, 327, 343, 348, 353
src/data_source/__init__.py                   0      0   100%
src/data_source/abstract_data_source.py       6      0   100%
src/data_source/s3_data_source.py            36      7    81%   29-31, 38, 43, 53, 65-66
src/graph_manager.py                         38      0   100%
src/graph_populator.py                      176      1    99%   385
src/rest_api.py                              97     21    78%   35-39, 97, 100-102, 113-115, 124, 143-157, 161
-----------------------------------------------------------------------
TOTAL                                       572     61    89%

-> ok on my side 👍

@tuxdna
Copy link
Collaborator

tuxdna commented Mar 29, 2018

@msrb @tisnik All checks are complete, and we will keep adding more tests. Feel free to close this issue now. 👍

Thanks!

@tisnik tisnik changed the title Improve test coverage in fabric8-analytics/fabric8-analytics-data-model repository [5] Improve test coverage in fabric8-analytics/fabric8-analytics-data-model repository Apr 6, 2018
@tisnik tisnik closed this as completed Apr 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants