aiverify-moonshot 0.4.5__tar.gz → 0.4.7__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.4.5 → aiverify_moonshot-0.4.7}/.github/scripts/create_backup.sh +12 -6
- aiverify_moonshot-0.4.7/.github/scripts/install_ms_service.sh +52 -0
- aiverify_moonshot-0.4.7/.github/scripts/moonshot_env +28 -0
- aiverify_moonshot-0.4.7/.github/scripts/moonshot_test_env +7 -0
- aiverify_moonshot-0.4.7/.github/scripts/moonshot_ui_env +5 -0
- aiverify_moonshot-0.4.7/.github/scripts/run_smoke_test.sh +56 -0
- aiverify_moonshot-0.4.7/.github/scripts/start_ms_service.sh +10 -0
- aiverify_moonshot-0.4.7/.github/workflows/docs-update.yaml +79 -0
- aiverify_moonshot-0.4.7/.github/workflows/gh-event-notification.yaml +43 -0
- aiverify_moonshot-0.4.7/.github/workflows/integration-test.yaml +151 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/.github/workflows/nightly-build.yaml +36 -6
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/.github/workflows/pre-build-checks.yaml +37 -9
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/.github/workflows/pypi-deployment.yaml +2 -3
- aiverify_moonshot-0.4.5/.github/workflows/codeql.yaml → aiverify_moonshot-0.4.7/.github/workflows/sast-codeql.yaml +60 -12
- aiverify_moonshot-0.4.7/.github/workflows/sca-scan.yaml +111 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/.github/workflows/smoke-test.yaml +21 -19
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/.github/workflows/test-pypi-deployment.yaml +0 -9
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/PKG-INFO +13 -12
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/README.md +2 -2
- aiverify_moonshot-0.4.7/aiverify_moonshot_main_Black_Duck_Notices_Report.txt +3352 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/benchmark/cookbook.py +226 -42
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/benchmark/datasets.py +53 -8
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/benchmark/metrics.py +48 -7
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/benchmark/recipe.py +283 -42
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/benchmark/result.py +73 -30
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/benchmark/run.py +43 -11
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/benchmark/runner.py +29 -20
- aiverify_moonshot-0.4.7/moonshot/integrations/cli/cli_errors.py +511 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/common/connectors.py +139 -8
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/common/dataset.py +66 -13
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/common/prompt_template.py +38 -2
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/redteam/session.py +126 -43
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/app.py +1 -1
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_bookmark.py +6 -6
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/bookmark/bookmark.py +119 -60
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/bookmark/bookmark_arguments.py +10 -0
- aiverify_moonshot-0.4.7/moonshot/src/messages_constants.py +40 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/runners/runner.py +1 -1
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/pyproject.toml +18 -16
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/requirements.txt +22 -23
- aiverify_moonshot-0.4.5/.github/scripts/install_ms_service.sh +0 -28
- aiverify_moonshot-0.4.5/.github/scripts/run_smoke_test.sh +0 -35
- aiverify_moonshot-0.4.5/.github/scripts/start_ms_service.sh +0 -7
- aiverify_moonshot-0.4.5/.github/workflows/sca-scan.yaml +0 -64
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/.coveragerc +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/.flake8 +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/.github/pull_request_template.md +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/.gitignore +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/.pre-commit-config.yaml +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/AUTHORS.md +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/LICENSE.md +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/NOTICES.md +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/__main__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/api.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/__main__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/active_session_cfg.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/benchmark/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/benchmark/benchmark.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/cli.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/common/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/common/common.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/common/display_helper.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/initialisation/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/initialisation/initialisation.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/redteam/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/redteam/attack_module.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/redteam/context_strategy.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/redteam/prompt_template.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/redteam/redteam.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/cli/utils/process_data.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/.env.dev +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/__main__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/container.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/log/.gitkeep +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/logging_conf.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/attack_modules.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/benchmark.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/benchmark_result.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/bookmark.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/context_strategy.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/cookbook.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/dataset.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/endpoint.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/metric.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/prompt_template.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/recipe.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/redteam.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/routes/runner.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/benchmark_runner_dto.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/bookmark_create_dto.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/cookbook_create_dto.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/cookbook_response_model.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/dataset_create_dto.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/dataset_response_dto.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/endpoint_create_dto.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/endpoint_response_model.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/prompt_response_model.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/prompt_template_response_model.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/recipe_create_dto.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/recipe_response_model.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/session_create_dto.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/session_prompt_dto.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/schemas/session_response_model.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/attack_module_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/auto_red_team_test_manager.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/auto_red_team_test_state.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/base_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/benchmark_result_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/benchmark_test_manager.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/benchmark_test_state.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/benchmarking_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/bookmark_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/context_strategy_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/cookbook_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/dataset_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/endpoint_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/metric_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/prompt_template_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/recipe_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/runner_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/session_service.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/utils/exceptions_handler.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/utils/file_manager.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/services/utils/results_formatter.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/status_updater/interface/benchmark_progress_callback.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/status_updater/interface/redteam_progress_callback.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/status_updater/moonshot_ui_webhook.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/temp/.gitkeep +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/integrations/web_api/types/types.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_connector.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_connector_endpoint.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_context_strategy.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_cookbook.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_dataset.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_environment_variables.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_metrics.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_prompt_template.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_recipe.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_red_teaming.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_result.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_run.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_runner.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/api/api_session.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/configs/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/configs/env_variables.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/connectors/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/connectors/connector.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/connectors/connector_prompt_arguments.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/connectors_endpoints/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/connectors_endpoints/connector_endpoint.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/connectors_endpoints/connector_endpoint_arguments.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/cookbooks/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/cookbooks/cookbook.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/cookbooks/cookbook_arguments.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/datasets/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/datasets/dataset.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/datasets/dataset_arguments.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/metrics/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/metrics/metric.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/metrics/metric_interface.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/prompt_templates/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/prompt_templates/prompt_template.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/recipes/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/recipes/recipe.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/recipes/recipe_arguments.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/attack/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/attack/attack_module.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/attack/attack_module_arguments.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/attack/context_strategy.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/context_strategy/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/context_strategy/context_strategy_interface.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/session/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/session/chat.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/session/red_teaming_progress.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/session/red_teaming_type.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/redteaming/session/session.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/results/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/results/result.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/results/result_arguments.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/runners/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/runners/runner_arguments.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/runners/runner_type.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/runs/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/runs/run.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/runs/run_arguments.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/runs/run_progress.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/runs/run_status.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/storage/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/storage/db_interface.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/storage/io_interface.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/storage/storage.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/utils/__init__.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/utils/find_feature.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/utils/import_modules.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/utils/log.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/utils/pagination.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/moonshot/src/utils/timeit.py +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/third-party/pygments-2.18.0-py3-none-any.whl +0 -0
- {aiverify_moonshot-0.4.5 → aiverify_moonshot-0.4.7}/third-party/text_unidecode-1.3-py2.py3-none-any.whl +0 -0
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
BASE_DIR=~/moonshot
|
|
4
|
+
MOONSHOT_DIR=moonshot-sit
|
|
5
|
+
|
|
6
|
+
# Moonshot SIT dir
|
|
7
|
+
SIT_DIR=$BASE_DIR/$MOONSHOT_DIR
|
|
8
|
+
|
|
9
|
+
# Backup directory and the maximum number of backups
|
|
10
|
+
BACKUP_DIR=$BASE_DIR/backups
|
|
5
11
|
MAX_BACKUPS=5
|
|
6
12
|
|
|
7
13
|
# Check if the moonshot directory exists
|
|
8
|
-
if [ ! -d
|
|
9
|
-
echo "Skip backup:
|
|
14
|
+
if [ ! -d $SIT_DIR ]; then
|
|
15
|
+
echo "Skip backup: $SIT_DIR dir does not exist."
|
|
10
16
|
exit 0
|
|
11
17
|
fi
|
|
12
18
|
|
|
@@ -30,5 +36,5 @@ else
|
|
|
30
36
|
new_backup=$highest_backup
|
|
31
37
|
fi
|
|
32
38
|
|
|
33
|
-
# Create a new backup by moving the moonshot
|
|
34
|
-
mv
|
|
39
|
+
# Create a new backup by moving the moonshot dir to the backup dir with the new backup number
|
|
40
|
+
mv $SIT_DIR $BACKUP_DIR/backup_$new_backup
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Arguments for branches, default to dev_main if not provided.
|
|
4
|
+
MOONSHOT_BRANCH=${1:-dev_main}
|
|
5
|
+
MOONSHOT_DATA_BRANCH=${2:-dev_main}
|
|
6
|
+
MOONSHOT_UI_BRANCH=${3:-dev_main}
|
|
7
|
+
|
|
8
|
+
BASE_DIR=~/moonshot
|
|
9
|
+
SCRIPTS_DIR=~/scripts
|
|
10
|
+
#BASE_DIR=./moonshot-test
|
|
11
|
+
#SCRIPTS_DIR=./.github/scripts
|
|
12
|
+
|
|
13
|
+
MOONSHOT_SIT=moonshot-sit
|
|
14
|
+
|
|
15
|
+
# Install moonshot from GitHub
|
|
16
|
+
|
|
17
|
+
# Create BASE_DIR if it does not
|
|
18
|
+
if [ ! -d "$BASE_DIR" ]; then
|
|
19
|
+
mkdir -p "$BASE_DIR"
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
cd $BASE_DIR
|
|
23
|
+
|
|
24
|
+
# Clone the repositories from the specified branches
|
|
25
|
+
echo "Cloning moonshot from branch $MOONSHOT_BRANCH"
|
|
26
|
+
echo "Cloning moonshot-data from branch $MOONSHOT_DATA_BRANCH"
|
|
27
|
+
echo "Cloning moonshot-ui from branch $MOONSHOT_UI_BRANCH"
|
|
28
|
+
git clone --branch $MOONSHOT_BRANCH https://github.com/aiverify-foundation/moonshot.git $MOONSHOT_SIT
|
|
29
|
+
cd $MOONSHOT_SIT
|
|
30
|
+
git clone --branch $MOONSHOT_DATA_BRANCH https://github.com/aiverify-foundation/moonshot-data.git
|
|
31
|
+
git clone --branch $MOONSHOT_UI_BRANCH https://github.com/aiverify-foundation/moonshot-ui.git
|
|
32
|
+
cp $SCRIPTS_DIR/moonshot_env .env
|
|
33
|
+
|
|
34
|
+
python3 -m venv venv
|
|
35
|
+
source venv/bin/activate
|
|
36
|
+
|
|
37
|
+
# Install Python dependencies
|
|
38
|
+
pip install -r requirements.txt
|
|
39
|
+
cd moonshot-data
|
|
40
|
+
pip install -r requirements.txt
|
|
41
|
+
|
|
42
|
+
# Install Node.js dependencies and build the UI
|
|
43
|
+
cd ../moonshot-ui
|
|
44
|
+
rm .env.local
|
|
45
|
+
cp $SCRIPTS_DIR/moonshot_ui_env .env.local
|
|
46
|
+
npm install
|
|
47
|
+
|
|
48
|
+
# Modify the start script in package.json
|
|
49
|
+
sudo apt-get install -y jq
|
|
50
|
+
jq '.scripts.start = "next start -H 0.0.0.0 -p 3100"' package.json > package.tmp.json && mv package.tmp.json package.json
|
|
51
|
+
|
|
52
|
+
npm run build
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# .env for moonshot SIT
|
|
2
|
+
|
|
3
|
+
# For Data
|
|
4
|
+
ATTACK_MODULES="./moonshot-data/attack-modules"
|
|
5
|
+
BOOKMARKS="./moonshot-data/generated-outputs/bookmarks"
|
|
6
|
+
CONNECTORS="./moonshot-data/connectors"
|
|
7
|
+
CONNECTORS_ENDPOINTS="./moonshot-data/connectors-endpoints"
|
|
8
|
+
CONTEXT_STRATEGY="./moonshot-data/context-strategy"
|
|
9
|
+
COOKBOOKS="./moonshot-data/cookbooks"
|
|
10
|
+
DATABASES="./moonshot-data/generated-outputs/databases"
|
|
11
|
+
DATABASES_MODULES="./moonshot-data/databases-modules"
|
|
12
|
+
DATASETS="./moonshot-data/datasets"
|
|
13
|
+
IO_MODULES="./moonshot-data/io-modules"
|
|
14
|
+
METRICS="./moonshot-data/metrics"
|
|
15
|
+
PROMPT_TEMPLATES="./moonshot-data/prompt-templates"
|
|
16
|
+
RECIPES="./moonshot-data/recipes"
|
|
17
|
+
RESULTS="./moonshot-data/generated-outputs/results"
|
|
18
|
+
RESULTS_MODULES="./moonshot-data/results-modules"
|
|
19
|
+
RUNNERS="./moonshot-data/generated-outputs/runners"
|
|
20
|
+
RUNNERS_MODULES="./moonshot-data/runners-modules"
|
|
21
|
+
TOKENIZERS_PARALLELISM = false
|
|
22
|
+
|
|
23
|
+
# For Web API
|
|
24
|
+
HOST_ADDRESS=127.0.0.1 # The interface the server will bind to
|
|
25
|
+
HOST_PORT=5100
|
|
26
|
+
|
|
27
|
+
# URI of the Web UI webhook
|
|
28
|
+
MOONSHOT_UI_CALLBACK_URL=http://localhost:3100/api/v1/benchmarks/status
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
AZURE_OPENAI_API_KEY=$1
|
|
4
|
+
AZURE_OPENAI_ENDPOINT=$2
|
|
5
|
+
TEST_BRANCH_NAME=${3:-main}
|
|
6
|
+
|
|
7
|
+
BASE_DIR=~/moonshot
|
|
8
|
+
SCRIPTS_DIR=~/scripts
|
|
9
|
+
|
|
10
|
+
# Export the env variables for smoke test to use
|
|
11
|
+
export AZURE_OPENAI_TOKEN=$AZURE_OPENAI_API_KEY
|
|
12
|
+
export AZURE_OPENAI_URI=$AZURE_OPENAI_ENDPOINT
|
|
13
|
+
export MOONSHOT_URL="http://127.0.0.1"
|
|
14
|
+
export MOONSHOT_PORT_NUMBER="3100"
|
|
15
|
+
export ADDITIONAL_PARAMETERS="{
|
|
16
|
+
'timeout': 300,
|
|
17
|
+
'allow_retries': true,
|
|
18
|
+
'num_of_retries': 3,
|
|
19
|
+
'temperature': 0.5,
|
|
20
|
+
'model': 'gpt-4o'
|
|
21
|
+
}"
|
|
22
|
+
|
|
23
|
+
cd $BASE_DIR
|
|
24
|
+
|
|
25
|
+
if [ -d "moonshot-smoke-testing" ]; then
|
|
26
|
+
echo "Removing existing moonshot-smoke-testing directory..."
|
|
27
|
+
rm -rf moonshot-smoke-testing
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# Clone the smoke test repo from the specified branch
|
|
31
|
+
echo "Cloning moonshot-smoke-testing repo from branch $BRANCH_NAME..."
|
|
32
|
+
git clone --branch $TEST_BRANCH_NAME https://github.com/aiverify-foundation/moonshot-smoke-testing.git
|
|
33
|
+
cd moonshot-smoke-testing
|
|
34
|
+
npm ci
|
|
35
|
+
|
|
36
|
+
cp $SCRIPTS_DIR/moonshot_test_env .env
|
|
37
|
+
echo "Created .env"
|
|
38
|
+
cat .env
|
|
39
|
+
|
|
40
|
+
# Install Playwright (if needed)
|
|
41
|
+
#sudo npx playwright install-deps
|
|
42
|
+
### If the above didn't work, try the following:
|
|
43
|
+
##sudo apt-get install libatk1.0-0\
|
|
44
|
+
## libatk-bridge2.0-0\
|
|
45
|
+
## libxkbcommon0\
|
|
46
|
+
## libatspi2.0-0\
|
|
47
|
+
## libxcomposite1\
|
|
48
|
+
## libxdamage1\
|
|
49
|
+
## libxfixes3\
|
|
50
|
+
## libxrandr2\
|
|
51
|
+
## libgbml
|
|
52
|
+
|
|
53
|
+
echo "Running smoke test on moonshot at $MOONSHOT_URL:$MOONSHOT_PORT_NUMBER..."
|
|
54
|
+
npx playwright test tests/smoke-test.spec.ts --reporter=list
|
|
55
|
+
|
|
56
|
+
#echo "Exit code: $?"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: "Docs Update"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# push:
|
|
5
|
+
# branches: [ "docs" ]
|
|
6
|
+
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
docs_branch:
|
|
10
|
+
description: 'Branch to checkout docs'
|
|
11
|
+
required: true
|
|
12
|
+
default: 'docs'
|
|
13
|
+
type: string
|
|
14
|
+
|
|
15
|
+
workflow_call:
|
|
16
|
+
inputs:
|
|
17
|
+
docs_branch:
|
|
18
|
+
description: 'Branch to checkout docs'
|
|
19
|
+
required: true
|
|
20
|
+
default: 'docs'
|
|
21
|
+
type: string
|
|
22
|
+
|
|
23
|
+
# Allow one concurrent deployment
|
|
24
|
+
concurrency:
|
|
25
|
+
group: ${{ github.repository }}-${{ github.workflow }}
|
|
26
|
+
cancel-in-progress: true
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
|
|
30
|
+
docs-update:
|
|
31
|
+
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
timeout-minutes: 40
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
|
|
37
|
+
- name: Checkout code
|
|
38
|
+
uses: actions/checkout@v3
|
|
39
|
+
with:
|
|
40
|
+
ref: 'docs'
|
|
41
|
+
|
|
42
|
+
- name: Setup python 3.11
|
|
43
|
+
uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: "3.11"
|
|
46
|
+
|
|
47
|
+
# Install dependencies
|
|
48
|
+
- name: Install mkdocs
|
|
49
|
+
run: |
|
|
50
|
+
pip install mkdocs mkdocs-material mkdocstrings mkdocstrings-python mkdocs-swagger-ui-tag
|
|
51
|
+
|
|
52
|
+
- name: Build docs
|
|
53
|
+
run: |
|
|
54
|
+
mkdocs build
|
|
55
|
+
|
|
56
|
+
- name: Upload artifact
|
|
57
|
+
uses: actions/upload-pages-artifact@v3
|
|
58
|
+
with:
|
|
59
|
+
path: ./site
|
|
60
|
+
|
|
61
|
+
pages-deploy:
|
|
62
|
+
needs: docs-update
|
|
63
|
+
|
|
64
|
+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
|
65
|
+
permissions:
|
|
66
|
+
pages: write # to deploy to Pages
|
|
67
|
+
id-token: write # to verify the deployment originates from an appropriate source
|
|
68
|
+
|
|
69
|
+
# Deploy to the github-pages environment (ensure main can deploy to pages)
|
|
70
|
+
environment:
|
|
71
|
+
name: github-pages
|
|
72
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
73
|
+
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
steps:
|
|
76
|
+
- name: Deploy to GitHub Pages
|
|
77
|
+
id: deployment
|
|
78
|
+
uses: actions/deploy-pages@v4
|
|
79
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: GH Event Notification
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# issues:
|
|
5
|
+
# types: [opened]
|
|
6
|
+
# pull_request:
|
|
7
|
+
# types: [opened]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
notify:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Get PR or Issue details
|
|
16
|
+
id: details
|
|
17
|
+
run: |
|
|
18
|
+
if [ "${{ github.event_name }}" == "issues" ]; then
|
|
19
|
+
echo "::set-output name=type::issue"
|
|
20
|
+
echo "::set-output name=title::${{ github.event.issue.title }}"
|
|
21
|
+
echo "::set-output name=user::${{ github.event.issue.user.login }}"
|
|
22
|
+
echo "::set-output name=url::${{ github.event.issue.html_url }}"
|
|
23
|
+
else
|
|
24
|
+
echo "::set-output name=type::pull_request"
|
|
25
|
+
echo "::set-output name=title::${{ github.event.pull_request.title }}"
|
|
26
|
+
echo "::set-output name=user::${{ github.event.pull_request.user.login }}"
|
|
27
|
+
echo "::set-output name=url::${{ github.event.pull_request.html_url }}"
|
|
28
|
+
fi
|
|
29
|
+
echo "::set-output name=repo::${{ github.repository }}"
|
|
30
|
+
|
|
31
|
+
- name: Send notification to Slack
|
|
32
|
+
uses: slackapi/slack-github-action@v1.26.0
|
|
33
|
+
with:
|
|
34
|
+
payload: |
|
|
35
|
+
{
|
|
36
|
+
"type": "${{ steps.details.outputs.type }}",
|
|
37
|
+
"title": "${{ steps.details.outputs.title }}",
|
|
38
|
+
"user": "${{ steps.details.outputs.user }}",
|
|
39
|
+
"repo": "${{ steps.details.outputs.repo }}",
|
|
40
|
+
"url": "${{ steps.details.outputs.url }}"
|
|
41
|
+
}
|
|
42
|
+
env:
|
|
43
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_GH_NOTIF_URL }}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Smoke Test
|
|
2
|
+
|
|
3
|
+
name: Moonshot Integration Test
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
# Runs on Pull Request Review
|
|
7
|
+
pull_request_review:
|
|
8
|
+
branches:
|
|
9
|
+
- 'main'
|
|
10
|
+
|
|
11
|
+
# Run this workflow manually from Actions tab
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
inputs:
|
|
14
|
+
moonshot_branch:
|
|
15
|
+
description: 'Moonshot Branch / Tag Name'
|
|
16
|
+
required: true
|
|
17
|
+
default: 'main'
|
|
18
|
+
type: string
|
|
19
|
+
moonshot_data_branch:
|
|
20
|
+
description: 'Moonshot Data Branch / Tag Name'
|
|
21
|
+
required: true
|
|
22
|
+
default: 'main'
|
|
23
|
+
type: string
|
|
24
|
+
moonshot_ui_branch:
|
|
25
|
+
description: 'Moonshot UI Branch / Tag Name'
|
|
26
|
+
required: true
|
|
27
|
+
default: 'main'
|
|
28
|
+
type: string
|
|
29
|
+
|
|
30
|
+
# Allow one concurrent deployment
|
|
31
|
+
concurrency:
|
|
32
|
+
group: ${{ github.repository }}-${{ github.workflow }}
|
|
33
|
+
cancel-in-progress: true
|
|
34
|
+
|
|
35
|
+
jobs:
|
|
36
|
+
integration-test:
|
|
37
|
+
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
timeout-minutes: 20
|
|
40
|
+
|
|
41
|
+
steps:
|
|
42
|
+
|
|
43
|
+
- name: Checkout Moonshot (Pull Request Review)
|
|
44
|
+
if: github.event_name == 'pull_request_review'
|
|
45
|
+
uses: actions/checkout@v4
|
|
46
|
+
with:
|
|
47
|
+
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
48
|
+
ref: ${{ github.event.pull_request.head.ref }}
|
|
49
|
+
|
|
50
|
+
- name: Checkout Moonshot (Workflow Dispatch)
|
|
51
|
+
if: github.event_name == 'workflow_dispatch'
|
|
52
|
+
uses: actions/checkout@v4
|
|
53
|
+
with:
|
|
54
|
+
repository: aiverify-foundation/moonshot
|
|
55
|
+
ref: ${{ inputs.moonshot_branch }}
|
|
56
|
+
|
|
57
|
+
- name: Setup Python 3.11
|
|
58
|
+
uses: actions/setup-python@v4
|
|
59
|
+
with:
|
|
60
|
+
python-version: '3.11'
|
|
61
|
+
|
|
62
|
+
- name: Setup Moonshot
|
|
63
|
+
run: |
|
|
64
|
+
python -m venv venv
|
|
65
|
+
source venv/bin/activate
|
|
66
|
+
pip install -r requirements.txt
|
|
67
|
+
touch .env
|
|
68
|
+
echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
|
|
69
|
+
|
|
70
|
+
- name: Checkout Moonshot Data (Pull Request Review)
|
|
71
|
+
if: github.event_name == 'pull_request_review'
|
|
72
|
+
uses: actions/checkout@v4
|
|
73
|
+
with:
|
|
74
|
+
repository: aiverify-foundation/moonshot-data
|
|
75
|
+
ref: ${{ vars.MOONSHOT_DATA_BRANCH }}
|
|
76
|
+
path: moonshot-data
|
|
77
|
+
|
|
78
|
+
- name: Checkout Moonshot Data (Workflow Dispatch)
|
|
79
|
+
if: github.event_name == 'workflow_dispatch'
|
|
80
|
+
uses: actions/checkout@v4
|
|
81
|
+
with:
|
|
82
|
+
repository: aiverify-foundation/moonshot-data
|
|
83
|
+
ref: ${{ inputs.moonshot_data_branch }}
|
|
84
|
+
path: moonshot-data
|
|
85
|
+
|
|
86
|
+
- name: Setup Moonshot Data
|
|
87
|
+
run: |
|
|
88
|
+
source venv/bin/activate
|
|
89
|
+
cd moonshot-data
|
|
90
|
+
pip install -r requirements.txt
|
|
91
|
+
|
|
92
|
+
- name: Checkout Moonshot UI (Pull Request Review)
|
|
93
|
+
if: github.event_name == 'pull_request_review'
|
|
94
|
+
uses: actions/checkout@v4
|
|
95
|
+
with:
|
|
96
|
+
repository: aiverify-foundation/moonshot-ui
|
|
97
|
+
ref: ${{ vars.MOONSHOT_UI_BRANCH }}
|
|
98
|
+
path: moonshot-ui
|
|
99
|
+
|
|
100
|
+
- name: Checkout Moonshot UI (Workflow Dispatch)
|
|
101
|
+
if: github.event_name == 'workflow_dispatch'
|
|
102
|
+
uses: actions/checkout@v4
|
|
103
|
+
with:
|
|
104
|
+
repository: aiverify-foundation/moonshot-ui
|
|
105
|
+
ref: ${{ inputs.moonshot_ui_branch }}
|
|
106
|
+
path: moonshot-ui
|
|
107
|
+
|
|
108
|
+
- name: Setup Moonshot UI
|
|
109
|
+
run: |
|
|
110
|
+
cd moonshot-ui
|
|
111
|
+
npm ci
|
|
112
|
+
npm run build
|
|
113
|
+
cd ../
|
|
114
|
+
source venv/bin/activate
|
|
115
|
+
python -m moonshot web &
|
|
116
|
+
|
|
117
|
+
- name: Checkout Integration Test
|
|
118
|
+
uses: actions/checkout@v4
|
|
119
|
+
with:
|
|
120
|
+
repository: aiverify-foundation/moonshot-integration-testing
|
|
121
|
+
path: moonshot-integration-testing
|
|
122
|
+
|
|
123
|
+
- name: Run Integration Test
|
|
124
|
+
env:
|
|
125
|
+
AZURE_OPENAI_URI: ${{ secrets.AZURE_OPENAI_URI }}
|
|
126
|
+
AZURE_OPENAI_TOKEN: ${{ secrets.AZURE_OPENAI_TOKEN }}
|
|
127
|
+
ADDITIONAL_PARAMETERS: ${{ secrets.ADDITIONAL_PARAMETERS }}
|
|
128
|
+
run: |
|
|
129
|
+
cd moonshot-integration-testing/ui-integration-testing
|
|
130
|
+
npm ci
|
|
131
|
+
npx playwright install --with-deps
|
|
132
|
+
AZURE_OPENAI_URI="$AZURE_OPENAI_URI" AZURE_OPENAI_TOKEN="$AZURE_OPENAI_TOKEN" ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS" npx playwright test
|
|
133
|
+
|
|
134
|
+
- name: TestRail CLI upload results
|
|
135
|
+
env:
|
|
136
|
+
TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
|
|
137
|
+
TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
|
|
138
|
+
run: |
|
|
139
|
+
cd moonshot-integration-testing/ui-integration-testing
|
|
140
|
+
pip install trcli
|
|
141
|
+
trcli -y \
|
|
142
|
+
-h https://imdabtg.testrail.io/ \
|
|
143
|
+
--project "Moonshot" \
|
|
144
|
+
-u $TESTRAIL_USERNAME \
|
|
145
|
+
-p $TESTRAIL_PASSWORD \
|
|
146
|
+
parse_junit \
|
|
147
|
+
--title "Moonshot" \
|
|
148
|
+
--result-fields "os:Ubuntu 22.04" \
|
|
149
|
+
--milestone-id "5" \
|
|
150
|
+
--run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
|
|
151
|
+
-f "./test-results/junit-report.xml"
|
|
@@ -6,12 +6,23 @@ on:
|
|
|
6
6
|
# Run this workflow manually from Actions tab
|
|
7
7
|
workflow_dispatch:
|
|
8
8
|
inputs:
|
|
9
|
-
|
|
10
|
-
description: '
|
|
9
|
+
branch_moonshot:
|
|
10
|
+
description: 'moonshot branch or tag'
|
|
11
|
+
required: true
|
|
12
|
+
default: 'dev_main'
|
|
13
|
+
type: string
|
|
14
|
+
branch_moonshot_data:
|
|
15
|
+
description: 'moonshot-data branch or tag'
|
|
16
|
+
required: true
|
|
17
|
+
default: 'dev_main'
|
|
18
|
+
type: string
|
|
19
|
+
branch_moonshot_ui:
|
|
20
|
+
description: 'moonshot-ui branch or tag'
|
|
11
21
|
required: true
|
|
12
22
|
default: 'dev_main'
|
|
13
23
|
type: string
|
|
14
24
|
|
|
25
|
+
|
|
15
26
|
# Allow one concurrent deployment
|
|
16
27
|
concurrency:
|
|
17
28
|
group: ${{ github.repository }}-${{ github.workflow }}
|
|
@@ -22,7 +33,7 @@ jobs:
|
|
|
22
33
|
nightly-build:
|
|
23
34
|
|
|
24
35
|
runs-on: ubuntu-latest
|
|
25
|
-
timeout-minutes:
|
|
36
|
+
timeout-minutes: 60
|
|
26
37
|
permissions:
|
|
27
38
|
id-token: write
|
|
28
39
|
contents: read
|
|
@@ -67,7 +78,7 @@ jobs:
|
|
|
67
78
|
--instance-ids "${{ vars.AWS_SIT_INSTANCE_ID }}" \
|
|
68
79
|
--document-name "AWS-RunShellScript" \
|
|
69
80
|
--comment "Install moonshot" \
|
|
70
|
-
--parameters 'commands=["sudo su - ubuntu -c \". ~/scripts/install_ms_service.sh ${{ inputs.
|
|
81
|
+
--parameters 'commands=["sudo su - ubuntu -c \". ~/scripts/install_ms_service.sh ${{ inputs.branch_moonshot }} ${{ inputs.branch_moonshot_data }} ${{ inputs.branch_moonshot_ui }}\""]' \
|
|
71
82
|
--query "Command.CommandId" \
|
|
72
83
|
--output text)
|
|
73
84
|
|
|
@@ -115,12 +126,13 @@ jobs:
|
|
|
115
126
|
echo "Command status: $status"
|
|
116
127
|
|
|
117
128
|
- name: Run smoke test
|
|
129
|
+
timeout-minutes: 30
|
|
118
130
|
run: |
|
|
119
131
|
command_id=$(aws ssm send-command \
|
|
120
132
|
--instance-ids "${{ vars.AWS_SIT_INSTANCE_ID }}" \
|
|
121
133
|
--document-name "AWS-RunShellScript" \
|
|
122
134
|
--comment "Run smoke test" \
|
|
123
|
-
--parameters 'commands=["sudo su - ubuntu -c \". ~/scripts/run_smoke_test.sh\""]' \
|
|
135
|
+
--parameters 'commands=["sudo su - ubuntu -c \". ~/scripts/run_smoke_test.sh ${{ secrets.AZURE_OPENAI_TOKEN }} ${{ secrets.AZURE_OPENAI_URI }} \""]' \
|
|
124
136
|
--query "Command.CommandId" \
|
|
125
137
|
--output text)
|
|
126
138
|
|
|
@@ -141,6 +153,7 @@ jobs:
|
|
|
141
153
|
--instance-id "${{ vars.AWS_SIT_INSTANCE_ID }}" \
|
|
142
154
|
--query "StandardOutputContent" \
|
|
143
155
|
--output text)
|
|
156
|
+
echo "SMOKE_TEST_STATUS=$status" >> $GITHUB_ENV
|
|
144
157
|
echo "Smoke test output: $output"
|
|
145
158
|
echo "Command status: $status"
|
|
146
159
|
if [ "$status" == "Success" ]; then
|
|
@@ -154,9 +167,26 @@ jobs:
|
|
|
154
167
|
attempts=$((attempts + 1))
|
|
155
168
|
else
|
|
156
169
|
echo "Unexpected command status: $status"
|
|
170
|
+
echo "SMOKE_TEST_STATUS=$status" >> $GITHUB_ENV
|
|
157
171
|
exit 1
|
|
158
172
|
fi
|
|
159
173
|
done
|
|
160
174
|
|
|
161
175
|
echo "Max attempts reached, exiting."
|
|
162
|
-
|
|
176
|
+
echo "SMOKE_TEST_STATUS=timeout" >> $GITHUB_ENV
|
|
177
|
+
exit 1
|
|
178
|
+
|
|
179
|
+
# Send slack notification
|
|
180
|
+
- name: Send slack notification
|
|
181
|
+
if: ${{ ! cancelled() }}
|
|
182
|
+
uses: slackapi/slack-github-action@v1.26.0
|
|
183
|
+
with:
|
|
184
|
+
payload: |
|
|
185
|
+
{
|
|
186
|
+
"workflow": "${{ github.repository }} | ${{ github.workflow }}",
|
|
187
|
+
"status": "${{ job.status }}",
|
|
188
|
+
"details": "${{ env.SMOKE_TEST_STATUS }}",
|
|
189
|
+
"ref": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
190
|
+
}
|
|
191
|
+
env:
|
|
192
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
@@ -116,28 +116,56 @@ jobs:
|
|
|
116
116
|
if: ${{ ! cancelled() }}
|
|
117
117
|
timeout-minutes: 30
|
|
118
118
|
run: |
|
|
119
|
+
set +e
|
|
119
120
|
bash ci/run-test.sh
|
|
121
|
+
source ci/gen_pre_build_summ.sh test
|
|
122
|
+
test_status=$?
|
|
123
|
+
source ci/gen_pre_build_summ.sh coverage
|
|
124
|
+
coverage_status=$?
|
|
125
|
+
echo "UNIT_TESTS_STATUS=$UNITTEST_SUMMARY" >> $GITHUB_ENV
|
|
126
|
+
echo "CODE_COVERAGE_STATUS=$COVERAGE_SUMMARY" >> $GITHUB_ENV
|
|
127
|
+
set -e
|
|
128
|
+
if [ $test_status -ne 0 ] || [ $coverage_status -ne 0 ]; then
|
|
129
|
+
exit 1
|
|
130
|
+
fi
|
|
120
131
|
|
|
121
132
|
# Code quality analysis (flake8)
|
|
122
133
|
- name: Code quality analysis (flake8)
|
|
123
134
|
id: code_quality
|
|
124
135
|
if: ${{ ! cancelled() }}
|
|
125
136
|
run: |
|
|
137
|
+
set +e
|
|
126
138
|
bash ci/run-flake8.sh
|
|
139
|
+
source ci/gen_pre_build_summ.sh lint
|
|
140
|
+
lint_status=$?
|
|
141
|
+
echo "CODE_QUALITY_STATUS=$LINT_SUMMARY" >> $GITHUB_ENV
|
|
142
|
+
set -e
|
|
143
|
+
exit $lint_status
|
|
127
144
|
|
|
128
145
|
# pip-audit
|
|
129
146
|
- name: Dependency analysis (vulnerabilities & licenses)
|
|
130
147
|
id: dependency_analysis
|
|
131
148
|
if: ${{ ! cancelled() }}
|
|
132
149
|
run: |
|
|
150
|
+
set +e
|
|
133
151
|
bash ci/run-pip-audit.sh
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
echo "
|
|
139
|
-
echo "
|
|
140
|
-
|
|
152
|
+
source ci/gen_pre_build_summ.sh dependency
|
|
153
|
+
dep_status=$?
|
|
154
|
+
source ci/gen_pre_build_summ.sh license
|
|
155
|
+
lic_status=$?
|
|
156
|
+
echo "DEPENDENCY_STATUS=$DEPENDENCY_SUMMARY" >> $GITHUB_ENV
|
|
157
|
+
echo "LICENSE_STATUS=$LICENSE_SUMMARY" >> $GITHUB_ENV
|
|
158
|
+
set -e
|
|
159
|
+
if [ $dep_status -ne 0 ] || [ $lic_status -ne 0 ]; then
|
|
160
|
+
exit 1
|
|
161
|
+
fi
|
|
162
|
+
|
|
163
|
+
# - name: Capture step statuses
|
|
164
|
+
# if: ${{ ! cancelled() }}
|
|
165
|
+
# run: |
|
|
166
|
+
# echo "UNIT_TESTS_STATUS=${{ steps.unit_tests.outcome }}" >> $GITHUB_ENV
|
|
167
|
+
# echo "CODE_QUALITY_STATUS=${{ steps.code_quality.outcome }}" >> $GITHUB_ENV
|
|
168
|
+
# echo "DEPENDENCY_ANALYSIS_STATUS=${{ steps.dependency_analysis.outcome }}" >> $GITHUB_ENV
|
|
141
169
|
|
|
142
170
|
# Send slack notification
|
|
143
171
|
- name: Send slack notification
|
|
@@ -146,9 +174,9 @@ jobs:
|
|
|
146
174
|
with:
|
|
147
175
|
payload: |
|
|
148
176
|
{
|
|
149
|
-
"workflow": "${{ github.repository }}
|
|
177
|
+
"workflow": "${{ github.repository }} | ${{ github.workflow }} | ${{ env.PR_NUM }}",
|
|
150
178
|
"status": "${{ job.status }}",
|
|
151
|
-
"details": "
|
|
179
|
+
"details": "${{ env.UNIT_TESTS_STATUS }} | ${{ env.CODE_COVERAGE_STATUS }} | ${{ env.CODE_QUALITY_STATUS }} | ${{ env.DEPENDENCY_STATUS }} | ${{ env.LICENSE_STATUS }}",
|
|
152
180
|
"ref": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
153
181
|
}
|
|
154
182
|
env:
|
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
- name: Set up Python
|
|
22
22
|
uses: actions/setup-python@v5
|
|
23
23
|
with:
|
|
24
|
-
python-version: "3.
|
|
24
|
+
python-version: "3.11.6"
|
|
25
25
|
- name: Install pypa/build
|
|
26
26
|
run: >-
|
|
27
27
|
python3 -m
|
|
@@ -39,13 +39,12 @@ jobs:
|
|
|
39
39
|
publish-to-pypi:
|
|
40
40
|
name: >-
|
|
41
41
|
Publish Python 🐍 distribution 📦 to PyPI
|
|
42
|
-
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
|
|
43
42
|
needs:
|
|
44
43
|
- build
|
|
45
44
|
runs-on: ubuntu-latest
|
|
46
45
|
environment:
|
|
47
46
|
name: pypi
|
|
48
|
-
url: https://pypi.org/p
|
|
47
|
+
url: https://pypi.org/p/aiverify-moonshot
|
|
49
48
|
permissions:
|
|
50
49
|
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
51
50
|
|