Closed Bug 1203621 Opened 7 years ago Closed 7 years ago
Release a pushlog python client
We have some python code to interact with Hg's pushlog  We wold like to have a python client which we would depend on. gps: where could we put this code?  https://github.com/armenzg/mozilla_ci_tools/blob/master/mozci/sources/pushlog.py
https://hg.mozilla.org/hgcustom/version-control-tools/file/e93d6e07ba33/pylib/mozautomation/mozautomation/repository.py#l221 already exists. I don't believe mozautomation is frequently released to PyPI, however. Do you need it to be?
The module I've written contains certain logic useful to me and other projects (they're currently grabbing Mozci to get to my pushlog functionality): * def query_revisions_range(repo_url, from_revision, to_revision, version=2, tipsonly=1) * def query_pushid_range(repo_url, start_id, end_id, version=2) * def query_revisions_range_from_revision_before_and_after(repo_url, revision, before, after): * def query_revision_info(repo_url, revision, full=False) * def query_repo_tip(repo_url): * def valid_revision(repo_url, revision): I want to turn my pushlog module into a client. I want to make mozci depend on such new package. I think such package should depend on mozautomation. Where do you believe such module should be checked-in? Somewhere under version-control-tools?
We try to have as much version control code in version-control-tools as possible so we can a) test for client breakage before server changes are deployed to prod b) update code all in one place. mozautomation is a silly package name. If you want to create pylib/mozpushlogclient or pylib/mozhginfo in version-control-tools and set up a PyPI package for it, go for it. FWIW, long term I'd like to roll version-control-tools into mozilla-central. The reason it isn't there now is because a) tree closures b) automation not being smart enough to not run Firefox tests on every checkin c) stricter review/push rules.
Thanks gps. This works for us.
As I comment on github, I will take this bug and work on it :)
Assignee: nobody → sabergeass
Work in progress by MikeLing.
Comment on attachment 8688961 [details] [review] wip - code to release mozhginfo package Removing the review flag. MikeLing: Please fix the tox file and add a setup.py gps: would you mind giving us your feedback? We won't be trying to merge against GH. Git is easier for MikeLing.
Attachment #8688961 - Flags: review?(armenzg) → feedback?(gps)
(In reply to Armen Zambrano Gasparnian [:armenzg] from comment #7) hey armenzg, Sure! I will fix those nits on my PR :) Could you give me some directions about how to add setup.py? I haven't use setup.py before(I mean write one at beginning), so I don't know which part is necessary for pushlog module. I should ask this on irc yesterday, but I somehow forget it when I preparing my exam in next week. Also need to apologize to Alice(:adusca), I miss her message untill next day I re-login the irc, I really need to pay attention to my irc status :( Thank you
@MikeLing you can use this as an example of setup.py  You should be able to run: "python setup.py sdist"  https://github.com/armenzg/buildapi_client/blob/master/setup.py
Disregard this comment. I just saw your PR.
Comment on attachment 8688961 [details] [review] wip - code to release mozhginfo package Looks mostly good. I left some minor comments on GitHub.
Attachment #8688961 - Flags: feedback?(gps) → feedback+
Thanks gps! I filed a follow up for the tests re-write: bug 1227531 Once the nits raised are addressed by MikeLing I will land to hg.
I will release this tomorrow. I filed bug 1228097 as a follow up for sorting.
Landed: https://hg.mozilla.org/hgcustom/version-control-tools/rev/6021c9031bc3 Released: https://pypi.python.org/pypi/pushlog_client \o/
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.