aiverify-moonshot 0.4.11__tar.gz → 0.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aiverify_moonshot-0.5.1/.github/developing-workflows.md +28 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/workflows/docs-update.yaml +4 -3
- aiverify_moonshot-0.5.1/.github/workflows/gh-event-notification.yaml +50 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/workflows/integration-test.yaml +19 -4
- aiverify_moonshot-0.5.1/.github/workflows/notices-file-gen.yaml +82 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/workflows/pre-build-checks.yaml +6 -5
- aiverify_moonshot-0.4.11/.github/workflows/nightly-build.yaml → aiverify_moonshot-0.5.1/.github/workflows/sit-build.yaml +59 -52
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/workflows/smoke-test-cli.yaml +3 -3
- aiverify_moonshot-0.5.1/.github/workflows/uat-deploy.yaml +76 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/PKG-INFO +6 -5
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/README.md +1 -1
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/benchmark/cookbook.py +1 -5
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/benchmark/recipe.py +1 -5
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/cli_errors.py +3 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/common/connectors.py +22 -10
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/common/dataset.py +5 -6
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/app.py +1 -1
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/cookbook_response_model.py +1 -1
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/endpoint_create_dto.py +1 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/recipe_response_model.py +1 -1
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/cookbook_service.py +52 -21
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/endpoint_service.py +1 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/recipe_service.py +36 -15
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_bookmark.py +16 -5
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_connector.py +3 -3
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_connector_endpoint.py +6 -3
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_context_strategy.py +2 -2
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_cookbook.py +6 -6
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_dataset.py +5 -5
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_environment_variables.py +3 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_metrics.py +1 -1
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_prompt_template.py +9 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_recipe.py +3 -3
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_red_teaming.py +4 -8
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_result.py +10 -6
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_run.py +3 -3
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_runner.py +7 -6
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/api_session.py +11 -7
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/connectors/connector.py +121 -58
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/connectors/connector_prompt_arguments.py +7 -4
- aiverify_moonshot-0.5.1/moonshot/src/connectors/connector_response.py +15 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/connectors_endpoints/connector_endpoint.py +32 -20
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/connectors_endpoints/connector_endpoint_arguments.py +4 -1
- aiverify_moonshot-0.5.1/moonshot/src/messages_constants.py +123 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/pyproject.toml +8 -6
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/requirements.txt +4 -3
- aiverify_moonshot-0.4.11/.github/workflows/gh-event-notification.yaml +0 -43
- aiverify_moonshot-0.4.11/moonshot/src/connectors/connector_response.py +0 -20
- aiverify_moonshot-0.4.11/moonshot/src/messages_constants.py +0 -41
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.coveragerc +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.flake8 +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/pull_request_template.md +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/scripts/create_backup.sh +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/scripts/install_ms_service.sh +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/scripts/moonshot_env +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/scripts/moonshot_test_env +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/scripts/moonshot_ui_env +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/scripts/run_smoke_test.sh +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/scripts/start_ms_service.sh +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/workflows/pypi-deployment.yaml +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/workflows/sast-codeql.yaml +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/workflows/sca-scan.yaml +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/workflows/smoke-test.yaml +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/workflows/test-pypi-deployment.yaml +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.gitignore +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.pre-commit-config.yaml +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/AUTHORS.md +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/LICENSE.md +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/NOTICES.md +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/__main__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/api.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/__main__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/active_session_cfg.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/benchmark/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/benchmark/benchmark.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/benchmark/datasets.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/benchmark/metrics.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/benchmark/result.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/benchmark/run.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/benchmark/runner.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/cli.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/common/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/common/common.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/common/display_helper.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/common/prompt_template.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/initialisation/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/initialisation/initialisation.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/redteam/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/redteam/attack_module.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/redteam/context_strategy.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/redteam/prompt_template.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/redteam/redteam.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/redteam/session.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/utils/process_data.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/.env.dev +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/__main__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/container.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/log/.gitkeep +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/logging_conf.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/attack_modules.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/benchmark.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/benchmark_result.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/bookmark.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/context_strategy.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/cookbook.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/dataset.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/endpoint.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/metric.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/prompt_template.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/recipe.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/redteam.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/routes/runner.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/benchmark_runner_dto.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/bookmark_create_dto.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/cookbook_create_dto.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/dataset_create_dto.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/dataset_response_dto.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/endpoint_response_model.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/prompt_response_model.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/prompt_template_response_model.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/recipe_create_dto.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/session_create_dto.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/session_prompt_dto.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/schemas/session_response_model.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/attack_module_service.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/auto_red_team_test_manager.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/auto_red_team_test_state.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/base_service.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/benchmark_result_service.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/benchmark_test_manager.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/benchmark_test_state.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/benchmarking_service.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/bookmark_service.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/context_strategy_service.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/dataset_service.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/metric_service.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/prompt_template_service.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/runner_service.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/session_service.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/utils/exceptions_handler.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/utils/file_manager.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/services/utils/results_formatter.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/status_updater/interface/benchmark_progress_callback.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/status_updater/interface/redteam_progress_callback.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/status_updater/moonshot_ui_webhook.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/temp/.gitkeep +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/web_api/types/types.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/api/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/bookmark/bookmark.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/bookmark/bookmark_arguments.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/configs/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/configs/env_variables.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/connectors/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/connectors_endpoints/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/cookbooks/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/cookbooks/cookbook.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/cookbooks/cookbook_arguments.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/datasets/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/datasets/dataset.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/datasets/dataset_arguments.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/metrics/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/metrics/metric.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/metrics/metric_interface.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/prompt_templates/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/prompt_templates/prompt_template.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/recipes/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/recipes/recipe.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/recipes/recipe_arguments.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/attack/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/attack/attack_module.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/attack/attack_module_arguments.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/attack/context_strategy.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/context_strategy/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/context_strategy/context_strategy_interface.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/session/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/session/chat.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/session/red_teaming_progress.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/session/red_teaming_type.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/redteaming/session/session.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/results/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/results/result.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/results/result_arguments.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/runners/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/runners/runner.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/runners/runner_arguments.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/runners/runner_type.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/runs/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/runs/run.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/runs/run_arguments.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/runs/run_progress.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/runs/run_status.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/storage/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/storage/db_interface.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/storage/io_interface.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/storage/storage.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/utils/__init__.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/utils/find_feature.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/utils/import_modules.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/utils/log.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/utils/pagination.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/src/utils/timeit.py +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/third-party/pygments-2.18.0-py3-none-any.whl +0 -0
- {aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/third-party/text_unidecode-1.3-py2.py3-none-any.whl +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Developing GitHub Workflows
|
|
2
|
+
===========================
|
|
3
|
+
Follow these instructions to develop Github workflows in a non-main branch
|
|
4
|
+
instead of in the main branch to avoid creating unwanted commit records to
|
|
5
|
+
the main branch.
|
|
6
|
+
|
|
7
|
+
Workflows created in a non-main branch can only be run via CLI as follows:
|
|
8
|
+
|
|
9
|
+
`gh workflow run <workflow-name> --ref <branch-name> -f <parameter-name>=<parameter-value>`
|
|
10
|
+
|
|
11
|
+
For example, to run a workflow called License File Generation created in the ci-workflow-dev branch:
|
|
12
|
+
|
|
13
|
+
`gh workflow run 'License File Generation' --ref ci-workflow-dev -f repo=aiverify-foundation/moonshot -f branch=ci-workflow-dev`
|
|
14
|
+
|
|
15
|
+
To run the workflow via CLI, it must appear in the workflow list when you
|
|
16
|
+
run the following command:
|
|
17
|
+
|
|
18
|
+
`gh workflow list`
|
|
19
|
+
|
|
20
|
+
If it is not in the list, you have to trigger it once, this can be done by
|
|
21
|
+
creating a trigger for push in your workflow as follows and pushing a commit
|
|
22
|
+
to the branch. Once the workflow appears in the workflow list, you can remove
|
|
23
|
+
the trigger for push from your workflow.
|
|
24
|
+
|
|
25
|
+
on:
|
|
26
|
+
push:
|
|
27
|
+
branches: [ "ci-workflow-dev" ]
|
|
28
|
+
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
- name: Checkout code
|
|
38
38
|
uses: actions/checkout@v3
|
|
39
39
|
with:
|
|
40
|
-
ref:
|
|
40
|
+
ref: ${{ inputs.docs_branch }}
|
|
41
41
|
|
|
42
42
|
- name: Setup python 3.11
|
|
43
43
|
uses: actions/setup-python@v5
|
|
@@ -53,7 +53,7 @@ jobs:
|
|
|
53
53
|
run: |
|
|
54
54
|
mkdocs build
|
|
55
55
|
|
|
56
|
-
- name: Upload artifact
|
|
56
|
+
- name: Upload docs artifact
|
|
57
57
|
uses: actions/upload-pages-artifact@v3
|
|
58
58
|
with:
|
|
59
59
|
path: ./site
|
|
@@ -66,7 +66,8 @@ jobs:
|
|
|
66
66
|
pages: write # to deploy to Pages
|
|
67
67
|
id-token: write # to verify the deployment originates from an appropriate source
|
|
68
68
|
|
|
69
|
-
# Deploy to the github-pages environment
|
|
69
|
+
# Deploy to the github-pages environment
|
|
70
|
+
# Ensure main branch can deploy to pages in the GitHub Pages Environment settings
|
|
70
71
|
environment:
|
|
71
72
|
name: github-pages
|
|
72
73
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: GH Event Notification
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issues:
|
|
5
|
+
types: [opened]
|
|
6
|
+
pull_request:
|
|
7
|
+
types: [opened]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
notify:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Get Issue details
|
|
15
|
+
if: ${{ github.event_name == 'issues' }}
|
|
16
|
+
id: issue_details
|
|
17
|
+
env:
|
|
18
|
+
TITLE: ${{ github.event.issue.title }}
|
|
19
|
+
run: |
|
|
20
|
+
echo "type=issue" >> $GITHUB_ENV
|
|
21
|
+
echo "title=$TITLE" >> $GITHUB_ENV
|
|
22
|
+
echo "user=${{ github.event.issue.user.login }}" >> $GITHUB_ENV
|
|
23
|
+
echo "url=${{ github.event.issue.html_url }}" >> $GITHUB_ENV
|
|
24
|
+
echo "repo=${{ github.repository }}" >> $GITHUB_ENV
|
|
25
|
+
|
|
26
|
+
- name: Get PR details
|
|
27
|
+
if: ${{ github.event_name == 'pull_request' }}
|
|
28
|
+
id: pr_details
|
|
29
|
+
env:
|
|
30
|
+
TITLE: ${{ github.event.pull_request.title }}
|
|
31
|
+
run: |
|
|
32
|
+
echo "type=pull_request" >> $GITHUB_ENV
|
|
33
|
+
echo "title=$TITLE" >> $GITHUB_ENV
|
|
34
|
+
echo "user=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
|
|
35
|
+
echo "url=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV
|
|
36
|
+
echo "repo=${{ github.repository }}" >> $GITHUB_ENV
|
|
37
|
+
|
|
38
|
+
- name: Send notification to Slack
|
|
39
|
+
uses: slackapi/slack-github-action@v1.26.0
|
|
40
|
+
with:
|
|
41
|
+
payload: |
|
|
42
|
+
{
|
|
43
|
+
"type": "${{ env.type }}",
|
|
44
|
+
"title": "${{ env.title }}",
|
|
45
|
+
"user": "${{ env.user }}",
|
|
46
|
+
"repo": "${{ env.repo }}",
|
|
47
|
+
"url": "${{ env.url }}"
|
|
48
|
+
}
|
|
49
|
+
env:
|
|
50
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_GH_NOTIF_URL }}
|
{aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/workflows/integration-test.yaml
RENAMED
|
@@ -36,7 +36,7 @@ jobs:
|
|
|
36
36
|
integration-test:
|
|
37
37
|
|
|
38
38
|
runs-on: ubuntu-latest
|
|
39
|
-
timeout-minutes:
|
|
39
|
+
timeout-minutes: 120
|
|
40
40
|
|
|
41
41
|
steps:
|
|
42
42
|
|
|
@@ -104,6 +104,13 @@ jobs:
|
|
|
104
104
|
repository: aiverify-foundation/moonshot-ui
|
|
105
105
|
ref: ${{ inputs.moonshot_ui_branch }}
|
|
106
106
|
path: moonshot-ui
|
|
107
|
+
|
|
108
|
+
# Download NLTK stopwords
|
|
109
|
+
- name: Download NLTK stopwords
|
|
110
|
+
run: |
|
|
111
|
+
source venv/bin/activate
|
|
112
|
+
pip install nltk
|
|
113
|
+
python -c "import nltk; nltk.download('stopwords');nltk.download('averaged_perceptron_tagger'); nltk.download('omw');nltk.download('universal_tagset'); nltk.download('wordnet');nltk.download('punkt')"
|
|
107
114
|
|
|
108
115
|
- name: Setup Moonshot UI
|
|
109
116
|
run: |
|
|
@@ -122,14 +129,22 @@ jobs:
|
|
|
122
129
|
|
|
123
130
|
- name: Run Integration Test
|
|
124
131
|
env:
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
URI: ${{ secrets.URI }}
|
|
133
|
+
TOKEN: ${{ secrets.TOKEN }}
|
|
134
|
+
URI2: ${{ secrets.URI2 }}
|
|
135
|
+
TOKEN2: ${{ secrets.TOKEN2 }}
|
|
127
136
|
ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
|
|
137
|
+
TOGETHER_TOKEN: ${{ secrets.TOGETHER_TOKEN }}
|
|
138
|
+
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
|
|
139
|
+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
140
|
+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
141
|
+
GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
|
|
128
142
|
run: |
|
|
129
143
|
cd moonshot-integration-testing/ui-integration-testing
|
|
130
144
|
npm ci
|
|
145
|
+
npm install dotenv
|
|
131
146
|
npx playwright install --with-deps
|
|
132
|
-
|
|
147
|
+
URI="$URI" TOKEN="$TOKEN" URI2="$URI2" TOKEN2="$TOKEN2" ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS" TOGETHER_TOKEN="$TOGETHER_TOKEN" OPENAI_TOKEN="$OPENAI_TOKEN" AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" GOOGLE_TOKEN="$GOOGLE_TOKEN" npx playwright test
|
|
133
148
|
|
|
134
149
|
- name: TestRail CLI upload results
|
|
135
150
|
env:
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: Notices File Generation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
repo:
|
|
7
|
+
description: 'Repository name'
|
|
8
|
+
required: true
|
|
9
|
+
default: 'aiverify-foundation/moonshot'
|
|
10
|
+
type: string
|
|
11
|
+
branch:
|
|
12
|
+
description: 'Branch or tag'
|
|
13
|
+
required: true
|
|
14
|
+
default: 'main'
|
|
15
|
+
type: string
|
|
16
|
+
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
inputs:
|
|
19
|
+
repo:
|
|
20
|
+
description: 'Repository name'
|
|
21
|
+
required: true
|
|
22
|
+
default: 'aiverify-foundation/moonshot'
|
|
23
|
+
type: string
|
|
24
|
+
branch:
|
|
25
|
+
description: 'Branch or tag'
|
|
26
|
+
required: true
|
|
27
|
+
default: 'main'
|
|
28
|
+
type: string
|
|
29
|
+
|
|
30
|
+
jobs:
|
|
31
|
+
notices-file-gen:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
timeout-minutes: 10
|
|
34
|
+
steps:
|
|
35
|
+
- name: Checkout Code
|
|
36
|
+
uses: actions/checkout@v4
|
|
37
|
+
with:
|
|
38
|
+
repository: ${{ github.event.inputs.repo }}
|
|
39
|
+
ref: ${{ github.event.inputs.branch }}
|
|
40
|
+
submodules: recursive
|
|
41
|
+
|
|
42
|
+
- name: Setup Python 3.11
|
|
43
|
+
uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: "3.11"
|
|
46
|
+
|
|
47
|
+
- name: Generate notices file
|
|
48
|
+
run: |
|
|
49
|
+
set +e
|
|
50
|
+
pip install -r requirements.txt
|
|
51
|
+
npm install
|
|
52
|
+
repo_name=$(echo "${{ github.event.inputs.repo }}" | awk -F'/' '{print $2}')
|
|
53
|
+
bash <(curl -s -L https://detect.synopsys.com/detect9.sh) \
|
|
54
|
+
--blackduck.url=https://blackduck.aipo-imda.net/ \
|
|
55
|
+
--blackduck.api.token=${{ secrets.BLACKDUCK_TOKEN }} \
|
|
56
|
+
--detect.detector.search.depth=10 \
|
|
57
|
+
--detect.project.name=aiverify-${repo_name} \
|
|
58
|
+
--detect.project.version.name=${{ github.event.inputs.branch }} \
|
|
59
|
+
--detect.source.path=. \
|
|
60
|
+
--detect.code.location.name="aiverify-${repo_name}_${{ github.event.inputs.branch }}" \
|
|
61
|
+
--detect.excluded.directories=/tests \
|
|
62
|
+
--blackduck.trust.cert=true \
|
|
63
|
+
--detect.excluded.detector.types=POETRY \
|
|
64
|
+
--detect.blackduck.scan.mode=RAPID \
|
|
65
|
+
--detect.notices.report=true \
|
|
66
|
+
--detect.notices.report.path=.
|
|
67
|
+
set -e
|
|
68
|
+
ls -al
|
|
69
|
+
cat ./*_Black_Duck_Notices_Report.txt
|
|
70
|
+
|
|
71
|
+
#
|
|
72
|
+
# - name: Commit notices file
|
|
73
|
+
# run: |
|
|
74
|
+
# set +e
|
|
75
|
+
# mv aiverify_moonshot_main_Black_Duck_Notices_Report.txt NOTICES.md
|
|
76
|
+
# git add NOTICES.md
|
|
77
|
+
# git config user.name "imda-btg"
|
|
78
|
+
# git config user.email "idma-btg@imda.gov.sg"
|
|
79
|
+
# git commit -m "update notices file"
|
|
80
|
+
# git push
|
|
81
|
+
# set -e
|
|
82
|
+
#
|
{aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/.github/workflows/pre-build-checks.yaml
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# 2. Code quality analysis (flake8)
|
|
4
4
|
# 3. Dependency analysis (vulnerabilities)
|
|
5
5
|
# 4. Dependency analysis (undesirable licenses)
|
|
6
|
-
# 5.
|
|
6
|
+
# 5. Send slack notification on check results
|
|
7
7
|
|
|
8
8
|
name: Pre-Build Checks
|
|
9
9
|
|
|
@@ -50,8 +50,9 @@ jobs:
|
|
|
50
50
|
if: github.event_name == 'workflow_dispatch'
|
|
51
51
|
run: |
|
|
52
52
|
echo "MS_BRANCH=${{ inputs.branch_to_test }}" >> "$GITHUB_ENV"
|
|
53
|
-
echo "MS_DATA_BRANCH
|
|
53
|
+
echo "MS_DATA_BRANCH=dev_main" >> "$GITHUB_ENV"
|
|
54
54
|
echo "PR_NUM=#0" >> "$GITHUB_ENV"
|
|
55
|
+
echo "${{ inputs.branch_to_test }}"
|
|
55
56
|
|
|
56
57
|
# Checkout moonshot code
|
|
57
58
|
- name: Checkout code (moonshot)
|
|
@@ -110,7 +111,7 @@ jobs:
|
|
|
110
111
|
HOST_PORT=5000" > .env
|
|
111
112
|
cat .env
|
|
112
113
|
|
|
113
|
-
# Unit tests & coverage
|
|
114
|
+
# Check 1: Unit tests & coverage
|
|
114
115
|
- name: Unit tests with coverage
|
|
115
116
|
id: unit_tests
|
|
116
117
|
if: ${{ ! cancelled() }}
|
|
@@ -129,7 +130,7 @@ jobs:
|
|
|
129
130
|
exit 1
|
|
130
131
|
fi
|
|
131
132
|
|
|
132
|
-
# Code quality analysis (flake8)
|
|
133
|
+
# Check 2: Code quality analysis (flake8)
|
|
133
134
|
- name: Code quality analysis (flake8)
|
|
134
135
|
id: code_quality
|
|
135
136
|
if: ${{ ! cancelled() }}
|
|
@@ -142,7 +143,7 @@ jobs:
|
|
|
142
143
|
set -e
|
|
143
144
|
exit $lint_status
|
|
144
145
|
|
|
145
|
-
# pip-audit
|
|
146
|
+
# Check 3: Dependency vulnerability & license analysis (pip-audit)
|
|
146
147
|
- name: Dependency analysis (vulnerabilities & licenses)
|
|
147
148
|
id: dependency_analysis
|
|
148
149
|
if: ${{ ! cancelled() }}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
name:
|
|
2
|
+
name: SIT Build
|
|
3
3
|
|
|
4
4
|
on:
|
|
5
5
|
|
|
@@ -30,7 +30,8 @@ concurrency:
|
|
|
30
30
|
|
|
31
31
|
jobs:
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
# Remote deployment of moonshot to SIT server
|
|
34
|
+
sit-build:
|
|
34
35
|
|
|
35
36
|
runs-on: ubuntu-latest
|
|
36
37
|
timeout-minutes: 60
|
|
@@ -125,56 +126,62 @@ jobs:
|
|
|
125
126
|
--output text)
|
|
126
127
|
echo "Command status: $status"
|
|
127
128
|
|
|
128
|
-
- name: Run smoke test
|
|
129
|
-
timeout-minutes: 30
|
|
129
|
+
# - name: Run smoke test
|
|
130
|
+
# timeout-minutes: 30
|
|
131
|
+
# run: |
|
|
132
|
+
# command_id=$(aws ssm send-command \
|
|
133
|
+
# --instance-ids "${{ vars.AWS_SIT_INSTANCE_ID }}" \
|
|
134
|
+
# --document-name "AWS-RunShellScript" \
|
|
135
|
+
# --comment "Run smoke test" \
|
|
136
|
+
# --parameters 'commands=["sudo su - ubuntu -c \". ~/scripts/run_smoke_test.sh ${{ secrets.AZURE_OPENAI_TOKEN }} ${{ secrets.AZURE_OPENAI_URI }} \""]' \
|
|
137
|
+
# --query "Command.CommandId" \
|
|
138
|
+
# --output text)
|
|
139
|
+
#
|
|
140
|
+
# max_attempts=20
|
|
141
|
+
# delay=60
|
|
142
|
+
# attempts=0
|
|
143
|
+
#
|
|
144
|
+
# while [ $attempts -lt $max_attempts ]; do
|
|
145
|
+
# status=$(aws ssm list-command-invocations \
|
|
146
|
+
# --command-id "$command_id" \
|
|
147
|
+
# --instance-id "${{ vars.AWS_SIT_INSTANCE_ID }}" \
|
|
148
|
+
# --query "CommandInvocations[0].Status" \
|
|
149
|
+
# --output text)
|
|
150
|
+
#
|
|
151
|
+
# if [ "$status" == "Success" ] || [ "$status" == "Failed" ]; then
|
|
152
|
+
# output=$(aws ssm get-command-invocation \
|
|
153
|
+
# --command-id "$command_id" \
|
|
154
|
+
# --instance-id "${{ vars.AWS_SIT_INSTANCE_ID }}" \
|
|
155
|
+
# --query "StandardOutputContent" \
|
|
156
|
+
# --output text)
|
|
157
|
+
# echo "SMOKE_TEST_STATUS=$status" >> $GITHUB_ENV
|
|
158
|
+
# echo "Smoke test output: $output"
|
|
159
|
+
# echo "Command status: $status"
|
|
160
|
+
# if [ "$status" == "Success" ]; then
|
|
161
|
+
# exit 0
|
|
162
|
+
# else
|
|
163
|
+
# exit 1
|
|
164
|
+
# fi
|
|
165
|
+
# elif [ "$status" == "InProgress" ]; then
|
|
166
|
+
# echo "Command status: $status, waiting..."
|
|
167
|
+
# sleep $delay
|
|
168
|
+
# attempts=$((attempts + 1))
|
|
169
|
+
# else
|
|
170
|
+
# echo "Unexpected command status: $status"
|
|
171
|
+
# echo "SMOKE_TEST_STATUS=$status" >> $GITHUB_ENV
|
|
172
|
+
# exit 1
|
|
173
|
+
# fi
|
|
174
|
+
# done
|
|
175
|
+
#
|
|
176
|
+
# echo "Max attempts reached, exiting."
|
|
177
|
+
# echo "SMOKE_TEST_STATUS=timeout" >> $GITHUB_ENV
|
|
178
|
+
# exit 1
|
|
179
|
+
|
|
180
|
+
# Remote execution of integration test in SIT server
|
|
181
|
+
- name: Run integration test
|
|
130
182
|
run: |
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
--document-name "AWS-RunShellScript" \
|
|
134
|
-
--comment "Run smoke test" \
|
|
135
|
-
--parameters 'commands=["sudo su - ubuntu -c \". ~/scripts/run_smoke_test.sh ${{ secrets.AZURE_OPENAI_TOKEN }} ${{ secrets.AZURE_OPENAI_URI }} \""]' \
|
|
136
|
-
--query "Command.CommandId" \
|
|
137
|
-
--output text)
|
|
138
|
-
|
|
139
|
-
max_attempts=20
|
|
140
|
-
delay=60
|
|
141
|
-
attempts=0
|
|
142
|
-
|
|
143
|
-
while [ $attempts -lt $max_attempts ]; do
|
|
144
|
-
status=$(aws ssm list-command-invocations \
|
|
145
|
-
--command-id "$command_id" \
|
|
146
|
-
--instance-id "${{ vars.AWS_SIT_INSTANCE_ID }}" \
|
|
147
|
-
--query "CommandInvocations[0].Status" \
|
|
148
|
-
--output text)
|
|
149
|
-
|
|
150
|
-
if [ "$status" == "Success" ] || [ "$status" == "Failed" ]; then
|
|
151
|
-
output=$(aws ssm get-command-invocation \
|
|
152
|
-
--command-id "$command_id" \
|
|
153
|
-
--instance-id "${{ vars.AWS_SIT_INSTANCE_ID }}" \
|
|
154
|
-
--query "StandardOutputContent" \
|
|
155
|
-
--output text)
|
|
156
|
-
echo "SMOKE_TEST_STATUS=$status" >> $GITHUB_ENV
|
|
157
|
-
echo "Smoke test output: $output"
|
|
158
|
-
echo "Command status: $status"
|
|
159
|
-
if [ "$status" == "Success" ]; then
|
|
160
|
-
exit 0
|
|
161
|
-
else
|
|
162
|
-
exit 1
|
|
163
|
-
fi
|
|
164
|
-
elif [ "$status" == "InProgress" ]; then
|
|
165
|
-
echo "Command status: $status, waiting..."
|
|
166
|
-
sleep $delay
|
|
167
|
-
attempts=$((attempts + 1))
|
|
168
|
-
else
|
|
169
|
-
echo "Unexpected command status: $status"
|
|
170
|
-
echo "SMOKE_TEST_STATUS=$status" >> $GITHUB_ENV
|
|
171
|
-
exit 1
|
|
172
|
-
fi
|
|
173
|
-
done
|
|
174
|
-
|
|
175
|
-
echo "Max attempts reached, exiting."
|
|
176
|
-
echo "SMOKE_TEST_STATUS=timeout" >> $GITHUB_ENV
|
|
177
|
-
exit 1
|
|
183
|
+
echo "Run integration test in SIT server..."
|
|
184
|
+
echo "INTG_TEST_STATUS=NotRun" >> $GITHUB_ENV
|
|
178
185
|
|
|
179
186
|
# Send slack notification
|
|
180
187
|
- name: Send slack notification
|
|
@@ -185,7 +192,7 @@ jobs:
|
|
|
185
192
|
{
|
|
186
193
|
"workflow": "${{ github.repository }} | ${{ github.workflow }}",
|
|
187
194
|
"status": "${{ job.status }}",
|
|
188
|
-
"details": "${{ env.
|
|
195
|
+
"details": "${{ env.INTG_TEST_STATUS }}",
|
|
189
196
|
"ref": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
190
197
|
}
|
|
191
198
|
env:
|
|
@@ -42,7 +42,7 @@ jobs:
|
|
|
42
42
|
steps:
|
|
43
43
|
|
|
44
44
|
- name: Checkout Moonshot (Pull Request Review)
|
|
45
|
-
if: github.event_name == '
|
|
45
|
+
if: github.event_name == 'pull_request'
|
|
46
46
|
uses: actions/checkout@v4
|
|
47
47
|
with:
|
|
48
48
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
@@ -69,7 +69,7 @@ jobs:
|
|
|
69
69
|
echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
|
|
70
70
|
|
|
71
71
|
- name: Checkout Moonshot Data (Pull Request Review)
|
|
72
|
-
if: github.event_name == '
|
|
72
|
+
if: github.event_name == 'pull_request'
|
|
73
73
|
uses: actions/checkout@v4
|
|
74
74
|
with:
|
|
75
75
|
repository: aiverify-foundation/moonshot-data
|
|
@@ -91,7 +91,7 @@ jobs:
|
|
|
91
91
|
pip install -r requirements.txt
|
|
92
92
|
|
|
93
93
|
- name: Checkout Moonshot UI (Pull Request Review)
|
|
94
|
-
if: github.event_name == '
|
|
94
|
+
if: github.event_name == 'pull_request'
|
|
95
95
|
uses: actions/checkout@v4
|
|
96
96
|
with:
|
|
97
97
|
repository: aiverify-foundation/moonshot-ui
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: UAT Deploy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
types: [closed]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build-python-package:
|
|
11
|
+
if: ${{ github.event.pull_request.merged }}
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout code
|
|
16
|
+
uses: actions/checkout@v3
|
|
17
|
+
with:
|
|
18
|
+
ref: main
|
|
19
|
+
submodules: recursive
|
|
20
|
+
|
|
21
|
+
- name: Setup python 3.11
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.11"
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: |
|
|
28
|
+
python3 -m pip install --upgrade pip
|
|
29
|
+
pip install -r requirements.txt
|
|
30
|
+
|
|
31
|
+
- name: Bump version
|
|
32
|
+
run: |
|
|
33
|
+
echo "Bumping version..."
|
|
34
|
+
pip install bump2version
|
|
35
|
+
bump2version patch
|
|
36
|
+
|
|
37
|
+
- name: Package test PyPI
|
|
38
|
+
run: |
|
|
39
|
+
echo "Packaging test PyPI..."
|
|
40
|
+
pip install build
|
|
41
|
+
python3 -m build
|
|
42
|
+
|
|
43
|
+
- name: Store the distribution packages
|
|
44
|
+
uses: actions/upload-artifact@v3
|
|
45
|
+
with:
|
|
46
|
+
name: python-package
|
|
47
|
+
path: dist/
|
|
48
|
+
|
|
49
|
+
publish-to-testpypi:
|
|
50
|
+
needs:
|
|
51
|
+
- build-python-package
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
|
|
54
|
+
environment:
|
|
55
|
+
name: testpypi
|
|
56
|
+
url: https://test.pypi.org/p/aiverify-moonshot
|
|
57
|
+
|
|
58
|
+
permissions:
|
|
59
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
60
|
+
|
|
61
|
+
steps:
|
|
62
|
+
- name: Download python package
|
|
63
|
+
uses: actions/download-artifact@v3
|
|
64
|
+
with:
|
|
65
|
+
name: python-package
|
|
66
|
+
path: dist/
|
|
67
|
+
|
|
68
|
+
- name: Publish to test PyPI
|
|
69
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
70
|
+
with:
|
|
71
|
+
repository-url: https://test.pypi.org/legacy/
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: aiverify-moonshot
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: AI Verify advances Gen AI testing with Project Moonshot.
|
|
5
5
|
Project-URL: Repository, https://github.com/aiverify-foundation/moonshot
|
|
6
6
|
Project-URL: Documentation, https://aiverify-foundation.github.io/moonshot/
|
|
@@ -24,11 +24,12 @@ Requires-Dist: pydantic==2.8.2
|
|
|
24
24
|
Requires-Dist: pyparsing>=3.1.4
|
|
25
25
|
Requires-Dist: python-dotenv>=1.0.1
|
|
26
26
|
Requires-Dist: python-slugify>=8.0.4
|
|
27
|
+
Requires-Dist: tenacity>=8.5.0
|
|
27
28
|
Requires-Dist: xxhash>=3.5.0
|
|
28
29
|
Provides-Extra: all
|
|
29
30
|
Requires-Dist: cmd2>=2.4.3; extra == 'all'
|
|
30
31
|
Requires-Dist: dependency-injector>=4.41.0; extra == 'all'
|
|
31
|
-
Requires-Dist: fastapi>=0.
|
|
32
|
+
Requires-Dist: fastapi>=0.115.4; extra == 'all'
|
|
32
33
|
Requires-Dist: rich>=13.8.0; extra == 'all'
|
|
33
34
|
Requires-Dist: typing-extensions>=4.12.2; extra == 'all'
|
|
34
35
|
Requires-Dist: uvicorn>=0.30.6; extra == 'all'
|
|
@@ -37,7 +38,7 @@ Requires-Dist: cmd2>=2.4.3; extra == 'cli'
|
|
|
37
38
|
Requires-Dist: rich>=13.8.0; extra == 'cli'
|
|
38
39
|
Provides-Extra: web-api
|
|
39
40
|
Requires-Dist: dependency-injector>=4.41.0; extra == 'web-api'
|
|
40
|
-
Requires-Dist: fastapi>=0.
|
|
41
|
+
Requires-Dist: fastapi>=0.115.4; extra == 'web-api'
|
|
41
42
|
Requires-Dist: typing-extensions>=4.12.2; extra == 'web-api'
|
|
42
43
|
Requires-Dist: uvicorn>=0.30.6; extra == 'web-api'
|
|
43
44
|
Description-Content-Type: text/markdown
|
|
@@ -46,7 +47,7 @@ Description-Content-Type: text/markdown
|
|
|
46
47
|
|
|
47
48
|

|
|
48
49
|
|
|
49
|
-
**Version 0.
|
|
50
|
+
**Version 0.5.1**
|
|
50
51
|
|
|
51
52
|
A simple and modular tool to evaluate any LLM application.
|
|
52
53
|
|
{aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/benchmark/cookbook.py
RENAMED
|
@@ -256,11 +256,7 @@ def run_cookbook(args) -> None:
|
|
|
256
256
|
if isinstance(args.random_seed, bool) or not isinstance(args.random_seed, int):
|
|
257
257
|
raise TypeError(ERROR_BENCHMARK_RUN_COOKBOOK_RANDOM_SEED_VALIDATION)
|
|
258
258
|
|
|
259
|
-
if (
|
|
260
|
-
not isinstance(args.system_prompt, str)
|
|
261
|
-
or not args.system_prompt
|
|
262
|
-
or args.system_prompt is None
|
|
263
|
-
):
|
|
259
|
+
if not isinstance(args.system_prompt, str) or args.system_prompt is None:
|
|
264
260
|
raise TypeError(ERROR_BENCHMARK_RUN_COOKBOOK_SYS_PROMPT_VALIDATION)
|
|
265
261
|
|
|
266
262
|
if (
|
{aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/benchmark/recipe.py
RENAMED
|
@@ -337,11 +337,7 @@ def run_recipe(args) -> None:
|
|
|
337
337
|
if isinstance(args.random_seed, bool) or not isinstance(args.random_seed, int):
|
|
338
338
|
raise TypeError(ERROR_BENCHMARK_RUN_RECIPE_RANDOM_SEED_VALIDATION)
|
|
339
339
|
|
|
340
|
-
if (
|
|
341
|
-
not isinstance(args.system_prompt, str)
|
|
342
|
-
or not args.system_prompt
|
|
343
|
-
or args.system_prompt is None
|
|
344
|
-
):
|
|
340
|
+
if not isinstance(args.system_prompt, str) or args.system_prompt is None:
|
|
345
341
|
raise TypeError(ERROR_BENCHMARK_RUN_RECIPE_SYS_PROMPT_VALIDATION)
|
|
346
342
|
|
|
347
343
|
if (
|
{aiverify_moonshot-0.4.11 → aiverify_moonshot-0.5.1}/moonshot/integrations/cli/cli_errors.py
RENAMED
|
@@ -348,6 +348,9 @@ ERROR_COMMON_ADD_ENDPOINT_MAX_CALLS_PER_SECOND_VALIDATION = "The 'max_calls_per_
|
|
|
348
348
|
ERROR_COMMON_ADD_ENDPOINT_MAX_CONCURRENCY_VALIDATION = (
|
|
349
349
|
"The 'max_concurrency' argument must be a non-empty positive integer and not None."
|
|
350
350
|
)
|
|
351
|
+
ERROR_COMMON_ADD_ENDPOINT_MODEL_VALIDATION = (
|
|
352
|
+
"The 'model' argument must be a string and not None."
|
|
353
|
+
)
|
|
351
354
|
ERROR_COMMON_ADD_ENDPOINT_PARAMS_VALIDATION = (
|
|
352
355
|
"The 'params' argument must be a string representation of a dictionary."
|
|
353
356
|
)
|