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

Post support - Bug fix! #12

Merged
merged 28 commits into from
Jun 13, 2016
Merged

Post support - Bug fix! #12

merged 28 commits into from
Jun 13, 2016

Conversation

bunop
Copy link
Contributor

@bunop bunop commented May 25, 2016

Hi,

I made some changes and updated some methods in pyEnsemblRest libraries. Brifely, I have:

  • Updated license
  • Returned ensembl errors while raising Exception messages
  • Modified test according Unittest. Test could be done:
    • using nosetests --with-coverage --cover-package=ensemblrest --cover-erase (as Travis CI does)
    • using python setup.py test
    • using python -m unittest discover -s test/
  • fixed indentation
  • added the possibility to change Content Types
  • Added a test for each Ensembl and EnsemblGenomes method
  • Compared ensembl objects when the returned order of elements change
  • Updated documentation
  • Added new methods (like Variation GA4GH and Ld)
  • Fixed a bug in POST methods, when other parameters where added in request
  • Reached 100% coverage!

There are some test that fails when Ensembl has transient problems. If I understand why, I can request an help to ensembl developer list. For now, nosetest return status 0 if such test fail. If you like such modifications, you should consider to submit this package to pypi since last uploaded version is very old.

Regards,

Paolo

bunop and others added 28 commits December 18, 2014 09:55
Now on 400 status page (when occurs an error using REST server) I put
the server error message (if exists) in exception.
Reading content type with json loads help dealing with data and debug
Using 4 spaces (as suggested by Guido Van Rossum) instead of tabs
to indent code
Where json returns nested dictionaries, I can't check for equality
using assertDictEqual, or by using collections Counts object: values
can be lists with different order, so I need do sort them and check
for equality with a custom method
Now extra parameters enter as url parameters in POST request as
GET request. All POST methods have a 'post_parameters' attrib which
is used to send data as a POST request. All failed POST tests where
resolved
Now methods exclusive of ensemblgenome are defined in ensemblgenome
Sometimes ensembl REST server has problem and my tests may fail
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling e71b035 on bunop:post-support into ab8a028 on pyOpenSci:master.

@gawbul
Copy link
Owner

gawbul commented Jun 13, 2016

Cool, thanks for your contribution. Will have a look over this asap today.

@gawbul gawbul merged commit 7b8ae14 into gawbul:master Jun 13, 2016
@gawbul
Copy link
Owner

gawbul commented Jun 13, 2016

All merged. Thanks for the contribution. Will update the pypi version asap.

@bunop
Copy link
Contributor Author

bunop commented Jun 13, 2016

Thank you. I think I will add some little enhancements (I'm thinking to modify the rate request when the remaining requests drop down, for instance when an user submit multiple clients at the same time). When I am ready, I will do another pull request.

Regards,

Paolo

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