fix: parse new JSONL bulk format, add missig fields & variants, rate limiting - #67
fix: parse new JSONL bulk format, add missig fields & variants, rate limiting#67voidcontext wants to merge 2 commits into
Conversation
|
@mendess There are a lot of test failures because of Scryfalls's rate limiting. I could just sprinkle a bit of "thread sleep" over the snippets in the doc comments, but that would be extremely ugly. Do you have any better suggestions? |
I think I pushed a reasonable solution. Respecting rate limits by default is a good idea probably, and through feature flags it's possible to disable it if needed. This doesn't solve all the rate limiting related test issues, so I'll need to keep digging. What do you think about this solution? Would it be acceptable? Edit: obviously this would add an extra 100-500 ms delay to every requests even if it's not required. I'll try to come up with an improved solution. |
c82e2f4 to
2c3d576
Compare
This commit is fixing some doctests as well, where the change in the underlying Scryfall dataset made test ambiguous.
This change introduces request throttling, confgurable through rust features at compile time. The test script has been modified to resptect the rate limits.
|
The build is green, all the known issues have been fixed (there's one flaky test though, that failed locally from time to time: I've made some changes to the test script that helped me during development (e.g. to build all the different feature permutations with From a developer experience perspective (for contributors of this library), I am not really happy with the end result, because a simple |
The bulk data format has changed, see: https://scryfall.com/blog/two-new-ways-to-sync-scryfall-data-236