atcoder-tools
atcoder-tools copied to clipboard
Add retry for each problem
Why is this change needed?
問題の取得に失敗し、SampleDetectionError が発生することがある。(以前より失敗することが増えた気がする)
What did you implement?
Retryにより3回リトライするようにした。初回は0.5秒。(リトライに失敗した場合はRetryErrorが発生する)prepare_contestのほうのリトライは不要になったので削除した。
What behavior do you expect?
- [ ] testに通ること
- [ ] genコマンドの問題の取得の失敗が減ること (0.5秒後に自動リトライして取得に成功すること)
- [ ] 存在しないコンテストを指定してgenを実行すると
atcodertools.tools.envgen.EnvironmentInitializationErrorが発生すること。
fixupまちがえました 🙇
Codecov Report
Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
Project coverage is 90.25%. Comparing base (
30336a7) to head (4ff7041). Report is 16 commits behind head on stable.
| Files | Patch % | Lines |
|---|---|---|
| atcodertools/client/atcoder.py | 88.88% | 1 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## stable #296 +/- ##
==========================================
- Coverage 90.31% 90.25% -0.07%
==========================================
Files 64 64
Lines 2788 2781 -7
==========================================
- Hits 2518 2510 -8
- Misses 270 271 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
ありがとうございます! コード見る限りよさそうです!もともとのretryはコンテスト開始前にツールを起動した場合の失敗を主に想定していたんですが、ユースケースの区別なくネットワーク通信の深いところで統一的にretryを行うというのには同意です。 挙動に関してはこちらで確認して、よさそうならマージさせていただきます。