Skip to content

Rename from API to Http-Client #144

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

Merged
merged 2 commits into from
Dec 13, 2018
Merged

Conversation

AliabbasMerchant
Copy link
Member

I'll keep on updating renaming_status.txt.
The file will be deleted before the final merge.

(The module may be unusable while the process of renaming is going on.)

@ntninja
Copy link
Contributor

ntninja commented Nov 22, 2018

Thanks for working on this again!
One comment after looking over the first version: Do you really want to rename the root package from ipfsapi to ipfs_http_client? Why not use ipfshttpclient instead, as it is standard python convention?

@AliabbasMerchant
Copy link
Member Author

@daviddias @Alexander255
I have made all changes from my side.
Please have a look at renaming_status.txt
I have marked a few things as doubtful

@ntninja
Copy link
Contributor

ntninja commented Nov 23, 2018

Looks mostly good. Please take a look at those CI failures (aside from codestyle). Also please don't create the -ipfshttpclient.* files – just leave them at their original name. Once I merge this I'll take care to split off the previous version into another branch and start working on that compat-shim I talked about.

@AliabbasMerchant
Copy link
Member Author

  1. I'll look into the CI failure.
  2. I havent renamed any of the files in ipfshttpclient. Just changed the folder name from ipfsapi to ipfshttpclient, and changed the contents of the files.

@ntninja
Copy link
Contributor

ntninja commented Nov 24, 2018

I havent renamed any of the files in ipfshttpclient. Just changed the folder name from ipfsapi to ipfshttpclient, and changed the contents of the files.

Then please delete the original files (git rm), commit that and squash your commits. GIT will then detect the files as “renamed with changes” and git blame will continue to work. As I said please also rename the -ipfshttpapi.* files back to their original names.

Thanks for taking the time to work on this and all the work you've already submitted thus far!

@AliabbasMerchant AliabbasMerchant force-pushed the rename branch 2 times, most recently from 522e2e3 to 88e01e4 Compare December 3, 2018 13:11
@AliabbasMerchant
Copy link
Member Author

@Alexander255 I have renamed the 3 -ipfshttpclient.* files back to their original name and have made changes in them, under the original name itself.
Also, I have squashed all the commits.
With regards to docs/api_ref.md -> docs/http_client_ref.md, no matter what I do, git is considering it as a delete-new_file and not a rename.

Copy link
Contributor

@ntninja ntninja left a comment

Choose a reason for hiding this comment

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

Overall this looks very good! 👍

To fix the merge conflict try (where origin is the name of ipfs/py-ipfs-api repo):

git fetch origin master
git rebase origin/master
git mergetool

In general api_ref.md refers to the API of this module (ie: the interface our users use), but if it's easier to keep it renamed to http_client_ref.md, it won't do any harm either 🙂

One important thing I found during review, however, is that you change the default API endpoint path from api/v0 to http_client/v0 – this is unacceptable as it would make us incompatible with all existing API server implementations for no good reason (it's one of those actually refers to API cases). Other than that I only added some comments regard your comments on URLs and names that will have to be fixed by other (ie: me) – nevermind them.

If you need help getting rid of the merge conflict just leave a comment. Once the conflict is resolved please also try to make the CI happy (except for codestyle never mind that for now).

@AliabbasMerchant
Copy link
Member Author

Ok. I'll do the required changes. Just give me a few days time. I am currently not at home and don't have my laptop. :)

@AliabbasMerchant
Copy link
Member Author

Finally! No conflicts.
The file api_ref.md was successfully renamed to http_client_ref.md
Also, I have changed http_client/v0 to api/v0

Copy link
Contributor

@ntninja ntninja left a comment

Choose a reason for hiding this comment

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

CI found two more issues (mentioned above) that easy to fix. I'm not sure what the the issue is but I think it may go away when I apply one of my planned (read: backward-incompatible) fixes before the release.

Thank you for the work you submitted! It's been quite some help!

with HTTMock(api_okay):
res = self.client.request('/apiokay')
with HTTMock(http_client_okay):
res = self.client.request('/http_client_fail')
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be /http_client_okay

with HTTMock(api_okay):
res = self.client.request('/apiokay',
with HTTMock(http_client_okay):
res = self.client.request('/http_client_fail',
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@ntninja ntninja merged commit e8734f8 into ipfs-shipyard:master Dec 13, 2018
@AliabbasMerchant AliabbasMerchant mentioned this pull request Dec 14, 2018
@AliabbasMerchant AliabbasMerchant changed the title [WIP] Rename from API to Http-Client Rename from API to Http-Client Jan 15, 2019
@ntninja ntninja added this to the ipfs-http-client v0.4.4 milestone Feb 15, 2019
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