-
Notifications
You must be signed in to change notification settings - Fork 39
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
Update ipfsapi dependency to new name, adapt ipwb tests to Py3 #609
Changes from all commits
12d4dc2
fa62480
139e4ca
113b1d1
9b7ebc7
5cf5628
7ffb482
cd6fa76
5f30101
1682f49
d15a95a
ed7e628
ac152da
0486697
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
warcio>=1.5.3 | ||
ipfsapi>=0.4.2 | ||
ipfshttpclient>=0.4.12 | ||
Flask==0.12.3 | ||
pycryptodome>=3.4.11 | ||
requests>=2.19.1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Number of entries in CDXJ == number of response records in WARC | ||
|
||
import pytest | ||
import testUtil as ipwbTest | ||
from . import testUtil as ipwbTest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change in the import style seems unrelated to this particular PR as it is more about Py3 support. If this is a dependency, then these changes should be made independently and merged prior to this PR. Consider this comment for the rest of the changes in test files. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I did not originally intend of your code review of this, but because I used f-strings above, which are a Py3 feature, and the tests are still in Py2, we could not have the original changes in this PR without updating the tests to also be Py3. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am OK with Py3 changes and understand the dependency situation here, but my primary concern was the title is not reflective of changes. That's why I suggested that we make these Py3 changes in a separate PR, merge it in this branch, and then test this branch. However, if that is too much work, we can go ahead with this one as it is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ibnesayeed I had started to do this...3 months ago in the issue-51-tests branch. The effort was never completed and I ended up redoing some of that here with additional fixes for the test. I have updated the title of the PR to better reflect the changes. 😃 |
||
import os | ||
|
||
from ipwb import indexer | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is time to retire
IPFSAPI_HOST
andIPFSAPI_PORT
and replace them with a single config calledAPFSAPI_ADDR
that will hold the multaddr value as described in the new API. The rationale behind this is the fact that the formation of address now depends on the format of the host. This change assumes that theIPFSAPI_HOST
will be a hostname, but if it's an IP address, then this will render invalid. Consolidating complete ADDR in one string will make sure that the user modifies everything accordingly (and any misconfiguration is users' fault, not of the system).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibnesayeed I agree that the semantics are off on HOST vs. IP. Let's update that in a separate optimization request with respect to #349, where it will be most useful. Please see #610. Until then, for the sake of integrating with the new version of the module, let's keep HOST and PORT for now, despite the lack of semantics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have made this change in this PR, but if you would prefer doing it in yet another PR, that is alright too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in #610 will require additional parsing logic and assuring that they have been applied across more files. The ticket ought to be representative of the need to do it and will hopefully allow us to build some test cases around it, which seems like it would be scope creep for this PR/issue.