Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 104 additions & 12 deletions scripts/select_ci_test_shard.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,112 @@
RECIPE_VERSION = 1
TESTS_ROOT = Path("tests")
WEIGHT_OVERRIDES = {
"tests/main/test_main_general.py": 300_000,
"tests/test_main_kr.py": 250_000,
"tests/main/jsonschema/test_main_jsonschema.py": 200_000,
"tests/main/openapi/test_main_openapi.py": 200_000,
"tests/main/xmlschema/test_main_xmlschema.py": 180_000,
"tests/parser/test_jsonschema.py": 180_000,
"tests/parser/test_openapi.py": 180_000,
# Rounded milliseconds from a full local pytest --durations run on 2026-07-03.
"tests/main/asyncapi/test_main_asyncapi.py": 420,
"tests/main/avro/test_main_avro.py": 2_270,
"tests/main/graphql/test_annotated.py": 80,
"tests/main/graphql/test_main_graphql.py": 1_180,
"tests/main/jsonschema/test_main_jsonschema.py": 13_210,
"tests/main/openapi/test_main_openapi.py": 7_530,
"tests/main/protobuf/test_main_protobuf.py": 520,
"tests/main/test_cli_fast_paths.py": 1_710,
"tests/main/test_dynamic_models.py": 550,
"tests/main/test_error_messages.py": 40,
"tests/main/test_exec_validation.py": 320,
"tests/main/test_generation_determinism.py": 860,
"tests/main/test_jsonschema_suite_conformance.py": 1,
"tests/main/test_main_csv.py": 50,
"tests/main/test_main_general.py": 3_990,
"tests/main/test_main_json.py": 120,
"tests/main/test_main_watch.py": 2_220,
"tests/main/test_main_yaml.py": 40,
"tests/main/test_parsed_source_cache_parity.py": 50,
"tests/main/test_performance.py": 1,
"tests/main/test_public_api_signature_baseline.py": 170,
"tests/main/test_types.py": 1,
"tests/main/xmlschema/test_main_xmlschema.py": 810,
"tests/model/dataclass/test_param.py": 1,
"tests/model/pydantic_v2/test_base_model.py": 1,
"tests/model/pydantic_v2/test_config.py": 1,
"tests/model/pydantic_v2/test_dataclass.py": 1,
"tests/model/pydantic_v2/test_root_model.py": 1,
"tests/model/pydantic_v2/test_root_model_type_alias.py": 1,
"tests/model/pydantic_v2/test_types.py": 1,
"tests/model/pydantic_v2/test_version.py": 1,
"tests/model/test_base.py": 10,
"tests/model/test_dataclass.py": 1,
"tests/parser/test_base.py": 990,
"tests/parser/test_default_put_dict.py": 1,
"tests/parser/test_generation.py": 1,
"tests/parser/test_generation_store_usage.py": 200,
"tests/parser/test_graph.py": 1,
"tests/parser/test_graphql.py": 190,
"tests/parser/test_imports.py": 230,
"tests/parser/test_jsonschema.py": 200,
"tests/parser/test_openapi.py": 1_960,
"tests/parser/test_scc.py": 100,
"tests/parser/test_schema_version.py": 210,
"tests/parser/test_xmlschema.py": 50,
"tests/skills/datamodel-code-generator/test_skill_flag_drift.py": 50,
"tests/skills/datamodel-code-generator/test_skill_recipes.py": 3_700,
"tests/test_assert_helper_usage.py": 190,
"tests/test_build_architecture_docs_script.py": 380,
"tests/test_build_conformance_docs_script.py": 50,
"tests/test_build_deprecation_docs_script.py": 100,
"tests/test_build_docs_examples_script.py": 40,
"tests/test_build_experimental_docs_script.py": 100,
"tests/test_build_llms_txt_script.py": 50,
"tests/test_build_playground_assets_script.py": 1,
"tests/test_build_preset_docs_script.py": 490,
"tests/test_build_release_benchmark_docs_script.py": 1_340,
"tests/test_build_schema_docs_script.py": 220,
"tests/test_conftest_helpers.py": 1,
"tests/test_deprecations.py": 1,
"tests/test_enums.py": 1,
"tests/test_experimental.py": 1,
"tests/test_format.py": 6_170,
"tests/test_generate_changelog_script.py": 230,
"tests/test_http.py": 1_090,
"tests/test_imports.py": 1,
"tests/test_infer_input_type.py": 110,
"tests/test_input_model.py": 1_630,
"tests/test_main_kr.py": 3_920,
"tests/test_package_metadata.py": 380,
"tests/test_prompt.py": 1,
"tests/test_reference.py": 1,
"tests/test_resolver.py": 1,
"tests/test_select_ci_test_shard_script.py": 250,
"tests/test_types.py": 10,
"tests/test_update_command_help_on_markdown_script.py": 1,
"tests/test_util.py": 40,
"tests/test_validate_release_draft_analysis_script.py": 1,
"tests/test_validators.py": 1,
"tests/test_yaml_backend.py": 1,
}
SPLIT_NODE_WEIGHT_OVERRIDES = {
f"{PAYLOAD_VALIDATION_FILE}::test_generated_pydantic_v2_model_accepts_schema_derived_payloads": 500_000,
f"{PAYLOAD_VALIDATION_FILE}::test_generated_pydantic_v2_model_dumps_schema_valid_payloads": 500_000,
f"{PAYLOAD_VALIDATION_FILE}::test_generated_pydantic_v2_model_rejects_schema_invalid_payloads": 260_000,
f"{PAYLOAD_VALIDATION_FILE}::test_generated_payload_backend_accepts_representative_schema_payloads": 80_000,
f"{PAYLOAD_VALIDATION_FILE}::test_generated_payload_backend_rejects_representative_schema_invalid_payloads": 80_000,
f"{PAYLOAD_VALIDATION_FILE}::test_generated_payload_backend_accepts_representative_schema_payloads": 3_330,
f"{PAYLOAD_VALIDATION_FILE}::test_generated_payload_backend_rejects_representative_schema_invalid_payloads": 850,
f"{PAYLOAD_VALIDATION_FILE}::test_generated_pydantic_v2_model_accepts_schema_derived_payloads": 109_400,
f"{PAYLOAD_VALIDATION_FILE}::test_generated_pydantic_v2_model_dumps_schema_valid_payloads": 106_910,
f"{PAYLOAD_VALIDATION_FILE}::test_generated_pydantic_v2_model_rejects_schema_invalid_payloads": 58_170,
f"{PAYLOAD_VALIDATION_FILE}::test_msgspec_schema_runtime_exclusions_cover_known_semantic_gaps": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_msgspec_schema_runtime_exclusions_detect_untyped_fractional_multiple_of": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_msgspec_schema_runtime_exclusions_ignore_literal_payloads": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_payload_backend_all_case_mode_widens_runtime_validating_backends": 10,
f"{PAYLOAD_VALIDATION_FILE}::test_payload_backend_case_mode_env_is_configurable": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_payload_backend_case_mode_env_rejects_invalid_values": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_payload_backend_full_matrix_exclusions_are_classified": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_payload_backend_representative_matrix_is_classified": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_payload_max_examples_env_is_configurable": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_payload_max_examples_env_rejects_invalid_values": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_payload_rejection_oracle_covers_supported_policy_constraints": 20,
f"{PAYLOAD_VALIDATION_FILE}::test_payload_rejection_oracle_policy_is_classified": 10,
f"{PAYLOAD_VALIDATION_FILE}::test_payload_round_trip_exclusions_are_classified": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_payload_validation_cases_cover_discovered_schema_files": 690,
f"{PAYLOAD_VALIDATION_FILE}::test_pydantic_round_trip_exclusions_cover_uri_unique_items_normalization": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_pydantic_v2_dataclass_legacy_exclusions_cover_fractional_multiple_of": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_pydantic_v2_legacy_runtime_exclusions_are_classified": 1,
f"{PAYLOAD_VALIDATION_FILE}::test_pydantic_v2_legacy_runtime_exclusions_are_version_gated": 1,
}


Expand Down
Loading