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

Add validator to catch datetime azure_openai.version #958

Merged
merged 4 commits into from
Aug 21, 2024

Conversation

rishimo
Copy link
Contributor

@rishimo rishimo commented Aug 21, 2024

🤔 Why?

If the azure_openai.version set in the app is a regular version e.g. 2024-06-01 instead of a -preview version it can be misinterpreted as a datetime when the config is loaded, causing validation errors.

🤓 What?

Adds a validator to force datetime to string to catch pesky validation errors.

🧪 Tested?

Connector tested locally with a YAML file generated by app, runs successfuly.

☑️ Checks

  • My PR contains actual code changes, and I have updated the version number in pyproject.toml.

mars-lan
mars-lan previously approved these changes Aug 21, 2024
Copy link
Contributor

@mars-lan mars-lan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YAML FTW!

Copy link

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11819 10495 89% 85% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
metaphor/common/embeddings_config.py 94% 🟢
TOTAL 94% 🟢

updated for commit: 44567e7 by action🐍

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.79%. Comparing base (441755b) to head (44567e7).
Report is 1 commits behind head on main.

Files Patch % Lines
metaphor/common/embeddings_config.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #958      +/-   ##
==========================================
- Coverage   88.80%   88.79%   -0.01%     
==========================================
  Files         182      182              
  Lines       11813    11819       +6     
==========================================
+ Hits        10490    10495       +5     
- Misses       1323     1324       +1     

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

@rishimo rishimo merged commit af58386 into main Aug 21, 2024
5 of 6 checks passed
@rishimo rishimo deleted the azure-embedding-version-fix branch August 21, 2024 20:21
@rishimo rishimo mentioned this pull request Sep 24, 2024
1 task
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