From ffb2b4d29b194887ec62a88362669d32a6f9fe24 Mon Sep 17 00:00:00 2001 From: BRADSEC <7948876+bradsec@users.noreply.github.com> Date: Sun, 21 Jun 2026 19:38:19 +1000 Subject: [PATCH] feat: add shoulders, chest, and bust data files --- data/female/bust_shape.json | 7 +++++++ data/female/bust_size.json | 7 +++++++ data/female/chest.json | 3 +++ data/female/shoulders.json | 8 ++++++++ data/male/bust_shape.json | 3 +++ data/male/bust_size.json | 3 +++ data/male/chest.json | 7 +++++++ data/male/shoulders.json | 8 ++++++++ test_random_person.py | 29 +++++++++++++++++++++++++++++ 9 files changed, 75 insertions(+) create mode 100644 data/female/bust_shape.json create mode 100644 data/female/bust_size.json create mode 100644 data/female/chest.json create mode 100644 data/female/shoulders.json create mode 100644 data/male/bust_shape.json create mode 100644 data/male/bust_size.json create mode 100644 data/male/chest.json create mode 100644 data/male/shoulders.json diff --git a/data/female/bust_shape.json b/data/female/bust_shape.json new file mode 100644 index 0000000..12ea14f --- /dev/null +++ b/data/female/bust_shape.json @@ -0,0 +1,7 @@ +[ + { "label": "round", "description": "round" }, + { "label": "teardrop", "description": "teardrop" }, + { "label": "wide-set", "description": "wide-set" }, + { "label": "close-set", "description": "close-set" }, + { "label": "natural", "description": "natural" } +] diff --git a/data/female/bust_size.json b/data/female/bust_size.json new file mode 100644 index 0000000..d53b76c --- /dev/null +++ b/data/female/bust_size.json @@ -0,0 +1,7 @@ +[ + { "label": "petite", "description": "petite" }, + { "label": "small", "description": "small" }, + { "label": "average", "description": "average" }, + { "label": "full", "description": "full" }, + { "label": "large", "description": "large" } +] diff --git a/data/female/chest.json b/data/female/chest.json new file mode 100644 index 0000000..3fb2efa --- /dev/null +++ b/data/female/chest.json @@ -0,0 +1,3 @@ +[ + { "label": "none", "description": "" } +] diff --git a/data/female/shoulders.json b/data/female/shoulders.json new file mode 100644 index 0000000..ad00310 --- /dev/null +++ b/data/female/shoulders.json @@ -0,0 +1,8 @@ +[ + { "label": "narrow", "description": "narrow shoulders" }, + { "label": "average", "description": "average shoulders" }, + { "label": "broad", "description": "broad shoulders" }, + { "label": "sloping", "description": "sloping shoulders" }, + { "label": "square", "description": "square shoulders" }, + { "label": "soft", "description": "soft shoulders" } +] diff --git a/data/male/bust_shape.json b/data/male/bust_shape.json new file mode 100644 index 0000000..3fb2efa --- /dev/null +++ b/data/male/bust_shape.json @@ -0,0 +1,3 @@ +[ + { "label": "none", "description": "" } +] diff --git a/data/male/bust_size.json b/data/male/bust_size.json new file mode 100644 index 0000000..3fb2efa --- /dev/null +++ b/data/male/bust_size.json @@ -0,0 +1,3 @@ +[ + { "label": "none", "description": "" } +] diff --git a/data/male/chest.json b/data/male/chest.json new file mode 100644 index 0000000..20c1f8e --- /dev/null +++ b/data/male/chest.json @@ -0,0 +1,7 @@ +[ + { "label": "flat", "description": "a flat chest" }, + { "label": "average", "description": "an average chest" }, + { "label": "broad", "description": "a broad chest" }, + { "label": "muscular", "description": "a muscular chest" }, + { "label": "barrel", "description": "a barrel chest" } +] diff --git a/data/male/shoulders.json b/data/male/shoulders.json new file mode 100644 index 0000000..264cec7 --- /dev/null +++ b/data/male/shoulders.json @@ -0,0 +1,8 @@ +[ + { "label": "narrow", "description": "narrow shoulders" }, + { "label": "average", "description": "average shoulders" }, + { "label": "broad", "description": "broad shoulders" }, + { "label": "sloping", "description": "sloping shoulders" }, + { "label": "square", "description": "square shoulders" }, + { "label": "muscular", "description": "muscular shoulders" } +] diff --git a/test_random_person.py b/test_random_person.py index f4c3cd7..6c084f2 100644 --- a/test_random_person.py +++ b/test_random_person.py @@ -154,5 +154,34 @@ class TestBuildDescription(unittest.TestCase): self.assertNotIn("eyes eyes", s) +class TestBodyData(unittest.TestCase): + + BODY_KEYS = ("shoulders", "chest", "bust_size", "bust_shape") + + def test_all_body_files_load(self): + for sex in ("male", "female"): + for key in self.BODY_KEYS: + data = core.load_sex(sex, f"{key}.json") + self.assertTrue(len(data) >= 1, f"{sex}/{key}") + for item in data: + self.assertIn("label", item) + self.assertIn("description", item) + + def test_male_bust_is_stub(self): + for key in ("bust_size", "bust_shape"): + labels = [i["label"] for i in core.load_sex("male", f"{key}.json")] + self.assertEqual(labels, ["none"], key) + + def test_female_chest_is_stub(self): + labels = [i["label"] for i in core.load_sex("female", "chest.json")] + self.assertEqual(labels, ["none"]) + + def test_shoulders_real_for_both(self): + for sex in ("male", "female"): + labels = [i["label"] for i in core.load_sex(sex, "shoulders.json")] + self.assertGreater(len(labels), 1, sex) + self.assertNotIn("none", labels) + + if __name__ == "__main__": unittest.main()