Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage data directory as ContextVar instead of global #84

Merged
merged 17 commits into from
Sep 20, 2024

Conversation

gordonhart
Copy link
Member

@gordonhart gordonhart commented Sep 20, 2024

Rather than using a static/global data directory, use a ContextVar exposed via the DataDirectoryProvider class that allows for runtime setting of the data directory. This unblocks usage of different data directories for different endpoint calls, and opens the door in the future to allow users to specify their own data directory or directories if they e.g. want to run AutoArena locally using data stored on a mounted NFS.

@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 3 lines in your changes missing coverage. Please review.

Project coverage is 96.86%. Comparing base (a8b3706) to head (f89e41c).

Files with missing lines Patch % Lines
autoarena/api/router.py 88.88% 1 Missing ⚠️
autoarena/api/utils.py 95.23% 1 Missing ⚠️
autoarena/judge/utils.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk      #84      +/-   ##
==========================================
+ Coverage   96.82%   96.86%   +0.03%     
==========================================
  Files          33       33              
  Lines        1419     1437      +18     
==========================================
+ Hits         1374     1392      +18     
  Misses         45       45              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gordonhart gordonhart merged commit ffbd300 into trunk Sep 20, 2024
11 checks passed
@gordonhart gordonhart deleted the gh/context-var branch September 20, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants