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

feat: add helper function: get_dependency_specs and test #3534

Merged
merged 10 commits into from
Oct 6, 2022

Conversation

xiangce
Copy link
Contributor

@xiangce xiangce commented Sep 27, 2022

All Pull Requests:

Check all that apply:

  • Have you followed the guidelines in our Contributing document, including the instructions about commit messages?
  • Is this PR to correct an issue?
  • Is this PR an enhancement?

Complete Description of Additions/Changes:

Add a helper function to the insights.core.dr module to get the dependency specs from a loaded component.

@xiangce xiangce force-pushed the get_dependency_specs branch from e6b9644 to a6c53c0 Compare September 27, 2022 09:43
@xiangce
Copy link
Contributor Author

xiangce commented Sep 27, 2022

Test Coverage:

# py.test --cov insights/core/ | egrep "dr.py|---|Cover   Missing"
Name                               Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------------
insights/core/dr.py                  483     53    204     21    87%   109->exit, 177->exit, 204, 255, 279, 285-286, 292-293, 298-301, 305, 
                                                                       340, 454-456, 460->exit, 465, 473, 483, 487->481, 523->exit, 560, 688, 701, 745, 805, 809, 816-819, 855-856, 869, 875, 893, 898-900, 915, 925, 927, 961, 969-972, 999->exit, 1034-1036, 1082-1088

This function locates in L364 ~ L424. Its coverage reaches 100%.

@xiangce xiangce changed the title feat: add help function: get_dependency_specs and test feat: add helper function: get_dependency_specs and test Sep 27, 2022
@xiangce xiangce force-pushed the get_dependency_specs branch from 8b3c856 to 547650b Compare September 27, 2022 10:04
@xiangce xiangce force-pushed the get_dependency_specs branch from 9d6076b to 36eb9e1 Compare September 29, 2022 08:59
@psachin psachin merged commit 430c852 into master Oct 6, 2022
psachin pushed a commit that referenced this pull request Oct 6, 2022
* feat: add helper function: "get_dependency_specs" and test

Signed-off-by: Xiangce Liu <[email protected]>

* coverage 100%

Signed-off-by: Xiangce Liu <[email protected]>

* fix typo in test

Signed-off-by: Xiangce Liu <[email protected]>

* fix doc error

Signed-off-by: Xiangce Liu <[email protected]>

* doc: move the note back to the example

Signed-off-by: Xiangce Liu <[email protected]>

* fix test for python 2

Signed-off-by: Xiangce Liu <[email protected]>

* add more docs

Signed-off-by: Xiangce Liu <[email protected]>

* remove blank line

Signed-off-by: Xiangce Liu <[email protected]>

* make the get_requires() looks more reasonable and add test

Signed-off-by: Xiangce Liu <[email protected]>

* Refine the code a bit

Signed-off-by: Xiangce Liu <[email protected]>

Signed-off-by: Xiangce Liu <[email protected]>
(cherry picked from commit 430c852)
@xiangce xiangce deleted the get_dependency_specs branch May 5, 2023 07:39
xiangce added a commit that referenced this pull request Sep 6, 2024
* feat: add helper function: "get_dependency_specs" and test

Signed-off-by: Xiangce Liu <[email protected]>

* coverage 100%

Signed-off-by: Xiangce Liu <[email protected]>

* fix typo in test

Signed-off-by: Xiangce Liu <[email protected]>

* fix doc error

Signed-off-by: Xiangce Liu <[email protected]>

* doc: move the note back to the example

Signed-off-by: Xiangce Liu <[email protected]>

* fix test for python 2

Signed-off-by: Xiangce Liu <[email protected]>

* add more docs

Signed-off-by: Xiangce Liu <[email protected]>

* remove blank line

Signed-off-by: Xiangce Liu <[email protected]>

* make the get_requires() looks more reasonable and add test

Signed-off-by: Xiangce Liu <[email protected]>

* Refine the code a bit

Signed-off-by: Xiangce Liu <[email protected]>

Signed-off-by: Xiangce Liu <[email protected]>
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.

2 participants