In reference to T1433
Changed return type for content_fossology_license_get.
It now returns dict with sha1 key and list of license
and tool information as value.
Differential D1720
Modify API output and test vlorentz on Jul 10 2019, 5:31 PM. Authored by
Details
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/568/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/571/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/572/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/574/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/582/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/583/ Comment Actions I haven't been able to give enough time to it. I'll complete the diff by this weekend. Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/592/ Comment Actions It appears that two different tests TestFossologyLicenseRangeIndexer and TestMimetypeRangeIndexer are inheriting from the same class namely, CommonContentIndexerRangeTest as a result both use the same assert_results_ok method. Both test classes have the same structure for expected results, hence the test works for both, as I experimented in the previous commit, changing the test for the new format of TestFossologyLicenseRangeIndexer will fail for TestMimetypeRangeIndexer. How do I resolve this? Should I override the method in both classes? The case for CommonContentIndexerTest is similar as it is inherited by TestCtagsIndexer, TestFossologyIndexer and TestMimeTypeIndexer. Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/595/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/596/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/597/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/598/ Comment Actions Overiding just the test method doesn't work for TestFossologyLicenseRangeIndexer. Tests test__index_contents and test__index_contents_with_indexed_data call the function self.indexer._index_contents which is implemented in ContentRangeIndexer. It calls a function index which is not implemented and it yields value when the docstring says it should return a dictionary. I am not sure how to resolve this. Comment Actions Build is green Comment Actions Keeping the expected results unchanged allows the build to pass, even though it is in the older format. However, as I have quoted, I am not sure how the actual results for the range is being generated by _index_contents. Should I write a new method that intercepts the return value of _index_contents and converts it to the required format? However is such a change within the ambit of this diff? Comment Actions
Is it?
Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/600/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/601/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/602/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/603/ Comment Actions I am sorry for the delay. Due to some dependency issue, I am unable to run the tests locally which is why I have been making so many pushes and am unable to solve it effectively. I will reinstall all the whole environment and try to fix it, if the environment works I will complete this. If I am unable to fix my environment then sadly I will have to drop this one. Comment Actions The problem is with the python setup something to do with typing.py giving errors if I remember correctly. I will try it again and add a error log. |