Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

urllib request mocking for pystac/load_stac related tests?

オープン
#738 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
testing

調査の方向性

tests/rest/test_connection.py の2950~2957行付近から始め、現在、一時的なローカルパスがHTTPリソースの代わりにどのように使われているかを確認してください。pystac が使用する urllib/urllib3 リクエストをモックする最新の方法を調査し、その後、失敗したリクエストと相対URLをカバーして、ローカルファイルなしで実際のHTTP動作をテストできるようにしてください。

索引モデルが issue の本文から書いたものです。

説明

STAC and load_stac technical debt

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時間
マージ済み PR(30日)
9

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Open-EO/openeo-python-client のほかの issue

Open-EO/openeo-python-client の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。