← Về thư mục
📄
/
/
profiles
/
r-and-d
/
raw_evidence
/
scientific-agent-skills
/
graft
/
tests
/
pkpd-modeling
/ test_scripts.md
tests/pkpd-modeling/test_scripts.py
tests/pkpd-modeling/test_scripts.py
run_script · function · L57-L64 — def run_script(name: str, *args: str) -> subprocess.CompletedProcess
write_csv · function · L67-L71 — def write_csv(directory: Path, name: str, header: str, rows) -> Path
TestSkillStructure · class · L77-L115 — class TestSkillStructure(unittest.TestCase)
test_frontmatter · method · L78-L79 — def test_frontmatter(self) -> None
test_length · method · L81-L82 — def test_length(self) -> None
test_no_stray_tests · method · L84-L85 — def test_no_stray_tests(self) -> None
test_no_bytecode · method · L87-L88 — def test_no_bytecode(self) -> None
test_scripts_compile · method · L90-L91 — def test_scripts_compile(self) -> None
test_internal_links_resolve · method · L93-L94 — def test_internal_links_resolve(self) -> None
test_every_referenced_file_exists · method · L96-L106 — def test_every_referenced_file_exists(self) -> None
test_every_script_is_documented · method · L108-L115 — def test_every_script_is_documented(self) -> None
TestDispositionIdentities · class · L121-L250 — class TestDispositionIdentities(unittest.TestCase)
test_one_compartment_matches_closed_form · method · L124-L127 — def test_one_compartment_matches_closed_form(self) -> None
test_auc_equals_dose_over_clearance · method · L129-L133 — def test_auc_equals_dose_over_clearance(self) -> None
test_vss_and_mrt · method · L135-L138 — def test_vss_and_mrt(self) -> None
test_initial_concentration_is_dose_over_v1 · method · L140-L142 — def test_initial_concentration_is_dose_over_v1(self) -> None
test_oral_matches_bateman · method · L144-L150 — def test_oral_matches_bateman(self) -> None
test_absorption_singularity_uses_the_limit · method · L152-L160 — def test_absorption_singularity_uses_the_limit(self) -> None
test_infusion_reaches_rate_over_clearance · method · L162-L165 — def test_infusion_reaches_rate_over_clearance(self) -> None
test_steady_state_metrics_match_brute_force_superposition · method · L167-L176 — def test_steady_state_metrics_match_brute_force_superposition(self) -> None
test_michaelis_menten_reduces_to_linear_at_high_km · method · L178-L184 — def test_michaelis_menten_reduces_to_linear_at_high_km(self) -> None
test_michaelis_menten_is_not_dose_proportional · method · L186-L192 — def test_michaelis_menten_is_not_dose_proportional(self) -> None
test_effect_compartment_matches_analytical_solution · method · L194-L199 — def test_effect_compartment_matches_analytical_solution(self) -> None
test_effect_compartment_equilibrates_to_constant_input · method · L201-L204 — def test_effect_compartment_equilibrates_to_constant_input(self) -> None
test_indirect_response_starts_at_baseline · method · L206-L216 — def test_indirect_response_starts_at_baseline(self) -> None
conc · function · L210-L211 — def conc(time: float) -> float
test_tmdd_target_is_suppressed_by_drug_and_recovers · method · L218-L237 — def test_tmdd_target_is_suppressed_by_drug_and_recovers(self) -> None
test_tmdd_without_drug_sits_at_the_target_baseline · method · L239-L246 — def test_tmdd_without_drug_sits_at_the_target_baseline(self) -> None
test_disposition_rejects_mismatched_peripherals · method · L248-L250 — def test_disposition_rejects_mismatched_peripherals(self) -> None
analytical_oral_profile · function · L256-L261 — def analytical_oral_profile(tmp: Path) -> Path
TestNCA · class · L264-L362 — class TestNCA(unittest.TestCase)
test_recovers_known_parameters · method · L265-L279 — def test_recovers_known_parameters(self) -> None
test_lambda_z_excludes_tmax · method · L281-L287 — def test_lambda_z_excludes_tmax(self) -> None
test_lambda_z_refuses_with_too_few_points · method · L289-L294 — def test_lambda_z_refuses_with_too_few_points(self) -> None
test_log_down_trapezoid_is_below_linear_on_a_declining_curve · method · L296-L303 — def test_log_down_trapezoid_is_below_linear_on_a_declining_curve(self) -> None
test_aumc_log_down_matches_the_analytical_integral · method · L305-L312 — def test_aumc_log_down_matches_the_analytical_integral(self) -> None
test_partial_auc_matches_full_auc_over_the_whole_range · method · L314-L318 — def test_partial_auc_matches_full_auc_over_the_whole_range(self) -> None
test_blq_rules_change_the_result_as_documented · method · L320-L330 — def test_blq_rules_change_the_result_as_documented(self) -> None
test_flags_excessive_extrapolation · method · L332-L341 — def test_flags_excessive_extrapolation(self) -> None: # Truncated profile: a large fraction of AUCinf comes from the tail.
test_steady_state_parameters · method · L343-L356 — def test_steady_state_parameters(self) -> None
test_rejects_missing_dose · method · L358-L362 — def test_rejects_missing_dose(self) -> None
TestCompartmentalFitting · class · L368-L423 — class TestCompartmentalFitting(unittest.TestCase)
two_compartment_data · method · L370-L375 — def two_compartment_data(tmp: Path) -> Path
test_recovers_two_compartment_parameters · method · L377-L390 — def test_recovers_two_compartment_parameters(self) -> None
test_flags_unidentifiable_third_compartment · method · L392-L400 — def test_flags_unidentifiable_third_compartment(self) -> None
test_f_test_rejects_the_third_compartment_and_accepts_the_second · method · L402-L415 — def test_f_test_rejects_the_third_compartment_and_accepts_the_second(self) -> None
test_flags_structural_misspecification_via_runs_test · method · L417-L423 — def test_flags_structural_misspecification_via_runs_test(self) -> None
TestBioequivalence · class · L429-L511 — class TestBioequivalence(unittest.TestCase)
test_sample_size_matches_published_table · method · L430-L436 — def test_sample_size_matches_published_table(self) -> None
test_power_is_monotone_in_sample_size · method · L438-L440 — def test_power_is_monotone_in_sample_size(self) -> None
test_abel_cap_is_exact · method · L442-L447 — def test_abel_cap_is_exact(self) -> None
test_abel_does_not_widen_below_30_percent · method · L449-L453 — def test_abel_does_not_widen_below_30_percent(self) -> None
test_cv_roundtrip · method · L455-L457 — def test_cv_roundtrip(self) -> None
test_crossover_removes_the_period_effect · method · L459-L479 — def test_crossover_removes_the_period_effect(self) -> None
test_scaling_refused_without_a_replicate_design · method · L481-L487 — def test_scaling_refused_without_a_replicate_design(self) -> None
test_reference_variability_needs_replicated_reference · method · L489-L495 — def test_reference_variability_needs_replicated_reference(self) -> None
test_rsabe_bound_passes_when_difference_is_small_and_cvwr_high · method · L497-L502 — def test_rsabe_bound_passes_when_difference_is_small_and_cvwr_high(self) -> None
test_nti_limits_applied · method · L504-L511 — def test_nti_limits_applied(self) -> None
TestAllometryAndFIH · class · L517-L561 — class TestAllometryAndFIH(unittest.TestCase)
test_fda_conversion_factors · method · L518-L523 — def test_fda_conversion_factors(self) -> None
test_mrsd_uses_the_most_sensitive_species · method · L525-L529 — def test_mrsd_uses_the_most_sensitive_species(self) -> None
test_maturation_is_monotone_and_bounded · method · L531-L536 — def test_maturation_is_monotone_and_bounded(self) -> None
test_allometric_scaling · method · L538-L539 — def test_allometric_scaling(self) -> None
test_neonate_without_maturation_raises_a_finding · method · L541-L544 — def test_neonate_without_maturation_raises_a_finding(self) -> None
test_exponent_regression_recovers_a_known_slope · method · L546-L552 — def test_exponent_regression_recovers_a_known_slope(self) -> None
test_rule_of_exponents_bands · method · L554-L557 — def test_rule_of_exponents_bands(self) -> None
test_unknown_species_rejected · method · L559-L561 — def test_unknown_species_rejected(self) -> None
TestDDIStatic · class · L567-L602 — class TestDDIStatic(unittest.TestCase)
test_basic_reversible_ratio · method · L568-L569 — def test_basic_reversible_ratio(self) -> None
test_tdi_ratio_reduces_to_one_without_inactivation · method · L571-L572 — def test_tdi_ratio_reduces_to_one_without_inactivation(self) -> None
test_induction_ratio_below_one · method · L574-L577 — def test_induction_ratio_below_one(self) -> None
test_mechanistic_static_model_matches_hand_calculation · method · L579-L585 — def test_mechanistic_static_model_matches_hand_calculation(self) -> None
test_auc_ratio_cannot_exceed_the_fm_ceiling · method · L587-L591 — def test_auc_ratio_cannot_exceed_the_fm_ceiling(self) -> None
test_no_perpetrator_gives_unity · method · L593-L595 — def test_no_perpetrator_gives_unity(self) -> None
test_classification_bands · method · L597-L602 — def test_classification_bands(self) -> None
TestExposureResponse · class · L608-L668 — class TestExposureResponse(unittest.TestCase)
test_emax_recovers_known_parameters · method · L609-L615 — def test_emax_recovers_known_parameters(self) -> None
test_sigmoid_emax_recovers_the_hill_coefficient · method · L617-L622 — def test_sigmoid_emax_recovers_the_hill_coefficient(self) -> None
test_flags_a_plateau_outside_the_data · method · L624-L632 — def test_flags_a_plateau_outside_the_data(self) -> None
test_cqtc_matches_ordinary_least_squares · method · L634-L640 — def test_cqtc_matches_ordinary_least_squares(self) -> None
test_cqtc_flags_extrapolation_and_the_10ms_threshold · method · L642-L647 — def test_cqtc_flags_extrapolation_and_the_10ms_threshold(self) -> None
test_logistic_slope_sign · method · L649-L655 — def test_logistic_slope_sign(self) -> None
test_logistic_rejects_non_binary · method · L657-L659 — def test_logistic_rejects_non_binary(self) -> None
test_quartile_summary_is_ordered · method · L661-L668 — def test_quartile_summary_is_ordered(self) -> None
TestPopPKDatasetCheck · class · L674-L708 — class TestPopPKDatasetCheck(unittest.TestCase)
test_catches_planted_defects · method · L675-L687 — def test_catches_planted_defects(self) -> None
test_clean_dataset_passes · method · L689-L692 — def test_clean_dataset_passes(self) -> None
test_addl_without_ii_is_an_error · method · L694-L704 — def test_addl_without_ii_is_an_error(self) -> None
test_strict_mode_fails_on_warnings · method · L706-L708 — def test_strict_mode_fails_on_warnings(self) -> None
TestTDMAndSimulation · class · L714-L799 — class TestTDMAndSimulation(unittest.TestCase)
test_map_recovers_a_known_individual · method · L715-L733 — def test_map_recovers_a_known_individual(self) -> None
test_single_level_raises_a_finding · method · L735-L741 — def test_single_level_raises_a_finding(self) -> None
test_level_beyond_the_interval_rejected · method · L743-L748 — def test_level_beyond_the_interval_rejected(self) -> None
test_simulate_regimen_matches_closed_form_steady_state · method · L750-L761 — def test_simulate_regimen_matches_closed_form_steady_state(self) -> None
test_accumulation_ratio_is_consistent_across_metrics · method · L763-L774 — def test_accumulation_ratio_is_consistent_across_metrics(self) -> None
test_monte_carlo_attainment_is_a_fraction · method · L776-L787 — def test_monte_carlo_attainment_is_a_fraction(self) -> None
test_regimen_comparison_preserves_cavg_for_equal_daily_dose · method · L789-L795 — def test_regimen_comparison_preserves_cavg_for_equal_daily_dose(self) -> None
test_mismatched_peripheral_arguments_rejected · method · L797-L799 — def test_mismatched_peripheral_arguments_rejected(self) -> None
TestCLIContract · class · L805-L863 — class TestCLIContract(unittest.TestCase)
test_json_output_is_parseable_and_self_contained · method · L808-L815 — def test_json_output_is_parseable_and_self_contained(self) -> None
test_tsv_output_has_no_notes · method · L817-L822 — def test_tsv_output_has_no_notes(self) -> None
test_missing_input_file_exits_two · method · L824-L827 — def test_missing_input_file_exits_two(self) -> None
test_duplicate_columns_rejected · method · L829-L834 — def test_duplicate_columns_rejected(self) -> None
test_comment_lines_and_blank_lines_skipped · method · L836-L842 — def test_comment_lines_and_blank_lines_skipped(self) -> None
test_tsv_is_detected · method · L844-L849 — def test_tsv_is_detected(self) -> None
test_column_names_are_case_insensitive · method · L851-L856 — def test_column_names_are_case_insensitive(self) -> None
test_report_exit_codes · method · L858-L863 — def test_report_exit_codes(self) -> None