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

add check for circular dependencies #165

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anxdpanic
Copy link
Member

@anxdpanic anxdpanic commented Feb 14, 2019

For #125

@anxdpanic
Copy link
Member Author

Wasn't sure how to approach a test for this at first, working on that now though.

@anxdpanic
Copy link
Member Author

Test is added now

kodi_addon_checker/check_dependencies.py Outdated Show resolved Hide resolved
kodi_addon_checker/check_dependencies.py Outdated Show resolved Hide resolved
tests/test_check_dependencies.py Outdated Show resolved Hide resolved
tests/test_data/Circular depend/addon.xml Outdated Show resolved Hide resolved
@anxdpanic
Copy link
Member Author

anxdpanic commented Feb 17, 2019

I have made the required changes , other than the optional/attrib change until further discussion

I added some temp logging to show the results against a repo,
https://pastebin.com/10Gkw9Jx

@anxdpanic anxdpanic force-pushed the going_in_circles branch 2 times, most recently from d744e6f to 602122f Compare February 18, 2019 13:58
@anxdpanic anxdpanic force-pushed the going_in_circles branch 2 times, most recently from bea64bc to 621f062 Compare March 17, 2019 13:34
@anxdpanic
Copy link
Member Author

rebased and resolved merge conflicts and pylint assertions

@razzeee razzeee requested a review from Rechi March 20, 2019 21:36
@@ -16,13 +16,19 @@


class Repository():
def __init__(self, version, path):
def __init__(self, version, path, local_xml=False):
Copy link
Member

Choose a reason for hiding this comment

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

can you add docstrings here, as your adding a new param (it should be documented that it's only use is testing)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, I also added simple descriptive doc strings to the unit test

Copy link
Member

Choose a reason for hiding this comment

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

Adding an additional parameter which is only used for testing is wrong.

kodi_addon_checker/check_dependencies.py Outdated Show resolved Hide resolved
@anxdpanic anxdpanic force-pushed the going_in_circles branch 2 times, most recently from 485bc74 to 9dab26a Compare March 20, 2019 22:53
@anxdpanic
Copy link
Member Author

Rebased and resolved the conflicts, is there anything else required for this?

@razzeee
Copy link
Member

razzeee commented Nov 5, 2019

Would be great if @Rechi could sign this off too :)

Copy link
Member

@Rechi Rechi left a comment

Choose a reason for hiding this comment

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

The check_circular_dependencies is hard to read and understand, it has to be simplified.

Please add another test-case checking transitive dependencies.

@@ -16,13 +16,19 @@


class Repository():
def __init__(self, version, path):
def __init__(self, version, path, local_xml=False):
Copy link
Member

Choose a reason for hiding this comment

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

Adding an additional parameter which is only used for testing is wrong.

@anxdpanic anxdpanic force-pushed the going_in_circles branch 2 times, most recently from 129c558 to a2c35cb Compare November 6, 2019 16:56
@anxdpanic
Copy link
Member Author

I've removed the local_xml parameter, and moved dependency tree creation to it's own function with it's own test

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.

3 participants