urllib request mocking for pystac/load_stac related tests?
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 tests/rest/test_connection.py 的 2950-2957 行附近开始,检查当前临时本地路径如何代替 HTTP 资源。研究一种最新的方法,对 pystac 使用的 urllib/urllib3 请求进行 mock,然后覆盖失败的请求和相对 URL,以便无需本地文件即可测试真实的 HTTP 行为。
由索引模型根据 Issue 内容生成。
描述
The openEO python client uses the popular requests module for HTTP requests. Testing of that is currently done with the requests_mock module.
For STAC support (e.g. load_stac) we are depending more and more on pystac which uses urllib/urllib3 internally. This is obviously not covered by requests_mock so we need something else as urllib mock utility. I might have missed something obvious but didn't find anything up to date yet
Because of lack of real URL mocking for urrlib, we currently workaround that with local paths to temp files, which is accepted by pystac. e.g.:
https://github.com/Open-EO/openeo-python-client/blob/026881df787de007205e110f765260aeaf2e9876/tests/rest/test_connection.py#L2950-L2957
That works for simple use cases, but it hinders testings of real HTTP functionality (e.g. handling of failed requests, handling relative URLs, ...)
- 主要语言
- Python
- 星标
- 219
- 派生
- 56
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 9
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Open-EO/openeo-python-client 的其他 Issue
-
auth feature request
难度 5/5 一周以上 新手友好度 25/100
Open-EO/openeo-python-client#953 ·
维护者通常 1 天内回复
-
collect feedback
难度 5/5 一周以上 新手友好度 35/100
Open-EO/openeo-python-client#952 · 7 条评论 ·
维护者通常 1 天内回复
-
Further decouple CubeMetadata from CollectionMetadata, and properly apply spatio-temporal filtering可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
Open-EO/openeo-python-client#949 · 3 条评论 ·
维护者通常 1 天内回复
-
asset download: support file:local_path to determine target file name可能已有人在做 @soxofaan 于 45 天前认领。 未关闭feature request
Open-EO/openeo-python-client#902 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Add split_points functionality可能已有人在做 @HansVRP 今天认领。 未关闭job manager
难度 4/5 3-5 天 新手友好度 35/100
Open-EO/openeo-python-client#899 ·
维护者通常 1 天内回复
查看 Open-EO/openeo-python-client 的全部 Issue
相似的 Issue
-
SSM GetParameter throttling during concurrent workflow launches可能已有人在做 @alexiswl 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 80/100
-
[Bug] Dev image build fails: `npm install` in the root Dockerfile runs out of memory (exit 134)可能已有人在做 @andest01 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
Rename FunctionalRole BOT_DEV to DEV_STAFF可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭enhancement good first issue
难度 2/5 1-3 小时 新手友好度 79/100
pesu-dev/discord_bot#97 ·
-
难度 1/5 1-3 小时 新手友好度 88/100
gradio-app/gradio#13964 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 93/100
BSData/horus-heresy-3rd-edition#3232 · 1 条评论 ·
维护者通常 1 天内回复