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

chore: Add make check-config command #875

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

tianjing-li
Copy link
Collaborator

@tianjing-li tianjing-li commented Dec 10, 2024

Adds new make command to check-config

Sample output:

Warning: Your configuration.yaml is missing the following keys: ['tools.gmail.user_scopes', 'tools.slack.user_scopes']
Warning: Your secrets.yaml is missing the following keys: ['tools.slack.client_id', 'tools.slack.client_secret', 'tools.gmail.client_id', 'tools.gmail.client_secret', 'google_cloud.api_key']

AI Description

This PR introduces a new check-config command to the Makefile, which runs a Python script to check the configuration and secrets files for missing keys. The script reads the configuration and secrets files, compares them to their respective templates, and prints warnings for any missing keys.

The PR also updates the poetry.lock file to use a different version of the onnxruntimepackage, and updates thepyproject.toml` file to match.

The following changes are made:

  • The check-config command is added to the Makefile, which runs a Python script to check the configuration and secrets files for missing keys.
  • A new Python script is added to the src/backend/scripts/config directory, which reads the configuration and secrets files, compares them to their respective templates, and prints warnings for any missing keys.
  • The poetry.lock file is updated to use a different version of the onnxruntime` package.
  • The pyproject.toml file is updated to match the new version of onnxruntime.
  • The src/backend/cli directory is renamed to src/backend/scripts/cli, and the src/backend/scripts/config directory is added.
  • The src/backend/tests/unit/cli/test_main.py file is updated to import from the new src/backend/scripts/cli/main.py file.

@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.11%. Comparing base (f6befe6) to head (0bdafab).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #875   +/-   ##
=======================================
  Coverage   78.11%   78.11%           
=======================================
  Files         259      259           
  Lines       11114    11114           
=======================================
  Hits         8682     8682           
  Misses       2432     2432           

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

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