From 831f3da094834547fd9a2d357a8006c065a85289 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 2 Sep 2025 21:28:01 +0100 Subject: Add is_phenotype_metadata_column. Promote phenotype_reserved_column_name_p from helpers.strategies to is_phenotype_metadata_column in pyhegp.serialization. --- tests/helpers/strategies.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'tests/helpers') diff --git a/tests/helpers/strategies.py b/tests/helpers/strategies.py index 416a914..de8239c 100644 --- a/tests/helpers/strategies.py +++ b/tests/helpers/strategies.py @@ -19,7 +19,7 @@ from hypothesis import strategies as st from hypothesis.extra.pandas import column, columns, data_frames -from pyhegp.serialization import Summary, is_genotype_metadata_column +from pyhegp.serialization import Summary, is_genotype_metadata_column, is_phenotype_metadata_column from pyhegp.utils import negate tabless_printable_ascii_text = st.text( @@ -71,11 +71,8 @@ def genotype_frames(draw): genotype.columns)), ignore_index=True) -def phenotype_reserved_column_name_p(name): - return name.lower() == "sample-id" - phenotype_names = st.lists(tabless_printable_ascii_text - .filter(negate(phenotype_reserved_column_name_p)), + .filter(negate(is_phenotype_metadata_column)), unique=True) @st.composite -- cgit 1.4.1