1714 lines
499 KiB
HTML
1714 lines
499 KiB
HTML
|
||
|
||
|
||
|
||
|
||
|
||
<!DOCTYPE html>
|
||
<html
|
||
lang="en"
|
||
|
||
data-color-mode="auto" data-light-theme="light" data-dark-theme="dark"
|
||
data-a11y-animated-images="system" data-a11y-link-underlines="true"
|
||
|
||
>
|
||
|
||
|
||
|
||
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<link rel="dns-prefetch" href="https://github.githubassets.com">
|
||
<link rel="dns-prefetch" href="https://avatars.githubusercontent.com">
|
||
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
|
||
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
|
||
<link rel="preconnect" href="https://github.githubassets.com" crossorigin>
|
||
<link rel="preconnect" href="https://avatars.githubusercontent.com">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-99f877e9ddfc0e51.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light_high_contrast-48fdd0811afbab3c.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-79ad2ace604703b3.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark_high_contrast-24484a076f02295f.css" /><link data-color-theme="light" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light-99f877e9ddfc0e51.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-48fdd0811afbab3c.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-f4bf1142976e4bbf.css" /><link data-color-theme="light_colorblind_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind_high_contrast-f661b49995ba0bd8.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-0b38d22346321c92.css" /><link data-color-theme="light_tritanopia_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia_high_contrast-f1c62c9e70259b9f.css" /><link data-color-theme="dark" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark-79ad2ace604703b3.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-24484a076f02295f.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-f50cacf0a86b9929.css" /><link data-color-theme="dark_colorblind_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind_high_contrast-e61d4f4ca17852c2.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-39c10993d5603fac.css" /><link data-color-theme="dark_tritanopia_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia_high_contrast-73236c840c0c7d90.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-0de76f07cc035b10.css" /><link data-color-theme="dark_dimmed_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed_high_contrast-fd1500c8744e40d6.css" />
|
||
|
||
<style type="text/css">
|
||
:root {
|
||
--tab-size-preference: 4;
|
||
}
|
||
|
||
pre, code {
|
||
tab-size: var(--tab-size-preference);
|
||
}
|
||
</style>
|
||
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-primitives-ed9ca172356fd545.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-1d2c7f7b52a6068b.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-adcabba7b5c5d221.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-552513ad07a183a1.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/repository-11ee8a031c040c1a.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-2d56bdb0166c0238.css" />
|
||
|
||
|
||
|
||
<script type="application/json" id="client-env">{"locale":"en","featureFlags":["actions_enable_background_steps","activity_diff_file_tree","activity_repos_file_tree","activity_repos_overview_header","activity_repos_overview_sidebar","agent_author_search_expansion","agent_author_search_expansion_ui_pulls","alternate_user_config_repo","billing_billable_licenses_cost_center_bucket_fix","billing_budget_expiration","billing_copilot_license_budget_use_license_count","billing_cost_center_list_assigned_resources","billing_discount_threshold_notification","block_user_close_content","cca_show_aic_usage_per_session","ccr_files_changed_model_picker","code_quality_enablement_banner_targeting","code_quality_remove_preview","code_view_raf_sticky_lines","codespaces_prebuild_region_target_update","coding_agent_third_party_model_ui","contentful_primer_code_blocks","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_automations_pagination","copilot_chat_clear_model_selection_for_default_change","copilot_chat_compact_tables","copilot_chat_header_reorder","copilot_chat_max_upsell","copilot_chat_minimize_contextual","copilot_chat_model_picker_promotions","copilot_chat_models_browser_cache","copilot_chat_new_topic_nudge","copilot_chat_reduce_quota_checks","copilot_chat_vision_dotcom_chat_ga_gate","copilot_chat_vision_preview_gate","copilot_css_textarea_autosize","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_diff_reference_context","copilot_duplicate_thread","copilot_extensions_removal_on_marketplace","copilot_fix_failed_workflows_all_skus","copilot_ftp_hyperspace_upgrade_prompt","copilot_hide_hovercard","copilot_immersive_code_block_transition_wrap","copilot_immersive_embedded_draggable","copilot_immersive_embedded_header_button","copilot_immersive_file_block_transition_open","copilot_immersive_file_preview_keep_mounted","copilot_immersive_suggestion_pills","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_agent_merge_fix_ci","copilot_mission_control_agent_merge_resolve_conflicts","copilot_mission_control_early_stop","copilot_mission_control_environment_list_icons","copilot_mission_control_managed_sandbox_environments","copilot_mission_control_needs_attention","copilot_mission_control_reasoning_effort","copilot_mission_control_sandbox_client_side_clone","copilot_mission_control_sandbox_remote_bypass","copilot_mission_control_session_filters","copilot_mission_control_task_alive_updates","copilot_mission_control_task_sharing","copilot_org_policy_page_focus_mode","copilot_pr_chat_enhancements","copilot_prominent_upgrade_button","copilot_resource_panel","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_authorization_status_ui","copilot_swe_agent_automation_resource_scoped_writes","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_issue_comment_trigger","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_pull_request_comment_trigger","copilot_swe_agent_pull_request_merged_trigger","copilot_swe_agent_pull_request_opened_trigger","copilot_swe_agent_pull_request_synchronize_trigger","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_task_scoped_alive_channel","copilot_token_based_billing","copilot_unconfigured_is_inherited","copilot_user_can_upgrade_plan_field","copilot_workbench_sunset","copilot_workbench_sunset_redirect","copilot_workbench_ubb","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","flex_cta_groups_mvp","flex_suite_disable_river_accordion_dither","glc_code_quality_repo_settings_workflow_config","hide_github_models_ui","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","in_product_messaging_datadog_monitoring","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_fields_multi_select","issue_inline_avatars","issue_pinned_views","issue_pinned_views_optimistic_updates","issue_relative_time_micro","issues_dashboard_sso_structured_errors","issues_expanded_file_types","issues_hide_closed_sub_issues","issues_lazy_load_comment_box_suggestions","issues_react_chrome_container_query_fix","labels_archiving","labels_archiving_info","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_lazy_hydrate_agent_tasks","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","memex_remove_deprecated_type_issue","merge_queue_restricted_pushers_warning","merge_status_checks_refetch_dedupe","merge_status_header_feedback","oauth_authorize_clickjacking_protection","octocaptcha_origin_optimization","primer_react_css_anchor_positioning","primer_react_merged_forwarded_refs","property_definition_empty_state_suggestions","prs_copilot_app_open_action","prs_css_anchor_positioning","prs_new_conversation_comments_api","prs_omit_files_routes","pull_request_copilot_attribution_header","pull_request_overview_panel_edit_description","pull_request_persister","pull_request_stacks_feedback_dialog","pull_request_stacks_rebase_conflict_instructions","pull_request_virtualization_image_estimate","pull_request_virtualization_scroll_compensation","pull_request_virtualization_scroll_intent","pulls_dashboard_sidebar_layout","quick_search_lazy_suggestions","react_blob_isolate_code_lines","react_blob_ssr_content_visibility","react_data_router_tanstack_allowed","react_query_props_with_key","react_sandbox_future_tanstack","repo_app_actions_workflows","repo_app_agents","repo_app_commits","repo_app_issues","repo_app_pull_requests","repo_app_turbo","repo_issues_sidebar_layout","repo_overview_ask_copilot","repos_contributors_limited_default_range","review_involves_filter","rule_ignored_file_paths","rulesets_actor_list_editor","sample_network_conn_type","security_center_artifact_filters_popover","see_who_reacted","semantic_similarity_duplicate_issue_detection","session_logs_ungroup_reasoning_text","set_sha256_on_repo_creation_form","site_banner_desktop_copilot_app","site_ghca_pixel_mona","site_github_app_business_enterprise_signup_ctas","site_github_app_ga_page","site_github_app_ga_page_highlight","site_github_app_mobile_native_share","site_global_banner_copilot_day","site_global_banner_dev_days_attendee","site_global_banner_learn_copilot_sdk","site_global_nav_spark_models_removed","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","swp_forms_disable_octocaptcha","thread_resolution_reason","ui_service_compute_proxy_control","ui_service_referrer_metrics","update_issue_suggestions","viewscreen_sandbox","warn_inaccessible_attachments","webp_support","workbench_store_readonly"],"githubDomain":"https://github.com","copilotApiOverrideUrl":"https://api.githubcopilot.com","cmcApiUrl":"https://api.github.com/cmc_internal/api"}</script>
|
||
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/high-contrast-cookie-e3d808ee18eb9784.js"></script>
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/wp-runtime-f176a19df481ff1f.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/app-foundation-13e668e8647c754c.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/app-runtime-79f2476139a75354.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/fetch-utilities-5305162aa9984914.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ser-cd1b421ad0ad7ed5.js" />
|
||
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/environment-04f6e0170488e4e8.js" defer="defer"></script>
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/app-runtime.7a9535dabdf3b702.module.css" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/catalyst-044fa3a2acdaf0a9.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/selector-observer-e88088f989b27670.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/relative-time-element-85cb37305f54dec4.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/by-6b3c07383371bf58.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ja9-36f036c13c2e3a4c.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/kw-866fd9513ae95106.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/r1-b075aab3204f32f9.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/jz5-7c5d1669717041f8.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/hj-5126390ff433704d.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/j05-dce4d588268f0f7e.js" />
|
||
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/github-elements-bc32978e9af6a818.js" defer="defer"></script>
|
||
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/element-registry-c9988048f4d520db.js" defer="defer"></script>
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/runtime-helpers-f3f5d71440009c48.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/aria-live-76b18916d0c8ec4d.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/hotkey-5109c77d7ac61078.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/react-core-7fa41ffc30596003.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/react-lib-33858e668cc159ef.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/04-2e0b5b7403cb7b99.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ur-024971cb63acad59.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/4t-9933bcccf9a9524f.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/6n-71c0ae3e489775ef.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/yhq-3a209035a30b1a09.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/z1-43f07743b557bfbe.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/wo-09f85d22a6c8931b.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/9y-75e8f8c6f5eccd49.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/j0-e9bfed51669329e8.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/0p-c8fed99e921442ca.js" />
|
||
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/behaviors-28be759561a76633.js" defer="defer"></script>
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/react-core.a447335ec9ae046d.module.css" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/n9-97e2e5539969aaaf.js" />
|
||
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/codespaces-45bef2b6aa4a0fc6.js" defer="defer"></script>
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ic-991f04433f366e7b.js" />
|
||
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/repositories-ccf203b12b83353d.js" defer="defer"></script>
|
||
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/code-menu-bc6f54087811ea2f.js" defer="defer"></script>
|
||
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/primer-react-fad6c97f07e0280a.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/aq-0dbf7d12b4d37e14.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/j6-1e8b001d24ed9cac.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/t7l-0a8b07066f584f39.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/fe-7576d9b281e2106a.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/wsr-5fd3071e5a9061ab.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ps6-85a59b16b0ceea7e.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/xv-51cb34754bda73a9.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/n4u-6317ce1c31aed1db.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/j8s-d05eedc69cebc200.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/la-de176c4ee471f2b3.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/u1-c2354415da044847.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/os-1dee58ca1675cc41.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/50-a6c15ac2de24205d.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/0o-6dedd6c7dfa5a7b9.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/nsi-89f8558c22a1e954.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/3np-b8ac617a3f77670d.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/on-75d8015f7c16be87.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/bi0-fa59350332fdd7ab.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/b1-e65db5e6cf097025.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/0l5-16b0cf9b35fe7f75.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/c2-fb6736e73d800b4e.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/f9-6f78c2d90591da73.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/0k-f05429fb3eb4e9a3.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/sp-2bfa60fc59b501fb.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/og-78525ede7a2add85.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/q5-23ee69a34fd8c463.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/qod-dbecf5f56ddaa69a.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/du-f925771a20e38027.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ql0-324fc36dae3b9a42.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/20x-dad6ee9ff6177544.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/dsj-342cb45d382b6fdb.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/6f-ddbc6e6b37135f96.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/e84-85a4f8740b573283.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/0pz-7d0eea7df68b2d64.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/7mh-b8dbc13ace044f4c.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/bsb-4f4ac8c20da73fac.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/46-2db674c6bc8272ab.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/q1-590dbf4434fdc3ad.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/me-6d77019ac8eb6290.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/0d-623095bb226c1f11.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/xc-7fd1e6996fa23469.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/7c-42dc52617c4fd396.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/4b-cfa20397aa7c0823.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/dynamic-github-ui--code-view--route-components-50d91ad640564ff8.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/gt-b75626ea0831d606.js" />
|
||
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/code-view-b106d3781f6c832b.js" defer="defer"></script>
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react-css.3ff9ad885fbbd7b1.module.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/ql0.16c145071702f131.module.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/46.73d41df1aa9a8bca.module.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/xc.678a3a89a0b97d69.module.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/4b.b27df37732ef81c7.module.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dynamic-github-ui--code-view--route-components.c7b328225801cde0.module.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-view.292547eba0d657d3.module.css" />
|
||
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/18-30bd8f55db757032.js" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/31k-1c94735cfe3b279c.js" />
|
||
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/notifications-subscriptions-menu-6ad3cbf09782cc71.js" defer="defer"></script>
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react-css.3ff9ad885fbbd7b1.module.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/notifications-subscriptions-menu.ac49a7696ff96455.module.css" />
|
||
|
||
|
||
<title>GitHub - github/scientist: :microscope: A Ruby library for carefully refactoring critical paths. · GitHub</title>
|
||
|
||
|
||
|
||
<meta name="route-pattern" content="/:user_id/:repository" data-turbo-transient>
|
||
<meta name="route-controller" content="files" data-turbo-transient>
|
||
<meta name="route-action" content="disambiguate" data-turbo-transient>
|
||
<meta name="fetch-nonce" content="v2:fe066acf-c1cc-6a96-b03e-e2f12f503e35">
|
||
|
||
|
||
<meta name="current-catalog-service-hash" content="f3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb">
|
||
|
||
|
||
<meta name="request-id" content="E8C0:19D73F:F99F3:1994FD:6AA36ED5" data-pjax-transient="true"/><meta name="html-safe-nonce" content="f0c5d988f5a6d2d66d45526ef10886a60982d97cad24e2e2fc1d66d8efe99e8b" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEMwOjE5RDczRjpGOTlGMzoxOTk0RkQ6NkFBMzZFRDUiLCJ2aXNpdG9yX2lkIjoiNDIyMTExNDUxNDc5NTYyMjEwMSIsInJlZ2lvbl9lZGdlIjoid2VzdHVzMyIsInJlZ2lvbl9yZW5kZXIiOiJ3ZXN0dXMzIn0=" data-pjax-transient="true"/><meta name="visitor-hmac" content="d0c53253a668c7971702456b595d56c65ef05cb8a9737d0349d672f2f3853d35" data-pjax-transient="true"/>
|
||
|
||
|
||
<meta name="hovercard-subject-tag" content="repository:16549503" data-turbo-transient>
|
||
|
||
|
||
<meta name="github-keyboard-shortcuts" content="repository,copilot" data-turbo-transient="true" />
|
||
|
||
|
||
<meta name="selected-link" value="repo_source" data-turbo-transient>
|
||
<link rel="assets" href="https://github.githubassets.com/">
|
||
|
||
<meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I">
|
||
|
||
<meta name="octolytics-url" content="https://collector.github.com/github/collect" />
|
||
|
||
|
||
|
||
|
||
|
||
<meta name="analytics-location" content="/<user-name>/<repo-name>" data-turbo-transient="true" />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<meta name="user-login" content="">
|
||
|
||
|
||
|
||
<meta name="viewport" content="width=device-width">
|
||
|
||
|
||
|
||
<meta name="description" content=":microscope: A Ruby library for carefully refactoring critical paths. - github/scientist">
|
||
|
||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
|
||
|
||
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
|
||
<meta property="fb:app_id" content="1401488693436528">
|
||
<meta name="apple-itunes-app" content="app-id=1477376905, app-argument=https://github.com/github/scientist" />
|
||
|
||
<meta name="twitter:image" content="https://opengraph.githubassets.com/ab65cc5bd073a5d3f4bdbf61c70993e7aa5be04ff5765ac2cbc5b046b8692c39/github/scientist" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="GitHub - github/scientist: :microscope: A Ruby library for carefully refactoring critical paths." /><meta name="twitter:description" content=":microscope: A Ruby library for carefully refactoring critical paths. - github/scientist" />
|
||
<meta property="og:image" content="https://opengraph.githubassets.com/ab65cc5bd073a5d3f4bdbf61c70993e7aa5be04ff5765ac2cbc5b046b8692c39/github/scientist" /><meta property="og:image:alt" content=":microscope: A Ruby library for carefully refactoring critical paths. - github/scientist" /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="GitHub - github/scientist: :microscope: A Ruby library for carefully refactoring critical paths." /><meta property="og:url" content="https://github.com/github/scientist" /><meta property="og:description" content=":microscope: A Ruby library for carefully refactoring critical paths. - github/scientist" />
|
||
|
||
|
||
|
||
|
||
|
||
<meta name="hostname" content="github.com">
|
||
|
||
|
||
|
||
<meta name="expected-hostname" content="github.com">
|
||
|
||
|
||
<meta http-equiv="x-pjax-version" content="d1d04ca6665942cf286c040b445fa3bb2efa681595d1b20c896a813eab8249c0" data-turbo-track="reload">
|
||
<meta http-equiv="x-pjax-csp-version" content="2af6a6627810d190be616096b617c8f37a1419b9435f76190f0e0d7638222ac1" data-turbo-track="reload">
|
||
<meta http-equiv="x-pjax-css-version" content="b7a4653359baeee3d827ca91d7c149e4962234557341efae58fad4aa5ce82a0a" data-turbo-track="reload">
|
||
<meta http-equiv="x-pjax-js-version" content="2d107c02f094199e148d05393ad004e0659898f4132ff3fd74a5c395c6857435" data-turbo-track="reload">
|
||
|
||
<meta name="turbo-cache-control" content="no-preview" data-turbo-transient="">
|
||
|
||
<meta name="turbo-cache-control" content="no-cache" data-turbo-transient>
|
||
|
||
<meta data-hydrostats="publish">
|
||
|
||
<meta name="go-import" content="github.com/github/scientist git https://github.com/github/scientist.git">
|
||
|
||
<meta name="octolytics-dimension-user_id" content="9919" /><meta name="octolytics-dimension-user_login" content="github" /><meta name="octolytics-dimension-repository_id" content="16549503" /><meta name="octolytics-dimension-repository_nwo" content="github/scientist" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="16549503" /><meta name="octolytics-dimension-repository_network_root_nwo" content="github/scientist" />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<meta name="turbo-body-classes" content="logged-out env-production page-responsive">
|
||
<meta name="disable-turbo" content="false">
|
||
|
||
|
||
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
|
||
|
||
|
||
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
|
||
|
||
<meta name="release" content="a0ac789986b5b2f33d10a9645118fd3651917b88" data-turbo-track="reload">
|
||
<meta name="ui-target" content="canary-1">
|
||
|
||
<link rel="mask-icon" href="https://github.githubassets.com/assets/pinned-octocat-093da3e6fa40.svg" color="#000000">
|
||
<link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png">
|
||
<link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg" data-base-href="https://github.githubassets.com/favicons/favicon">
|
||
|
||
<meta name="theme-color" content="#1e2327">
|
||
<meta name="color-scheme" content="light dark" />
|
||
|
||
|
||
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
|
||
|
||
</head>
|
||
|
||
<body class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
|
||
<div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
|
||
<div id="__primerPortalRoot__" style="z-index: 1000; position: absolute; width: 100%;" data-turbo-permanent></div>
|
||
|
||
|
||
<div class="position-relative header-wrapper js-header-wrapper ">
|
||
<a href="#start-of-content" data-skip-target-assigned="false" class="px-2 tmp-py-4 color-bg-accent-emphasis color-fg-on-emphasis show-on-focus js-skip-to-content">Skip to content</a>
|
||
|
||
<span data-view-component="true" class="progress-pjax-loader Progress position-fixed width-full">
|
||
<span style="width: 0%;" data-view-component="true" class="Progress-item progress-pjax-loader-bar left-0 top-0 color-bg-accent-emphasis"></span>
|
||
</span>
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/obo5-8a5f0070d148d90b.js" fetchpriority="low" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/keyboard-shortcuts-dialog-c36ec12975d77de7.js" fetchpriority="low" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react-css.3ff9ad885fbbd7b1.module.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/keyboard-shortcuts-dialog.8302d893d5bf61ba.module.css" />
|
||
|
||
<react-partial
|
||
partial-name="keyboard-shortcuts-dialog"
|
||
data-ssr="false"
|
||
data-attempted-ssr="false"
|
||
data-react-profiling="false"
|
||
>
|
||
|
||
<script type="application/json" data-target="react-partial.embeddedData">{"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}</script>
|
||
<div data-target="react-partial.reactRoot"></div>
|
||
</react-partial>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/nvz-d8ae5b1b70e399a7.js" fetchpriority="low" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/mz-504eb598d2e57128.js" fetchpriority="low" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/fz-30a6af7c53dfa4f1.js" fetchpriority="low" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/lht-d07b466cb387fec6.js" fetchpriority="low" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/1lf-a0b5bbf5742c0fd3.js" fetchpriority="low" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/3d-82c347d20a13fb90.js" fetchpriority="low" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/tua-07c0f2fd28675950.js" fetchpriority="low" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/lazy-react-partial-marketing-header-866751d51954477d.js" fetchpriority="low" />
|
||
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/marketing-header-03f048a3b4907614.js" fetchpriority="low" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react-css.3ff9ad885fbbd7b1.module.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react-brand-css.206bbd4fd232654e.module.css" />
|
||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/lazy-react-partial-marketing-header.784f79e59a54ffa6.module.css" />
|
||
|
||
<react-partial
|
||
partial-name="marketing-header"
|
||
data-ssr="true"
|
||
data-attempted-ssr="true"
|
||
data-react-profiling="false"
|
||
>
|
||
|
||
<script type="application/json" data-target="react-partial.embeddedData">{"props":{"color_mode":"dark","logged_in":false,"marketing_page":false,"home_path":"/","login_path":"/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fscientist","signup_path":"/signup?ref_cta=Sign+up\u0026ref_loc=header+logged+out\u0026ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E\u0026source=header-repo\u0026source_repo=github%2Fscientist","signup_enabled":true,"is_signup_controller":false,"show_search_and_nav":true,"hide_search":false,"private_mode_enabled":false,"should_use_dotcom_links":true,"auth_hydro_click":"{\"event_type\":\"authentication.click\",\"payload\":{\"location_in_page\":\"site header menu\",\"repository_id\":null,\"auth_type\":\"SIGN_UP\",\"originating_url\":\"https://github.com/github/scientist\",\"user_id\":null}}","auth_hydro_click_hmac":"22a64b1a4595711c122d47785469b37e803ca1ce0595e8c20f826e7b302d2f18","overlay":false,"fixed":false}}</script>
|
||
<div data-target="react-partial.reactRoot"><div data-color-mode="dark" data-light-theme="light" data-dark-theme="dark"><header class="MarketingHeader-module__root__Tk7n3 HeaderMktg header-logged-out" role="banner" data-marketing-header="true" data-color-mode="dark" data-light-theme="light" data-dark-theme="dark" data-is-top="true"><h2 class="MarketingHeader-module__visuallyHidden__sqKsl">Navigation Menu</h2><button type="button" class="MarketingHeader-module__backdrop__sw4RU" aria-label="Close navigation menu"></button><div class="MarketingHeader-module__bar__mBSyE"><div class="MarketingHeader-module__topRow__yeury"><div class="MarketingHeader-module__toggleSlot__hDxbh"><button type="button" class="HeaderMenuToggle-module__toggle__i8EiC" aria-label="Toggle navigation" aria-expanded="false"><span class="HeaderMenuToggle-module__toggleBar__jVN0H"></span><span class="HeaderMenuToggle-module__toggleBar__jVN0H"></span><span class="HeaderMenuToggle-module__toggleBar__jVN0H"></span></button></div><a href="/" aria-label="Homepage" class="HeaderLogo-module__logo__UFyHI" data-analytics-event="{"action":"homepage","tag":"link","context":"logo","location":"header","label":"homepage_link_logo_header"}"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-mark-github" viewBox="0 0 24 24" width="32" height="32" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M10.226 17.284c-2.965-.36-5.054-2.493-5.054-5.256 0-1.123.404-2.336 1.078-3.144-.292-.741-.247-2.314.09-2.965.898-.112 2.111.36 2.83 1.01.853-.269 1.752-.404 2.853-.404 1.1 0 1.999.135 2.807.382.696-.629 1.932-1.1 2.83-.988.315.606.36 2.179.067 2.942.72.854 1.101 2 1.101 3.167 0 2.763-2.089 4.852-5.098 5.234.763.494 1.28 1.572 1.28 2.807v2.336c0 .674.561 1.056 1.235.786 4.066-1.55 7.255-5.615 7.255-10.646C23.5 6.188 18.334 1 11.978 1 5.62 1 .5 6.188.5 12.545c0 4.986 3.167 9.12 7.435 10.669.606.225 1.19-.18 1.19-.786V20.63a2.9 2.9 0 0 1-1.078.224c-1.483 0-2.359-.808-2.987-2.313-.247-.607-.517-.966-1.034-1.033-.27-.023-.359-.135-.359-.27 0-.27.45-.471.898-.471.652 0 1.213.404 1.797 1.235.45.651.921.943 1.483.943.561 0 .92-.202 1.437-.719.382-.381.674-.718.944-.943"></path></svg></a><div class="AuthCTAs-module__mobileActions__NNzeV"><a class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--subtle___F7pEE Primer_Brand__Button-module__Button--size-small___zQrEw AuthCTAs-module__cta__WpwQq" href="/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fscientist" data-analytics-event="{"action":"sign_in","tag":"link","context":"auth_cta","location":"header","label":"sign_in_link_auth_cta_header"}" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header menu","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/github/scientist","user_id":null}}" data-hydro-click-hmac="22a64b1a4595711c122d47785469b37e803ca1ce0595e8c20f826e7b302d2f18"><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-subtle___8ndWH">Sign in</span></span></a><button class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--subtle___F7pEE Primer_Brand__Button-module__Button--size-small___zQrEw HeaderAppearanceSettings-module__trigger__hUheK" type="button" aria-haspopup="dialog" aria-labelledby="_R_3dd_"><span class="Primer_Brand__Button-module__Button__leading-visual___jjtTe" data-testid="Button-leading-visual"><svg data-component="Octicon" focusable="false" aria-hidden="true" class="octicon octicon-sliders Primer_Brand__Button-module__Button__icon-visual____qybb" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M15 2.75a.75.75 0 0 1-.75.75h-4a.75.75 0 0 1 0-1.5h4a.75.75 0 0 1 .75.75Zm-8.5.75v1.25a.75.75 0 0 0 1.5 0v-4a.75.75 0 0 0-1.5 0V2H1.75a.75.75 0 0 0 0 1.5H6.5Zm1.25 5.25a.75.75 0 0 0 0-1.5h-6a.75.75 0 0 0 0 1.5h6ZM15 8a.75.75 0 0 1-.75.75H11.5V10a.75.75 0 1 1-1.5 0V6a.75.75 0 0 1 1.5 0v1.25h2.75A.75.75 0 0 1 15 8Zm-9 5.25v-2a.75.75 0 0 0-1.5 0v1.25H1.75a.75.75 0 0 0 0 1.5H4.5v1.25a.75.75 0 0 0 1.5 0v-2Zm9 0a.75.75 0 0 1-.75.75h-6a.75.75 0 0 1 0-1.5h6a.75.75 0 0 1 .75.75Z"></path></svg></span><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-subtle___8ndWH"></span></span></button><div class="Primer_Brand__Tooltip-module__Tooltip___0Eipx" data-direction="s" aria-hidden="true" id="_R_3dd_">Appearance settings</div></div></div><div class="MarketingHeader-module__menu__GIy3y"><div class="MarketingHeader-module__menuWrapper__owstH"><nav class="MarketingNavigation-module__nav__W0KYY" aria-label="Global"><ul class="MarketingNavigation-module__list__tFbMb"><li><div class="NavDropdown-module__container__l2YeI"><button type="button" class="NavDropdown-module__button__PEHWX" aria-expanded="false" aria-controls="_R_nd_">Platform<svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-right NavDropdown-module__buttonIcon__Tkl8_" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m6.427 4.427 3.396 3.396a.25.25 0 0 1 0 .354l-3.396 3.396A.25.25 0 0 1 6 11.396V4.604a.25.25 0 0 1 .427-.177Z"></path></svg></button><div id="_R_nd_" class="NavDropdown-module__dropdown__xm1jd"><ul class="NavDropdown-module__list__zuCgG"><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_5knd_">AI CODE CREATION</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_5knd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/copilot" data-analytics-event="{"action":"github_copilot","tag":"link","context":"platform","location":"navbar","label":"github_copilot_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-copilot NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z"></path><path d="M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z"></path></svg>GitHub Copilot</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Write better code with AI</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/ai/github-app" data-analytics-event="{"action":"github_copilot_app","tag":"link","context":"platform","location":"navbar","label":"github_copilot_app_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-mark-github NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M6.766 11.328c-2.063-.25-3.516-1.734-3.516-3.656 0-.781.281-1.625.75-2.188-.203-.515-.172-1.609.063-2.062.625-.078 1.468.25 1.968.703.594-.187 1.219-.281 1.985-.281.765 0 1.39.094 1.953.265.484-.437 1.344-.765 1.969-.687.218.422.25 1.515.046 2.047.5.593.766 1.39.766 2.203 0 1.922-1.453 3.375-3.547 3.64.531.344.89 1.094.89 1.954v1.625c0 .468.391.734.86.547C13.781 14.359 16 11.53 16 8.03 16 3.61 12.406 0 7.984 0 3.563 0 0 3.61 0 8.031a7.88 7.88 0 0 0 5.172 7.422c.422.156.828-.125.828-.547v-1.25c-.219.094-.5.156-.75.156-1.031 0-1.64-.562-2.078-1.609-.172-.422-.36-.672-.719-.719-.187-.015-.25-.093-.25-.187 0-.188.313-.328.625-.328.453 0 .844.281 1.25.86.313.452.64.655 1.031.655s.641-.14 1-.5c.266-.265.47-.5.657-.656"></path></svg>GitHub Copilot app</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Direct agents from issue to merge</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/mcp" data-analytics-event="{"action":"mcp_registry","tag":"link","context":"platform","location":"navbar","label":"mcp_registry_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-mcp NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M5.52 1.12a3.578 3.578 0 0 1 6.078 2.98 3.578 3.578 0 0 1 2.982 6.08l-3.292 3.293a.252.252 0 0 0 0 .354l.843.843a.749.749 0 1 1-1.06 1.06l-.844-.843a1.75 1.75 0 0 1 0-2.474L13.52 9.12a2.08 2.08 0 0 0 0-2.94 2.08 2.08 0 0 0-2.94 0L7.731 9.03A.75.75 0 0 1 6.67 7.97l2.85-2.85a2.08 2.08 0 0 0 0-2.94 2.08 2.08 0 0 0-2.94 0l-4.799 4.8A.75.75 0 0 1 .72 5.92Z"></path><path d="M7.52 3.12a.749.749 0 1 1 1.06 1.06L5.731 7.03A2.079 2.079 0 0 0 8.67 9.97l2.85-2.85a.749.749 0 1 1 1.06 1.06l-2.849 2.85A3.578 3.578 0 0 1 4.67 5.97Z"></path></svg>MCP Registry</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Integrate external tools</span></span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_9knd_">DEVELOPER WORKFLOWS</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_9knd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/actions" data-analytics-event="{"action":"actions","tag":"link","context":"platform","location":"navbar","label":"actions_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-workflow NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 1.75C0 .784.784 0 1.75 0h3.5C6.216 0 7 .784 7 1.75v3.5A1.75 1.75 0 0 1 5.25 7H4v4a1 1 0 0 0 1 1h4v-1.25C9 9.784 9.784 9 10.75 9h3.5c.966 0 1.75.784 1.75 1.75v3.5A1.75 1.75 0 0 1 14.25 16h-3.5A1.75 1.75 0 0 1 9 14.25v-.75H5A2.5 2.5 0 0 1 2.5 11V7h-.75A1.75 1.75 0 0 1 0 5.25Zm1.75-.25a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Zm9 9a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Z"></path></svg>Actions</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Automate any workflow</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/codespaces" data-analytics-event="{"action":"codespaces","tag":"link","context":"platform","location":"navbar","label":"codespaces_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-codespaces NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 11.25c0-.966.784-1.75 1.75-1.75h12.5c.966 0 1.75.784 1.75 1.75v3A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm2-9.5C2 .784 2.784 0 3.75 0h8.5C13.216 0 14 .784 14 1.75v5a1.75 1.75 0 0 1-1.75 1.75h-8.5A1.75 1.75 0 0 1 2 6.75Zm1.75-.25a.25.25 0 0 0-.25.25v5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5a.25.25 0 0 0-.25-.25Zm-2 9.5a.25.25 0 0 0-.25.25v3c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-3a.25.25 0 0 0-.25-.25Z"></path><path d="M7 12.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path></svg>Codespaces</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Instant dev environments</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/issues" data-analytics-event="{"action":"issues","tag":"link","context":"platform","location":"navbar","label":"issues_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-issue-opened NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg>Issues</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Plan and track work</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/code-review" data-analytics-event="{"action":"code_review","tag":"link","context":"platform","location":"navbar","label":"code_review_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-code NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg>Code Review</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Manage code changes</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/code-quality" data-analytics-event="{"action":"code_quality","tag":"link","context":"platform","location":"navbar","label":"code_quality_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-codescan-checkmark NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M10.28 6.28a.75.75 0 1 0-1.06-1.06L6.25 8.19l-.97-.97a.75.75 0 0 0-1.06 1.06l1.5 1.5a.75.75 0 0 0 1.06 0l3.5-3.5Z"></path><path d="M7.5 15a7.5 7.5 0 1 1 5.807-2.754l2.473 2.474a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-2.474-2.473A7.472 7.472 0 0 1 7.5 15Zm0-13.5a6 6 0 1 0 4.094 10.386.748.748 0 0 1 .293-.292 6.002 6.002 0 0 0 1.117-6.486A6.002 6.002 0 0 0 7.5 1.5Z"></path></svg>Code Quality</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Enforce quality at merge</span></span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_dknd_">APPLICATION SECURITY</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_dknd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/security/advanced-security" data-analytics-event="{"action":"github_advanced_security","tag":"link","context":"platform","location":"navbar","label":"github_advanced_security_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-shield-check NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m8.533.133 5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667l5.25-1.68a1.748 1.748 0 0 1 1.066 0Zm-.61 1.429.001.001-5.25 1.68a.251.251 0 0 0-.174.237V7c0 1.36.275 2.666 1.057 3.859.784 1.194 2.121 2.342 4.366 3.298a.196.196 0 0 0 .154 0c2.245-.957 3.582-2.103 4.366-3.297C13.225 9.666 13.5 8.358 13.5 7V3.48a.25.25 0 0 0-.174-.238l-5.25-1.68a.25.25 0 0 0-.153 0ZM11.28 6.28l-3.5 3.5a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.97-2.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg>GitHub Advanced Security</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Find and fix vulnerabilities</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/security/advanced-security/code-security" data-analytics-event="{"action":"code_security","tag":"link","context":"platform","location":"navbar","label":"code_security_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-code-square NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25Zm7.47 3.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L10.69 8 9.22 6.53a.75.75 0 0 1 0-1.06ZM6.78 6.53 5.31 8l1.47 1.47a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg>Code security</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Secure your code as you build</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/security/advanced-security/secret-protection" data-analytics-event="{"action":"secret_protection","tag":"link","context":"platform","location":"navbar","label":"secret_protection_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-lock NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M4 4a4 4 0 0 1 8 0v2h.25c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 12.25 15h-8.5A1.75 1.75 0 0 1 2 13.25v-5.5C2 6.784 2.784 6 3.75 6H4Zm8.25 3.5h-8.5a.25.25 0 0 0-.25.25v5.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25ZM10.5 6V4a2.5 2.5 0 1 0-5 0v2Z"></path></svg>Secret protection</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Stop leaks before they start</span></span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ NavGroup-module__hasSeparator__FnMrN"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_hknd_">EXPLORE</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_hknd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/why-github" data-analytics-event="{"action":"why_github","tag":"link","context":"platform","location":"navbar","label":"why_github_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Why GitHub</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://docs.github.com" data-analytics-event="{"action":"documentation","tag":"link","context":"platform","location":"navbar","label":"documentation_link_platform_navbar"}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Documentation</span><svg focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://github.blog" data-analytics-event="{"action":"blog","tag":"link","context":"platform","location":"navbar","label":"blog_link_platform_navbar"}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Blog</span><svg focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://github.blog/changelog" data-analytics-event="{"action":"changelog","tag":"link","context":"platform","location":"navbar","label":"changelog_link_platform_navbar"}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Changelog</span><svg focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/marketplace" data-analytics-event="{"action":"marketplace","tag":"link","context":"platform","location":"navbar","label":"marketplace_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Marketplace</span></a></li></ul></div></li></ul><div class="NavDropdown-module__trailingLinkContainer__VgJGL"><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/features" data-analytics-event="{"action":"view_all_features","tag":"link","context":"platform","location":"navbar","label":"view_all_features_link_platform_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all features</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></div></div></div></li><li><div class="NavDropdown-module__container__l2YeI"><button type="button" class="NavDropdown-module__button__PEHWX" aria-expanded="false" aria-controls="_R_17d_">Solutions<svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-right NavDropdown-module__buttonIcon__Tkl8_" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m6.427 4.427 3.396 3.396a.25.25 0 0 1 0 .354l-3.396 3.396A.25.25 0 0 1 6 11.396V4.604a.25.25 0 0 1 .427-.177Z"></path></svg></button><div id="_R_17d_" class="NavDropdown-module__dropdown__xm1jd"><ul class="NavDropdown-module__list__zuCgG"><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_5l7d_">BY COMPANY SIZE</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_5l7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/enterprise" data-analytics-event="{"action":"enterprises","tag":"link","context":"solutions","location":"navbar","label":"enterprises_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Enterprises</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/team" data-analytics-event="{"action":"small_and_medium_teams","tag":"link","context":"solutions","location":"navbar","label":"small_and_medium_teams_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Small and medium teams</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/enterprise/startups" data-analytics-event="{"action":"startups","tag":"link","context":"solutions","location":"navbar","label":"startups_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Startups</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/industry/nonprofits" data-analytics-event="{"action":"nonprofits","tag":"link","context":"solutions","location":"navbar","label":"nonprofits_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Nonprofits</span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_9l7d_">BY USE CASE</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_9l7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/use-case/app-modernization" data-analytics-event="{"action":"app_modernization","tag":"link","context":"solutions","location":"navbar","label":"app_modernization_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">App Modernization</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/use-case/devsecops" data-analytics-event="{"action":"devsecops","tag":"link","context":"solutions","location":"navbar","label":"devsecops_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">DevSecOps</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/use-case/devops" data-analytics-event="{"action":"devops","tag":"link","context":"solutions","location":"navbar","label":"devops_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">DevOps</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/use-case/ci-cd" data-analytics-event="{"action":"ci/cd","tag":"link","context":"solutions","location":"navbar","label":"ci/cd_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">CI/CD</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/solutions/use-case" data-analytics-event="{"action":"view_all_use_cases","tag":"link","context":"solutions","location":"navbar","label":"view_all_use_cases_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all use cases</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_dl7d_">BY INDUSTRY</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_dl7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/industry/healthcare" data-analytics-event="{"action":"healthcare","tag":"link","context":"solutions","location":"navbar","label":"healthcare_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Healthcare</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/industry/financial-services" data-analytics-event="{"action":"financial_services","tag":"link","context":"solutions","location":"navbar","label":"financial_services_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Financial services</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/industry/manufacturing" data-analytics-event="{"action":"manufacturing","tag":"link","context":"solutions","location":"navbar","label":"manufacturing_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Manufacturing</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/industry/government" data-analytics-event="{"action":"government","tag":"link","context":"solutions","location":"navbar","label":"government_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Government</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/solutions/industry" data-analytics-event="{"action":"view_all_industries","tag":"link","context":"solutions","location":"navbar","label":"view_all_industries_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all industries</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></li></ul></div></li></ul><div class="NavDropdown-module__trailingLinkContainer__VgJGL"><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/solutions" data-analytics-event="{"action":"view_all_solutions","tag":"link","context":"solutions","location":"navbar","label":"view_all_solutions_link_solutions_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all solutions</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></div></div></div></li><li><div class="NavDropdown-module__container__l2YeI"><button type="button" class="NavDropdown-module__button__PEHWX" aria-expanded="false" aria-controls="_R_1nd_">Resources<svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-right NavDropdown-module__buttonIcon__Tkl8_" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m6.427 4.427 3.396 3.396a.25.25 0 0 1 0 .354l-3.396 3.396A.25.25 0 0 1 6 11.396V4.604a.25.25 0 0 1 .427-.177Z"></path></svg></button><div id="_R_1nd_" class="NavDropdown-module__dropdown__xm1jd"><ul class="NavDropdown-module__list__zuCgG"><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_5lnd_">EXPLORE BY TOPIC</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_5lnd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/articles?topic=ai" data-analytics-event="{"action":"ai","tag":"link","context":"resources","location":"navbar","label":"ai_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">AI</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/articles?topic=software-development" data-analytics-event="{"action":"software_development","tag":"link","context":"resources","location":"navbar","label":"software_development_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Software Development</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/articles?topic=devops" data-analytics-event="{"action":"devops","tag":"link","context":"resources","location":"navbar","label":"devops_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">DevOps</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/articles?topic=security" data-analytics-event="{"action":"security","tag":"link","context":"resources","location":"navbar","label":"security_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Security</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/resources/articles" data-analytics-event="{"action":"view_all_topics","tag":"link","context":"resources","location":"navbar","label":"view_all_topics_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all topics</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_9lnd_">EXPLORE BY TYPE</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_9lnd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/customer-stories" data-analytics-event="{"action":"customer_stories","tag":"link","context":"resources","location":"navbar","label":"customer_stories_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Customer stories</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/events" data-analytics-event="{"action":"events__webinars","tag":"link","context":"resources","location":"navbar","label":"events__webinars_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Events & webinars</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/whitepapers" data-analytics-event="{"action":"ebooks__reports","tag":"link","context":"resources","location":"navbar","label":"ebooks__reports_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Ebooks & reports</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/executive-insights" data-analytics-event="{"action":"business_insights","tag":"link","context":"resources","location":"navbar","label":"business_insights_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Business insights</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://skills.github.com" data-analytics-event="{"action":"github_skills","tag":"link","context":"resources","location":"navbar","label":"github_skills_link_resources_navbar"}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">GitHub Skills</span><svg focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_dlnd_">SUPPORT & SERVICES</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_dlnd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://docs.github.com" data-analytics-event="{"action":"documentation","tag":"link","context":"resources","location":"navbar","label":"documentation_link_resources_navbar"}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Documentation</span><svg focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://support.github.com" data-analytics-event="{"action":"customer_support","tag":"link","context":"resources","location":"navbar","label":"customer_support_link_resources_navbar"}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Customer support</span><svg focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/orgs/community/discussions" data-analytics-event="{"action":"community_forum","tag":"link","context":"resources","location":"navbar","label":"community_forum_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Community forum</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/trust-center" data-analytics-event="{"action":"trust_center","tag":"link","context":"resources","location":"navbar","label":"trust_center_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Trust center</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/partners" data-analytics-event="{"action":"partners","tag":"link","context":"resources","location":"navbar","label":"partners_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Partners</span></a></li></ul></div></li></ul><div class="NavDropdown-module__trailingLinkContainer__VgJGL"><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/resources" data-analytics-event="{"action":"view_all_resources","tag":"link","context":"resources","location":"navbar","label":"view_all_resources_link_resources_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all resources</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></div></div></div></li><li><div class="NavDropdown-module__container__l2YeI"><button type="button" class="NavDropdown-module__button__PEHWX" aria-expanded="false" aria-controls="_R_27d_">Open Source<svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-right NavDropdown-module__buttonIcon__Tkl8_" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m6.427 4.427 3.396 3.396a.25.25 0 0 1 0 .354l-3.396 3.396A.25.25 0 0 1 6 11.396V4.604a.25.25 0 0 1 .427-.177Z"></path></svg></button><div id="_R_27d_" class="NavDropdown-module__dropdown__xm1jd"><ul class="NavDropdown-module__list__zuCgG"><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_5m7d_">COMMUNITY</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_5m7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/open-source/sponsors" data-analytics-event="{"action":"github_sponsors","tag":"link","context":"open_source","location":"navbar","label":"github_sponsors_link_open_source_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-sponsor-tiers NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M10.586 1C12.268 1 13.5 2.37 13.5 4.25c0 1.745-.996 3.359-2.622 4.831-.166.15-.336.297-.509.438l1.116 5.584a.75.75 0 0 1-.991.852l-2.409-.876a.25.25 0 0 0-.17 0l-2.409.876a.75.75 0 0 1-.991-.852L5.63 9.519a13.78 13.78 0 0 1-.51-.438C3.497 7.609 2.5 5.995 2.5 4.25 2.5 2.37 3.732 1 5.414 1c.963 0 1.843.403 2.474 1.073L8 2.198l.112-.125a3.385 3.385 0 0 1 2.283-1.068L10.586 1Zm-3.621 9.495-.718 3.594 1.155-.42a1.75 1.75 0 0 1 1.028-.051l.168.051 1.154.42-.718-3.592c-.199.13-.37.235-.505.314l-.169.097a.75.75 0 0 1-.72 0 9.54 9.54 0 0 1-.515-.308l-.16-.105ZM10.586 2.5c-.863 0-1.611.58-1.866 1.459-.209.721-1.231.721-1.44 0C7.025 3.08 6.277 2.5 5.414 2.5 4.598 2.5 4 3.165 4 4.25c0 1.23.786 2.504 2.128 3.719.49.443 1.018.846 1.546 1.198l.325.21.076-.047.251-.163a13.341 13.341 0 0 0 1.546-1.198C11.214 6.754 12 5.479 12 4.25c0-1.085-.598-1.75-1.414-1.75Z"></path></svg>GitHub Sponsors</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Fund open source developers</span></span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_9m7d_">PROGRAMS</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_9m7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://securitylab.github.com" data-analytics-event="{"action":"security_lab","tag":"link","context":"open_source","location":"navbar","label":"security_lab_link_open_source_navbar"}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Security Lab</span><svg focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://maintainers.github.com" data-analytics-event="{"action":"maintainer_community","tag":"link","context":"open_source","location":"navbar","label":"maintainer_community_link_open_source_navbar"}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Maintainer Community</span><svg focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://stars.github.com" data-analytics-event="{"action":"github_stars","tag":"link","context":"open_source","location":"navbar","label":"github_stars_link_open_source_navbar"}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">GitHub Stars</span><svg focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://archiveprogram.github.com" data-analytics-event="{"action":"archive_program","tag":"link","context":"open_source","location":"navbar","label":"archive_program_link_open_source_navbar"}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Archive Program</span><svg focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_dm7d_">REPOSITORIES</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_dm7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/topics" data-analytics-event="{"action":"topics","tag":"link","context":"open_source","location":"navbar","label":"topics_link_open_source_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Topics</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/trending" data-analytics-event="{"action":"trending","tag":"link","context":"open_source","location":"navbar","label":"trending_link_open_source_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Trending</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/collections" data-analytics-event="{"action":"collections","tag":"link","context":"open_source","location":"navbar","label":"collections_link_open_source_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Collections</span></a></li></ul></div></li></ul></div></div></li><li><div class="NavDropdown-module__container__l2YeI"><button type="button" class="NavDropdown-module__button__PEHWX" aria-expanded="false" aria-controls="_R_2nd_">Enterprise<svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-right NavDropdown-module__buttonIcon__Tkl8_" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m6.427 4.427 3.396 3.396a.25.25 0 0 1 0 .354l-3.396 3.396A.25.25 0 0 1 6 11.396V4.604a.25.25 0 0 1 .427-.177Z"></path></svg></button><div id="_R_2nd_" class="NavDropdown-module__dropdown__xm1jd"><ul class="NavDropdown-module__list__zuCgG"><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_5mnd_">ENTERPRISE SOLUTIONS</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_5mnd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/enterprise" data-analytics-event="{"action":"enterprise_platform","tag":"link","context":"enterprise","location":"navbar","label":"enterprise_platform_link_enterprise_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-stack NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M7.122.392a1.75 1.75 0 0 1 1.756 0l5.003 2.902c.83.481.83 1.68 0 2.162L8.878 8.358a1.75 1.75 0 0 1-1.756 0L2.119 5.456a1.251 1.251 0 0 1 0-2.162ZM8.125 1.69a.248.248 0 0 0-.25 0l-4.63 2.685 4.63 2.685a.248.248 0 0 0 .25 0l4.63-2.685ZM1.601 7.789a.75.75 0 0 1 1.025-.273l5.249 3.044a.248.248 0 0 0 .25 0l5.249-3.044a.75.75 0 0 1 .752 1.298l-5.248 3.044a1.75 1.75 0 0 1-1.756 0L1.874 8.814A.75.75 0 0 1 1.6 7.789Zm0 3.5a.75.75 0 0 1 1.025-.273l5.249 3.044a.248.248 0 0 0 .25 0l5.249-3.044a.75.75 0 0 1 .752 1.298l-5.248 3.044a1.75 1.75 0 0 1-1.756 0l-5.248-3.044a.75.75 0 0 1-.273-1.025Z"></path></svg>Enterprise platform</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">AI-powered developer platform</span></span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_9mnd_">AVAILABLE ADD-ONS</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_9mnd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/security/advanced-security" data-analytics-event="{"action":"github_advanced_security","tag":"link","context":"enterprise","location":"navbar","label":"github_advanced_security_link_enterprise_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-shield-check NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m8.533.133 5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667l5.25-1.68a1.748 1.748 0 0 1 1.066 0Zm-.61 1.429.001.001-5.25 1.68a.251.251 0 0 0-.174.237V7c0 1.36.275 2.666 1.057 3.859.784 1.194 2.121 2.342 4.366 3.298a.196.196 0 0 0 .154 0c2.245-.957 3.582-2.103 4.366-3.297C13.225 9.666 13.5 8.358 13.5 7V3.48a.25.25 0 0 0-.174-.238l-5.25-1.68a.25.25 0 0 0-.153 0ZM11.28 6.28l-3.5 3.5a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.97-2.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg>GitHub Advanced Security</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Enterprise-grade security features</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/copilot/copilot-business" data-analytics-event="{"action":"copilot_for_business","tag":"link","context":"enterprise","location":"navbar","label":"copilot_for_business_link_enterprise_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-copilot NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z"></path><path d="M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z"></path></svg>Copilot for Business</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Enterprise-grade AI features</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/enterprise/premium-support" data-analytics-event="{"action":"premium_support","tag":"link","context":"enterprise","location":"navbar","label":"premium_support_link_enterprise_navbar"}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-comment-discussion NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path></svg>Premium Support</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Enterprise-grade 24/7 support</span></span></a></li></ul></div></li></ul></div></div></li><li><a href="https://github.com/pricing" data-analytics-event="{"action":"pricing","tag":"link","context":"pricing","location":"navbar","label":"pricing_link_pricing_navbar"}" class="MarketingNavigation-module__navLink__hUomM">Pricing</a></li></ul></nav><div class="MarketingHeader-module__ctaContainer__tBmPz"><div class="HeaderSearch-module__searchSlot__oVOUS"><button class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--subtle___F7pEE Primer_Brand__Button-module__Button--size-small___zQrEw HeaderSearch-module__trigger__zsF9q" type="button" aria-haspopup="dialog" aria-expanded="false" aria-label="Search or jump to, type / to search" data-analytics-event="{"action":"searchbar","tag":"input","context":"global","location":"navbar","label":"searchbar_input_global_navbar"}"><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-subtle___8ndWH"><span class="HeaderSearch-module__content__kMpxU"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-search HeaderSearch-module__icon__wcrHX" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg><span class="HeaderSearch-module__label__d1iWG">Search</span><kbd class="HeaderSearch-module__kbd__HNG0o" aria-hidden="true">/</kbd></span></span></span></button><div class="d-none"></div></div><div class="AuthCTAs-module__signInWrap__q2P60"><a class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--subtle___F7pEE Primer_Brand__Button-module__Button--size-small___zQrEw AuthCTAs-module__cta__WpwQq AuthCTAs-module__desktopActionGap__UZuXT AuthCTAs-module__hiddenBelowLg__BfKBw" href="/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fscientist" data-analytics-event="{"action":"sign_in","tag":"link","context":"auth_cta","location":"header","label":"sign_in_link_auth_cta_header"}" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header menu","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/github/scientist","user_id":null}}" data-hydro-click-hmac="22a64b1a4595711c122d47785469b37e803ca1ce0595e8c20f826e7b302d2f18"><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-subtle___8ndWH">Sign in</span></span></a></div><a class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--secondary___gHnw_ Primer_Brand__Button-module__Button--size-small___zQrEw AuthCTAs-module__cta__WpwQq" href="/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=github%2Fscientist" data-analytics-event="{"action":"sign_up","tag":"link","context":"auth_cta","location":"header","label":"sign_up_link_auth_cta_header"}" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header menu","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/github/scientist","user_id":null}}" data-hydro-click-hmac="22a64b1a4595711c122d47785469b37e803ca1ce0595e8c20f826e7b302d2f18"><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-secondary___eJ0_a">Sign up</span></span></a><button class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--subtle___F7pEE Primer_Brand__Button-module__Button--size-small___zQrEw HeaderAppearanceSettings-module__trigger__hUheK" type="button" aria-haspopup="dialog" aria-labelledby="_R_fbd_"><span class="Primer_Brand__Button-module__Button__leading-visual___jjtTe" data-testid="Button-leading-visual"><svg data-component="Octicon" focusable="false" aria-hidden="true" class="octicon octicon-sliders Primer_Brand__Button-module__Button__icon-visual____qybb" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M15 2.75a.75.75 0 0 1-.75.75h-4a.75.75 0 0 1 0-1.5h4a.75.75 0 0 1 .75.75Zm-8.5.75v1.25a.75.75 0 0 0 1.5 0v-4a.75.75 0 0 0-1.5 0V2H1.75a.75.75 0 0 0 0 1.5H6.5Zm1.25 5.25a.75.75 0 0 0 0-1.5h-6a.75.75 0 0 0 0 1.5h6ZM15 8a.75.75 0 0 1-.75.75H11.5V10a.75.75 0 1 1-1.5 0V6a.75.75 0 0 1 1.5 0v1.25h2.75A.75.75 0 0 1 15 8Zm-9 5.25v-2a.75.75 0 0 0-1.5 0v1.25H1.75a.75.75 0 0 0 0 1.5H4.5v1.25a.75.75 0 0 0 1.5 0v-2Zm9 0a.75.75 0 0 1-.75.75h-6a.75.75 0 0 1 0-1.5h6a.75.75 0 0 1 .75.75Z"></path></svg></span><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-subtle___8ndWH"></span></span></button><div class="Primer_Brand__Tooltip-module__Tooltip___0Eipx" data-direction="s" aria-hidden="true" id="_R_fbd_">Appearance settings</div></div></div></div></div><div class="MarketingHeader-module__bottomBorder__uZT38" aria-hidden="true"></div></header></div></div>
|
||
</react-partial>
|
||
|
||
|
||
|
||
<div hidden="hidden" data-view-component="true" class="js-stale-session-flash stale-session-flash flash flash-warn flash-full">
|
||
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
|
||
<path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path>
|
||
</svg>
|
||
<span class="js-stale-session-flash-signed-in" hidden>You signed in with another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span>
|
||
<span class="js-stale-session-flash-signed-out" hidden>You signed out in another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span>
|
||
<span class="js-stale-session-flash-switched" hidden>You switched accounts on another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span>
|
||
|
||
<button id="icon-button-81c597ea-16a5-4fce-b980-a34a0d414c9c" aria-labelledby="tooltip-ac83b03c-ff42-4014-98f1-091c54bf9bcc" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium flash-close js-flash-close"> <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x Button-visual">
|
||
<path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>
|
||
</svg>
|
||
</button><tool-tip id="tooltip-ac83b03c-ff42-4014-98f1-091c54bf9bcc" for="icon-button-81c597ea-16a5-4fce-b980-a34a0d414c9c" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Dismiss alert</tool-tip>
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div id="start-of-content" class="show-on-focus"></div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div id="js-flash-container" class="flash-container" data-turbo-replace>
|
||
|
||
|
||
|
||
|
||
|
||
<template class="js-flash-template">
|
||
|
||
<div class="flash flash-full {{ className }}">
|
||
<div >
|
||
<button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
|
||
<path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>
|
||
</svg>
|
||
</button>
|
||
<div aria-atomic="true" role="alert" class="js-flash-alert">
|
||
|
||
<div>{{ message }}</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div
|
||
class="application-main "
|
||
data-commit-hovercards-enabled
|
||
data-discussion-hovercards-enabled
|
||
data-issue-and-pr-hovercards-enabled
|
||
data-project-hovercards-enabled
|
||
>
|
||
<div itemscope itemtype="http://schema.org/SoftwareSourceCode" class="">
|
||
<main id="js-repo-pjax-container" >
|
||
|
||
|
||
|
||
|
||
<include-fragment src="/in-product-messaging/budget-threshold-banner?organization=github" data-nonce="v2:fe066acf-c1cc-6a96-b03e-e2f12f503e35" data-view-component="true">
|
||
|
||
<div data-show-on-forbidden-error hidden>
|
||
<div class="Box">
|
||
<div class="blankslate-container">
|
||
<div data-view-component="true" class="blankslate blankslate-spacious color-bg-default rounded-2">
|
||
|
||
|
||
<h3 data-view-component="true" class="blankslate-heading"> Uh oh!
|
||
</h3>
|
||
<p data-view-component="true" class="blankslate-description"> <p class="color-fg-muted my-2 mb-2 ws-normal">There was an error while loading. <a class="Link--inTextBlock" data-turbo="false" href="" aria-label="Please reload this page">Please reload this page</a>.</p>
|
||
</p>
|
||
|
||
</div> </div>
|
||
</div> </div>
|
||
</include-fragment>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div id="repository-container-header" class="tmp-pt-3 hide-full-screen" style="background-color: var(--page-header-bgColor, var(--color-page-header-bg));" data-turbo-replace>
|
||
|
||
<div class="d-flex flex-nowrap flex-justify-end tmp-mb-3 tmp-px-3 tmp-px-lg-5" style="gap: 1rem;">
|
||
|
||
<div class="flex-auto min-width-0 width-fit">
|
||
|
||
<div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2 tmp-mr-2">
|
||
<path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path>
|
||
</svg>
|
||
|
||
<span class="author flex-self-stretch" itemprop="author">
|
||
<a class="url fn" rel="author" data-hovercard-type="organization" data-hovercard-url="/orgs/github/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/github">
|
||
github
|
||
</a> </span>
|
||
<span class="mx-1 flex-self-stretch color-fg-muted">/</span>
|
||
<strong itemprop="name" class="mr-2 flex-self-stretch">
|
||
<a data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" href="/github/scientist">scientist</a>
|
||
</strong>
|
||
|
||
<span></span><span class="Label Label--secondary v-align-middle mr-1">Public</span>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
<div id="repository-details-container" class="flex-shrink-0" data-turbo-replace style="max-width: 70%;">
|
||
<ul class="pagehead-actions flex-shrink-0 d-none d-md-inline" style="padding: 2px 0;">
|
||
|
||
|
||
|
||
<li>
|
||
<a href="/login?return_to=%2Fgithub%2Fscientist" rel="nofollow" id="repository-details-watch-button" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"notification subscription menu watch","repository_id":null,"auth_type":"LOG_IN","originating_url":"https://github.com/github/scientist","user_id":null}}" data-hydro-click-hmac="6002d20d4f83bd75420106acbd29054272075c50b0a2642a4ac197f3ac408c36" aria-label="You must be signed in to change notification settings" data-view-component="true" class="btn-sm btn"> <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2 tmp-mr-2">
|
||
<path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path>
|
||
</svg>Notifications
|
||
</a> <tool-tip id="tooltip-779dad62-6383-4d9a-ab31-8f224b7e4825" for="repository-details-watch-button" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be signed in to change notification settings</tool-tip>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
<a icon="repo-forked" id="fork-button" href="/login?return_to=%2Fgithub%2Fscientist" rel="nofollow" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"repo details fork button","repository_id":16549503,"auth_type":"LOG_IN","originating_url":"https://github.com/github/scientist","user_id":null}}" data-hydro-click-hmac="f4b6f8c38246cddee2ed10ae25231f16433b063856dca4616aece1b796a60c76" data-view-component="true" class="btn-sm btn"> <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2 tmp-mr-2">
|
||
<path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path>
|
||
</svg>Fork
|
||
<span id="repo-network-counter" data-pjax-replace="true" data-turbo-replace="true" title="504" data-view-component="true" class="Counter">504</span>
|
||
</a>
|
||
</li>
|
||
|
||
<li>
|
||
<div data-view-component="true" class="BtnGroup d-flex">
|
||
<a href="/login?return_to=%2Fgithub%2Fscientist" rel="nofollow" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"star button","repository_id":16549503,"auth_type":"LOG_IN","originating_url":"https://github.com/github/scientist","user_id":null}}" data-hydro-click-hmac="1bf062b0cc4e246298368ce9f0c00018f54eb4e9b087bff38a26fe83befbfd14" aria-label="You must be signed in to star a repository" data-view-component="true" class="tooltipped tooltipped-sw btn-sm btn"> <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2 tmp-mr-2">
|
||
<path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path>
|
||
</svg><span data-view-component="true" class="d-inline">
|
||
Star
|
||
</span> <span id="repo-stars-counter-star" aria-label="7754 users starred this repository" data-singular-suffix="user starred this repository" data-plural-suffix="users starred this repository" data-turbo-replace="true" title="7,754" data-view-component="true" class="Counter js-social-count">7.8k</span>
|
||
</a></div>
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div id="responsive-meta-container" data-turbo-replace>
|
||
</div>
|
||
|
||
|
||
<nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 tmp-px-3 px-md-4 tmp-px-md-4 px-lg-5 tmp-px-lg-5">
|
||
|
||
<ul data-view-component="true" class="UnderlineNav-body list-style-none">
|
||
<li data-view-component="true" class="d-inline-flex">
|
||
<a id="code-tab" href="/github/scientist" data-tab-item="i0code-tab" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages repo_deployments repo_attestations /github/scientist" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g c" data-command-id="repositories:go-to-code" data-react-nav="code-view" data-react-nav-anchor="code-view-repo-link" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Code","target":"UNDERLINE_NAV.TAB"}" aria-current="page" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item selected">
|
||
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline">
|
||
<path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path>
|
||
</svg>
|
||
<span data-content="Code">Code</span>
|
||
<span id="code-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span>
|
||
|
||
|
||
|
||
</a></li>
|
||
<li data-view-component="true" class="d-inline-flex">
|
||
<a id="issues-tab" href="/github/scientist/issues" data-tab-item="i1issues-tab" data-selected-links="repo_issues repo_labels repo_milestones /github/scientist/issues" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g i" data-command-id="repositories:go-to-issues" data-react-nav="issues-react" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Issues","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item">
|
||
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline">
|
||
<path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path>
|
||
</svg>
|
||
<span data-content="Issues">Issues</span>
|
||
<span id="issues-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="9" data-view-component="true" class="Counter">9</span>
|
||
|
||
|
||
|
||
</a></li>
|
||
<li data-view-component="true" class="d-inline-flex">
|
||
<a id="pull-requests-tab" href="/github/scientist/pulls" data-tab-item="i2pull-requests-tab" data-selected-links="repo_pulls checks /github/scientist/pulls" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g p" data-command-id="repositories:go-to-pull-requests" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Pull requests","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item">
|
||
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline">
|
||
<path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path>
|
||
</svg>
|
||
<span data-content="Pull requests">Pull requests</span>
|
||
<span id="pull-requests-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="7" data-view-component="true" class="Counter">7</span>
|
||
|
||
|
||
|
||
</a></li>
|
||
<li data-view-component="true" class="d-inline-flex">
|
||
<a id="actions-tab" href="/github/scientist/actions" data-tab-item="i3actions-tab" data-selected-links="repo_actions /github/scientist/actions" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g a" data-command-id="repositories:go-to-actions" data-react-nav="actions-workflows" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Actions","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item">
|
||
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline">
|
||
<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path>
|
||
</svg>
|
||
<span data-content="Actions">Actions</span>
|
||
<span id="actions-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span>
|
||
|
||
|
||
|
||
</a></li>
|
||
<li data-view-component="true" class="d-inline-flex">
|
||
<a id="projects-tab" href="/github/scientist/projects" data-tab-item="i4projects-tab" data-selected-links="repo_projects new_repo_project repo_project /github/scientist/projects" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g b" data-command-id="repositories:go-to-projects" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Projects","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item">
|
||
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline">
|
||
<path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path>
|
||
</svg>
|
||
<span data-content="Projects">Projects</span>
|
||
<span id="projects-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span>
|
||
|
||
|
||
|
||
</a></li>
|
||
<li data-view-component="true" class="d-inline-flex">
|
||
<a id="security-and-quality-tab" href="/github/scientist/security" data-tab-item="i5security-and-quality-tab" data-selected-links="security overview alerts policy token_scanning code_scanning /github/scientist/security" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g s" data-command-id="repositories:go-to-security" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Security and quality","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item">
|
||
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline">
|
||
<path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path>
|
||
</svg>
|
||
<span data-content="Security and quality">Security and quality</span>
|
||
<span id="security-and-quality-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="0" hidden="hidden" data-view-component="true" class="Counter">0</span>
|
||
|
||
|
||
|
||
</a></li>
|
||
<li data-view-component="true" class="d-inline-flex">
|
||
<a id="insights-tab" href="/github/scientist/pulse" data-tab-item="i6insights-tab" data-selected-links="repo_graphs repo_contributors dependency_graph dependabot_updates pulse people community /github/scientist/pulse" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-command-id="repositories:go-to-insights" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Insights","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item">
|
||
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline">
|
||
<path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path>
|
||
</svg>
|
||
<span data-content="Insights">Insights</span>
|
||
<span id="insights-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span>
|
||
|
||
|
||
|
||
</a></li>
|
||
</ul>
|
||
<div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 tmp-pr-3 pr-md-4 tmp-pr-md-4 pr-lg-5 tmp-pr-lg-5 right-0"> <action-menu data-select-variant="none" data-view-component="true">
|
||
<focus-group direction="vertical" mnemonics retain>
|
||
<button id="action-menu-de65bc85-4898-434b-b28e-44c238020044-button" popovertarget="action-menu-de65bc85-4898-434b-b28e-44c238020044-overlay" aria-controls="action-menu-de65bc85-4898-434b-b28e-44c238020044-list" aria-haspopup="true" aria-labelledby="tooltip-7c1af0d8-52cc-490b-9e1e-06414edd5c7f" type="button" data-view-component="true" class="Button Button--iconOnly Button--secondary Button--medium UnderlineNav-item"> <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual">
|
||
<path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path>
|
||
</svg>
|
||
</button><tool-tip id="tooltip-7c1af0d8-52cc-490b-9e1e-06414edd5c7f" for="action-menu-de65bc85-4898-434b-b28e-44c238020044-button" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Additional navigation options</tool-tip>
|
||
|
||
|
||
<anchored-position data-target="action-menu.overlay" id="action-menu-de65bc85-4898-434b-b28e-44c238020044-overlay" anchor="action-menu-de65bc85-4898-434b-b28e-44c238020044-button" align="start" side="outside-bottom" anchor-offset="normal" popover="auto" data-view-component="true">
|
||
<div data-view-component="true" class="Overlay Overlay--size-auto">
|
||
|
||
<div data-view-component="true" class="Overlay-body Overlay-body--paddingNone"> <action-list>
|
||
<div data-view-component="true">
|
||
<ul aria-labelledby="action-menu-de65bc85-4898-434b-b28e-44c238020044-button" id="action-menu-de65bc85-4898-434b-b28e-44c238020044-list" role="menu" data-view-component="true" class="ActionListWrap--inset ActionListWrap">
|
||
<li hidden="hidden" data-menu-item="i0code-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
|
||
|
||
|
||
<a tabindex="-1" id="item-a50eecac-eb60-45a0-9c32-9ced4da794a0" href="/github/scientist" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16">
|
||
<span class="ActionListItem-visual ActionListItem-visual--leading">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code">
|
||
<path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path>
|
||
</svg>
|
||
</span>
|
||
|
||
<span data-view-component="true" class="ActionListItem-label">
|
||
Code
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
<li hidden="hidden" data-menu-item="i1issues-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
|
||
|
||
|
||
<a tabindex="-1" id="item-685873c7-ec02-4b0b-9abc-2aa944a64a1b" href="/github/scientist/issues" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16">
|
||
<span class="ActionListItem-visual ActionListItem-visual--leading">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened">
|
||
<path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path>
|
||
</svg>
|
||
</span>
|
||
|
||
<span data-view-component="true" class="ActionListItem-label">
|
||
Issues
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
<li hidden="hidden" data-menu-item="i2pull-requests-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
|
||
|
||
|
||
<a tabindex="-1" id="item-8d3223db-cfdf-42a9-8dff-0cc1b915b143" href="/github/scientist/pulls" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16">
|
||
<span class="ActionListItem-visual ActionListItem-visual--leading">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request">
|
||
<path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path>
|
||
</svg>
|
||
</span>
|
||
|
||
<span data-view-component="true" class="ActionListItem-label">
|
||
Pull requests
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
<li hidden="hidden" data-menu-item="i3actions-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
|
||
|
||
|
||
<a tabindex="-1" id="item-c68b820a-3532-42ae-af6d-d51d1149913b" href="/github/scientist/actions" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16">
|
||
<span class="ActionListItem-visual ActionListItem-visual--leading">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play">
|
||
<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path>
|
||
</svg>
|
||
</span>
|
||
|
||
<span data-view-component="true" class="ActionListItem-label">
|
||
Actions
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
<li hidden="hidden" data-menu-item="i4projects-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
|
||
|
||
|
||
<a tabindex="-1" id="item-bf27cef2-cf83-4133-a12f-914bd1dd379e" href="/github/scientist/projects" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16">
|
||
<span class="ActionListItem-visual ActionListItem-visual--leading">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table">
|
||
<path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path>
|
||
</svg>
|
||
</span>
|
||
|
||
<span data-view-component="true" class="ActionListItem-label">
|
||
Projects
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
<li hidden="hidden" data-menu-item="i5security-and-quality-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
|
||
|
||
|
||
<a tabindex="-1" id="item-80aaf34e-23bc-4ecd-b01f-8a5cf9e747ee" href="/github/scientist/security" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16">
|
||
<span class="ActionListItem-visual ActionListItem-visual--leading">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield">
|
||
<path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path>
|
||
</svg>
|
||
</span>
|
||
|
||
<span data-view-component="true" class="ActionListItem-label">
|
||
Security and quality
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
<li hidden="hidden" data-menu-item="i6insights-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
|
||
|
||
|
||
<a tabindex="-1" id="item-4582e392-da64-41c4-ac28-9eb41a6d16f2" href="/github/scientist/pulse" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16">
|
||
<span class="ActionListItem-visual ActionListItem-visual--leading">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph">
|
||
<path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path>
|
||
</svg>
|
||
</span>
|
||
|
||
<span data-view-component="true" class="ActionListItem-label">
|
||
Insights
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
</ul>
|
||
</div></action-list>
|
||
|
||
|
||
</div>
|
||
|
||
</div></anchored-position> </focus-group>
|
||
</action-menu></div>
|
||
</nav>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class="">
|
||
<div id="repo-content-pjax-container" class="repository-content " >
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<react-app
|
||
app-name="code-view"
|
||
initial-path="/github/scientist"
|
||
style="display: block; min-height: calc(100vh - 64px);"
|
||
data-attempted-ssr="true"
|
||
data-ssr="true"
|
||
data-lazy="false"
|
||
data-alternate="false"
|
||
data-data-router-enabled="true"
|
||
data-react-profiling="false"
|
||
>
|
||
|
||
<script type="application/json" data-target="react-app.embeddedData">{"payload":{"codeViewRepoRoute":{"path":"/","refInfo":{"name":"main","listCacheKey":"v0:1789075898.0","canEdit":false,"refType":"branch","currentOid":"504a396e987f655a21c6bf2ed57935aadaa40859"},"tree":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":"doc","path":"doc","contentType":"directory"},{"name":"lib","path":"lib","contentType":"directory"},{"name":"script","path":"script","contentType":"directory"},{"name":"test","path":"test","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"Gemfile","path":"Gemfile","contentType":"file"},{"name":"LICENSE.txt","path":"LICENSE.txt","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"Rakefile","path":"Rakefile","contentType":"file"},{"name":"scientist.gemspec","path":"scientist.gemspec","contentType":"file"}],"totalCount":12,"templateDirectorySuggestionUrl":null,"readme":null,"showBranchInfobar":false},"userNameDisplayConfiguration":"handle","treeExpanded":false,"symbolsExpanded":false,"copilotSWEAgentEnabled":false,"copilotAccessAllowed":false,"isOverview":true,"overview":{"banners":{"shouldRecommendReadme":false,"isPersonalRepo":false,"showUseActionBanner":false,"actionSlug":null,"actionId":null,"showProtectBranchBanner":false,"requiredCustomPropertyValuesMissingCount":0,"transactionalMessageBanner":null,"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_repo","releasePath":"/github/scientist/releases/new?marketplace=true","showPublishActionBanner":false},"interactionLimitBanner":null,"showInvitationBanner":false,"inviterName":null,"actionsMigrationBannerInfo":{"releaseTags":[],"showImmutableActionsMigrationBanner":false,"initialMigrationStatus":null},"copilotSurveyBanner":null,"showSpammyBanner":false,"blockedContributorsBanner":null,"codespacesSurveyBanner":null},"codeButton":{"contactPath":"/contact","isEnterprise":false,"local":{"protocolInfo":{"httpAvailable":true,"sshAvailable":null,"httpUrl":"https://github.com/github/scientist.git","showCloneWarning":null,"sshUrl":null,"sshCertificatesRequired":null,"sshCertificatesAvailable":null,"ghCliUrl":"gh repo clone github/scientist","defaultProtocol":"http","newSshKeyUrl":"/settings/ssh/new","setProtocolPath":"/users/set_protocol?protocol_type=clone"},"platformInfo":{"cloneUrl":"https://desktop.github.com","showVisualStudioCloneButton":false,"visualStudioCloneUrl":"https://windows.github.com","showXcodeCloneButton":false,"xcodeCloneUrl":"xcode://clone?repo=https%3A%2F%2Fgithub.com%2Fgithub%2Fscientist","zipballUrl":"/github/scientist/archive/refs/heads/main.zip"}},"newCodespacePath":"/codespaces/new?hide_repo_select=true\u0026repo=16549503"},"popovers":{"rename":null,"renamedParentRepo":null},"commitCount":"254","overviewFiles":[{"displayName":"README.md","repoName":"scientist","refName":"main","path":"README.md","preferredFileType":"readme","tabName":"README","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eScientist!\u003c/h1\u003e\u003ca id=\"user-content-scientist\" class=\"anchor\" aria-label=\"Permalink: Scientist!\" href=\"#scientist\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eA Ruby library for carefully refactoring critical paths. \u003ca href=\"https://github.com/github/scientist/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/github/scientist/actions/workflows/ci.yml/badge.svg\" alt=\"Build Status\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eHow do I science?\u003c/h2\u003e\u003ca id=\"user-content-how-do-i-science\" class=\"anchor\" aria-label=\"Permalink: How do I science?\" href=\"#how-do-i-science\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eLet's pretend you're changing the way you handle permissions in a large web app. Tests can help guide your refactoring, but you really want to compare the current and refactored behaviors under load.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"require \u0026quot;scientist\u0026quot;\n\nclass MyWidget\n def allows?(user)\n experiment = Scientist::Default.new \u0026quot;widget-permissions\u0026quot;\n experiment.use { model.check_user(user).valid? } # old way\n experiment.try { user.can?(:read, model) } # new way\n\n experiment.run\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-en\"\u003erequire\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"scientist\"\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyWidget\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eallows?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eexperiment\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e::\u003cspan class=\"pl-v\"\u003eDefault\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003enew\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"widget-permissions\"\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eexperiment\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003echeck_user\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003evalid?\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# old way\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eexperiment\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecan?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-pds\"\u003e:read\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# new way\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003eexperiment\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003erun\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eWrap a \u003ccode\u003euse\u003c/code\u003e block around the code's original behavior, and wrap \u003ccode\u003etry\u003c/code\u003e around the new behavior. \u003ccode\u003eexperiment.run\u003c/code\u003e will always return whatever the \u003ccode\u003euse\u003c/code\u003e block returns, but it does a bunch of stuff behind the scenes:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eIt decides whether or not to run the \u003ccode\u003etry\u003c/code\u003e block,\u003c/li\u003e\n\u003cli\u003eRandomizes the order in which \u003ccode\u003euse\u003c/code\u003e and \u003ccode\u003etry\u003c/code\u003e blocks are run,\u003c/li\u003e\n\u003cli\u003eMeasures the wall time and cpu time of all behaviors in seconds,\u003c/li\u003e\n\u003cli\u003eCompares the result of \u003ccode\u003etry\u003c/code\u003e to the result of \u003ccode\u003euse\u003c/code\u003e,\u003c/li\u003e\n\u003cli\u003eSwallow and record exceptions raised in the \u003ccode\u003etry\u003c/code\u003e block when overriding \u003ccode\u003eraised\u003c/code\u003e, and\u003c/li\u003e\n\u003cli\u003ePublishes all this information.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003euse\u003c/code\u003e block is called the \u003cstrong\u003econtrol\u003c/strong\u003e. The \u003ccode\u003etry\u003c/code\u003e block is called the \u003cstrong\u003ecandidate\u003c/strong\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eCreating an experiment is wordy, but when you include the \u003ccode\u003eScientist\u003c/code\u003e module, the \u003ccode\u003escience\u003c/code\u003e helper will instantiate an experiment and call \u003ccode\u003erun\u003c/code\u003e for you:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"require \u0026quot;scientist\u0026quot;\n\nclass MyWidget\n include Scientist\n\n def allows?(user)\n science \u0026quot;widget-permissions\u0026quot; do |experiment|\n experiment.use { model.check_user(user).valid? } # old way\n experiment.try { user.can?(:read, model) } # new way\n end # returns the control value\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-en\"\u003erequire\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"scientist\"\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyWidget\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eallows?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"widget-permissions\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003eexperiment\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003eexperiment\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003echeck_user\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003evalid?\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# old way\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eexperiment\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecan?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-pds\"\u003e:read\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# new way\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# returns the control value\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf you don't declare any \u003ccode\u003etry\u003c/code\u003e blocks, none of the Scientist machinery is invoked and the control value is always returned.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMaking science useful\u003c/h2\u003e\u003ca id=\"user-content-making-science-useful\" class=\"anchor\" aria-label=\"Permalink: Making science useful\" href=\"#making-science-useful\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe examples above will run, but they're not really \u003cem\u003edoing\u003c/em\u003e anything. The \u003ccode\u003etry\u003c/code\u003e blocks don't run yet and none of the results get published. Replace the default experiment implementation to control execution and reporting:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"require \u0026quot;scientist/experiment\u0026quot;\n\nclass MyExperiment\n include Scientist::Experiment\n\n attr_accessor :name\n\n def initialize(name)\n @name = name\n end\n\n def enabled?\n # see \u0026quot;Ramping up experiments\u0026quot; below\n true\n end\n\n def raised(operation, error)\n # see \u0026quot;In a Scientist callback\u0026quot; below\n p \u0026quot;Operation '#{operation}' failed with error '#{error.inspect}'\u0026quot;\n super # will re-raise\n end\n\n def publish(result)\n # see \u0026quot;Publishing results\u0026quot; below\n p result\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-en\"\u003erequire\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"scientist/experiment\"\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyExperiment\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e::\u003cspan class=\"pl-v\"\u003eExperiment\u003c/span\u003e\n\n \u003cspan class=\"pl-en\"\u003eattr_accessor\u003c/span\u003e \u003cspan class=\"pl-pds\"\u003e:name\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003einitialize\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003e@name\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eenabled?\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# see \"Ramping up experiments\" below\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003etrue\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eraised\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eoperation\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eerror\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# see \"In a Scientist callback\" below\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003ep\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"Operation '\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eoperation\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' failed with error '\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eerror\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003einspect\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e'\"\u003c/span\u003e\n \u003cspan class=\"pl-smi\"\u003esuper\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# will re-raise\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epublish\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# see \"Publishing results\" below\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003ep\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eWhen \u003ccode\u003eScientist::Experiment\u003c/code\u003e is included in a class, it automatically sets it as the default implementation via \u003ccode\u003eScientist::Experiment.set_default\u003c/code\u003e. This \u003ccode\u003eset_default\u003c/code\u003e call is skipped if you include \u003ccode\u003eScientist::Experiment\u003c/code\u003e in a module.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eNow calls to the \u003ccode\u003escience\u003c/code\u003e helper will load instances of \u003ccode\u003eMyExperiment\u003c/code\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eControlling comparison\u003c/h3\u003e\u003ca id=\"user-content-controlling-comparison\" class=\"anchor\" aria-label=\"Permalink: Controlling comparison\" href=\"#controlling-comparison\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eScientist compares control and candidate values using \u003ccode\u003e==\u003c/code\u003e. To override this behavior, use \u003ccode\u003ecompare\u003c/code\u003e to define how to compare observed values instead:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"class MyWidget\n include Scientist\n\n def users\n science \u0026quot;users\u0026quot; do |e|\n e.use { User.all } # returns User instances\n e.try { UserService.list } # returns UserService::User instances\n\n e.compare do |control, candidate|\n control.map(\u0026amp;:login) == candidate.map(\u0026amp;:login)\n end\n end\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyWidget\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eusers\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"users\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eall\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# returns User instances\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eUserService\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003elist\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# returns UserService::User instances\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecompare\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003emap\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u0026amp;\u003cspan class=\"pl-pds\"\u003e:login\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e == \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003emap\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u0026amp;\u003cspan class=\"pl-pds\"\u003e:login\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf either the control block or candidate block raises an error, Scientist compares the two observations' classes and messages using \u003ccode\u003e==\u003c/code\u003e. To override this behavior, use \u003ccode\u003ecompare_errors\u003c/code\u003e to define how to compare observed errors instead:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"class MyWidget\n include Scientist\n\n def slug_from_login(login)\n science \u0026quot;slug_from_login\u0026quot; do |e|\n e.use { User.slug_from_login login } # returns String instance or ArgumentError\n e.try { UserService.slug_from_login login } # returns String instance or ArgumentError\n\n compare_error_message_and_class = -\u0026gt; (control, candidate) do\n control.class == candidate.class \u0026amp;\u0026amp;\n control.message == candidate.message\n end\n\n compare_argument_errors = -\u0026gt; (control, candidate) do\n control.class == ArgumentError \u0026amp;\u0026amp;\n candidate.class == ArgumentError \u0026amp;\u0026amp;\n control.message.start_with?(\u0026quot;Input has invalid characters\u0026quot;) \u0026amp;\u0026amp;\n candidate.message.start_with?(\u0026quot;Invalid characters in input\u0026quot;)\n end\n\n e.compare_errors do |control, candidate|\n compare_error_message_and_class.call(control, candidate) ||\n compare_argument_errors.call(control, candidate)\n end\n end\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyWidget\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eslug_from_login\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003elogin\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"slug_from_login\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eslug_from_login\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elogin\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# returns String instance or ArgumentError\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eUserService\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eslug_from_login\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elogin\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# returns String instance or ArgumentError\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ecompare_error_message_and_class\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eclass\u003c/span\u003e == \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eclass\u003c/span\u003e \u0026amp;\u0026amp;\n \u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003emessage\u003c/span\u003e == \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003emessage\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ecompare_argument_errors\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eclass\u003c/span\u003e == \u003cspan class=\"pl-v\"\u003eArgumentError\u003c/span\u003e \u0026amp;\u0026amp;\n \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eclass\u003c/span\u003e == \u003cspan class=\"pl-v\"\u003eArgumentError\u003c/span\u003e \u0026amp;\u0026amp;\n \u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003emessage\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003estart_with?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Input has invalid characters\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u0026amp;\u0026amp;\n \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003emessage\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003estart_with?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Invalid characters in input\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecompare_errors\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ecompare_error_message_and_class\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecall\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e ||\n \u003cspan class=\"pl-s1\"\u003ecompare_argument_errors\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecall\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eAdding context\u003c/h3\u003e\u003ca id=\"user-content-adding-context\" class=\"anchor\" aria-label=\"Permalink: Adding context\" href=\"#adding-context\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eResults aren't very useful without some way to identify them. Use the \u003ccode\u003econtext\u003c/code\u003e method to add to or retrieve the context for an experiment:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"science \u0026quot;widget-permissions\u0026quot; do |e|\n e.context :user =\u0026gt; user\n\n e.use { model.check_user(user).valid? }\n e.try { user.can?(:read, model) }\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"widget-permissions\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003econtext\u003c/span\u003e \u003cspan class=\"pl-pds\"\u003e:user\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-en\"\u003euser\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003echeck_user\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003evalid?\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecan?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-pds\"\u003e:read\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ccode\u003econtext\u003c/code\u003e takes a Symbol-keyed Hash of extra data. The data is available in \u003ccode\u003eExperiment#publish\u003c/code\u003e via the \u003ccode\u003econtext\u003c/code\u003e method. If you're using the \u003ccode\u003escience\u003c/code\u003e helper a lot in a class, you can provide a default context:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"class MyWidget\n include Scientist\n\n def allows?(user)\n science \u0026quot;widget-permissions\u0026quot; do |e|\n e.context :user =\u0026gt; user\n\n e.use { model.check_user(user).valid? }\n e.try { user.can?(:read, model) }\n end\n end\n\n def destroy\n science \u0026quot;widget-destruction\u0026quot; do |e|\n e.use { old_scary_destroy }\n e.try { new_safe_destroy }\n end\n end\n\n def default_scientist_context\n { :widget =\u0026gt; self }\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyWidget\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eallows?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"widget-permissions\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003econtext\u003c/span\u003e \u003cspan class=\"pl-pds\"\u003e:user\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003echeck_user\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003evalid?\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecan?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-pds\"\u003e:read\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003edestroy\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"widget-destruction\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eold_scary_destroy\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003enew_safe_destroy\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003edefault_scientist_context\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-pds\"\u003e:widget\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003eself\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003ewidget-permissions\u003c/code\u003e and \u003ccode\u003ewidget-destruction\u003c/code\u003e experiments will both have a \u003ccode\u003e:widget\u003c/code\u003e key in their contexts.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eExpensive setup\u003c/h3\u003e\u003ca id=\"user-content-expensive-setup\" class=\"anchor\" aria-label=\"Permalink: Expensive setup\" href=\"#expensive-setup\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf an experiment requires expensive setup that should only occur when the experiment is going to be run, define it with the \u003ccode\u003ebefore_run\u003c/code\u003e method:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Code under test modifies this in-place. We want to copy it for the\n# candidate code, but only when needed:\nvalue_for_original_code = big_object\nvalue_for_new_code = nil\n\nscience \u0026quot;expensive-but-worthwhile\u0026quot; do |e|\n e.before_run do\n value_for_new_code = big_object.deep_copy\n end\n e.use { original_code(value_for_original_code) }\n e.try { new_code(value_for_new_code) }\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-c\"\u003e# Code under test modifies this in-place. We want to copy it for the\u003c/span\u003e\n\u003cspan class=\"pl-c\"\u003e# candidate code, but only when needed:\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003evalue_for_original_code\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ebig_object\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003evalue_for_new_code\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003enil\u003c/span\u003e\n\n\u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"expensive-but-worthwhile\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ebefore_run\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003evalue_for_new_code\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ebig_object\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003edeep_copy\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eoriginal_code\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003evalue_for_original_code\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003enew_code\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003evalue_for_new_code\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eKeeping it clean\u003c/h3\u003e\u003ca id=\"user-content-keeping-it-clean\" class=\"anchor\" aria-label=\"Permalink: Keeping it clean\" href=\"#keeping-it-clean\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSometimes you don't want to store the full value for later analysis. For example, an experiment may return \u003ccode\u003eUser\u003c/code\u003e instances, but when researching a mismatch, all you care about is the logins. You can define how to clean these values in an experiment:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"class MyWidget\n include Scientist\n\n def users\n science \u0026quot;users\u0026quot; do |e|\n e.use { User.all }\n e.try { UserService.list }\n\n e.clean do |value|\n value.map(\u0026amp;:login).sort\n end\n end\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyWidget\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eusers\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"users\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eall\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eUserService\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003elist\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eclean\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003evalue\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003evalue\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003emap\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u0026amp;\u003cspan class=\"pl-pds\"\u003e:login\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003esort\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAnd this cleaned value is available in observations in the final published result:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"class MyExperiment\n include Scientist::Experiment\n\n # ...\n\n def publish(result)\n result.control.value # [\u0026lt;User alice\u0026gt;, \u0026lt;User bob\u0026gt;, \u0026lt;User carol\u0026gt;]\n result.control.cleaned_value # [\u0026quot;alice\u0026quot;, \u0026quot;bob\u0026quot;, \u0026quot;carol\u0026quot;]\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyExperiment\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e::\u003cspan class=\"pl-v\"\u003eExperiment\u003c/span\u003e\n\n \u003cspan class=\"pl-c\"\u003e# ...\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epublish\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003evalue\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# [\u0026lt;User alice\u0026gt;, \u0026lt;User bob\u0026gt;, \u0026lt;User carol\u0026gt;]\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecleaned_value\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# [\"alice\", \"bob\", \"carol\"]\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eNote that the \u003ccode\u003e#clean\u003c/code\u003e method will discard the previous cleaner block if you call it again. If for some reason you need to access the currently configured cleaner block, \u003ccode\u003eScientist::Experiment#cleaner\u003c/code\u003e will return the block without further ado. \u003cem\u003e(This probably won't come up in normal usage, but comes in handy if you're writing, say, a custom experiment runner that provides default cleaners.)\u003c/em\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003e#clean\u003c/code\u003e method will not be used for comparison of the results, so in the following example it is not possible to remove the \u003ccode\u003e#compare\u003c/code\u003e method without the experiment failing:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"def user_ids\n science \u0026quot;user_ids\u0026quot; do\n e.use { [1,2,3] }\n e.try { [1,3,2] }\n e.clean { |value| value.sort }\n e.compare { |a, b| a.sort == b.sort }\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003euser_ids\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"user_ids\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e2\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e3\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e]\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e3\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e2\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e]\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eclean\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003evalue\u003c/span\u003e| \u003cspan class=\"pl-s1\"\u003evalue\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003esort\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecompare\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ea\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eb\u003c/span\u003e| \u003cspan class=\"pl-s1\"\u003ea\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003esort\u003c/span\u003e == \u003cspan class=\"pl-s1\"\u003eb\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003esort\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eIgnoring mismatches\u003c/h3\u003e\u003ca id=\"user-content-ignoring-mismatches\" class=\"anchor\" aria-label=\"Permalink: Ignoring mismatches\" href=\"#ignoring-mismatches\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDuring the early stages of an experiment, it's possible that some of your code will always generate a mismatch for reasons you know and understand but haven't yet fixed. Instead of these known cases always showing up as mismatches in your metrics or analysis, you can tell an experiment whether or not to ignore a mismatch using the \u003ccode\u003eignore\u003c/code\u003e method. You may include more than one block if needed:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"def admin?(user)\n science \u0026quot;widget-permissions\u0026quot; do |e|\n e.use { model.check_user(user).admin? }\n e.try { user.can?(:admin, model) }\n\n e.ignore { user.staff? } # user is staff, always an admin in the new system\n e.ignore do |control, candidate|\n # new system doesn't handle unconfirmed users yet:\n control \u0026amp;\u0026amp; !candidate \u0026amp;\u0026amp; !user.confirmed_email?\n end\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eadmin?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"widget-permissions\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003echeck_user\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eadmin?\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecan?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-pds\"\u003e:admin\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eignore\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003estaff?\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# user is staff, always an admin in the new system\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eignore\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e|\n \u003cspan class=\"pl-c\"\u003e# new system doesn't handle unconfirmed users yet:\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003econtrol\u003c/span\u003e \u0026amp;\u0026amp; !\u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e \u0026amp;\u0026amp; !\u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003econfirmed_email?\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe ignore blocks are only called if the \u003cem\u003evalues\u003c/em\u003e don't match. Unless a \u003ccode\u003ecompare_errors\u003c/code\u003e comparator is defined, two cases are considered mismatches: a) one observation raising an exception and the other not, b) observations raising exceptions with different classes or messages.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eEnabling/disabling experiments\u003c/h3\u003e\u003ca id=\"user-content-enablingdisabling-experiments\" class=\"anchor\" aria-label=\"Permalink: Enabling/disabling experiments\" href=\"#enablingdisabling-experiments\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSometimes you don't want an experiment to run. Say, disabling a new codepath for anyone who isn't staff. You can disable an experiment by setting a \u003ccode\u003erun_if\u003c/code\u003e block. If this returns \u003ccode\u003efalse\u003c/code\u003e, the experiment will merely return the control value. Otherwise, it defers to the experiment's configured \u003ccode\u003eenabled?\u003c/code\u003e method.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"class DashboardController\n include Scientist\n\n def dashboard_items\n science \u0026quot;dashboard-items\u0026quot; do |e|\n # only run this experiment for staff members\n e.run_if { current_user.staff? }\n # ...\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eDashboardController\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003edashboard_items\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"dashboard-items\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-c\"\u003e# only run this experiment for staff members\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003erun_if\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ecurrent_user\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003estaff?\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# ...\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eRamping up experiments\u003c/h3\u003e\u003ca id=\"user-content-ramping-up-experiments\" class=\"anchor\" aria-label=\"Permalink: Ramping up experiments\" href=\"#ramping-up-experiments\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAs a scientist, you know it's always important to be able to turn your experiment off, lest it run amok and result in villagers with pitchforks on your doorstep. In order to control whether or not an experiment is enabled, you must include the \u003ccode\u003eenabled?\u003c/code\u003e method in your \u003ccode\u003eScientist::Experiment\u003c/code\u003e implementation.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"class MyExperiment\n include Scientist::Experiment\n\n attr_accessor :name, :percent_enabled\n\n def initialize(name)\n @name = name\n @percent_enabled = 100\n end\n\n def enabled?\n percent_enabled \u0026gt; 0 \u0026amp;\u0026amp; rand(100) \u0026lt; percent_enabled\n end\n\n # ...\n\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyExperiment\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e::\u003cspan class=\"pl-v\"\u003eExperiment\u003c/span\u003e\n\n \u003cspan class=\"pl-en\"\u003eattr_accessor\u003c/span\u003e \u003cspan class=\"pl-pds\"\u003e:name\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-pds\"\u003e:percent_enabled\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003einitialize\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003e@name\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003e@percent_enabled\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e100\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eenabled?\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003epercent_enabled\u003c/span\u003e \u0026gt; \u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e \u0026amp;\u0026amp; \u003cspan class=\"pl-en\"\u003erand\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e100\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u0026lt; \u003cspan class=\"pl-en\"\u003epercent_enabled\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n \u003cspan class=\"pl-c\"\u003e# ...\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThis code will be invoked for every method with an experiment every time, so be sensitive about its performance. For example, you can store an experiment in the database but wrap it in various levels of caching such as memcache or per-request thread-locals.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003ePublishing results\u003c/h3\u003e\u003ca id=\"user-content-publishing-results\" class=\"anchor\" aria-label=\"Permalink: Publishing results\" href=\"#publishing-results\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eWhat good is science if you can't publish your results?\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eYou must implement the \u003ccode\u003epublish(result)\u003c/code\u003e method, and can publish data however you like. For example, timing data can be sent to graphite, and mismatches can be placed in a capped collection in redis for debugging later.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003epublish\u003c/code\u003e method is given a \u003ccode\u003eScientist::Result\u003c/code\u003e instance with its associated \u003ccode\u003eScientist::Observation\u003c/code\u003es:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"class MyExperiment\n include Scientist::Experiment\n\n # ...\n\n def publish(result)\n\n # Wall time\n # Store the timing for the control value,\n $statsd.timing \u0026quot;science.#{name}.control\u0026quot;, result.control.duration\n # for the candidate (only the first, see \u0026quot;Breaking the rules\u0026quot; below,\n $statsd.timing \u0026quot;science.#{name}.candidate\u0026quot;, result.candidates.first.duration\n\n # CPU time\n # Store the timing for the control value,\n $statsd.timing \u0026quot;science.cpu.#{name}.control\u0026quot;, result.control.cpu_time\n # for the candidate (only the first, see \u0026quot;Breaking the rules\u0026quot; below,\n $statsd.timing \u0026quot;science.cpu.#{name}.candidate\u0026quot;, result.candidates.first.cpu_time\n\n # and counts for match/ignore/mismatch:\n if result.matched?\n $statsd.increment \u0026quot;science.#{name}.matched\u0026quot;\n elsif result.ignored?\n $statsd.increment \u0026quot;science.#{name}.ignored\u0026quot;\n else\n $statsd.increment \u0026quot;science.#{name}.mismatched\u0026quot;\n # Finally, store mismatches in redis so they can be retrieved and examined\n # later on, for debugging and research.\n store_mismatch_data(result)\n end\n end\n\n def store_mismatch_data(result)\n payload = {\n :name =\u0026gt; name,\n :context =\u0026gt; context,\n :control =\u0026gt; observation_payload(result.control),\n :candidate =\u0026gt; observation_payload(result.candidates.first),\n :execution_order =\u0026gt; result.observations.map(\u0026amp;:name)\n }\n\n key = \u0026quot;science.#{name}.mismatch\u0026quot;\n $redis.lpush key, payload\n $redis.ltrim key, 0, 1000\n end\n\n def observation_payload(observation)\n if observation.raised?\n {\n :exception =\u0026gt; observation.exception.class,\n :message =\u0026gt; observation.exception.message,\n :backtrace =\u0026gt; observation.exception.backtrace\n }\n else\n {\n # see \u0026quot;Keeping it clean\u0026quot; above\n :value =\u0026gt; observation.cleaned_value\n }\n end\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyExperiment\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e::\u003cspan class=\"pl-v\"\u003eExperiment\u003c/span\u003e\n\n \u003cspan class=\"pl-c\"\u003e# ...\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003epublish\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n\n \u003cspan class=\"pl-c\"\u003e# Wall time\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# Store the timing for the control value,\u003c/span\u003e\n $statsd\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etiming\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"science.\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e.control\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eduration\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# for the candidate (only the first, see \"Breaking the rules\" below,\u003c/span\u003e\n $statsd\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etiming\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"science.\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e.candidate\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecandidates\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003efirst\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eduration\u003c/span\u003e\n\n \u003cspan class=\"pl-c\"\u003e# CPU time\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# Store the timing for the control value,\u003c/span\u003e\n $statsd\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etiming\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"science.cpu.\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e.control\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecpu_time\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# for the candidate (only the first, see \"Breaking the rules\" below,\u003c/span\u003e\n $statsd\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etiming\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"science.cpu.\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e.candidate\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecandidates\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003efirst\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecpu_time\u003c/span\u003e\n\n \u003cspan class=\"pl-c\"\u003e# and counts for match/ignore/mismatch:\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ematched?\u003c/span\u003e\n $statsd\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eincrement\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"science.\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e.matched\"\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eelsif\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eignored?\u003c/span\u003e\n $statsd\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eincrement\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"science.\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e.ignored\"\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eelse\u003c/span\u003e\n $statsd\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eincrement\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"science.\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e.mismatched\"\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# Finally, store mismatches in redis so they can be retrieved and examined\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# later on, for debugging and research.\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003estore_mismatch_data\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003estore_mismatch_data\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003epayload\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n \u003cspan class=\"pl-pds\"\u003e:name\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-pds\"\u003e:context\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-en\"\u003econtext\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-pds\"\u003e:control\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eobservation_payload\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-pds\"\u003e:candidate\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eobservation_payload\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecandidates\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003efirst\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-pds\"\u003e:execution_order\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eobservations\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003emap\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u0026amp;\u003cspan class=\"pl-pds\"\u003e:name\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ekey\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"science.\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e.mismatch\"\u003c/span\u003e\n $redis\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003elpush\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ekey\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003epayload\u003c/span\u003e\n $redis\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eltrim\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ekey\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e1000\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eobservation_payload\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eobservation\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eobservation\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eraised?\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n \u003cspan class=\"pl-pds\"\u003e:exception\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eobservation\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eexception\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eclass\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-pds\"\u003e:message\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eobservation\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eexception\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003emessage\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-pds\"\u003e:backtrace\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eobservation\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eexception\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ebacktrace\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eelse\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# see \"Keeping it clean\" above\u003c/span\u003e\n \u003cspan class=\"pl-pds\"\u003e:value\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eobservation\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecleaned_value\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eTesting\u003c/h3\u003e\u003ca id=\"user-content-testing\" class=\"anchor\" aria-label=\"Permalink: Testing\" href=\"#testing\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eWhen running your test suite, it's helpful to know that the experimental results always match. To help with testing, Scientist defines a \u003ccode\u003eraise_on_mismatches\u003c/code\u003e class attribute when you include \u003ccode\u003eScientist::Experiment\u003c/code\u003e. Only do this in your test suite!\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eTo raise on mismatches:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"class MyExperiment\n include Scientist::Experiment\n # ... implementation\nend\n\nMyExperiment.raise_on_mismatches = true\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyExperiment\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e::\u003cspan class=\"pl-v\"\u003eExperiment\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# ... implementation\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n\u003cspan class=\"pl-v\"\u003eMyExperiment\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eraise_on_mismatches\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003etrue\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eScientist will raise a \u003ccode\u003eScientist::Experiment::MismatchError\u003c/code\u003e exception if any observations don't match.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCustom mismatch errors\u003c/h4\u003e\u003ca id=\"user-content-custom-mismatch-errors\" class=\"anchor\" aria-label=\"Permalink: Custom mismatch errors\" href=\"#custom-mismatch-errors\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo instruct Scientist to raise a custom error instead of the default \u003ccode\u003eScientist::Experiment::MismatchError\u003c/code\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"class CustomMismatchError \u0026lt; Scientist::Experiment::MismatchError\n def to_s\n message = \u0026quot;There was a mismatch! Here's the diff:\u0026quot;\n\n diffs = result.candidates.map do |candidate|\n Diff.new(result.control, candidate)\n end.join(\u0026quot;\\n\u0026quot;)\n\n \u0026quot;#{message}\\n#{diffs}\u0026quot;\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eCustomMismatchError\u003c/span\u003e \u0026lt; \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e::\u003cspan class=\"pl-v\"\u003eExperiment\u003c/span\u003e::\u003cspan class=\"pl-v\"\u003eMismatchError\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eto_s\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003emessage\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"There was a mismatch! Here's the diff:\"\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ediffs\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecandidates\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003emap\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e|\n \u003cspan class=\"pl-v\"\u003eDiff\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003enew\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003econtrol\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecandidate\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ejoin\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\u003cspan class=\"pl-cce\"\u003e\\n\u003c/span\u003e\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n\n \u003cspan class=\"pl-s\"\u003e\"\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emessage\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"pl-cce\"\u003e\\n\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ediffs\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\"\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"science \u0026quot;widget-permissions\u0026quot; do |e|\n e.use { Report.find(id) }\n e.try { ReportService.new.fetch(id) }\n\n e.raise_with CustomMismatchError\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"widget-permissions\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eReport\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003efind\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eid\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eReportService\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003enew\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003efetch\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eid\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eraise_with\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eCustomMismatchError\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThis allows for pre-processing on mismatch error exception messages.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eHandling errors\u003c/h3\u003e\u003ca id=\"user-content-handling-errors\" class=\"anchor\" aria-label=\"Permalink: Handling errors\" href=\"#handling-errors\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eIn candidate code\u003c/h4\u003e\u003ca id=\"user-content-in-candidate-code\" class=\"anchor\" aria-label=\"Permalink: In candidate code\" href=\"#in-candidate-code\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eScientist rescues and tracks \u003cem\u003eall\u003c/em\u003e exceptions raised in a \u003ccode\u003etry\u003c/code\u003e or \u003ccode\u003euse\u003c/code\u003e block, including some where rescuing may cause unexpected behavior (like \u003ccode\u003eSystemExit\u003c/code\u003e or \u003ccode\u003eScriptError\u003c/code\u003e). To rescue a more restrictive set of exceptions, modify the \u003ccode\u003eRESCUES\u003c/code\u003e list:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# default is [Exception]\nScientist::Observation::RESCUES.replace [StandardError]\"\u003e\u003cpre\u003e\u003cspan class=\"pl-c\"\u003e# default is [Exception]\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e::\u003cspan class=\"pl-v\"\u003eObservation\u003c/span\u003e::\u003cspan class=\"pl-c1\"\u003eRESCUES\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ereplace\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eStandardError\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e]\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eTimeout ⏲️\u003c/strong\u003e: If you're introducing a candidate that could possibly timeout, use caution. \u003cg-emoji class=\"g-emoji\" alias=\"warning\"\u003e⚠️\u003c/g-emoji\u003e While Scientist rescues all exceptions that occur in the candidate block, it \u003cem\u003edoes not\u003c/em\u003e protect you from timeouts, as doing so would be complicated. It would likely require running the candidate code in a background job and tracking the time of a request. We feel the cost of this complexity would outweigh the benefit, so make sure that your code doesn't cause timeouts. This risk can be reduced by running the experiment on a low percentage so that users can (most likely) bypass the experiment by refreshing the page if they hit a timeout. See \u003ca href=\"#ramping-up-experiments\"\u003eRamping up experiments\u003c/a\u003e below for how details on how to set the percentage for your experiment.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eIn a Scientist callback\u003c/h4\u003e\u003ca id=\"user-content-in-a-scientist-callback\" class=\"anchor\" aria-label=\"Permalink: In a Scientist callback\" href=\"#in-a-scientist-callback\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf an exception is raised within any of Scientist's internal helpers, like \u003ccode\u003epublish\u003c/code\u003e, \u003ccode\u003ecompare\u003c/code\u003e, or \u003ccode\u003eclean\u003c/code\u003e, the \u003ccode\u003eraised\u003c/code\u003e method is called with the symbol name of the internal operation that failed and the exception that was raised. The default behavior of \u003ccode\u003eScientist::Default\u003c/code\u003e is to simply re-raise the exception. Since this halts the experiment entirely, it's often a better idea to handle this error and continue so the experiment as a whole isn't canceled entirely:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"class MyExperiment\n include Scientist::Experiment\n\n # ...\n\n def raised(operation, error)\n InternalErrorTracker.track! \u0026quot;science failure in #{name}: #{operation}\u0026quot;, error\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyExperiment\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e::\u003cspan class=\"pl-v\"\u003eExperiment\u003c/span\u003e\n\n \u003cspan class=\"pl-c\"\u003e# ...\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eraised\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eoperation\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eerror\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-v\"\u003eInternalErrorTracker\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etrack!\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"science failure in \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e: \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e#{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eoperation\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eerror\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe operations that may be handled here are:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ccode\u003e:clean\u003c/code\u003e - an exception is raised in a \u003ccode\u003eclean\u003c/code\u003e block\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e:compare\u003c/code\u003e - an exception is raised in a \u003ccode\u003ecompare\u003c/code\u003e block\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e:enabled\u003c/code\u003e - an exception is raised in the \u003ccode\u003eenabled?\u003c/code\u003e method\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e:ignore\u003c/code\u003e - an exception is raised in an \u003ccode\u003eignore\u003c/code\u003e block\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e:publish\u003c/code\u003e - an exception is raised in the \u003ccode\u003epublish\u003c/code\u003e method\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e:run_if\u003c/code\u003e - an exception is raised in a \u003ccode\u003erun_if\u003c/code\u003e block\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eDesigning an experiment\u003c/h3\u003e\u003ca id=\"user-content-designing-an-experiment\" class=\"anchor\" aria-label=\"Permalink: Designing an experiment\" href=\"#designing-an-experiment\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBecause \u003ccode\u003eenabled?\u003c/code\u003e and \u003ccode\u003erun_if\u003c/code\u003e determine when a candidate runs, it's impossible to guarantee that it will run every time. For this reason, Scientist is only safe for wrapping methods that aren't changing data.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eWhen using Scientist, we've found it most useful to modify both the existing and new systems simultaneously anywhere writes happen, and verify the results at read time with \u003ccode\u003escience\u003c/code\u003e. \u003ccode\u003eraise_on_mismatches\u003c/code\u003e has also been useful to ensure that the correct data was written during tests, and reviewing published mismatches has helped us find any situations we overlooked with our production data at runtime. When writing to and reading from two systems, it's also useful to write some data reconciliation scripts to verify and clean up production data alongside any running experiments.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eNoise and error rates\u003c/h4\u003e\u003ca id=\"user-content-noise-and-error-rates\" class=\"anchor\" aria-label=\"Permalink: Noise and error rates\" href=\"#noise-and-error-rates\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eKeep in mind that Scientist's \u003ccode\u003etry\u003c/code\u003e and \u003ccode\u003euse\u003c/code\u003e blocks run sequentially in random order. As such, any data upon which your code depends may change before the second block is invoked, potentially yielding a mismatch between the candidate and control return values. To calibrate your expectations with respect to \u003ca href=\"https://en.wikipedia.org/wiki/Type_I_and_type_II_errors\" rel=\"nofollow\"\u003efalse negatives\u003c/a\u003e arising from systemic conditions external to your proposed changes, consider starting with an experiment in which both the \u003ccode\u003etry\u003c/code\u003e and \u003ccode\u003euse\u003c/code\u003e blocks invoke the control method. Then proceed with introducing a candidate.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eFinishing an experiment\u003c/h3\u003e\u003ca id=\"user-content-finishing-an-experiment\" class=\"anchor\" aria-label=\"Permalink: Finishing an experiment\" href=\"#finishing-an-experiment\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAs your candidate behavior converges on the controls, you'll start thinking about removing an experiment and using the new behavior.\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eIf there are any ignore blocks, the candidate behavior is \u003cem\u003eguaranteed\u003c/em\u003e to be different. If this is unacceptable, you'll need to remove the ignore blocks and resolve any ongoing mismatches in behavior until the observations match perfectly every time.\u003c/li\u003e\n\u003cli\u003eWhen removing a read-behavior experiment, it's a good idea to keep any write-side duplication between an old and new system in place until well after the new behavior has been in production, in case you need to roll back.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eBreaking the rules\u003c/h2\u003e\u003ca id=\"user-content-breaking-the-rules\" class=\"anchor\" aria-label=\"Permalink: Breaking the rules\" href=\"#breaking-the-rules\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSometimes scientists just gotta do weird stuff. We understand.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eIgnoring results entirely\u003c/h3\u003e\u003ca id=\"user-content-ignoring-results-entirely\" class=\"anchor\" aria-label=\"Permalink: Ignoring results entirely\" href=\"#ignoring-results-entirely\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eScience is useful even when all you care about is the timing data or even whether or not a new code path blew up. If you have the ability to incrementally control how often an experiment runs via your \u003ccode\u003eenabled?\u003c/code\u003e method, you can use it to silently and carefully test new code paths and ignore the results altogether. You can do this by setting \u003ccode\u003eignore { true }\u003c/code\u003e, or for greater efficiency, \u003ccode\u003ecompare { true }\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis will still log mismatches if any exceptions are raised, but will disregard the values entirely.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eTrying more than one thing\u003c/h3\u003e\u003ca id=\"user-content-trying-more-than-one-thing\" class=\"anchor\" aria-label=\"Permalink: Trying more than one thing\" href=\"#trying-more-than-one-thing\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIt's not usually a good idea to try more than one alternative simultaneously. Behavior isn't guaranteed to be isolated and reporting + visualization get quite a bit harder. Still, it's sometimes useful.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eTo try more than one alternative at once, add names to some \u003ccode\u003etry\u003c/code\u003e blocks:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"require \u0026quot;scientist\u0026quot;\n\nclass MyWidget\n include Scientist\n\n def allows?(user)\n science \u0026quot;widget-permissions\u0026quot; do |e|\n e.use { model.check_user(user).valid? } # old way\n\n e.try(\u0026quot;api\u0026quot;) { user.can?(:read, model) } # new service API\n e.try(\u0026quot;raw-sql\u0026quot;) { user.can_sql?(:read, model) } # raw query\n end\n end\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-en\"\u003erequire\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"scientist\"\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyWidget\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003einclude\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eallows?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"widget-permissions\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003echeck_user\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003evalid?\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# old way\u003c/span\u003e\n\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"api\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecan?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-pds\"\u003e:read\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# new service API\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"raw-sql\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecan_sql?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-pds\"\u003e:read\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# raw query\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eWhen the experiment runs, all candidate behaviors are tested and each candidate observation is compared with the control in turn.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eNo control, just candidates\u003c/h3\u003e\u003ca id=\"user-content-no-control-just-candidates\" class=\"anchor\" aria-label=\"Permalink: No control, just candidates\" href=\"#no-control-just-candidates\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefine the candidates with named \u003ccode\u003etry\u003c/code\u003e blocks, omit a \u003ccode\u003euse\u003c/code\u003e, and pass a candidate name to \u003ccode\u003erun\u003c/code\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"experiment = MyExperiment.new(\u0026quot;various-ways\u0026quot;) do |e|\n e.try(\u0026quot;first-way\u0026quot;) { ... }\n e.try(\u0026quot;second-way\u0026quot;) { ... }\nend\n\nexperiment.run(\u0026quot;second-way\u0026quot;)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-en\"\u003eexperiment\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyExperiment\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003enew\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"various-ways\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"first-way\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e ... \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"second-way\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e ... \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\n\n\u003cspan class=\"pl-en\"\u003eexperiment\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003erun\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"second-way\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003escience\u003c/code\u003e helper also knows this trick:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"science \u0026quot;various-ways\u0026quot;, run: \u0026quot;first-way\u0026quot; do |e|\n e.try(\u0026quot;first-way\u0026quot;) { ... }\n e.try(\u0026quot;second-way\u0026quot;) { ... }\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"various-ways\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-pds\"\u003erun\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"first-way\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"first-way\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e ... \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"second-way\"\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e ... \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eProviding fake timing data\u003c/h4\u003e\u003ca id=\"user-content-providing-fake-timing-data\" class=\"anchor\" aria-label=\"Permalink: Providing fake timing data\" href=\"#providing-fake-timing-data\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf you're writing tests that depend on specific timing values, you can provide canned durations using the \u003ccode\u003efabricate_durations_for_testing_purposes\u003c/code\u003e method, and Scientist will report these in \u003ccode\u003eScientist::Observation#duration\u003c/code\u003e and \u003ccode\u003eScientist::Observation#cpu_time\u003c/code\u003e instead of the actual execution times.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"science \u0026quot;absolutely-nothing-suspicious-happening-here\u0026quot; do |e|\n e.use { ... } # \u0026quot;control\u0026quot;\n e.try { ... } # \u0026quot;candidate\u0026quot;\n e.fabricate_durations_for_testing_purposes({\n \u0026quot;control\u0026quot; =\u0026gt; { \u0026quot;duration\u0026quot; =\u0026gt; 1.0, \u0026quot;cpu_time\u0026quot; =\u0026gt; 0.9 },\n \u0026quot;candidate\u0026quot; =\u0026gt; { \u0026quot;duration\u0026quot; =\u0026gt; 0.5, \u0026quot;cpu_time\u0026quot; =\u0026gt; 0.4 }\n })\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-en\"\u003escience\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"absolutely-nothing-suspicious-happening-here\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e ... \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# \"control\"\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e ... \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# \"candidate\"\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003efabricate_durations_for_testing_purposes\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n \u003cspan class=\"pl-s\"\u003e\"control\"\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"duration\"\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e1.0\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"cpu_time\"\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0.9\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-s\"\u003e\"candidate\"\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"duration\"\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0.5\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"cpu_time\"\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u0026gt;\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0.4\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ccode\u003efabricate_durations_for_testing_purposes\u003c/code\u003e takes a Hash of duration \u0026amp; cpu_time values, keyed by behavior names. (By default, Scientist uses \u003ccode\u003e\"control\"\u003c/code\u003e and \u003ccode\u003e\"candidate\"\u003c/code\u003e, but if you override these as shown in \u003ca href=\"#trying-more-than-one-thing\"\u003eTrying more than one thing\u003c/a\u003e or \u003ca href=\"#no-control-just-candidates\"\u003eNo control, just candidates\u003c/a\u003e, use matching names here.) If a name is not provided, the actual execution time will be reported instead.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eWe should mention these durations will be used both for the \u003ccode\u003eduration\u003c/code\u003e field and the \u003ccode\u003ecpu_time\u003c/code\u003e field.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cem\u003eLike \u003ccode\u003eScientist::Experiment#cleaner\u003c/code\u003e, this probably won't come up in normal usage. It's here to make it easier to test code that extends Scientist.\u003c/em\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eWithout including Scientist\u003c/h3\u003e\u003ca id=\"user-content-without-including-scientist\" class=\"anchor\" aria-label=\"Permalink: Without including Scientist\" href=\"#without-including-scientist\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf you need to use Scientist in a place where you aren't able to include the Scientist module, you can call \u003ccode\u003eScientist.run\u003c/code\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ruby notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Scientist.run \u0026quot;widget-permissions\u0026quot; do |e|\n e.use { model.check_user(user).valid? }\n e.try { user.can?(:read, model) }\nend\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eScientist\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003erun\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"widget-permissions\"\u003c/span\u003e \u003cspan class=\"pl-k\"\u003edo\u003c/span\u003e |\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e|\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003echeck_user\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-en\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003evalid?\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003etry\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-en\"\u003euser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecan?\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-pds\"\u003e:read\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-en\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eend\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eHacking\u003c/h2\u003e\u003ca id=\"user-content-hacking\" class=\"anchor\" aria-label=\"Permalink: Hacking\" href=\"#hacking\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBe on a Unixy box. Make sure a modern Bundler is available. \u003ccode\u003escript/test\u003c/code\u003e runs the unit tests. All development dependencies are installed automatically. Scientist requires Ruby 2.3 or newer.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eWrappers\u003c/h2\u003e\u003ca id=\"user-content-wrappers\" class=\"anchor\" aria-label=\"Permalink: Wrappers\" href=\"#wrappers\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/RealGeeks/lab_tech\"\u003eRealGeeks/lab_tech\u003c/a\u003e is a Rails engine for using this library by controlling, storing, and analyzing experiment results with ActiveRecord.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eAlternatives\u003c/h2\u003e\u003ca id=\"user-content-alternatives\" class=\"anchor\" aria-label=\"Permalink: Alternatives\" href=\"#alternatives\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/daylerees/scientist\"\u003edaylerees/scientist\u003c/a\u003e (PHP)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/scientistproject/Scientist.net\"\u003escientistproject/scientist.net\u003c/a\u003e (.NET)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/joealcorn/laboratory\"\u003ejoealcorn/laboratory\u003c/a\u003e (Python)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/rawls238/Scientist4J\"\u003erawls238/Scientist4J\u003c/a\u003e (Java)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/tomiaijo/scientist\"\u003etomiaijo/scientist\u003c/a\u003e (C++)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/trello/scientist\"\u003etrello/scientist\u003c/a\u003e (node.js)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/ziyasal/scientist.js\"\u003eziyasal/scientist.js\u003c/a\u003e (node.js, ES6)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/TrueWill/tzientist\"\u003eTrueWill/tzientist\u003c/a\u003e (node.js, TypeScript)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/TrueWill/paleontologist\"\u003eTrueWill/paleontologist\u003c/a\u003e (Deno, TypeScript)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/yeller/laboratory\"\u003eyeller/laboratory\u003c/a\u003e (Clojure)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/lancew/Scientist\"\u003elancew/Scientist\u003c/a\u003e (Perl 5)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/lancew/ScientistP6\"\u003elancew/ScientistP6\u003c/a\u003e (Perl 6)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/MadcapJake/Test-Lab\"\u003eMadcapJake/Test-Lab\u003c/a\u003e (Perl 6)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/cwbriones/scientist\"\u003ecwbriones/scientist\u003c/a\u003e (Elixir)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/calavera/go-scientist\"\u003ecalavera/go-scientist\u003c/a\u003e (Go)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/jelmersnoeck/experiment\"\u003ejelmersnoeck/experiment\u003c/a\u003e (Go)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/spoptchev/scientist\"\u003espoptchev/scientist\u003c/a\u003e (Kotlin / Java)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/junkpiano/scientist\"\u003ejunkpiano/scientist\u003c/a\u003e (Swift)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://serverlessscientist.com/\" rel=\"nofollow\"\u003eserverless scientist\u003c/a\u003e (AWS Lambda)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/fightmegg/scientist\"\u003efightmegg/scientist\u003c/a\u003e (TypeScript, Browser / Node.js)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/MisterSpex/misterspex-scientist\"\u003eMisterSpex/misterspex-scientist\u003c/a\u003e (Java, no dependencies)\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMaintainers\u003c/h2\u003e\u003ca id=\"user-content-maintainers\" class=\"anchor\" aria-label=\"Permalink: Maintainers\" href=\"#maintainers\"\u003e\u003csvg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"https://github.com/jbarnette\"\u003e@jbarnette\u003c/a\u003e,\n\u003ca href=\"https://github.com/jesseplusplus\"\u003e@jesseplusplus\u003c/a\u003e,\n\u003ca href=\"https://github.com/rick\"\u003e@rick\u003c/a\u003e,\nand \u003ca href=\"https://github.com/zerowidth\"\u003e@zerowidth\u003c/a\u003e\u003c/p\u003e\n\u003c/article\u003e","loaded":true,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Scientist!","anchor":"scientist","htmlText":"Scientist!"},{"level":2,"text":"How do I science?","anchor":"how-do-i-science","htmlText":"How do I science?"},{"level":2,"text":"Making science useful","anchor":"making-science-useful","htmlText":"Making science useful"},{"level":3,"text":"Controlling comparison","anchor":"controlling-comparison","htmlText":"Controlling comparison"},{"level":3,"text":"Adding context","anchor":"adding-context","htmlText":"Adding context"},{"level":3,"text":"Expensive setup","anchor":"expensive-setup","htmlText":"Expensive setup"},{"level":3,"text":"Keeping it clean","anchor":"keeping-it-clean","htmlText":"Keeping it clean"},{"level":3,"text":"Ignoring mismatches","anchor":"ignoring-mismatches","htmlText":"Ignoring mismatches"},{"level":3,"text":"Enabling/disabling experiments","anchor":"enablingdisabling-experiments","htmlText":"Enabling/disabling experiments"},{"level":3,"text":"Ramping up experiments","anchor":"ramping-up-experiments","htmlText":"Ramping up experiments"},{"level":3,"text":"Publishing results","anchor":"publishing-results","htmlText":"Publishing results"},{"level":3,"text":"Testing","anchor":"testing","htmlText":"Testing"},{"level":4,"text":"Custom mismatch errors","anchor":"custom-mismatch-errors","htmlText":"Custom mismatch errors"},{"level":3,"text":"Handling errors","anchor":"handling-errors","htmlText":"Handling errors"},{"level":4,"text":"In candidate code","anchor":"in-candidate-code","htmlText":"In candidate code"},{"level":4,"text":"In a Scientist callback","anchor":"in-a-scientist-callback","htmlText":"In a Scientist callback"},{"level":3,"text":"Designing an experiment","anchor":"designing-an-experiment","htmlText":"Designing an experiment"},{"level":4,"text":"Noise and error rates","anchor":"noise-and-error-rates","htmlText":"Noise and error rates"},{"level":3,"text":"Finishing an experiment","anchor":"finishing-an-experiment","htmlText":"Finishing an experiment"},{"level":2,"text":"Breaking the rules","anchor":"breaking-the-rules","htmlText":"Breaking the rules"},{"level":3,"text":"Ignoring results entirely","anchor":"ignoring-results-entirely","htmlText":"Ignoring results entirely"},{"level":3,"text":"Trying more than one thing","anchor":"trying-more-than-one-thing","htmlText":"Trying more than one thing"},{"level":3,"text":"No control, just candidates","anchor":"no-control-just-candidates","htmlText":"No control, just candidates"},{"level":4,"text":"Providing fake timing data","anchor":"providing-fake-timing-data","htmlText":"Providing fake timing data"},{"level":3,"text":"Without including Scientist","anchor":"without-including-scientist","htmlText":"Without including Scientist"},{"level":2,"text":"Hacking","anchor":"hacking","htmlText":"Hacking"},{"level":2,"text":"Wrappers","anchor":"wrappers","htmlText":"Wrappers"},{"level":2,"text":"Alternatives","anchor":"alternatives","htmlText":"Alternatives"},{"level":2,"text":"Maintainers","anchor":"maintainers","htmlText":"Maintainers"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fscientist"}},{"displayName":"CODE_OF_CONDUCT.md","repoName":".github","refName":"main","path":"CODE_OF_CONDUCT.md","preferredFileType":"code_of_conduct","tabName":"Code of conduct","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fscientist"}},{"displayName":"CONTRIBUTING.md","repoName":"scientist","refName":"main","path":"CONTRIBUTING.md","preferredFileType":"contributing","tabName":"Contributing","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fscientist"}},{"displayName":"LICENSE.txt","repoName":"scientist","refName":"main","path":"LICENSE.txt","preferredFileType":"license","tabName":"MIT","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fscientist"}},{"displayName":"SECURITY.md","repoName":".github","refName":"main","path":"SECURITY.md","preferredFileType":"security","tabName":"Security","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fscientist"}}],"overviewFilesProcessingTime":0,"copilotSWEAgentEnabled":false}},"codeViewLayoutRoute":{"repo":{"id":16549503,"defaultBranch":"main","name":"scientist","ownerLogin":"github","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2014-02-05T15:58:43.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/9919?v=4","public":true,"private":false,"isOrgOwned":true},"currentUser":null,"uploadToken":"AXuAtcwue_E78-gSSdmnKz_KZt6hhGqgjzQARMqYautCq7C18R4HW3921FryzhX6WBWchCHLQ0gw7ZdNWexcWQ","allShortcutsEnabled":false,"treeExpanded":true,"path":"/","symbolsExpanded":false,"refInfo":{"name":"main","listCacheKey":"v0:1789075898.0","canEdit":false,"currentOid":"504a396e987f655a21c6bf2ed57935aadaa40859"},"helpUrl":"https://docs.github.com","githubDevUrl":null},"sidebarAbout":{"description":":microscope: A Ruby library for carefully refactoring critical paths.","formattedDescription":"🔬 A Ruby library for carefully refactoring critical paths.","topics":[{"name":"refactoring"},{"name":"ruby"},{"name":"rubygem"},{"name":"scientist"}],"showInsights":true,"canOpenStargazersAndWatchers":false,"stargazerCount":7754,"watcherCount":438,"forksCount":504,"stargazersPath":"/github/scientist/stargazers","watchersPath":"/github/scientist/watchers","forkNetworkPath":"/github/scientist/forks","activityPath":"/github/scientist/activity","customPropertiesPath":"/github/scientist/custom-properties","reportPath":"/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fgithub%2Fscientist\u0026report=github+%28user%29","canEditMetadata":false,"ownerLogin":"github","repoName":"scientist","isOrg":true,"sections":{"releases":{"releaseCount":1,"tagCount":19},"sponsors":false,"deployments":false,"packages":true,"usedBy":true,"contributors":true,"languages":true,"cta":false,"suggestedWorkflows":false},"hasCitation":false,"repo":{"ownerAvatarUrl":"https://avatars.githubusercontent.com/u/9919?s=60\u0026v=4","ownerId":9919,"isPrivate":false,"isTemplate":false,"isFork":false,"isMirror":false,"isArchived":false,"visibilityLabel":"Public","license":{"spdxId":"MIT","name":"MIT License"},"isAdvisoryWorkspace":false},"star":{"viewerHasStarred":false,"canStar":false},"fork":{"canFork":false,"forkabilityError":"not_logged_in"},"pin":{"canPin":false,"isPinned":true,"isOrgOwned":true,"pinItemsRemaining":1},"watch":{"canWatch":false,"watchData":{"repositoryId":"16549503","repositoryName":"github/scientist","watchersCount":438,"subscriptionType":"none","subscribableThreadTypes":[{"name":"Issue","enabled":true,"subscribed":false},{"name":"PullRequest","enabled":true,"subscribed":false},{"name":"Release","enabled":true,"subscribed":false},{"name":"Discussion","enabled":false,"subscribed":false},{"name":"SecurityAlert","enabled":true,"subscribed":false}],"showLabelSubscriptions":false,"subscribedLabels":[]}},"viewer":{"isLoggedIn":false,"isSiteAdmin":false,"emuContributionBlocked":false},"showSponsorButton":false,"showTemplateButton":false,"showDemoNotification":false},"csrf_tokens":{"/github/scientist/branches":{"post":"lK1MCao23c7I1KRWWInu-v492GpLFqZiQEsLvb_hyWg2Yk_67dAa6do5RmvGNOU4cq2rX5Ri7t0SNVsRbq2txw"}}},"title":"GitHub - github/scientist: :microscope: A Ruby library for carefully refactoring critical paths.","appPayload":{},"meta":{"title":"GitHub - github/scientist: :microscope: A Ruby library for carefully refactoring critical paths."}}</script>
|
||
<div data-target="react-app.reactRoot"><meta name="github-code-view-meta-stats" id="github-code-view-meta-stats" data-hydrostats="publish"/> <!-- --> <a hidden="" id="code-view-repo-link" href="/github/scientist" data-discover="true"></a> <div class="d-none"></div><div><div style="--spacing:var(--spacing-none)" class="prc-PageLayout-PageLayoutRoot--KH-d" data-component="SplitPageLayout"><div class="prc-PageLayout-PageLayoutWrapper-2BhU2" data-width="full"><div class="prc-PageLayout-PageLayoutContent-BneH9"><div data-component="SplitPageLayout.Content" class="prc-PageLayout-ContentWrapper-gR9eG" data-is-hidden-narrow="false"><div class="prc-PageLayout-Content-xWL-A" data-width="full" style="--spacing:var(--spacing-none)"><div class="SharedPageLayout-module__content__IwGAp" data-selector="repos-split-pane-content" id="repos-split-pane-content" tabindex="0"><div style="--spacing:var(--spacing-none)" class="prc-PageLayout-PageLayoutRoot--KH-d container-xl" data-component="SplitPageLayout"><div class="prc-PageLayout-PageLayoutWrapper-2BhU2" data-width="full"><header data-component="SplitPageLayout.Header" data-hidden="false" class="prc-PageLayout-Header-0of-R tmp-px-3 tmp-px-lg-5" style="--spacing:var(--spacing-none)"><div class="prc-PageLayout-HeaderContent-gdFfN" style="--spacing:var(--spacing-none)"><!--&--><!--/&--></div><div class="prc-PageLayout-HorizontalDivider-JLVqp prc-PageLayout-HeaderHorizontalDivider-odAHl" data-component="PageLayout.HorizontalDivider" data-variant="none" style="--spacing-divider:var(--spacing-none);--spacing:var(--spacing-none)"></div></header><div class="prc-PageLayout-PageLayoutContent-BneH9"><div data-component="SplitPageLayout.Content" class="prc-PageLayout-ContentWrapper-gR9eG" data-is-hidden="false"><div class="prc-PageLayout-Content-xWL-A" data-width="large" style="--spacing:var(--spacing-condensed)"><div class="OverviewContent-module__Box__PF75K tmp-pl-lg-3 mt-0"><div class="OverviewHeader-module__Box__cC1RH"></div><div class="OverviewContent-module__Box_1__MPS0U"><div class="OverviewContent-module__Box_2__Di8Pb"><div class="OverviewContent-module__Box_3__wzlJx"><button data-component="Button" type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" style="min-width:0" aria-label="main branch" data-testid="anchor-button" data-icv-name="Switch branches/tags" class="prc-Button-ButtonBase-9n-Xk overview-ref-selector width-full RefSelectorAnchoredOverlay-module__RefSelectorOverlayBtn__a3WK3" data-loading="false" data-size="medium" data-variant="default" id="ref-picker-repos-header-ref-selector"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></span><span data-component="text" class="prc-Button-Label-FWkx3"><div class="RefSelectorAnchoredOverlay-module__RefSelectorOverlayContainer__yaf4p"><div class="ref-selector-button-text-container RefSelectorAnchoredOverlay-module__RefSelectorBtnTextContainer__Di3rk"><span class="RefSelectorAnchoredOverlay-module__RefSelectorText__w_fmP">main</span></div></div></span><span data-component="trailingVisual" class="prc-Button-Visual-YNt2F prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></span></button><div class="d-none"></div></div><div class="OverviewContent-module__Box_4__qf73o"><a data-component="Button" type="button" href="/github/scientist/branches" class="prc-Button-ButtonBase-9n-Xk OverviewContent-module__Button___Uotu" data-loading="false" data-size="medium" data-variant="invisible"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></span><span data-component="text" class="prc-Button-Label-FWkx3">Branches</span></span></a><a data-component="Button" type="button" href="/github/scientist/tags" class="prc-Button-ButtonBase-9n-Xk OverviewContent-module__Button___Uotu" data-loading="false" data-size="medium" data-variant="invisible"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-tag" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path></svg></span><span data-component="text" class="prc-Button-Label-FWkx3">Tags</span></span></a></div><div class="OverviewContent-module__Box_5__Zc3i7"><a data-component="Button" type="button" aria-label="Go to Branches page" href="/github/scientist/branches" class="prc-Button-ButtonBase-9n-Xk OverviewContent-module__Button_1__vmS6D" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="invisible"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></a><a data-component="Button" type="button" aria-label="Go to Tags page" href="/github/scientist/tags" class="prc-Button-ButtonBase-9n-Xk OverviewContent-module__Button_1__vmS6D" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="invisible"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-tag" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path></svg></a></div></div><div class="OverviewContent-module__Box_6__Y_Yb_"><div class="OverviewContent-module__Box_7__JuRXo"><div class="d-none"></div><div class="OverviewContent-module__Box_8__UZCZh"><div class="OverviewContent-module__FileResultsList__EjrTH"><span class="d-flex FileResultsList-module__FilesSearchBox__ivVkc TextInput-wrapper prc-components-TextInputWrapper-Hpdqi prc-components-TextInputBaseWrapper-wY-n0" data-no-trailing-action="true" data-component="TextInput" data-leading-visual="true" data-trailing-visual="true" aria-busy="false"><span class="TextInput-icon" id="_R_2hidahlik5_" aria-hidden="true" data-component="TextInput.LeadingVisual"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-search" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg></span><input type="text" aria-label="Go to file" role="combobox" aria-controls="file-results-list" aria-expanded="false" aria-haspopup="dialog" autoCorrect="off" spellCheck="false" placeholder="Go to file" aria-describedby="_R_2hidahlik5_ _R_2hidahlik5H1_" data-component="input" class="prc-components-Input-IwWrt" value=""/><span class="TextInput-icon" id="_R_2hidahlik5H1_" aria-hidden="true" data-component="TextInput.TrailingVisual"></span></span></div></div><div class="OverviewContent-module__Box_9__bqMPw"><button data-component="Button" type="button" class="prc-Button-ButtonBase-9n-Xk" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="default"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="text" class="prc-Button-Label-FWkx3">Go to file</span></span></button></div></div><button data-component="Button" type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-9n-Xk" data-loading="false" data-size="medium" data-variant="primary" id="_R_3idahlik5_"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-code hide-sm" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg></span><span data-component="text" class="prc-Button-Label-FWkx3">Code</span><span data-component="trailingVisual" class="prc-Button-Visual-YNt2F prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></span></button><div class="OverviewContent-module__Box_10__mGSb4"><button data-component="IconButton" type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-9n-Xk prc-Button-IconButton-fyge7" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="default" aria-labelledby="_R_3sidahlik5_" id="_R_4idahlik5_"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-kebab-horizontal" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg></button><span class="prc-TooltipV2-Tooltip-tLeuB" data-direction="n" data-component="Tooltip" aria-hidden="true" id="_R_3sidahlik5_">Open more actions menu</span></div></div></div><div class="OverviewContent-module__Box_11__F19kY"><div data-hpc="true" containertiming="hpc"><div class="d-none"></div><div class="DirectoryContent-module__Box_3__gl6dE bgColor-muted p-1 border border-bottom-0 rounded-top-2"><div class="LatestCommit-module__Box__B25ZT"><h2 class="sr-only ScreenReaderHeading-module__userSelectNone__rwWIk prc-Heading-Heading-MtWFE" data-component="Heading" data-testid="screen-reader-heading">Latest commit</h2><div style="width:120px" class="Skeleton Skeleton--text" data-testid="loading"> </div><div class="d-flex flex-shrink-0 gap-2"><div data-testid="latest-commit-details" class="d-none d-sm-flex flex-items-center"></div><div class="d-flex gap-2"><h2 class="sr-only ScreenReaderHeading-module__userSelectNone__rwWIk prc-Heading-Heading-MtWFE" data-component="Heading" data-testid="screen-reader-heading">History</h2><a data-component="LinkButton" href="/github/scientist/commits/main/" class="prc-Button-ButtonBase-9n-Xk d-none d-lg-flex LinkButton-module__linkButton__nFnov flex-items-center fgColor-default" data-loading="false" data-size="small" data-variant="invisible"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-history" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg></span><span data-component="text" class="prc-Button-Label-FWkx3"><span class="fgColor-default">254 Commits</span></span></span></a><div class="d-sm-none"></div><div class="d-flex d-lg-none"><a data-component="LinkButton" aria-label="View commit history for this file." href="/github/scientist/commits/main/" class="prc-Button-ButtonBase-9n-Xk LinkButton-module__linkButton__nFnov flex-items-center fgColor-default" data-loading="false" data-size="small" data-variant="invisible" aria-describedby="_R_2bacdahlik5_"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-history" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg></span></span></a><span class="prc-TooltipV2-Tooltip-tLeuB" data-direction="s" data-component="Tooltip" role="tooltip" aria-hidden="true" id="_R_2bacdahlik5_">254 Commits</span></div></div></div></div></div><h2 class="sr-only ScreenReaderHeading-module__userSelectNone__rwWIk prc-Heading-Heading-MtWFE" data-component="Heading" data-testid="screen-reader-heading" id="folders-and-files">Folders and files</h2><table class="Table-module__Box__HZKiQ DirectoryContent-module__OverviewTable__fe0iH" aria-labelledby="folders-and-files"><thead class="DirectoryContent-module__OverviewHeaderRow__hOrKy Table-module__Box_1__VacXC"><tr class="Table-module__Box_2__PBp9s"><th colSpan="2" class="DirectoryContent-module__Box__iC_5e"><span class="text-bold">Name</span></th><th colSpan="1" class="DirectoryContent-module__Box_1__fuSBO"><span class="text-bold">Name</span></th><th class="hide-sm"><div class="width-fit prc-Truncate-Truncate-2G1eo" data-inline="true" title="Last commit message" style="--truncate-max-width:125px"><span class="text-bold">Last commit message</span></div></th><th colSpan="1" class="DirectoryContent-module__Box_2__Ccrx7"><div class="width-fit prc-Truncate-Truncate-2G1eo" data-inline="true" title="Last commit date" style="--truncate-max-width:125px"><span class="text-bold">Last commit date</span></div></th></tr></thead><tbody><tr class="react-directory-row undefined" id="folder-row-0"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".github" aria-label=".github, (Directory)" class="Link--primary" href="/github/scientist/tree/main/.github" data-discover="true">.github</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".github" aria-label=".github, (Directory)" class="Link--primary" href="/github/scientist/tree/main/.github" data-discover="true">.github</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-1"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="doc" aria-label="doc, (Directory)" class="Link--primary" href="/github/scientist/tree/main/doc" data-discover="true">doc</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="doc" aria-label="doc, (Directory)" class="Link--primary" href="/github/scientist/tree/main/doc" data-discover="true">doc</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-2"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="lib" aria-label="lib, (Directory)" class="Link--primary" href="/github/scientist/tree/main/lib" data-discover="true">lib</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="lib" aria-label="lib, (Directory)" class="Link--primary" href="/github/scientist/tree/main/lib" data-discover="true">lib</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-3"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="script" aria-label="script, (Directory)" class="Link--primary" href="/github/scientist/tree/main/script" data-discover="true">script</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="script" aria-label="script, (Directory)" class="Link--primary" href="/github/scientist/tree/main/script" data-discover="true">script</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-4"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="test" aria-label="test, (Directory)" class="Link--primary" href="/github/scientist/tree/main/test" data-discover="true">test</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="test" aria-label="test, (Directory)" class="Link--primary" href="/github/scientist/tree/main/test" data-discover="true">test</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-5"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".gitignore" aria-label=".gitignore, (File)" class="Link--primary" href="/github/scientist/blob/main/.gitignore" data-discover="true">.gitignore</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".gitignore" aria-label=".gitignore, (File)" class="Link--primary" href="/github/scientist/blob/main/.gitignore" data-discover="true">.gitignore</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-6"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="CONTRIBUTING.md" aria-label="CONTRIBUTING.md, (File)" class="Link--primary" href="/github/scientist/blob/main/CONTRIBUTING.md" data-discover="true">CONTRIBUTING.md</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="CONTRIBUTING.md" aria-label="CONTRIBUTING.md, (File)" class="Link--primary" href="/github/scientist/blob/main/CONTRIBUTING.md" data-discover="true">CONTRIBUTING.md</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-7"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="Gemfile" aria-label="Gemfile, (File)" class="Link--primary" href="/github/scientist/blob/main/Gemfile" data-discover="true">Gemfile</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="Gemfile" aria-label="Gemfile, (File)" class="Link--primary" href="/github/scientist/blob/main/Gemfile" data-discover="true">Gemfile</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-8"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="LICENSE.txt" aria-label="LICENSE.txt, (File)" class="Link--primary" href="/github/scientist/blob/main/LICENSE.txt" data-discover="true">LICENSE.txt</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="LICENSE.txt" aria-label="LICENSE.txt, (File)" class="Link--primary" href="/github/scientist/blob/main/LICENSE.txt" data-discover="true">LICENSE.txt</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-9"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="README.md" aria-label="README.md, (File)" class="Link--primary" href="/github/scientist/blob/main/README.md" data-discover="true">README.md</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="README.md" aria-label="README.md, (File)" class="Link--primary" href="/github/scientist/blob/main/README.md" data-discover="true">README.md</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-10"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="Rakefile" aria-label="Rakefile, (File)" class="Link--primary" href="/github/scientist/blob/main/Rakefile" data-discover="true">Rakefile</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="Rakefile" aria-label="Rakefile, (File)" class="Link--primary" href="/github/scientist/blob/main/Rakefile" data-discover="true">Rakefile</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-11"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="scientist.gemspec" aria-label="scientist.gemspec, (File)" class="Link--primary" href="/github/scientist/blob/main/scientist.gemspec" data-discover="true">scientist.gemspec</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="scientist.gemspec" aria-label="scientist.gemspec, (File)" class="Link--primary" href="/github/scientist/blob/main/scientist.gemspec" data-discover="true">scientist.gemspec</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="react-directory-commit-age"><div class="Skeleton Skeleton--text"> </div></div></td></tr><tr class="show-for-mobile DirectoryContent-module__Box_4__RhIsE" data-testid="view-all-files-row"><td colSpan="3" class="DirectoryContent-module__Box_5__GaE8N"><div><button class="prc-Link-Link-9ZwDx" data-component="Link">View all files</button></div></td></tr></tbody></table></div><div class="OverviewRepoFiles-module__Box_1__OXeac"><div class="OverviewRepoFiles-module__Box_2__zsLGk"><div itemScope="" itemType="https://schema.org/abstract" class="OverviewRepoFiles-module__Box_3__bBU1C"><h2 class="prc-src-InternalVisuallyHidden-2YaI6">Repository files navigation</h2><nav class="prc-components-UnderlineWrapper-eT-Yj prc-UnderlineNav-UnderlineWrapper-GWONT OverviewRepoFiles-module__UnderlineNav__QbWWv" aria-label="Repository files" data-variant="inset" data-overflow-mode="wrap" data-hide-icons-breakpoint="medium"><ul class="prc-UnderlineNav-ItemsList-oj8gN prc-components-UnderlineItemList-xKlKC" role="list"><li role="presentation" aria-hidden="true" class="prc-UnderlineNav-WrapSpacer--aLgz"></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a href="#" aria-current="page" class="prc-components-UnderlineItem-7fP-n"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-book" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path></svg></span><span data-component="text" data-content="README">README</span></a></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a href="#" class="prc-components-UnderlineItem-7fP-n"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-code-of-conduct" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8.048 2.241c.964-.709 2.079-1.238 3.325-1.241a4.616 4.616 0 0 1 3.282 1.355c.41.408.757.86.996 1.428.238.568.348 1.206.347 1.968 0 2.193-1.505 4.254-3.081 5.862-1.496 1.526-3.213 2.796-4.249 3.563l-.22.163a.749.749 0 0 1-.895 0l-.221-.163c-1.036-.767-2.753-2.037-4.249-3.563C1.51 10.008.007 7.952.002 5.762a4.614 4.614 0 0 1 1.353-3.407C3.123.585 6.223.537 8.048 2.24Zm-1.153.983c-1.25-1.033-3.321-.967-4.48.191a3.115 3.115 0 0 0-.913 2.335c0 1.556 1.109 3.24 2.652 4.813C5.463 11.898 6.96 13.032 8 13.805c.353-.262.758-.565 1.191-.905l-1.326-1.223a.75.75 0 0 1 1.018-1.102l1.48 1.366c.328-.281.659-.577.984-.887L9.99 9.802a.75.75 0 1 1 1.019-1.103l1.384 1.28c.295-.329.566-.661.81-.995L12.92 8.7l-1.167-1.168c-.674-.671-1.78-.664-2.474.03-.268.269-.538.537-.802.797-.893.882-2.319.843-3.185-.032-.346-.35-.693-.697-1.043-1.047a.75.75 0 0 1-.04-1.016c.162-.191.336-.401.52-.623.62-.748 1.356-1.637 2.166-2.417Zm7.112 4.442c.313-.65.491-1.293.491-1.916v-.001c0-.614-.088-1.045-.23-1.385-.143-.339-.357-.633-.673-.949a3.111 3.111 0 0 0-2.218-.915c-1.092.003-2.165.627-3.226 1.602-.823.755-1.554 1.637-2.228 2.45l-.127.154.562.566a.755.755 0 0 0 1.066.02l.794-.79c1.258-1.258 3.312-1.31 4.594-.032.396.394.792.791 1.173 1.173Z"></path></svg></span><span data-component="text" data-content="Code of conduct">Code of conduct</span></a></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a href="#" class="prc-components-UnderlineItem-7fP-n"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-people" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 5.5a3.5 3.5 0 1 1 5.898 2.549 5.508 5.508 0 0 1 3.034 4.084.75.75 0 1 1-1.482.235 4 4 0 0 0-7.9 0 .75.75 0 0 1-1.482-.236A5.507 5.507 0 0 1 3.102 8.05 3.493 3.493 0 0 1 2 5.5ZM11 4a3.001 3.001 0 0 1 2.22 5.018 5.01 5.01 0 0 1 2.56 3.012.749.749 0 0 1-.885.954.752.752 0 0 1-.549-.514 3.507 3.507 0 0 0-2.522-2.372.75.75 0 0 1-.574-.73v-.352a.75.75 0 0 1 .416-.672A1.5 1.5 0 0 0 11 5.5.75.75 0 0 1 11 4Zm-5.5-.5a2 2 0 1 0-.001 3.999A2 2 0 0 0 5.5 3.5Z"></path></svg></span><span data-component="text" data-content="Contributing">Contributing</span></a></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a href="#" class="prc-components-UnderlineItem-7fP-n"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-law" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path></svg></span><span data-component="text" data-content="MIT license">MIT license</span></a></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a href="#" class="prc-components-UnderlineItem-7fP-n"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-law" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path></svg></span><span data-component="text" data-content="Security">Security</span></a></li></ul><div class="prc-UnderlineNav-MoreButtonContainer-Dnrq6"><div class="prc-UnderlineNav-MoreButtonDivider-dN0a-"></div><button data-component="overflow-menu-button" type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-9n-Xk prc-UnderlineNav-MoreButton-Y8soj" data-loading="false" data-size="medium" data-variant="invisible" id="_R_1a5kdahlik5_"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="text" class="prc-Button-Label-FWkx3"><span>More<span class="prc-src-InternalVisuallyHidden-2YaI6"> items</span></span></span></span><span data-component="trailingAction" class="prc-Button-Visual-YNt2F prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></button></div></nav><div class="OverviewRepoFiles-module__readmeHeaderSlot__FxQN_"></div><button data-component="ActionMenu.Button" type="button" aria-label="Outline" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-9n-Xk OverviewRepoFiles-module__ActionMenu_Button__OKDYV" data-loading="false" data-size="medium" data-variant="invisible" id="_R_hkdahlik5_"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-list-unordered" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M5.75 2.5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2 14a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM2 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg></button></div><div class="js-snippet-clipboard-copy-unpositioned DirectoryRichtextContent-module__SharedMarkdownContent__hHXUL" data-hpc="true" containertiming="hpc"><article class="markdown-body entry-content container-lg" itemprop="text"><div class="markdown-heading" dir="auto"><h1 tabindex="-1" class="heading-element" dir="auto">Scientist!</h1><a id="user-content-scientist" class="anchor" aria-label="Permalink: Scientist!" href="#scientist"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">A Ruby library for carefully refactoring critical paths. <a href="https://github.com/github/scientist/actions/workflows/ci.yml"><img src="https://github.com/github/scientist/actions/workflows/ci.yml/badge.svg" alt="Build Status" style="max-width: 100%;"></a></p>
|
||
<div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">How do I science?</h2><a id="user-content-how-do-i-science" class="anchor" aria-label="Permalink: How do I science?" href="#how-do-i-science"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Let's pretend you're changing the way you handle permissions in a large web app. Tests can help guide your refactoring, but you really want to compare the current and refactored behaviors under load.</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require "scientist"
|
||
|
||
class MyWidget
|
||
def allows?(user)
|
||
experiment = Scientist::Default.new "widget-permissions"
|
||
experiment.use { model.check_user(user).valid? } # old way
|
||
experiment.try { user.can?(:read, model) } # new way
|
||
|
||
experiment.run
|
||
end
|
||
end"><pre><span class="pl-en">require</span> <span class="pl-s">"scientist"</span>
|
||
|
||
<span class="pl-k">class</span> <span class="pl-v">MyWidget</span>
|
||
<span class="pl-k">def</span> <span class="pl-en">allows?</span><span class="pl-kos">(</span><span class="pl-s1">user</span><span class="pl-kos">)</span>
|
||
<span class="pl-s1">experiment</span> <span class="pl-c1">=</span> <span class="pl-v">Scientist</span>::<span class="pl-v">Default</span><span class="pl-kos">.</span><span class="pl-en">new</span> <span class="pl-s">"widget-permissions"</span>
|
||
<span class="pl-s1">experiment</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-en">model</span><span class="pl-kos">.</span><span class="pl-en">check_user</span><span class="pl-kos">(</span><span class="pl-s1">user</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">valid?</span> <span class="pl-kos">}</span> <span class="pl-c"># old way</span>
|
||
<span class="pl-s1">experiment</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-en">can?</span><span class="pl-kos">(</span><span class="pl-pds">:read</span><span class="pl-kos">,</span> <span class="pl-en">model</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-c"># new way</span>
|
||
|
||
<span class="pl-s1">experiment</span><span class="pl-kos">.</span><span class="pl-en">run</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">Wrap a <code>use</code> block around the code's original behavior, and wrap <code>try</code> around the new behavior. <code>experiment.run</code> will always return whatever the <code>use</code> block returns, but it does a bunch of stuff behind the scenes:</p>
|
||
<ul dir="auto">
|
||
<li>It decides whether or not to run the <code>try</code> block,</li>
|
||
<li>Randomizes the order in which <code>use</code> and <code>try</code> blocks are run,</li>
|
||
<li>Measures the wall time and cpu time of all behaviors in seconds,</li>
|
||
<li>Compares the result of <code>try</code> to the result of <code>use</code>,</li>
|
||
<li>Swallow and record exceptions raised in the <code>try</code> block when overriding <code>raised</code>, and</li>
|
||
<li>Publishes all this information.</li>
|
||
</ul>
|
||
<p dir="auto">The <code>use</code> block is called the <strong>control</strong>. The <code>try</code> block is called the <strong>candidate</strong>.</p>
|
||
<p dir="auto">Creating an experiment is wordy, but when you include the <code>Scientist</code> module, the <code>science</code> helper will instantiate an experiment and call <code>run</code> for you:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require "scientist"
|
||
|
||
class MyWidget
|
||
include Scientist
|
||
|
||
def allows?(user)
|
||
science "widget-permissions" do |experiment|
|
||
experiment.use { model.check_user(user).valid? } # old way
|
||
experiment.try { user.can?(:read, model) } # new way
|
||
end # returns the control value
|
||
end
|
||
end"><pre><span class="pl-en">require</span> <span class="pl-s">"scientist"</span>
|
||
|
||
<span class="pl-k">class</span> <span class="pl-v">MyWidget</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">allows?</span><span class="pl-kos">(</span><span class="pl-s1">user</span><span class="pl-kos">)</span>
|
||
<span class="pl-en">science</span> <span class="pl-s">"widget-permissions"</span> <span class="pl-k">do</span> |<span class="pl-s1">experiment</span>|
|
||
<span class="pl-s1">experiment</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-en">model</span><span class="pl-kos">.</span><span class="pl-en">check_user</span><span class="pl-kos">(</span><span class="pl-s1">user</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">valid?</span> <span class="pl-kos">}</span> <span class="pl-c"># old way</span>
|
||
<span class="pl-s1">experiment</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-en">can?</span><span class="pl-kos">(</span><span class="pl-pds">:read</span><span class="pl-kos">,</span> <span class="pl-en">model</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-c"># new way</span>
|
||
<span class="pl-k">end</span> <span class="pl-c"># returns the control value</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">If you don't declare any <code>try</code> blocks, none of the Scientist machinery is invoked and the control value is always returned.</p>
|
||
<div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Making science useful</h2><a id="user-content-making-science-useful" class="anchor" aria-label="Permalink: Making science useful" href="#making-science-useful"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">The examples above will run, but they're not really <em>doing</em> anything. The <code>try</code> blocks don't run yet and none of the results get published. Replace the default experiment implementation to control execution and reporting:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require "scientist/experiment"
|
||
|
||
class MyExperiment
|
||
include Scientist::Experiment
|
||
|
||
attr_accessor :name
|
||
|
||
def initialize(name)
|
||
@name = name
|
||
end
|
||
|
||
def enabled?
|
||
# see "Ramping up experiments" below
|
||
true
|
||
end
|
||
|
||
def raised(operation, error)
|
||
# see "In a Scientist callback" below
|
||
p "Operation '#{operation}' failed with error '#{error.inspect}'"
|
||
super # will re-raise
|
||
end
|
||
|
||
def publish(result)
|
||
# see "Publishing results" below
|
||
p result
|
||
end
|
||
end"><pre><span class="pl-en">require</span> <span class="pl-s">"scientist/experiment"</span>
|
||
|
||
<span class="pl-k">class</span> <span class="pl-v">MyExperiment</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>::<span class="pl-v">Experiment</span>
|
||
|
||
<span class="pl-en">attr_accessor</span> <span class="pl-pds">:name</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">initialize</span><span class="pl-kos">(</span><span class="pl-s1">name</span><span class="pl-kos">)</span>
|
||
<span class="pl-c1">@name</span> <span class="pl-c1">=</span> <span class="pl-s1">name</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">enabled?</span>
|
||
<span class="pl-c"># see "Ramping up experiments" below</span>
|
||
<span class="pl-c1">true</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">raised</span><span class="pl-kos">(</span><span class="pl-s1">operation</span><span class="pl-kos">,</span> <span class="pl-s1">error</span><span class="pl-kos">)</span>
|
||
<span class="pl-c"># see "In a Scientist callback" below</span>
|
||
<span class="pl-en">p</span> <span class="pl-s">"Operation '<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-s1">operation</span><span class="pl-kos">}</span></span>' failed with error '<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-s1">error</span><span class="pl-kos">.</span><span class="pl-en">inspect</span><span class="pl-kos">}</span></span>'"</span>
|
||
<span class="pl-smi">super</span> <span class="pl-c"># will re-raise</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">publish</span><span class="pl-kos">(</span><span class="pl-s1">result</span><span class="pl-kos">)</span>
|
||
<span class="pl-c"># see "Publishing results" below</span>
|
||
<span class="pl-en">p</span> <span class="pl-s1">result</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">When <code>Scientist::Experiment</code> is included in a class, it automatically sets it as the default implementation via <code>Scientist::Experiment.set_default</code>. This <code>set_default</code> call is skipped if you include <code>Scientist::Experiment</code> in a module.</p>
|
||
<p dir="auto">Now calls to the <code>science</code> helper will load instances of <code>MyExperiment</code>.</p>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Controlling comparison</h3><a id="user-content-controlling-comparison" class="anchor" aria-label="Permalink: Controlling comparison" href="#controlling-comparison"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Scientist compares control and candidate values using <code>==</code>. To override this behavior, use <code>compare</code> to define how to compare observed values instead:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyWidget
|
||
include Scientist
|
||
|
||
def users
|
||
science "users" do |e|
|
||
e.use { User.all } # returns User instances
|
||
e.try { UserService.list } # returns UserService::User instances
|
||
|
||
e.compare do |control, candidate|
|
||
control.map(&:login) == candidate.map(&:login)
|
||
end
|
||
end
|
||
end
|
||
end"><pre><span class="pl-k">class</span> <span class="pl-v">MyWidget</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">users</span>
|
||
<span class="pl-en">science</span> <span class="pl-s">"users"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-v">User</span><span class="pl-kos">.</span><span class="pl-en">all</span> <span class="pl-kos">}</span> <span class="pl-c"># returns User instances</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-v">UserService</span><span class="pl-kos">.</span><span class="pl-en">list</span> <span class="pl-kos">}</span> <span class="pl-c"># returns UserService::User instances</span>
|
||
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">compare</span> <span class="pl-k">do</span> |<span class="pl-s1">control</span><span class="pl-kos">,</span> <span class="pl-s1">candidate</span>|
|
||
<span class="pl-s1">control</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">(</span>&<span class="pl-pds">:login</span><span class="pl-kos">)</span> == <span class="pl-s1">candidate</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">(</span>&<span class="pl-pds">:login</span><span class="pl-kos">)</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">If either the control block or candidate block raises an error, Scientist compares the two observations' classes and messages using <code>==</code>. To override this behavior, use <code>compare_errors</code> to define how to compare observed errors instead:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyWidget
|
||
include Scientist
|
||
|
||
def slug_from_login(login)
|
||
science "slug_from_login" do |e|
|
||
e.use { User.slug_from_login login } # returns String instance or ArgumentError
|
||
e.try { UserService.slug_from_login login } # returns String instance or ArgumentError
|
||
|
||
compare_error_message_and_class = -> (control, candidate) do
|
||
control.class == candidate.class &&
|
||
control.message == candidate.message
|
||
end
|
||
|
||
compare_argument_errors = -> (control, candidate) do
|
||
control.class == ArgumentError &&
|
||
candidate.class == ArgumentError &&
|
||
control.message.start_with?("Input has invalid characters") &&
|
||
candidate.message.start_with?("Invalid characters in input")
|
||
end
|
||
|
||
e.compare_errors do |control, candidate|
|
||
compare_error_message_and_class.call(control, candidate) ||
|
||
compare_argument_errors.call(control, candidate)
|
||
end
|
||
end
|
||
end
|
||
end"><pre><span class="pl-k">class</span> <span class="pl-v">MyWidget</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">slug_from_login</span><span class="pl-kos">(</span><span class="pl-s1">login</span><span class="pl-kos">)</span>
|
||
<span class="pl-en">science</span> <span class="pl-s">"slug_from_login"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-v">User</span><span class="pl-kos">.</span><span class="pl-en">slug_from_login</span> <span class="pl-s1">login</span> <span class="pl-kos">}</span> <span class="pl-c"># returns String instance or ArgumentError</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-v">UserService</span><span class="pl-kos">.</span><span class="pl-en">slug_from_login</span> <span class="pl-s1">login</span> <span class="pl-kos">}</span> <span class="pl-c"># returns String instance or ArgumentError</span>
|
||
|
||
<span class="pl-s1">compare_error_message_and_class</span> <span class="pl-c1">=</span> <span class="pl-c1">-></span> <span class="pl-kos">(</span><span class="pl-s1">control</span><span class="pl-kos">,</span> <span class="pl-s1">candidate</span><span class="pl-kos">)</span> <span class="pl-k">do</span>
|
||
<span class="pl-s1">control</span><span class="pl-kos">.</span><span class="pl-en">class</span> == <span class="pl-s1">candidate</span><span class="pl-kos">.</span><span class="pl-en">class</span> &&
|
||
<span class="pl-s1">control</span><span class="pl-kos">.</span><span class="pl-en">message</span> == <span class="pl-s1">candidate</span><span class="pl-kos">.</span><span class="pl-en">message</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-s1">compare_argument_errors</span> <span class="pl-c1">=</span> <span class="pl-c1">-></span> <span class="pl-kos">(</span><span class="pl-s1">control</span><span class="pl-kos">,</span> <span class="pl-s1">candidate</span><span class="pl-kos">)</span> <span class="pl-k">do</span>
|
||
<span class="pl-s1">control</span><span class="pl-kos">.</span><span class="pl-en">class</span> == <span class="pl-v">ArgumentError</span> &&
|
||
<span class="pl-s1">candidate</span><span class="pl-kos">.</span><span class="pl-en">class</span> == <span class="pl-v">ArgumentError</span> &&
|
||
<span class="pl-s1">control</span><span class="pl-kos">.</span><span class="pl-en">message</span><span class="pl-kos">.</span><span class="pl-en">start_with?</span><span class="pl-kos">(</span><span class="pl-s">"Input has invalid characters"</span><span class="pl-kos">)</span> &&
|
||
<span class="pl-s1">candidate</span><span class="pl-kos">.</span><span class="pl-en">message</span><span class="pl-kos">.</span><span class="pl-en">start_with?</span><span class="pl-kos">(</span><span class="pl-s">"Invalid characters in input"</span><span class="pl-kos">)</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">compare_errors</span> <span class="pl-k">do</span> |<span class="pl-s1">control</span><span class="pl-kos">,</span> <span class="pl-s1">candidate</span>|
|
||
<span class="pl-s1">compare_error_message_and_class</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">control</span><span class="pl-kos">,</span> <span class="pl-s1">candidate</span><span class="pl-kos">)</span> ||
|
||
<span class="pl-s1">compare_argument_errors</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">control</span><span class="pl-kos">,</span> <span class="pl-s1">candidate</span><span class="pl-kos">)</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Adding context</h3><a id="user-content-adding-context" class="anchor" aria-label="Permalink: Adding context" href="#adding-context"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Results aren't very useful without some way to identify them. Use the <code>context</code> method to add to or retrieve the context for an experiment:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="science "widget-permissions" do |e|
|
||
e.context :user => user
|
||
|
||
e.use { model.check_user(user).valid? }
|
||
e.try { user.can?(:read, model) }
|
||
end"><pre><span class="pl-en">science</span> <span class="pl-s">"widget-permissions"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">context</span> <span class="pl-pds">:user</span> <span class="pl-c1">=></span> <span class="pl-en">user</span>
|
||
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-en">model</span><span class="pl-kos">.</span><span class="pl-en">check_user</span><span class="pl-kos">(</span><span class="pl-en">user</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">valid?</span> <span class="pl-kos">}</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-en">user</span><span class="pl-kos">.</span><span class="pl-en">can?</span><span class="pl-kos">(</span><span class="pl-pds">:read</span><span class="pl-kos">,</span> <span class="pl-en">model</span><span class="pl-kos">)</span> <span class="pl-kos">}</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto"><code>context</code> takes a Symbol-keyed Hash of extra data. The data is available in <code>Experiment#publish</code> via the <code>context</code> method. If you're using the <code>science</code> helper a lot in a class, you can provide a default context:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyWidget
|
||
include Scientist
|
||
|
||
def allows?(user)
|
||
science "widget-permissions" do |e|
|
||
e.context :user => user
|
||
|
||
e.use { model.check_user(user).valid? }
|
||
e.try { user.can?(:read, model) }
|
||
end
|
||
end
|
||
|
||
def destroy
|
||
science "widget-destruction" do |e|
|
||
e.use { old_scary_destroy }
|
||
e.try { new_safe_destroy }
|
||
end
|
||
end
|
||
|
||
def default_scientist_context
|
||
{ :widget => self }
|
||
end
|
||
end"><pre><span class="pl-k">class</span> <span class="pl-v">MyWidget</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">allows?</span><span class="pl-kos">(</span><span class="pl-s1">user</span><span class="pl-kos">)</span>
|
||
<span class="pl-en">science</span> <span class="pl-s">"widget-permissions"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">context</span> <span class="pl-pds">:user</span> <span class="pl-c1">=></span> <span class="pl-s1">user</span>
|
||
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-en">model</span><span class="pl-kos">.</span><span class="pl-en">check_user</span><span class="pl-kos">(</span><span class="pl-s1">user</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">valid?</span> <span class="pl-kos">}</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-en">can?</span><span class="pl-kos">(</span><span class="pl-pds">:read</span><span class="pl-kos">,</span> <span class="pl-en">model</span><span class="pl-kos">)</span> <span class="pl-kos">}</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">destroy</span>
|
||
<span class="pl-en">science</span> <span class="pl-s">"widget-destruction"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-en">old_scary_destroy</span> <span class="pl-kos">}</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-en">new_safe_destroy</span> <span class="pl-kos">}</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">default_scientist_context</span>
|
||
<span class="pl-kos">{</span> <span class="pl-pds">:widget</span> <span class="pl-c1">=></span> <span class="pl-smi">self</span> <span class="pl-kos">}</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">The <code>widget-permissions</code> and <code>widget-destruction</code> experiments will both have a <code>:widget</code> key in their contexts.</p>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Expensive setup</h3><a id="user-content-expensive-setup" class="anchor" aria-label="Permalink: Expensive setup" href="#expensive-setup"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">If an experiment requires expensive setup that should only occur when the experiment is going to be run, define it with the <code>before_run</code> method:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Code under test modifies this in-place. We want to copy it for the
|
||
# candidate code, but only when needed:
|
||
value_for_original_code = big_object
|
||
value_for_new_code = nil
|
||
|
||
science "expensive-but-worthwhile" do |e|
|
||
e.before_run do
|
||
value_for_new_code = big_object.deep_copy
|
||
end
|
||
e.use { original_code(value_for_original_code) }
|
||
e.try { new_code(value_for_new_code) }
|
||
end"><pre><span class="pl-c"># Code under test modifies this in-place. We want to copy it for the</span>
|
||
<span class="pl-c"># candidate code, but only when needed:</span>
|
||
<span class="pl-s1">value_for_original_code</span> <span class="pl-c1">=</span> <span class="pl-en">big_object</span>
|
||
<span class="pl-s1">value_for_new_code</span> <span class="pl-c1">=</span> <span class="pl-c1">nil</span>
|
||
|
||
<span class="pl-en">science</span> <span class="pl-s">"expensive-but-worthwhile"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">before_run</span> <span class="pl-k">do</span>
|
||
<span class="pl-s1">value_for_new_code</span> <span class="pl-c1">=</span> <span class="pl-en">big_object</span><span class="pl-kos">.</span><span class="pl-en">deep_copy</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-en">original_code</span><span class="pl-kos">(</span><span class="pl-s1">value_for_original_code</span><span class="pl-kos">)</span> <span class="pl-kos">}</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-en">new_code</span><span class="pl-kos">(</span><span class="pl-s1">value_for_new_code</span><span class="pl-kos">)</span> <span class="pl-kos">}</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Keeping it clean</h3><a id="user-content-keeping-it-clean" class="anchor" aria-label="Permalink: Keeping it clean" href="#keeping-it-clean"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Sometimes you don't want to store the full value for later analysis. For example, an experiment may return <code>User</code> instances, but when researching a mismatch, all you care about is the logins. You can define how to clean these values in an experiment:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyWidget
|
||
include Scientist
|
||
|
||
def users
|
||
science "users" do |e|
|
||
e.use { User.all }
|
||
e.try { UserService.list }
|
||
|
||
e.clean do |value|
|
||
value.map(&:login).sort
|
||
end
|
||
end
|
||
end
|
||
end"><pre><span class="pl-k">class</span> <span class="pl-v">MyWidget</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">users</span>
|
||
<span class="pl-en">science</span> <span class="pl-s">"users"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-v">User</span><span class="pl-kos">.</span><span class="pl-en">all</span> <span class="pl-kos">}</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-v">UserService</span><span class="pl-kos">.</span><span class="pl-en">list</span> <span class="pl-kos">}</span>
|
||
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">clean</span> <span class="pl-k">do</span> |<span class="pl-s1">value</span>|
|
||
<span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">(</span>&<span class="pl-pds">:login</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">sort</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">And this cleaned value is available in observations in the final published result:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyExperiment
|
||
include Scientist::Experiment
|
||
|
||
# ...
|
||
|
||
def publish(result)
|
||
result.control.value # [<User alice>, <User bob>, <User carol>]
|
||
result.control.cleaned_value # ["alice", "bob", "carol"]
|
||
end
|
||
end"><pre><span class="pl-k">class</span> <span class="pl-v">MyExperiment</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>::<span class="pl-v">Experiment</span>
|
||
|
||
<span class="pl-c"># ...</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">publish</span><span class="pl-kos">(</span><span class="pl-s1">result</span><span class="pl-kos">)</span>
|
||
<span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">control</span><span class="pl-kos">.</span><span class="pl-en">value</span> <span class="pl-c"># [<User alice>, <User bob>, <User carol>]</span>
|
||
<span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">control</span><span class="pl-kos">.</span><span class="pl-en">cleaned_value</span> <span class="pl-c"># ["alice", "bob", "carol"]</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">Note that the <code>#clean</code> method will discard the previous cleaner block if you call it again. If for some reason you need to access the currently configured cleaner block, <code>Scientist::Experiment#cleaner</code> will return the block without further ado. <em>(This probably won't come up in normal usage, but comes in handy if you're writing, say, a custom experiment runner that provides default cleaners.)</em></p>
|
||
<p dir="auto">The <code>#clean</code> method will not be used for comparison of the results, so in the following example it is not possible to remove the <code>#compare</code> method without the experiment failing:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def user_ids
|
||
science "user_ids" do
|
||
e.use { [1,2,3] }
|
||
e.try { [1,3,2] }
|
||
e.clean { |value| value.sort }
|
||
e.compare { |a, b| a.sort == b.sort }
|
||
end
|
||
end"><pre><span class="pl-k">def</span> <span class="pl-en">user_ids</span>
|
||
<span class="pl-en">science</span> <span class="pl-s">"user_ids"</span> <span class="pl-k">do</span>
|
||
<span class="pl-en">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">]</span> <span class="pl-kos">}</span>
|
||
<span class="pl-en">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">]</span> <span class="pl-kos">}</span>
|
||
<span class="pl-en">e</span><span class="pl-kos">.</span><span class="pl-en">clean</span> <span class="pl-kos">{</span> |<span class="pl-s1">value</span>| <span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-en">sort</span> <span class="pl-kos">}</span>
|
||
<span class="pl-en">e</span><span class="pl-kos">.</span><span class="pl-en">compare</span> <span class="pl-kos">{</span> |<span class="pl-s1">a</span><span class="pl-kos">,</span> <span class="pl-s1">b</span>| <span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-en">sort</span> == <span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-en">sort</span> <span class="pl-kos">}</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Ignoring mismatches</h3><a id="user-content-ignoring-mismatches" class="anchor" aria-label="Permalink: Ignoring mismatches" href="#ignoring-mismatches"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">During the early stages of an experiment, it's possible that some of your code will always generate a mismatch for reasons you know and understand but haven't yet fixed. Instead of these known cases always showing up as mismatches in your metrics or analysis, you can tell an experiment whether or not to ignore a mismatch using the <code>ignore</code> method. You may include more than one block if needed:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def admin?(user)
|
||
science "widget-permissions" do |e|
|
||
e.use { model.check_user(user).admin? }
|
||
e.try { user.can?(:admin, model) }
|
||
|
||
e.ignore { user.staff? } # user is staff, always an admin in the new system
|
||
e.ignore do |control, candidate|
|
||
# new system doesn't handle unconfirmed users yet:
|
||
control && !candidate && !user.confirmed_email?
|
||
end
|
||
end
|
||
end"><pre><span class="pl-k">def</span> <span class="pl-en">admin?</span><span class="pl-kos">(</span><span class="pl-s1">user</span><span class="pl-kos">)</span>
|
||
<span class="pl-en">science</span> <span class="pl-s">"widget-permissions"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-en">model</span><span class="pl-kos">.</span><span class="pl-en">check_user</span><span class="pl-kos">(</span><span class="pl-s1">user</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">admin?</span> <span class="pl-kos">}</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-en">can?</span><span class="pl-kos">(</span><span class="pl-pds">:admin</span><span class="pl-kos">,</span> <span class="pl-en">model</span><span class="pl-kos">)</span> <span class="pl-kos">}</span>
|
||
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">ignore</span> <span class="pl-kos">{</span> <span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-en">staff?</span> <span class="pl-kos">}</span> <span class="pl-c"># user is staff, always an admin in the new system</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">ignore</span> <span class="pl-k">do</span> |<span class="pl-s1">control</span><span class="pl-kos">,</span> <span class="pl-s1">candidate</span>|
|
||
<span class="pl-c"># new system doesn't handle unconfirmed users yet:</span>
|
||
<span class="pl-s1">control</span> && !<span class="pl-s1">candidate</span> && !<span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-en">confirmed_email?</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">The ignore blocks are only called if the <em>values</em> don't match. Unless a <code>compare_errors</code> comparator is defined, two cases are considered mismatches: a) one observation raising an exception and the other not, b) observations raising exceptions with different classes or messages.</p>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Enabling/disabling experiments</h3><a id="user-content-enablingdisabling-experiments" class="anchor" aria-label="Permalink: Enabling/disabling experiments" href="#enablingdisabling-experiments"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Sometimes you don't want an experiment to run. Say, disabling a new codepath for anyone who isn't staff. You can disable an experiment by setting a <code>run_if</code> block. If this returns <code>false</code>, the experiment will merely return the control value. Otherwise, it defers to the experiment's configured <code>enabled?</code> method.</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class DashboardController
|
||
include Scientist
|
||
|
||
def dashboard_items
|
||
science "dashboard-items" do |e|
|
||
# only run this experiment for staff members
|
||
e.run_if { current_user.staff? }
|
||
# ...
|
||
end
|
||
end"><pre><span class="pl-k">class</span> <span class="pl-v">DashboardController</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">dashboard_items</span>
|
||
<span class="pl-en">science</span> <span class="pl-s">"dashboard-items"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-c"># only run this experiment for staff members</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">run_if</span> <span class="pl-kos">{</span> <span class="pl-en">current_user</span><span class="pl-kos">.</span><span class="pl-en">staff?</span> <span class="pl-kos">}</span>
|
||
<span class="pl-c"># ...</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Ramping up experiments</h3><a id="user-content-ramping-up-experiments" class="anchor" aria-label="Permalink: Ramping up experiments" href="#ramping-up-experiments"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">As a scientist, you know it's always important to be able to turn your experiment off, lest it run amok and result in villagers with pitchforks on your doorstep. In order to control whether or not an experiment is enabled, you must include the <code>enabled?</code> method in your <code>Scientist::Experiment</code> implementation.</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyExperiment
|
||
include Scientist::Experiment
|
||
|
||
attr_accessor :name, :percent_enabled
|
||
|
||
def initialize(name)
|
||
@name = name
|
||
@percent_enabled = 100
|
||
end
|
||
|
||
def enabled?
|
||
percent_enabled > 0 && rand(100) < percent_enabled
|
||
end
|
||
|
||
# ...
|
||
|
||
end"><pre><span class="pl-k">class</span> <span class="pl-v">MyExperiment</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>::<span class="pl-v">Experiment</span>
|
||
|
||
<span class="pl-en">attr_accessor</span> <span class="pl-pds">:name</span><span class="pl-kos">,</span> <span class="pl-pds">:percent_enabled</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">initialize</span><span class="pl-kos">(</span><span class="pl-s1">name</span><span class="pl-kos">)</span>
|
||
<span class="pl-c1">@name</span> <span class="pl-c1">=</span> <span class="pl-s1">name</span>
|
||
<span class="pl-c1">@percent_enabled</span> <span class="pl-c1">=</span> <span class="pl-c1">100</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">enabled?</span>
|
||
<span class="pl-en">percent_enabled</span> > <span class="pl-c1">0</span> && <span class="pl-en">rand</span><span class="pl-kos">(</span><span class="pl-c1">100</span><span class="pl-kos">)</span> < <span class="pl-en">percent_enabled</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-c"># ...</span>
|
||
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">This code will be invoked for every method with an experiment every time, so be sensitive about its performance. For example, you can store an experiment in the database but wrap it in various levels of caching such as memcache or per-request thread-locals.</p>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Publishing results</h3><a id="user-content-publishing-results" class="anchor" aria-label="Permalink: Publishing results" href="#publishing-results"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">What good is science if you can't publish your results?</p>
|
||
<p dir="auto">You must implement the <code>publish(result)</code> method, and can publish data however you like. For example, timing data can be sent to graphite, and mismatches can be placed in a capped collection in redis for debugging later.</p>
|
||
<p dir="auto">The <code>publish</code> method is given a <code>Scientist::Result</code> instance with its associated <code>Scientist::Observation</code>s:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyExperiment
|
||
include Scientist::Experiment
|
||
|
||
# ...
|
||
|
||
def publish(result)
|
||
|
||
# Wall time
|
||
# Store the timing for the control value,
|
||
$statsd.timing "science.#{name}.control", result.control.duration
|
||
# for the candidate (only the first, see "Breaking the rules" below,
|
||
$statsd.timing "science.#{name}.candidate", result.candidates.first.duration
|
||
|
||
# CPU time
|
||
# Store the timing for the control value,
|
||
$statsd.timing "science.cpu.#{name}.control", result.control.cpu_time
|
||
# for the candidate (only the first, see "Breaking the rules" below,
|
||
$statsd.timing "science.cpu.#{name}.candidate", result.candidates.first.cpu_time
|
||
|
||
# and counts for match/ignore/mismatch:
|
||
if result.matched?
|
||
$statsd.increment "science.#{name}.matched"
|
||
elsif result.ignored?
|
||
$statsd.increment "science.#{name}.ignored"
|
||
else
|
||
$statsd.increment "science.#{name}.mismatched"
|
||
# Finally, store mismatches in redis so they can be retrieved and examined
|
||
# later on, for debugging and research.
|
||
store_mismatch_data(result)
|
||
end
|
||
end
|
||
|
||
def store_mismatch_data(result)
|
||
payload = {
|
||
:name => name,
|
||
:context => context,
|
||
:control => observation_payload(result.control),
|
||
:candidate => observation_payload(result.candidates.first),
|
||
:execution_order => result.observations.map(&:name)
|
||
}
|
||
|
||
key = "science.#{name}.mismatch"
|
||
$redis.lpush key, payload
|
||
$redis.ltrim key, 0, 1000
|
||
end
|
||
|
||
def observation_payload(observation)
|
||
if observation.raised?
|
||
{
|
||
:exception => observation.exception.class,
|
||
:message => observation.exception.message,
|
||
:backtrace => observation.exception.backtrace
|
||
}
|
||
else
|
||
{
|
||
# see "Keeping it clean" above
|
||
:value => observation.cleaned_value
|
||
}
|
||
end
|
||
end
|
||
end"><pre><span class="pl-k">class</span> <span class="pl-v">MyExperiment</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>::<span class="pl-v">Experiment</span>
|
||
|
||
<span class="pl-c"># ...</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">publish</span><span class="pl-kos">(</span><span class="pl-s1">result</span><span class="pl-kos">)</span>
|
||
|
||
<span class="pl-c"># Wall time</span>
|
||
<span class="pl-c"># Store the timing for the control value,</span>
|
||
$statsd<span class="pl-kos">.</span><span class="pl-en">timing</span> <span class="pl-s">"science.<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-en">name</span><span class="pl-kos">}</span></span>.control"</span><span class="pl-kos">,</span> <span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">control</span><span class="pl-kos">.</span><span class="pl-en">duration</span>
|
||
<span class="pl-c"># for the candidate (only the first, see "Breaking the rules" below,</span>
|
||
$statsd<span class="pl-kos">.</span><span class="pl-en">timing</span> <span class="pl-s">"science.<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-en">name</span><span class="pl-kos">}</span></span>.candidate"</span><span class="pl-kos">,</span> <span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">candidates</span><span class="pl-kos">.</span><span class="pl-en">first</span><span class="pl-kos">.</span><span class="pl-en">duration</span>
|
||
|
||
<span class="pl-c"># CPU time</span>
|
||
<span class="pl-c"># Store the timing for the control value,</span>
|
||
$statsd<span class="pl-kos">.</span><span class="pl-en">timing</span> <span class="pl-s">"science.cpu.<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-en">name</span><span class="pl-kos">}</span></span>.control"</span><span class="pl-kos">,</span> <span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">control</span><span class="pl-kos">.</span><span class="pl-en">cpu_time</span>
|
||
<span class="pl-c"># for the candidate (only the first, see "Breaking the rules" below,</span>
|
||
$statsd<span class="pl-kos">.</span><span class="pl-en">timing</span> <span class="pl-s">"science.cpu.<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-en">name</span><span class="pl-kos">}</span></span>.candidate"</span><span class="pl-kos">,</span> <span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">candidates</span><span class="pl-kos">.</span><span class="pl-en">first</span><span class="pl-kos">.</span><span class="pl-en">cpu_time</span>
|
||
|
||
<span class="pl-c"># and counts for match/ignore/mismatch:</span>
|
||
<span class="pl-k">if</span> <span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">matched?</span>
|
||
$statsd<span class="pl-kos">.</span><span class="pl-en">increment</span> <span class="pl-s">"science.<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-en">name</span><span class="pl-kos">}</span></span>.matched"</span>
|
||
<span class="pl-k">elsif</span> <span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">ignored?</span>
|
||
$statsd<span class="pl-kos">.</span><span class="pl-en">increment</span> <span class="pl-s">"science.<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-en">name</span><span class="pl-kos">}</span></span>.ignored"</span>
|
||
<span class="pl-k">else</span>
|
||
$statsd<span class="pl-kos">.</span><span class="pl-en">increment</span> <span class="pl-s">"science.<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-en">name</span><span class="pl-kos">}</span></span>.mismatched"</span>
|
||
<span class="pl-c"># Finally, store mismatches in redis so they can be retrieved and examined</span>
|
||
<span class="pl-c"># later on, for debugging and research.</span>
|
||
<span class="pl-en">store_mismatch_data</span><span class="pl-kos">(</span><span class="pl-s1">result</span><span class="pl-kos">)</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">store_mismatch_data</span><span class="pl-kos">(</span><span class="pl-s1">result</span><span class="pl-kos">)</span>
|
||
<span class="pl-s1">payload</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
|
||
<span class="pl-pds">:name</span> <span class="pl-c1">=></span> <span class="pl-en">name</span><span class="pl-kos">,</span>
|
||
<span class="pl-pds">:context</span> <span class="pl-c1">=></span> <span class="pl-en">context</span><span class="pl-kos">,</span>
|
||
<span class="pl-pds">:control</span> <span class="pl-c1">=></span> <span class="pl-en">observation_payload</span><span class="pl-kos">(</span><span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">control</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
|
||
<span class="pl-pds">:candidate</span> <span class="pl-c1">=></span> <span class="pl-en">observation_payload</span><span class="pl-kos">(</span><span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">candidates</span><span class="pl-kos">.</span><span class="pl-en">first</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
|
||
<span class="pl-pds">:execution_order</span> <span class="pl-c1">=></span> <span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">observations</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">(</span>&<span class="pl-pds">:name</span><span class="pl-kos">)</span>
|
||
<span class="pl-kos">}</span>
|
||
|
||
<span class="pl-s1">key</span> <span class="pl-c1">=</span> <span class="pl-s">"science.<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-en">name</span><span class="pl-kos">}</span></span>.mismatch"</span>
|
||
$redis<span class="pl-kos">.</span><span class="pl-en">lpush</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">payload</span>
|
||
$redis<span class="pl-kos">.</span><span class="pl-en">ltrim</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">1000</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">observation_payload</span><span class="pl-kos">(</span><span class="pl-s1">observation</span><span class="pl-kos">)</span>
|
||
<span class="pl-k">if</span> <span class="pl-s1">observation</span><span class="pl-kos">.</span><span class="pl-en">raised?</span>
|
||
<span class="pl-kos">{</span>
|
||
<span class="pl-pds">:exception</span> <span class="pl-c1">=></span> <span class="pl-s1">observation</span><span class="pl-kos">.</span><span class="pl-en">exception</span><span class="pl-kos">.</span><span class="pl-en">class</span><span class="pl-kos">,</span>
|
||
<span class="pl-pds">:message</span> <span class="pl-c1">=></span> <span class="pl-s1">observation</span><span class="pl-kos">.</span><span class="pl-en">exception</span><span class="pl-kos">.</span><span class="pl-en">message</span><span class="pl-kos">,</span>
|
||
<span class="pl-pds">:backtrace</span> <span class="pl-c1">=></span> <span class="pl-s1">observation</span><span class="pl-kos">.</span><span class="pl-en">exception</span><span class="pl-kos">.</span><span class="pl-en">backtrace</span>
|
||
<span class="pl-kos">}</span>
|
||
<span class="pl-k">else</span>
|
||
<span class="pl-kos">{</span>
|
||
<span class="pl-c"># see "Keeping it clean" above</span>
|
||
<span class="pl-pds">:value</span> <span class="pl-c1">=></span> <span class="pl-s1">observation</span><span class="pl-kos">.</span><span class="pl-en">cleaned_value</span>
|
||
<span class="pl-kos">}</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Testing</h3><a id="user-content-testing" class="anchor" aria-label="Permalink: Testing" href="#testing"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">When running your test suite, it's helpful to know that the experimental results always match. To help with testing, Scientist defines a <code>raise_on_mismatches</code> class attribute when you include <code>Scientist::Experiment</code>. Only do this in your test suite!</p>
|
||
<p dir="auto">To raise on mismatches:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyExperiment
|
||
include Scientist::Experiment
|
||
# ... implementation
|
||
end
|
||
|
||
MyExperiment.raise_on_mismatches = true"><pre><span class="pl-k">class</span> <span class="pl-v">MyExperiment</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>::<span class="pl-v">Experiment</span>
|
||
<span class="pl-c"># ... implementation</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-v">MyExperiment</span><span class="pl-kos">.</span><span class="pl-en">raise_on_mismatches</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span></pre></div>
|
||
<p dir="auto">Scientist will raise a <code>Scientist::Experiment::MismatchError</code> exception if any observations don't match.</p>
|
||
<div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Custom mismatch errors</h4><a id="user-content-custom-mismatch-errors" class="anchor" aria-label="Permalink: Custom mismatch errors" href="#custom-mismatch-errors"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">To instruct Scientist to raise a custom error instead of the default <code>Scientist::Experiment::MismatchError</code>:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class CustomMismatchError < Scientist::Experiment::MismatchError
|
||
def to_s
|
||
message = "There was a mismatch! Here's the diff:"
|
||
|
||
diffs = result.candidates.map do |candidate|
|
||
Diff.new(result.control, candidate)
|
||
end.join("\n")
|
||
|
||
"#{message}\n#{diffs}"
|
||
end
|
||
end"><pre><span class="pl-k">class</span> <span class="pl-v">CustomMismatchError</span> < <span class="pl-v">Scientist</span>::<span class="pl-v">Experiment</span>::<span class="pl-v">MismatchError</span>
|
||
<span class="pl-k">def</span> <span class="pl-en">to_s</span>
|
||
<span class="pl-s1">message</span> <span class="pl-c1">=</span> <span class="pl-s">"There was a mismatch! Here's the diff:"</span>
|
||
|
||
<span class="pl-s1">diffs</span> <span class="pl-c1">=</span> <span class="pl-en">result</span><span class="pl-kos">.</span><span class="pl-en">candidates</span><span class="pl-kos">.</span><span class="pl-en">map</span> <span class="pl-k">do</span> |<span class="pl-s1">candidate</span>|
|
||
<span class="pl-v">Diff</span><span class="pl-kos">.</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-en">result</span><span class="pl-kos">.</span><span class="pl-en">control</span><span class="pl-kos">,</span> <span class="pl-s1">candidate</span><span class="pl-kos">)</span>
|
||
<span class="pl-k">end</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s">"<span class="pl-cce">\n</span>"</span><span class="pl-kos">)</span>
|
||
|
||
<span class="pl-s">"<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-s1">message</span><span class="pl-kos">}</span></span><span class="pl-cce">\n</span><span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-s1">diffs</span><span class="pl-kos">}</span></span>"</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="science "widget-permissions" do |e|
|
||
e.use { Report.find(id) }
|
||
e.try { ReportService.new.fetch(id) }
|
||
|
||
e.raise_with CustomMismatchError
|
||
end"><pre><span class="pl-en">science</span> <span class="pl-s">"widget-permissions"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-v">Report</span><span class="pl-kos">.</span><span class="pl-en">find</span><span class="pl-kos">(</span><span class="pl-en">id</span><span class="pl-kos">)</span> <span class="pl-kos">}</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-v">ReportService</span><span class="pl-kos">.</span><span class="pl-en">new</span><span class="pl-kos">.</span><span class="pl-en">fetch</span><span class="pl-kos">(</span><span class="pl-en">id</span><span class="pl-kos">)</span> <span class="pl-kos">}</span>
|
||
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">raise_with</span> <span class="pl-v">CustomMismatchError</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">This allows for pre-processing on mismatch error exception messages.</p>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Handling errors</h3><a id="user-content-handling-errors" class="anchor" aria-label="Permalink: Handling errors" href="#handling-errors"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">In candidate code</h4><a id="user-content-in-candidate-code" class="anchor" aria-label="Permalink: In candidate code" href="#in-candidate-code"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Scientist rescues and tracks <em>all</em> exceptions raised in a <code>try</code> or <code>use</code> block, including some where rescuing may cause unexpected behavior (like <code>SystemExit</code> or <code>ScriptError</code>). To rescue a more restrictive set of exceptions, modify the <code>RESCUES</code> list:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# default is [Exception]
|
||
Scientist::Observation::RESCUES.replace [StandardError]"><pre><span class="pl-c"># default is [Exception]</span>
|
||
<span class="pl-v">Scientist</span>::<span class="pl-v">Observation</span>::<span class="pl-c1">RESCUES</span><span class="pl-kos">.</span><span class="pl-en">replace</span> <span class="pl-kos">[</span><span class="pl-v">StandardError</span><span class="pl-kos">]</span></pre></div>
|
||
<p dir="auto"><strong>Timeout ⏲️</strong>: If you're introducing a candidate that could possibly timeout, use caution. <g-emoji class="g-emoji" alias="warning">⚠️</g-emoji> While Scientist rescues all exceptions that occur in the candidate block, it <em>does not</em> protect you from timeouts, as doing so would be complicated. It would likely require running the candidate code in a background job and tracking the time of a request. We feel the cost of this complexity would outweigh the benefit, so make sure that your code doesn't cause timeouts. This risk can be reduced by running the experiment on a low percentage so that users can (most likely) bypass the experiment by refreshing the page if they hit a timeout. See <a href="#ramping-up-experiments">Ramping up experiments</a> below for how details on how to set the percentage for your experiment.</p>
|
||
<div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">In a Scientist callback</h4><a id="user-content-in-a-scientist-callback" class="anchor" aria-label="Permalink: In a Scientist callback" href="#in-a-scientist-callback"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">If an exception is raised within any of Scientist's internal helpers, like <code>publish</code>, <code>compare</code>, or <code>clean</code>, the <code>raised</code> method is called with the symbol name of the internal operation that failed and the exception that was raised. The default behavior of <code>Scientist::Default</code> is to simply re-raise the exception. Since this halts the experiment entirely, it's often a better idea to handle this error and continue so the experiment as a whole isn't canceled entirely:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyExperiment
|
||
include Scientist::Experiment
|
||
|
||
# ...
|
||
|
||
def raised(operation, error)
|
||
InternalErrorTracker.track! "science failure in #{name}: #{operation}", error
|
||
end
|
||
end"><pre><span class="pl-k">class</span> <span class="pl-v">MyExperiment</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>::<span class="pl-v">Experiment</span>
|
||
|
||
<span class="pl-c"># ...</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">raised</span><span class="pl-kos">(</span><span class="pl-s1">operation</span><span class="pl-kos">,</span> <span class="pl-s1">error</span><span class="pl-kos">)</span>
|
||
<span class="pl-v">InternalErrorTracker</span><span class="pl-kos">.</span><span class="pl-en">track!</span> <span class="pl-s">"science failure in <span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-en">name</span><span class="pl-kos">}</span></span>: <span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-s1">operation</span><span class="pl-kos">}</span></span>"</span><span class="pl-kos">,</span> <span class="pl-s1">error</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">The operations that may be handled here are:</p>
|
||
<ul dir="auto">
|
||
<li><code>:clean</code> - an exception is raised in a <code>clean</code> block</li>
|
||
<li><code>:compare</code> - an exception is raised in a <code>compare</code> block</li>
|
||
<li><code>:enabled</code> - an exception is raised in the <code>enabled?</code> method</li>
|
||
<li><code>:ignore</code> - an exception is raised in an <code>ignore</code> block</li>
|
||
<li><code>:publish</code> - an exception is raised in the <code>publish</code> method</li>
|
||
<li><code>:run_if</code> - an exception is raised in a <code>run_if</code> block</li>
|
||
</ul>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Designing an experiment</h3><a id="user-content-designing-an-experiment" class="anchor" aria-label="Permalink: Designing an experiment" href="#designing-an-experiment"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Because <code>enabled?</code> and <code>run_if</code> determine when a candidate runs, it's impossible to guarantee that it will run every time. For this reason, Scientist is only safe for wrapping methods that aren't changing data.</p>
|
||
<p dir="auto">When using Scientist, we've found it most useful to modify both the existing and new systems simultaneously anywhere writes happen, and verify the results at read time with <code>science</code>. <code>raise_on_mismatches</code> has also been useful to ensure that the correct data was written during tests, and reviewing published mismatches has helped us find any situations we overlooked with our production data at runtime. When writing to and reading from two systems, it's also useful to write some data reconciliation scripts to verify and clean up production data alongside any running experiments.</p>
|
||
<div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Noise and error rates</h4><a id="user-content-noise-and-error-rates" class="anchor" aria-label="Permalink: Noise and error rates" href="#noise-and-error-rates"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Keep in mind that Scientist's <code>try</code> and <code>use</code> blocks run sequentially in random order. As such, any data upon which your code depends may change before the second block is invoked, potentially yielding a mismatch between the candidate and control return values. To calibrate your expectations with respect to <a href="https://en.wikipedia.org/wiki/Type_I_and_type_II_errors" rel="nofollow">false negatives</a> arising from systemic conditions external to your proposed changes, consider starting with an experiment in which both the <code>try</code> and <code>use</code> blocks invoke the control method. Then proceed with introducing a candidate.</p>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Finishing an experiment</h3><a id="user-content-finishing-an-experiment" class="anchor" aria-label="Permalink: Finishing an experiment" href="#finishing-an-experiment"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">As your candidate behavior converges on the controls, you'll start thinking about removing an experiment and using the new behavior.</p>
|
||
<ul dir="auto">
|
||
<li>If there are any ignore blocks, the candidate behavior is <em>guaranteed</em> to be different. If this is unacceptable, you'll need to remove the ignore blocks and resolve any ongoing mismatches in behavior until the observations match perfectly every time.</li>
|
||
<li>When removing a read-behavior experiment, it's a good idea to keep any write-side duplication between an old and new system in place until well after the new behavior has been in production, in case you need to roll back.</li>
|
||
</ul>
|
||
<div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Breaking the rules</h2><a id="user-content-breaking-the-rules" class="anchor" aria-label="Permalink: Breaking the rules" href="#breaking-the-rules"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Sometimes scientists just gotta do weird stuff. We understand.</p>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Ignoring results entirely</h3><a id="user-content-ignoring-results-entirely" class="anchor" aria-label="Permalink: Ignoring results entirely" href="#ignoring-results-entirely"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Science is useful even when all you care about is the timing data or even whether or not a new code path blew up. If you have the ability to incrementally control how often an experiment runs via your <code>enabled?</code> method, you can use it to silently and carefully test new code paths and ignore the results altogether. You can do this by setting <code>ignore { true }</code>, or for greater efficiency, <code>compare { true }</code>.</p>
|
||
<p dir="auto">This will still log mismatches if any exceptions are raised, but will disregard the values entirely.</p>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Trying more than one thing</h3><a id="user-content-trying-more-than-one-thing" class="anchor" aria-label="Permalink: Trying more than one thing" href="#trying-more-than-one-thing"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">It's not usually a good idea to try more than one alternative simultaneously. Behavior isn't guaranteed to be isolated and reporting + visualization get quite a bit harder. Still, it's sometimes useful.</p>
|
||
<p dir="auto">To try more than one alternative at once, add names to some <code>try</code> blocks:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require "scientist"
|
||
|
||
class MyWidget
|
||
include Scientist
|
||
|
||
def allows?(user)
|
||
science "widget-permissions" do |e|
|
||
e.use { model.check_user(user).valid? } # old way
|
||
|
||
e.try("api") { user.can?(:read, model) } # new service API
|
||
e.try("raw-sql") { user.can_sql?(:read, model) } # raw query
|
||
end
|
||
end
|
||
end"><pre><span class="pl-en">require</span> <span class="pl-s">"scientist"</span>
|
||
|
||
<span class="pl-k">class</span> <span class="pl-v">MyWidget</span>
|
||
<span class="pl-en">include</span> <span class="pl-v">Scientist</span>
|
||
|
||
<span class="pl-k">def</span> <span class="pl-en">allows?</span><span class="pl-kos">(</span><span class="pl-s1">user</span><span class="pl-kos">)</span>
|
||
<span class="pl-en">science</span> <span class="pl-s">"widget-permissions"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-en">model</span><span class="pl-kos">.</span><span class="pl-en">check_user</span><span class="pl-kos">(</span><span class="pl-s1">user</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">valid?</span> <span class="pl-kos">}</span> <span class="pl-c"># old way</span>
|
||
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span><span class="pl-kos">(</span><span class="pl-s">"api"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-en">can?</span><span class="pl-kos">(</span><span class="pl-pds">:read</span><span class="pl-kos">,</span> <span class="pl-en">model</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-c"># new service API</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span><span class="pl-kos">(</span><span class="pl-s">"raw-sql"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-en">can_sql?</span><span class="pl-kos">(</span><span class="pl-pds">:read</span><span class="pl-kos">,</span> <span class="pl-en">model</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-c"># raw query</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto">When the experiment runs, all candidate behaviors are tested and each candidate observation is compared with the control in turn.</p>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">No control, just candidates</h3><a id="user-content-no-control-just-candidates" class="anchor" aria-label="Permalink: No control, just candidates" href="#no-control-just-candidates"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Define the candidates with named <code>try</code> blocks, omit a <code>use</code>, and pass a candidate name to <code>run</code>:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="experiment = MyExperiment.new("various-ways") do |e|
|
||
e.try("first-way") { ... }
|
||
e.try("second-way") { ... }
|
||
end
|
||
|
||
experiment.run("second-way")"><pre><span class="pl-en">experiment</span> <span class="pl-c1">=</span> <span class="pl-v">MyExperiment</span><span class="pl-kos">.</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-s">"various-ways"</span><span class="pl-kos">)</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span><span class="pl-kos">(</span><span class="pl-s">"first-way"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span><span class="pl-kos">(</span><span class="pl-s">"second-way"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span>
|
||
<span class="pl-k">end</span>
|
||
|
||
<span class="pl-en">experiment</span><span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-s">"second-way"</span><span class="pl-kos">)</span></pre></div>
|
||
<p dir="auto">The <code>science</code> helper also knows this trick:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="science "various-ways", run: "first-way" do |e|
|
||
e.try("first-way") { ... }
|
||
e.try("second-way") { ... }
|
||
end"><pre><span class="pl-en">science</span> <span class="pl-s">"various-ways"</span><span class="pl-kos">,</span> <span class="pl-pds">run</span>: <span class="pl-s">"first-way"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span><span class="pl-kos">(</span><span class="pl-s">"first-way"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span><span class="pl-kos">(</span><span class="pl-s">"second-way"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Providing fake timing data</h4><a id="user-content-providing-fake-timing-data" class="anchor" aria-label="Permalink: Providing fake timing data" href="#providing-fake-timing-data"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">If you're writing tests that depend on specific timing values, you can provide canned durations using the <code>fabricate_durations_for_testing_purposes</code> method, and Scientist will report these in <code>Scientist::Observation#duration</code> and <code>Scientist::Observation#cpu_time</code> instead of the actual execution times.</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="science "absolutely-nothing-suspicious-happening-here" do |e|
|
||
e.use { ... } # "control"
|
||
e.try { ... } # "candidate"
|
||
e.fabricate_durations_for_testing_purposes({
|
||
"control" => { "duration" => 1.0, "cpu_time" => 0.9 },
|
||
"candidate" => { "duration" => 0.5, "cpu_time" => 0.4 }
|
||
})
|
||
end"><pre><span class="pl-en">science</span> <span class="pl-s">"absolutely-nothing-suspicious-happening-here"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span> <span class="pl-c"># "control"</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span> <span class="pl-c"># "candidate"</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">fabricate_durations_for_testing_purposes</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
|
||
<span class="pl-s">"control"</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> <span class="pl-s">"duration"</span> <span class="pl-c1">=></span> <span class="pl-c1">1.0</span><span class="pl-kos">,</span> <span class="pl-s">"cpu_time"</span> <span class="pl-c1">=></span> <span class="pl-c1">0.9</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
|
||
<span class="pl-s">"candidate"</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> <span class="pl-s">"duration"</span> <span class="pl-c1">=></span> <span class="pl-c1">0.5</span><span class="pl-kos">,</span> <span class="pl-s">"cpu_time"</span> <span class="pl-c1">=></span> <span class="pl-c1">0.4</span> <span class="pl-kos">}</span>
|
||
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos"></span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<p dir="auto"><code>fabricate_durations_for_testing_purposes</code> takes a Hash of duration & cpu_time values, keyed by behavior names. (By default, Scientist uses <code>"control"</code> and <code>"candidate"</code>, but if you override these as shown in <a href="#trying-more-than-one-thing">Trying more than one thing</a> or <a href="#no-control-just-candidates">No control, just candidates</a>, use matching names here.) If a name is not provided, the actual execution time will be reported instead.</p>
|
||
<p dir="auto">We should mention these durations will be used both for the <code>duration</code> field and the <code>cpu_time</code> field.</p>
|
||
<p dir="auto"><em>Like <code>Scientist::Experiment#cleaner</code>, this probably won't come up in normal usage. It's here to make it easier to test code that extends Scientist.</em></p>
|
||
<div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Without including Scientist</h3><a id="user-content-without-including-scientist" class="anchor" aria-label="Permalink: Without including Scientist" href="#without-including-scientist"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">If you need to use Scientist in a place where you aren't able to include the Scientist module, you can call <code>Scientist.run</code>:</p>
|
||
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Scientist.run "widget-permissions" do |e|
|
||
e.use { model.check_user(user).valid? }
|
||
e.try { user.can?(:read, model) }
|
||
end"><pre><span class="pl-v">Scientist</span><span class="pl-kos">.</span><span class="pl-en">run</span> <span class="pl-s">"widget-permissions"</span> <span class="pl-k">do</span> |<span class="pl-s1">e</span>|
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">use</span> <span class="pl-kos">{</span> <span class="pl-en">model</span><span class="pl-kos">.</span><span class="pl-en">check_user</span><span class="pl-kos">(</span><span class="pl-en">user</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">valid?</span> <span class="pl-kos">}</span>
|
||
<span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-en">try</span> <span class="pl-kos">{</span> <span class="pl-en">user</span><span class="pl-kos">.</span><span class="pl-en">can?</span><span class="pl-kos">(</span><span class="pl-pds">:read</span><span class="pl-kos">,</span> <span class="pl-en">model</span><span class="pl-kos">)</span> <span class="pl-kos">}</span>
|
||
<span class="pl-k">end</span></pre></div>
|
||
<div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Hacking</h2><a id="user-content-hacking" class="anchor" aria-label="Permalink: Hacking" href="#hacking"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto">Be on a Unixy box. Make sure a modern Bundler is available. <code>script/test</code> runs the unit tests. All development dependencies are installed automatically. Scientist requires Ruby 2.3 or newer.</p>
|
||
<div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Wrappers</h2><a id="user-content-wrappers" class="anchor" aria-label="Permalink: Wrappers" href="#wrappers"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<ul dir="auto">
|
||
<li><a href="https://github.com/RealGeeks/lab_tech">RealGeeks/lab_tech</a> is a Rails engine for using this library by controlling, storing, and analyzing experiment results with ActiveRecord.</li>
|
||
</ul>
|
||
<div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Alternatives</h2><a id="user-content-alternatives" class="anchor" aria-label="Permalink: Alternatives" href="#alternatives"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<ul dir="auto">
|
||
<li><a href="https://github.com/daylerees/scientist">daylerees/scientist</a> (PHP)</li>
|
||
<li><a href="https://github.com/scientistproject/Scientist.net">scientistproject/scientist.net</a> (.NET)</li>
|
||
<li><a href="https://github.com/joealcorn/laboratory">joealcorn/laboratory</a> (Python)</li>
|
||
<li><a href="https://github.com/rawls238/Scientist4J">rawls238/Scientist4J</a> (Java)</li>
|
||
<li><a href="https://github.com/tomiaijo/scientist">tomiaijo/scientist</a> (C++)</li>
|
||
<li><a href="https://github.com/trello/scientist">trello/scientist</a> (node.js)</li>
|
||
<li><a href="https://github.com/ziyasal/scientist.js">ziyasal/scientist.js</a> (node.js, ES6)</li>
|
||
<li><a href="https://github.com/TrueWill/tzientist">TrueWill/tzientist</a> (node.js, TypeScript)</li>
|
||
<li><a href="https://github.com/TrueWill/paleontologist">TrueWill/paleontologist</a> (Deno, TypeScript)</li>
|
||
<li><a href="https://github.com/yeller/laboratory">yeller/laboratory</a> (Clojure)</li>
|
||
<li><a href="https://github.com/lancew/Scientist">lancew/Scientist</a> (Perl 5)</li>
|
||
<li><a href="https://github.com/lancew/ScientistP6">lancew/ScientistP6</a> (Perl 6)</li>
|
||
<li><a href="https://github.com/MadcapJake/Test-Lab">MadcapJake/Test-Lab</a> (Perl 6)</li>
|
||
<li><a href="https://github.com/cwbriones/scientist">cwbriones/scientist</a> (Elixir)</li>
|
||
<li><a href="https://github.com/calavera/go-scientist">calavera/go-scientist</a> (Go)</li>
|
||
<li><a href="https://github.com/jelmersnoeck/experiment">jelmersnoeck/experiment</a> (Go)</li>
|
||
<li><a href="https://github.com/spoptchev/scientist">spoptchev/scientist</a> (Kotlin / Java)</li>
|
||
<li><a href="https://github.com/junkpiano/scientist">junkpiano/scientist</a> (Swift)</li>
|
||
<li><a href="http://serverlessscientist.com/" rel="nofollow">serverless scientist</a> (AWS Lambda)</li>
|
||
<li><a href="https://github.com/fightmegg/scientist">fightmegg/scientist</a> (TypeScript, Browser / Node.js)</li>
|
||
<li><a href="https://github.com/MisterSpex/misterspex-scientist">MisterSpex/misterspex-scientist</a> (Java, no dependencies)</li>
|
||
</ul>
|
||
<div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Maintainers</h2><a id="user-content-maintainers" class="anchor" aria-label="Permalink: Maintainers" href="#maintainers"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
|
||
<p dir="auto"><a href="https://github.com/jbarnette">@jbarnette</a>,
|
||
<a href="https://github.com/jesseplusplus">@jesseplusplus</a>,
|
||
<a href="https://github.com/rick">@rick</a>,
|
||
and <a href="https://github.com/zerowidth">@zerowidth</a></p>
|
||
</article></div></div></div></div></div></div></div><div class="prc-PageLayout-PaneWrapper-pHPop pr-2" style="--offset-header:0px;--spacing-row:var(--spacing-none);--spacing-column:var(--spacing-none)" data-is-hidden="false" data-position="end"><div class="prc-PageLayout-HorizontalDivider-JLVqp prc-PageLayout-PaneHorizontalDivider-9tbnE" data-component="PageLayout.HorizontalDivider" data-variant-narrow="none" data-variant-regular="none" data-position="end" style="--spacing-divider:var(--spacing-none);--spacing:var(--spacing-none)"></div><div class="prc-PageLayout-Pane-AyzHK" data-component="SplitPageLayout.Pane" style="--spacing:var(--spacing-normal);--pane-min-width:256px;--pane-max-width:calc(100vw - var(--pane-max-width-diff));--pane-width-size:var(--pane-width-large);--pane-width:320px"><!--&--><div class="CodeViewSidebar-module__borderGrid__Lpx5q"><div class="SidebarSection-module__sidebarSection__e8jFN hide-sm hide-md border-0"><h2 class="SidebarSection-module__sectionHeading__TG36m prc-Heading-Heading-MtWFE" data-variant="small" data-component="Heading"><span>About</span></h2><p class="SidebarAbout-module__description__xTkIP prc-Text-Text-9mHv3" data-component="Text">🔬 A Ruby library for carefully refactoring critical paths.</p><h3 class="sr-only prc-Heading-Heading-MtWFE" data-component="Heading"><span>Topics</span></h3><div class="prc-TopicTag-TopicTagGroup-CPva9"><a class="prc-TopicTag-TopicTag-LS-jX" href="/topics/refactoring" data-discover="true">refactoring</a><a class="prc-TopicTag-TopicTag-LS-jX" href="/topics/ruby" data-discover="true">ruby</a><a class="prc-TopicTag-TopicTag-LS-jX" href="/topics/rubygem" data-discover="true">rubygem</a><a class="prc-TopicTag-TopicTag-LS-jX" href="/topics/scientist" data-discover="true">scientist</a></div><h3 class="sr-only prc-Heading-Heading-MtWFE" data-component="Heading"><span>Resources</span></h3><div class="mt-2"><a class="prc-Link-Link-9ZwDx" data-component="Link" data-muted="true" href="#readme-ov-file"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-book mr-2" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path></svg><span>Readme</span></a></div><div class="mt-2"><a class="prc-Link-Link-9ZwDx" data-component="Link" data-muted="true" href="#MIT-1-ov-file"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-law mr-2" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path></svg><span>MIT license</span></a></div><h3 class="sr-only prc-Heading-Heading-MtWFE" data-component="Heading"><span>Code of conduct</span></h3><div class="mt-2"><a class="prc-Link-Link-9ZwDx" data-component="Link" data-muted="true" href="/github/scientist#coc-ov-file" data-discover="true"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-code-of-conduct mr-2" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8.048 2.241c.964-.709 2.079-1.238 3.325-1.241a4.616 4.616 0 0 1 3.282 1.355c.41.408.757.86.996 1.428.238.568.348 1.206.347 1.968 0 2.193-1.505 4.254-3.081 5.862-1.496 1.526-3.213 2.796-4.249 3.563l-.22.163a.749.749 0 0 1-.895 0l-.221-.163c-1.036-.767-2.753-2.037-4.249-3.563C1.51 10.008.007 7.952.002 5.762a4.614 4.614 0 0 1 1.353-3.407C3.123.585 6.223.537 8.048 2.24Zm-1.153.983c-1.25-1.033-3.321-.967-4.48.191a3.115 3.115 0 0 0-.913 2.335c0 1.556 1.109 3.24 2.652 4.813C5.463 11.898 6.96 13.032 8 13.805c.353-.262.758-.565 1.191-.905l-1.326-1.223a.75.75 0 0 1 1.018-1.102l1.48 1.366c.328-.281.659-.577.984-.887L9.99 9.802a.75.75 0 1 1 1.019-1.103l1.384 1.28c.295-.329.566-.661.81-.995L12.92 8.7l-1.167-1.168c-.674-.671-1.78-.664-2.474.03-.268.269-.538.537-.802.797-.893.882-2.319.843-3.185-.032-.346-.35-.693-.697-1.043-1.047a.75.75 0 0 1-.04-1.016c.162-.191.336-.401.52-.623.62-.748 1.356-1.637 2.166-2.417Zm7.112 4.442c.313-.65.491-1.293.491-1.916v-.001c0-.614-.088-1.045-.23-1.385-.143-.339-.357-.633-.673-.949a3.111 3.111 0 0 0-2.218-.915c-1.092.003-2.165.627-3.226 1.602-.823.755-1.554 1.637-2.228 2.45l-.127.154.562.566a.755.755 0 0 0 1.066.02l.794-.79c1.258-1.258 3.312-1.31 4.594-.032.396.394.792.791 1.173 1.173Z"></path></svg><span>Code of conduct</span></a></div><h3 class="sr-only prc-Heading-Heading-MtWFE" data-component="Heading"><span>Contributing</span></h3><div class="mt-2"><a class="prc-Link-Link-9ZwDx" data-component="Link" data-muted="true" href="#contributing-ov-file"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-people mr-2" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 5.5a3.5 3.5 0 1 1 5.898 2.549 5.508 5.508 0 0 1 3.034 4.084.75.75 0 1 1-1.482.235 4 4 0 0 0-7.9 0 .75.75 0 0 1-1.482-.236A5.507 5.507 0 0 1 3.102 8.05 3.493 3.493 0 0 1 2 5.5ZM11 4a3.001 3.001 0 0 1 2.22 5.018 5.01 5.01 0 0 1 2.56 3.012.749.749 0 0 1-.885.954.752.752 0 0 1-.549-.514 3.507 3.507 0 0 0-2.522-2.372.75.75 0 0 1-.574-.73v-.352a.75.75 0 0 1 .416-.672A1.5 1.5 0 0 0 11 5.5.75.75 0 0 1 11 4Zm-5.5-.5a2 2 0 1 0-.001 3.999A2 2 0 0 0 5.5 3.5Z"></path></svg><span>Contributing</span></a></div><h3 class="sr-only prc-Heading-Heading-MtWFE" data-component="Heading"><span>Security policy</span></h3><div class="mt-2"><a class="prc-Link-Link-9ZwDx" data-component="Link" data-muted="true" href="#security-ov-file"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-shield-lock mr-2" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m8.533.133 5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667l5.25-1.68a1.748 1.748 0 0 1 1.066 0Zm-.61 1.429.001.001-5.25 1.68a.251.251 0 0 0-.174.237V7c0 1.36.275 2.666 1.057 3.859.784 1.194 2.121 2.342 4.366 3.298a.196.196 0 0 0 .154 0c2.245-.957 3.582-2.103 4.366-3.297C13.225 9.666 13.5 8.358 13.5 7V3.48a.25.25 0 0 0-.174-.238l-5.25-1.68a.25.25 0 0 0-.153 0ZM9.5 6.5c0 .536-.286 1.032-.75 1.3v2.45a.75.75 0 0 1-1.5 0V7.8A1.5 1.5 0 1 1 9.5 6.5Z"></path></svg><span>Security policy</span></a></div><div class="mt-2"><a class="prc-Link-Link-9ZwDx" data-component="Link" data-muted="true" href="/github/scientist/activity" data-discover="true"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-pulse mr-2" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M6 2c.306 0 .582.187.696.471L10 10.731l1.304-3.26A.751.751 0 0 1 12 7h3.25a.75.75 0 0 1 0 1.5h-2.742l-1.812 4.528a.751.751 0 0 1-1.392 0L6 4.77 4.696 8.03A.75.75 0 0 1 4 8.5H.75a.75.75 0 0 1 0-1.5h2.742l1.812-4.529A.751.751 0 0 1 6 2Z"></path></svg><span>Activity</span></a></div><div class="mt-2"><a class="prc-Link-Link-9ZwDx" data-component="Link" data-muted="true" href="/github/scientist/custom-properties" data-discover="true"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-note mr-2" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 3.75C0 2.784.784 2 1.75 2h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 14H1.75A1.75 1.75 0 0 1 0 12.25Zm1.75-.25a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25ZM3.5 6.25a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75Zm.75 2.25h4a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1 0-1.5Z"></path></svg><span>Custom properties</span></a></div><h3 class="sr-only prc-Heading-Heading-MtWFE" data-component="Heading"><span>Stars</span></h3><div class="mt-2"><span class="SidebarAbout-module__socialStat__nnJPx"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-star mr-2" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg><strong>7.8k</strong> stars</span></div><h3 class="sr-only prc-Heading-Heading-MtWFE" data-component="Heading"><span>Watchers</span></h3><div class="mt-2"><span class="SidebarAbout-module__socialStat__nnJPx"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-eye mr-2" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.83.88 9.576.43 8.898a1.62 1.62 0 0 1 0-1.798c.45-.677 1.367-1.931 2.637-3.022C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.825.742-3.955 1.715-1.124.967-1.954 2.096-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z"></path></svg><strong>438</strong> watching</span></div><h3 class="sr-only prc-Heading-Heading-MtWFE" data-component="Heading"><span>Forks</span></h3><div class="mt-2"><a class="prc-Link-Link-9ZwDx" data-component="Link" data-muted="true" href="/github/scientist/forks" data-discover="true"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-repo-forked mr-2" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg><span><strong>504</strong></span><span> forks</span></a></div><div class="mt-2"><a class="prc-Link-Link-9ZwDx" data-component="Link" data-muted="true" href="/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fgithub%2Fscientist&report=github+%28user%29" data-discover="true"><span>Report repository</span></a></div></div><div class="SidebarSection-module__sidebarSection__e8jFN"><h2 class="SidebarSection-module__sectionHeading__TG36m prc-Heading-Heading-MtWFE" data-variant="small" data-component="Heading"><span>Releases</span></h2><div class="prc-SkeletonText-SkeletonText--DvUT prc-Skeleton-SkeletonBox-e93nW" style="width:100%" data-text-skeleton-size="bodyMedium" data-component="SkeletonText"></div><div class="prc-SkeletonText-SkeletonText--DvUT prc-Skeleton-SkeletonBox-e93nW" style="width:100%" data-text-skeleton-size="bodyMedium" data-component="SkeletonText"></div></div><div class="SidebarSection-module__sidebarSection__e8jFN"><h2 class="SidebarSection-module__sectionHeading__TG36m prc-Heading-Heading-MtWFE" data-variant="small" data-component="Heading"><span>Packages</span></h2><div class="prc-SkeletonText-SkeletonText--DvUT prc-Skeleton-SkeletonBox-e93nW" style="width:100%" data-text-skeleton-size="bodyMedium" data-component="SkeletonText"></div></div><div class="SidebarSection-module__sidebarSection__e8jFN"><h2 class="SidebarSection-module__sectionHeading__TG36m prc-Heading-Heading-MtWFE" data-variant="small" data-component="Heading"><span>Used by</span></h2><div class="prc-SkeletonText-SkeletonText--DvUT prc-Skeleton-SkeletonBox-e93nW" style="width:100%" data-text-skeleton-size="bodyMedium" data-component="SkeletonText"></div></div><div class="SidebarSection-module__sidebarSection__e8jFN"><h2 class="SidebarSection-module__sectionHeading__TG36m prc-Heading-Heading-MtWFE" data-variant="small" data-component="Heading"><span>Contributors</span></h2><div class="prc-SkeletonText-SkeletonText--DvUT prc-Skeleton-SkeletonBox-e93nW" style="width:100%" data-text-skeleton-size="bodyMedium" data-component="SkeletonText"></div></div><div class="SidebarSection-module__sidebarSection__e8jFN"><h2 class="SidebarSection-module__sectionHeading__TG36m prc-Heading-Heading-MtWFE" data-variant="small" data-component="Heading"><span>Languages</span></h2><div class="prc-SkeletonText-SkeletonText--DvUT prc-Skeleton-SkeletonBox-e93nW" style="width:100%" data-text-skeleton-size="bodyMedium" data-component="SkeletonText"></div></div></div><!--/&--></div><div class="prc-PageLayout-VerticalDivider-9QRmK prc-PageLayout-PaneVerticalDivider-le57g" data-component="PageLayout.VerticalDivider" data-variant-narrow="none" data-variant-regular="none" data-position="end" style="--spacing:var(--spacing-none)"></div></div></div></div></div></div></div></div></div></div></div><div class="ScrollMarksContainer-module__scrollMarksContainer__Eu7uU" id="find-result-marks-container"></div><div class="d-none"></div><div class="d-none"></div></div> <!-- --> <!-- --> </div>
|
||
</react-app>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</turbo-frame>
|
||
|
||
</main>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<footer class="footer f6 color-fg-muted color-border-subtle tmp-pt-7 tmp-pb-6 p-responsive" role="contentinfo" >
|
||
<h2 class='sr-only'>Footer</h2>
|
||
|
||
|
||
|
||
|
||
<div class="d-flex flex-justify-center flex-items-center flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap">
|
||
<div class="d-flex flex-items-center flex-shrink-0 mx-2">
|
||
<a aria-label="GitHub Homepage" class="footer-octicon mr-2" href="https://github.com">
|
||
<svg aria-hidden="true" data-component="Octicon" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github">
|
||
<path d="M10.226 17.284c-2.965-.36-5.054-2.493-5.054-5.256 0-1.123.404-2.336 1.078-3.144-.292-.741-.247-2.314.09-2.965.898-.112 2.111.36 2.83 1.01.853-.269 1.752-.404 2.853-.404 1.1 0 1.999.135 2.807.382.696-.629 1.932-1.1 2.83-.988.315.606.36 2.179.067 2.942.72.854 1.101 2 1.101 3.167 0 2.763-2.089 4.852-5.098 5.234.763.494 1.28 1.572 1.28 2.807v2.336c0 .674.561 1.056 1.235.786 4.066-1.55 7.255-5.615 7.255-10.646C23.5 6.188 18.334 1 11.978 1 5.62 1 .5 6.188.5 12.545c0 4.986 3.167 9.12 7.435 10.669.606.225 1.19-.18 1.19-.786V20.63a2.9 2.9 0 0 1-1.078.224c-1.483 0-2.359-.808-2.987-2.313-.247-.607-.517-.966-1.034-1.033-.27-.023-.359-.135-.359-.27 0-.27.45-.471.898-.471.652 0 1.213.404 1.797 1.235.45.651.921.943 1.483.943.561 0 .92-.202 1.437-.719.382-.381.674-.718.944-.943"></path>
|
||
</svg>
|
||
</a>
|
||
<span>
|
||
© 2026 GitHub, Inc.
|
||
</span>
|
||
</div>
|
||
|
||
<nav aria-label="Footer">
|
||
<h3 class="sr-only" id="sr-footer-heading">Footer navigation</h3>
|
||
|
||
<ul class="list-style-none d-flex flex-justify-center flex-wrap mb-2 mb-lg-0" aria-labelledby="sr-footer-heading">
|
||
|
||
|
||
<li class="mx-2">
|
||
<a data-analytics-event="{"category":"Footer","action":"go to Terms","label":"text:terms"}" href="https://docs.github.com/site-policy/github-terms/github-terms-of-service" data-view-component="true" class="Link--secondary Link">Terms</a>
|
||
</li>
|
||
|
||
<li class="mx-2">
|
||
<a data-analytics-event="{"category":"Footer","action":"go to privacy","label":"text:privacy"}" href="https://docs.github.com/site-policy/privacy-policies/github-privacy-statement" data-view-component="true" class="Link--secondary Link">Privacy</a>
|
||
</li>
|
||
|
||
|
||
<li class="mx-2">
|
||
<a data-analytics-event="{"category":"Footer","action":"go to security","label":"text:security"}" href="https://github.com/security" data-view-component="true" class="Link--secondary Link">Security</a>
|
||
</li>
|
||
|
||
<li class="mx-2">
|
||
<a data-analytics-event="{"category":"Footer","action":"go to status","label":"text:status"}" href="https://www.githubstatus.com/" data-view-component="true" class="Link--secondary Link">Status</a>
|
||
</li>
|
||
|
||
<li class="mx-2">
|
||
<a data-analytics-event="{"category":"Footer","action":"go to community","label":"text:community"}" href="https://github.community/" data-view-component="true" class="Link--secondary Link">Community</a>
|
||
</li>
|
||
|
||
<li class="mx-2">
|
||
<a data-analytics-event="{"category":"Footer","action":"go to docs","label":"text:docs"}" href="https://docs.github.com/" data-view-component="true" class="Link--secondary Link">Docs</a>
|
||
</li>
|
||
|
||
<li class="mx-2">
|
||
<a data-analytics-event="{"category":"Footer","action":"go to contact","label":"text:contact"}" href="https://support.github.com?tags=dotcom-footer" data-view-component="true" class="Link--secondary Link">Contact</a>
|
||
</li>
|
||
|
||
|
||
<li class="mx-2" >
|
||
<cookie-consent-link>
|
||
<button
|
||
type="button"
|
||
class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent"
|
||
data-action="click:cookie-consent-link#showConsentManagement"
|
||
data-analytics-event="{"location":"footer","action":"cookies","context":"subfooter","tag":"link","label":"cookies_link_subfooter_footer"}"
|
||
>
|
||
Manage cookies
|
||
</button>
|
||
</cookie-consent-link>
|
||
</li>
|
||
|
||
<li class="mx-2">
|
||
<cookie-consent-link>
|
||
<button
|
||
type="button"
|
||
class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent text-left"
|
||
data-action="click:cookie-consent-link#showConsentManagement"
|
||
data-analytics-event="{"location":"footer","action":"dont_share_info","context":"subfooter","tag":"link","label":"dont_share_info_link_subfooter_footer"}"
|
||
>
|
||
Do not share my personal information
|
||
</button>
|
||
</cookie-consent-link>
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
</div>
|
||
</footer>
|
||
|
||
|
||
|
||
<ghcc-consent id="ghcc" class="position-fixed bottom-0 left-0" style="z-index: 999999"
|
||
data-locale="en"
|
||
data-initial-cookie-consent-allowed=""
|
||
data-cookie-consent-required="false"
|
||
></ghcc-consent>
|
||
|
||
|
||
|
||
|
||
<div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden>
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
|
||
<path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path>
|
||
</svg>
|
||
<button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
|
||
<path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>
|
||
</svg>
|
||
</button>
|
||
You can’t perform that action at this time.
|
||
</div>
|
||
|
||
<template id="site-details-dialog">
|
||
<details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open>
|
||
<summary role="button" aria-label="Close dialog"></summary>
|
||
<details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal">
|
||
<button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog>
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
|
||
<path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>
|
||
</svg>
|
||
</button>
|
||
<div class="octocat-spinner tmp-my-6 js-details-dialog-spinner"></div>
|
||
</details-dialog>
|
||
</details>
|
||
</template>
|
||
|
||
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;">
|
||
<div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;">
|
||
</div>
|
||
</div>
|
||
|
||
<template id="snippet-clipboard-copy-button">
|
||
<div class="zeroclipboard-container position-absolute right-0 top-0">
|
||
<clipboard-copy aria-label="Copy code to clipboard" class="ClipboardButton btn js-clipboard-copy m-2 p-0" data-copy-feedback="Copied!" data-tooltip-direction="w">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2 tmp-m-2">
|
||
<path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path>
|
||
</svg>
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2 tmp-m-2">
|
||
<path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path>
|
||
</svg>
|
||
</clipboard-copy>
|
||
</div>
|
||
</template>
|
||
<template id="snippet-clipboard-copy-button-unpositioned">
|
||
<div class="zeroclipboard-container">
|
||
<clipboard-copy aria-label="Copy code to clipboard" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w">
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon">
|
||
<path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path>
|
||
</svg>
|
||
<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none">
|
||
<path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path>
|
||
</svg>
|
||
</clipboard-copy>
|
||
</div>
|
||
</template>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
<div id="js-global-screen-reader-notice" class="sr-only mt-n1" aria-live="polite" aria-atomic="true" ></div>
|
||
<div id="js-global-screen-reader-notice-assertive" class="sr-only mt-n1" aria-live="assertive" aria-atomic="true"></div>
|
||
</body>
|
||
</html>
|
||
|