aiverify-moonshot 0.4.10__tar.gz → 0.5.0__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.0/.github/developing-workflows.md +28 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/workflows/docs-update.yaml +4 -3
- aiverify_moonshot-0.5.0/.github/workflows/gh-event-notification.yaml +50 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/workflows/integration-test.yaml +19 -4
- aiverify_moonshot-0.5.0/.github/workflows/notices-file-gen.yaml +82 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/workflows/pre-build-checks.yaml +6 -5
- aiverify_moonshot-0.4.10/.github/workflows/nightly-build.yaml → aiverify_moonshot-0.5.0/.github/workflows/sit-build.yaml +59 -52
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/workflows/smoke-test-cli.yaml +8 -8
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/workflows/smoke-test.yaml +24 -19
- aiverify_moonshot-0.5.0/.github/workflows/uat-deploy.yaml +76 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/PKG-INFO +24 -26
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/README.md +1 -1
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/benchmark/cookbook.py +8 -11
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/benchmark/recipe.py +1 -5
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/cli_errors.py +3 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/common/connectors.py +22 -10
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/app.py +1 -1
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/endpoint_create_dto.py +1 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/endpoint_service.py +1 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_bookmark.py +16 -5
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_connector.py +3 -3
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_connector_endpoint.py +6 -3
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_context_strategy.py +2 -2
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_cookbook.py +6 -6
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_dataset.py +5 -5
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_environment_variables.py +3 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_metrics.py +1 -1
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_prompt_template.py +9 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_recipe.py +3 -3
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_red_teaming.py +4 -8
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_result.py +10 -6
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_run.py +3 -3
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_runner.py +7 -6
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/api/api_session.py +11 -7
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/bookmark/bookmark.py +12 -5
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/connectors/connector.py +127 -62
- aiverify_moonshot-0.5.0/moonshot/src/connectors/connector_prompt_arguments.py +27 -0
- aiverify_moonshot-0.5.0/moonshot/src/connectors/connector_response.py +15 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/connectors_endpoints/connector_endpoint.py +32 -20
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/connectors_endpoints/connector_endpoint_arguments.py +4 -1
- aiverify_moonshot-0.5.0/moonshot/src/messages_constants.py +123 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/redteaming/attack/attack_module.py +34 -7
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/runs/run_arguments.py +43 -20
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/pyproject.toml +34 -33
- aiverify_moonshot-0.5.0/requirements.txt +59 -0
- aiverify_moonshot-0.4.10/.github/workflows/gh-event-notification.yaml +0 -43
- aiverify_moonshot-0.4.10/moonshot/src/connectors/connector_prompt_arguments.py +0 -17
- aiverify_moonshot-0.4.10/moonshot/src/messages_constants.py +0 -41
- aiverify_moonshot-0.4.10/requirements.txt +0 -58
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.coveragerc +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.flake8 +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/pull_request_template.md +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/scripts/create_backup.sh +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/scripts/install_ms_service.sh +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/scripts/moonshot_env +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/scripts/moonshot_test_env +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/scripts/moonshot_ui_env +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/scripts/run_smoke_test.sh +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/scripts/start_ms_service.sh +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/workflows/pypi-deployment.yaml +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/workflows/sast-codeql.yaml +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/workflows/sca-scan.yaml +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.github/workflows/test-pypi-deployment.yaml +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.gitignore +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/.pre-commit-config.yaml +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/AUTHORS.md +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/LICENSE.md +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/NOTICES.md +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/utils → aiverify_moonshot-0.5.0/moonshot}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/__main__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/api.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/storage → aiverify_moonshot-0.5.0/moonshot/integrations}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/runs → aiverify_moonshot-0.5.0/moonshot/integrations/cli}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/__main__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/active_session_cfg.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/runners → aiverify_moonshot-0.5.0/moonshot/integrations/cli/benchmark}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/benchmark/benchmark.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/benchmark/datasets.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/benchmark/metrics.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/benchmark/result.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/benchmark/run.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/benchmark/runner.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/cli.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/results → aiverify_moonshot-0.5.0/moonshot/integrations/cli/common}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/common/common.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/common/dataset.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/common/display_helper.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/common/prompt_template.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/redteaming/session → aiverify_moonshot-0.5.0/moonshot/integrations/cli/initialisation}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/initialisation/initialisation.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/redteaming/context_strategy → aiverify_moonshot-0.5.0/moonshot/integrations/cli/redteam}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/redteam/attack_module.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/redteam/context_strategy.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/redteam/prompt_template.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/redteam/redteam.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/redteam/session.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/cli/utils/process_data.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/.env.dev +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/redteaming/attack → aiverify_moonshot-0.5.0/moonshot/integrations/web_api}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/__main__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/container.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations/web_api/temp → aiverify_moonshot-0.5.0/moonshot/integrations/web_api/log}/.gitkeep +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/logging_conf.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/redteaming → aiverify_moonshot-0.5.0/moonshot/integrations/web_api/routes}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/attack_modules.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/benchmark.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/benchmark_result.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/bookmark.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/context_strategy.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/cookbook.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/dataset.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/endpoint.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/metric.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/prompt_template.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/recipe.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/redteam.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/routes/runner.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/recipes → aiverify_moonshot-0.5.0/moonshot/integrations/web_api/schemas}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/benchmark_runner_dto.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/bookmark_create_dto.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/cookbook_create_dto.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/cookbook_response_model.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/dataset_create_dto.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/dataset_response_dto.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/endpoint_response_model.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/prompt_response_model.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/prompt_template_response_model.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/recipe_create_dto.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/recipe_response_model.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/session_create_dto.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/session_prompt_dto.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/schemas/session_response_model.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/prompt_templates → aiverify_moonshot-0.5.0/moonshot/integrations/web_api/services}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/attack_module_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/auto_red_team_test_manager.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/auto_red_team_test_state.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/base_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/benchmark_result_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/benchmark_test_manager.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/benchmark_test_state.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/benchmarking_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/bookmark_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/context_strategy_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/cookbook_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/dataset_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/metric_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/prompt_template_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/recipe_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/runner_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/session_service.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/utils/exceptions_handler.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/utils/file_manager.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/services/utils/results_formatter.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/status_updater/interface/benchmark_progress_callback.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/status_updater/interface/redteam_progress_callback.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/status_updater/moonshot_ui_webhook.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations/web_api/log → aiverify_moonshot-0.5.0/moonshot/integrations/web_api/temp}/.gitkeep +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/integrations/web_api/types/types.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/metrics → aiverify_moonshot-0.5.0/moonshot/src}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/datasets → aiverify_moonshot-0.5.0/moonshot/src/api}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/bookmark/bookmark_arguments.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/cookbooks → aiverify_moonshot-0.5.0/moonshot/src/configs}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/configs/env_variables.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/connectors_endpoints → aiverify_moonshot-0.5.0/moonshot/src/connectors}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/connectors → aiverify_moonshot-0.5.0/moonshot/src/connectors_endpoints}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/configs → aiverify_moonshot-0.5.0/moonshot/src/cookbooks}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/cookbooks/cookbook.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/cookbooks/cookbook_arguments.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src/api → aiverify_moonshot-0.5.0/moonshot/src/datasets}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/datasets/dataset.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/datasets/dataset_arguments.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/src → aiverify_moonshot-0.5.0/moonshot/src/metrics}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/metrics/metric.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/metrics/metric_interface.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations/web_api/services → aiverify_moonshot-0.5.0/moonshot/src/prompt_templates}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/prompt_templates/prompt_template.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations/web_api/schemas → aiverify_moonshot-0.5.0/moonshot/src/recipes}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/recipes/recipe.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/recipes/recipe_arguments.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations/web_api/routes → aiverify_moonshot-0.5.0/moonshot/src/redteaming}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations/web_api → aiverify_moonshot-0.5.0/moonshot/src/redteaming/attack}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/redteaming/attack/attack_module_arguments.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/redteaming/attack/context_strategy.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations/cli/redteam → aiverify_moonshot-0.5.0/moonshot/src/redteaming/context_strategy}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/redteaming/context_strategy/context_strategy_interface.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations/cli/initialisation → aiverify_moonshot-0.5.0/moonshot/src/redteaming/session}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/redteaming/session/chat.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/redteaming/session/red_teaming_progress.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/redteaming/session/red_teaming_type.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/redteaming/session/session.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations/cli/common → aiverify_moonshot-0.5.0/moonshot/src/results}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/results/result.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/results/result_arguments.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations/cli/benchmark → aiverify_moonshot-0.5.0/moonshot/src/runners}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/runners/runner.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/runners/runner_arguments.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/runners/runner_type.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations/cli → aiverify_moonshot-0.5.0/moonshot/src/runs}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/runs/run.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/runs/run_progress.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/runs/run_status.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot/integrations → aiverify_moonshot-0.5.0/moonshot/src/storage}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/storage/db_interface.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/storage/io_interface.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/storage/storage.py +0 -0
- {aiverify_moonshot-0.4.10/moonshot → aiverify_moonshot-0.5.0/moonshot/src/utils}/__init__.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/utils/find_feature.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/utils/import_modules.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/utils/log.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/utils/pagination.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/moonshot/src/utils/timeit.py +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/third-party/pygments-2.18.0-py3-none-any.whl +0 -0
- {aiverify_moonshot-0.4.10 → aiverify_moonshot-0.5.0}/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.10 → aiverify_moonshot-0.5.0}/.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')"
|
|
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.10 → aiverify_moonshot-0.5.0}/.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:
|
|
@@ -4,10 +4,10 @@ name: Moonshot CLI Smoke Test
|
|
|
4
4
|
|
|
5
5
|
on:
|
|
6
6
|
# Runs on Pull Request Review
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [ assigned, synchronize ]
|
|
9
|
+
branches:
|
|
10
|
+
- 'dev_main'
|
|
11
11
|
|
|
12
12
|
# Run this workflow manually from Actions tab
|
|
13
13
|
workflow_dispatch:
|
|
@@ -35,14 +35,14 @@ concurrency:
|
|
|
35
35
|
|
|
36
36
|
jobs:
|
|
37
37
|
smoke-test:
|
|
38
|
-
|
|
38
|
+
if: (github.event_name == 'pull_request' && github.event.pull_request.assignee != null) || github.event_name == 'workflow_dispatch'
|
|
39
39
|
runs-on: ubuntu-latest
|
|
40
40
|
timeout-minutes: 20
|
|
41
41
|
|
|
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
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
name: Moonshot Smoke Test
|
|
4
4
|
|
|
5
5
|
on:
|
|
6
|
-
# Runs
|
|
7
|
-
|
|
8
|
-
types: [
|
|
6
|
+
# Runs when a pull request to main is being assigned
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [ assigned, synchronize ]
|
|
9
9
|
branches:
|
|
10
|
-
|
|
10
|
+
- 'dev_main'
|
|
11
11
|
|
|
12
12
|
# Run this workflow manually from Actions tab
|
|
13
13
|
workflow_dispatch:
|
|
@@ -35,14 +35,13 @@ concurrency:
|
|
|
35
35
|
|
|
36
36
|
jobs:
|
|
37
37
|
smoke-test:
|
|
38
|
-
if: (github.event_name == '
|
|
38
|
+
if: (github.event_name == 'pull_request' && github.event.pull_request.assignee != null) || github.event_name == 'workflow_dispatch'
|
|
39
39
|
runs-on: ubuntu-latest
|
|
40
40
|
timeout-minutes: 60
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
steps:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if: github.event_name == 'pull_request_review'
|
|
43
|
+
- name: Checkout Moonshot (Pull Request)
|
|
44
|
+
if: github.event_name == 'pull_request'
|
|
46
45
|
uses: actions/checkout@v4
|
|
47
46
|
with:
|
|
48
47
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
@@ -67,9 +66,8 @@ jobs:
|
|
|
67
66
|
pip install -r requirements.txt
|
|
68
67
|
touch .env
|
|
69
68
|
echo "${{ secrets.ENVIRONMENT_VARS }}" >> .env
|
|
70
|
-
|
|
71
69
|
- name: Checkout Moonshot Data (Pull Request Review)
|
|
72
|
-
if: github.event_name == '
|
|
70
|
+
if: github.event_name == 'pull_request'
|
|
73
71
|
uses: actions/checkout@v4
|
|
74
72
|
with:
|
|
75
73
|
repository: aiverify-foundation/moonshot-data
|
|
@@ -89,9 +87,8 @@ jobs:
|
|
|
89
87
|
source venv/bin/activate
|
|
90
88
|
cd moonshot-data
|
|
91
89
|
pip install -r requirements.txt
|
|
92
|
-
|
|
93
90
|
- name: Checkout Moonshot UI (Pull Request Review)
|
|
94
|
-
if: github.event_name == '
|
|
91
|
+
if: github.event_name == 'pull_request'
|
|
95
92
|
uses: actions/checkout@v4
|
|
96
93
|
with:
|
|
97
94
|
repository: aiverify-foundation/moonshot-ui
|
|
@@ -105,16 +102,22 @@ jobs:
|
|
|
105
102
|
repository: aiverify-foundation/moonshot-ui
|
|
106
103
|
ref: ${{ inputs.moonshot_ui_branch }}
|
|
107
104
|
path: moonshot-ui
|
|
108
|
-
|
|
105
|
+
|
|
106
|
+
# Download NLTK stopwords
|
|
107
|
+
- name: Download NLTK stopwords
|
|
108
|
+
run: |
|
|
109
|
+
source venv/bin/activate
|
|
110
|
+
pip install nltk
|
|
111
|
+
python -c "import nltk; nltk.download('stopwords')"
|
|
112
|
+
|
|
109
113
|
- name: Setup Moonshot UI
|
|
110
114
|
run: |
|
|
111
115
|
cd moonshot-ui
|
|
112
|
-
npm
|
|
116
|
+
npm install
|
|
113
117
|
npm run build
|
|
114
118
|
cd ../
|
|
115
119
|
source venv/bin/activate
|
|
116
120
|
python -m moonshot web &
|
|
117
|
-
|
|
118
121
|
- name: Checkout Smoke Test
|
|
119
122
|
uses: actions/checkout@v4
|
|
120
123
|
with:
|
|
@@ -129,7 +132,9 @@ jobs:
|
|
|
129
132
|
MOONSHOT_URL: ${{ secrets.MOONSHOT_URL }}
|
|
130
133
|
MOONSHOT_PORT_NUMBER: ${{ secrets.MOONSHOT_PORT_NUMBER }}
|
|
131
134
|
run: |
|
|
135
|
+
source venv/bin/activate
|
|
132
136
|
cd moonshot-smoke-testing
|
|
133
|
-
npm
|
|
134
|
-
|
|
135
|
-
|
|
137
|
+
npm install --global yarn
|
|
138
|
+
yarn add playwright
|
|
139
|
+
yarn playwright install --with-deps
|
|
140
|
+
AZURE_OPENAI_URI="$AZURE_OPENAI_URI" AZURE_OPENAI_TOKEN="$AZURE_OPENAI_TOKEN" ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS" MOONSHOT_URL="$MOONSHOT_URL" MOONSHOT_PORT_NUMBER="$MOONSHOT_PORT_NUMBER" DEBUG=pw:api npx playwright test tests/smoke-test.spec.ts
|
|
@@ -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
|
+
|