unitaryfund / metriq-client

Fork of papers-with-code client
https://metriq.info
Apache License 2.0
3 stars 10 forks source link

Reasses model and route parity (unit tests) #21

Open WrathfulSpatula opened 2 years ago

WrathfulSpatula commented 2 years ago

Python models (or "data transfer objects," "DTOs,") and route definitions should match those in https://github.com/unitaryfund/metriq-api, and it should be possible to run each request and receive the correct API route response. It's possible to verify this work via unit tests.

If Maria and Karen will tackle this issue together, they might start by each taking half the set of route definitions from metriq-api. For each route, add a unit test that demonstrates that the corresponding Python client method, given a well-formed DTO input, returns the right response from a "mock" REST API back end server.

Dan and Vincent will help Maria and Karen set up their development environments and find the right tools to set up the mock REST API back end. This issue ticket itself will be broken into smaller issue tickets as we identify separable work items in the larger project.

vprusso commented 1 year ago

As Maria/Karen have concluded their internship, would you say this task is still actionable? Am I correct in assuming that the intent of this task is to create corresponding unit tests for the content in the examples/ directory? That is, if my interpretation is correct, can I slightly rephrase the wording of this issue to mention that the content in the examples/ directory should be automatically run as a set of unit tests for a project pipeline, @WrathfulSpatula ?