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

Added validation for config and updated renderer details in config documentation. #237

Merged
merged 17 commits into from
Mar 7, 2024

Conversation

KunalJadhav5
Copy link
Contributor

@KunalJadhav5 KunalJadhav5 commented Feb 27, 2024

Tested Code for below config details

daemon:
  port: 80000000
  host: localhost
logging:
  level: inf
reports:
  format: pd
  renderer: easyprint
  outputDir:~/.temp_unal

Errors:

(venv) daxa-kunal@kunal-ubu-test-20240215-155301:~/kunal_pebblo/pebblo$ pebblo --config /home/daxa-kunal/kunal_pebblo/pebblo/pebblo/app/config/config.yaml
  0%|                                                                                                                                                                                                                                                   | 0/10 [00:00<?, ?it/s]Error: Invalid port '80000000'. Port must be between 1 and 65535.
Error: Unsupported logLevel 'INF' specified in the configuration
Error: Unsupported format 'pd' specified in the configuration
Error: Unsupported renderer 'easyprint' specified in the configuration
Error: Output directory '~/.temp_unal' specified for the reports does not exist
  0%|                                                                                                                                                                                                                                                   | 0/10 [00:00<?, ?it/s]
(venv) daxa-kunal@kunal-ubu-test-20240215-155301:~/kunal_pebblo/pebblo$


#Local Output for testcases

Launching pytest with arguments 
C:\Users\KunalJadhav\Desktop\Kunal_Desktop\pebblo_config\pebblo\tests\app\config\test_config_validation.py --no-header --no-summary -q in C:\Users\KunalJadhav\Desktop\Kunal_Desktop\pebblo_config\pebblo\tests\app\config

============================= test session starts =============================
collecting ... collected 4 items

test_config_validation.py::test_daemon_config_validate PASSED            [ 25%]
test_config_validation.py::test_logging_config_validate PASSED           [ 50%]
test_config_validation.py::test_reports_config_validate PASSED           [ 75%]
test_config_validation.py::test_validate_config PASSED                   [100%]

============================== 4 passed in 0.06s ==============================

image

Copy link
Collaborator

@shreyas-damle shreyas-damle left a comment

Choose a reason for hiding this comment

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

Please add unit tests.

@Raj725
Copy link
Collaborator

Raj725 commented Mar 6, 2024

@KunalJadhav5 pls fix the failing tests

Raj725
Raj725 previously approved these changes Mar 6, 2024
Copy link
Collaborator

@Raj725 Raj725 left a comment

Choose a reason for hiding this comment

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

LGTM

@shreyas-damle shreyas-damle merged commit 2e1055e into daxa-ai:main Mar 7, 2024
12 of 16 checks passed
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.

3 participants