Comments (16)
Will check this out shortly.
from python-epo-ops-client.
Thanks!
from python-epo-ops-client.
@amotl Hmm, I couldn't reproduce this:
In [20]: from epo_ops import Client
In [21]: from epo_ops.models import Docdb
In [22]: c = Client('key', 'secret')
In [23]: response = c.family("publication", Docdb("1000000", "EP", "A1"), constituents=['biblio
...: ', 'legal'])
In [24]: response.status_code
Out[24]: 200
Does that match your expectation?
from python-epo-ops-client.
Thanks, I will check this again.
from python-epo-ops-client.
After pulling the most recent changes from development
, I can confirm all tests are succeeding
pytest -s -v --cov-report term --cov epo_ops tests
especially the tests added to cover the topic #33/#34.
tests/test_api.py::test_family[default_client] PASSED
tests/test_api.py::test_family_biblio[default_client] PASSED
tests/test_api.py::test_family_legal[default_client] PASSED
So, I am puzzled why PatZilla would croak on that. Investigating...
However, those two guys fail
tests/test_ops_quota.py::test_mock_quota_exceeded[cached_client] FAILED
tests/test_ops_quota.py::test_mock_quota_exceeded[default_client] FAILED
which is totally unrelated to this issue, so this is just FYI.
from python-epo-ops-client.
@amotl In order to successfully execute the mock tests, you'll need to get an apiary URL as specified in https://github.com/55minutes/python-epo-ops-client#tests.
from python-epo-ops-client.
You can always refer to travis as well.
from python-epo-ops-client.
In order to successfully execute the mock tests, you'll need to get an apiary URL
I see, thanks. I was running them against production by using
export APIARY_URL=https://ops.epo.org/
from python-epo-ops-client.
@amotl Can you try APIARY_URL=http://private-anon-111333769e-opsv31.apiary-mock.com
?
from python-epo-ops-client.
That works perfectly and also makes the mock tests pass. Thanks!
However, regarding the subtle change required from #33/#34, we obviously preferred running the tests against the real API.
As we see everything should be fine with python-epo-ops-client
in this regard, we will now check what might be going wrong with the integration into PatZilla.
from python-epo-ops-client.
@amotl Only the EPO failure cases (quota exceeded per day/week) hit the mock API url, as there's no way to simulate that directly at OPS (they don't have a staging server with failure simulation URLs, as far as I know). Everything else hits the actual OPS end points, that's why the OPS key and secret is required for testing.
from python-epo-ops-client.
You can see what Apiary mocks: https://opsv31.docs.apiary.io/.
Also thanks for testing, I'll document the anonymous URL in the project docs.
from python-epo-ops-client.
Only the EPO failure cases (quota exceeded per day/week) hit the mock API url.
Thank you very much for letting us know about this important detail. So, there's no reason not to run the tests against the Apiary endpoint.
from python-epo-ops-client.
Regarding the TypeError
, we just have been able to find out about the root cause. It was totally our fault, as we have been bitten by a custom routine monkeypatching the _make_request
method of epo-ops-client
[1]. Oh my! ;]
If you are curious, the only thing we changed to that method is that we didn't want to invoke raise_for_status()
.
# Let errors propagate. Don't croak on anything status >= 400.
#response.raise_for_status()
from python-epo-ops-client.
@amotl Feel free to file an enhancement issue and I can think about how best to allow that behavior to be toggle-able.
from python-epo-ops-client.
Thanks again!
from python-epo-ops-client.
Related Issues (20)
- SSL Error HOT 2
- 404 Client Error: Not Found for url: https://ops.epo.org/3.2/rest-services/published-data/publication/docdb/claims HOT 2
- `client.image` Method Fails to Retrieve Specific Document Pages
- Make invoking "response.raise_for_status()" optional
- Module epo_ops not found HOT 3
- Module epo_ops not found error HOT 1
- [Question] Is it possible to change the range of the results `published_data_search` ? HOT 2
- Negative delay when using Sqlite throttle middleware HOT 2
- Epodoc biblio url not found HOT 8
- Different results between espacenet and API HOT 1
- SQLite objects created in a thread can only be used in that same thread. The object was created in thread HOT 3
- 404 HTTP Error in Search HOT 1
- Is "description" supported by this client? HOT 6
- Future maintenance of repository and package HOT 7
- Next steps in maintenance and modernization HOT 2
- Fix test case `test_mock_quota_exceeded` HOT 3
- Replace Apiary tests with monkeypatch or in-process mockery HOT 5
- type hints HOT 6
- Throw an error if `original` is used with any incompatible method HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-epo-ops-client.