microsoft / rats

Rats is a collection of tools to help researchers define and run experiments. It is designed to be a modular and extensible framework currently supporting building and running pipelines, integrating configs and services.
MIT License
13 stars 4 forks source link

Fix/service caching #309

Closed elonp closed 1 week ago

elonp commented 1 week ago

When a single service-provider-method is decorated with multiple service ids, caching should be separated for each service id. The cache key was based on annotation.name, which is the name of the method, so was shared across service ids in the above scenario. This PR adds tests for service caching, and fixes the cache key so those tests pass.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 61.14%. Comparing base (7411911) to head (a2be916). Report is 1 commits behind head on main.

Additional details and impacted files | [Components](https://app.codecov.io/gh/microsoft/rats/pull/309/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | Coverage Δ | | |---|---|---| | [rats-apps](https://app.codecov.io/gh/microsoft/rats/pull/309/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `∅ <ø> (∅)` | | | [rats-devtools](https://app.codecov.io/gh/microsoft/rats/pull/309/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `∅ <ø> (∅)` | | | [rats-pipelines](https://app.codecov.io/gh/microsoft/rats/pull/309/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `∅ <ø> (∅)` | | | [rats-processors](https://app.codecov.io/gh/microsoft/rats/pull/309/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `∅ <ø> (∅)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.