From 0823466f9d41a1f04aef6b8eeb1fc7387b59d8ee Mon Sep 17 00:00:00 2001 From: janbridley Date: Wed, 30 Aug 2023 09:38:32 -0400 Subject: [PATCH 1/4] Fixed documentation for common families --- coxeter/families/common.py | 22 ++++++++++++++-------- doc/source/coxeter.bib | 11 +++++++++++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/coxeter/families/common.py b/coxeter/families/common.py index 4585b8d3..cbf98567 100644 --- a/coxeter/families/common.py +++ b/coxeter/families/common.py @@ -75,7 +75,7 @@ def make_vertices(cls, n): PlatonicFamily = TabulatedGSDShapeFamily.from_json_file( os.path.join(_DATA_FOLDER, "platonic.json"), classname="PlatonicFamily", - docstring="""The family of Platonic solids. + docstring="""The family of Platonic solids (5 total). The following parameters are required by this class: @@ -88,6 +88,7 @@ def make_vertices(cls, n): os.path.join(_DATA_FOLDER, "archimedean.json"), classname="ArchimedeanFamily", docstring="""The family of Archimedean solids (13 total). + The following parameters are required by this class: - name: The name of the ArchimedeanFamily solid. Options are "Cuboctahedron", \ "Icosidodecahedron", "Truncated Tetrahedron", "Truncated Octahedron", \ @@ -101,8 +102,9 @@ def make_vertices(cls, n): CatalanFamily = TabulatedGSDShapeFamily.from_json_file( os.path.join(_DATA_FOLDER, "catalan.json"), classname="CatalanFamily", - docstring="""The family of Catalan solids, also known as Archimedean duals + docstring="""The family of Catalan solids, also known as Archimedean duals \ (13 total). + The following parameters are required by this class: - name: The name of the CatalanFamily solid. Options are "Deltoidal \ Hexecontahedron", "Deltoidal Icositetrahedron", "Disdyakis \ @@ -117,10 +119,12 @@ def make_vertices(cls, n): JohnsonFamily = TabulatedGSDShapeFamily.from_json_file( os.path.join(_DATA_FOLDER, "johnson.json"), classname="JohnsonFamily", - docstring="""The family of Johnson solids (92 total). + docstring="""The family of Johnson solids, as enumerated in \ + :cite:`Johnson1966` (92 total). + The following parameters are required by this class: - name: The name of the JohnsonFamily solid. A full list is available in \ - 10.1126/science.1220869: :cite:`Damasceno2012`. In general, shape names \ + :cite:`Johnson1966`. In general, shape names \ should have the first character of each word capitalized, with spaces \ between words (e.g. "Elongated Triangular Cupola"). Pyramids and \ dipyramids are named from their base polygon (e.g. "Square Pyramid" \ @@ -128,12 +132,12 @@ def make_vertices(cls, n): """, ) - PyramidDipyramidFamily = TabulatedGSDShapeFamily.from_json_file( os.path.join(_DATA_FOLDER, "pyramid_dipyramid.json"), classname="PyramidDipyramidFamily", docstring="""The family of regular equilateral pyramids and dipyramids (6 total). -The following parameters are required by this class: + + The following parameters are required by this class: - name: The name of the pyramid or dipyramid. Options are "Triangular Pyramid", \ "Square Pyramid", "Pentagonal Pyramid", "Triangular Dipyramid", \ "Square Dipyramid", and "Pentagonal Dipyramid". @@ -143,8 +147,10 @@ def make_vertices(cls, n): PrismAntiprismFamily = TabulatedGSDShapeFamily.from_json_file( os.path.join(_DATA_FOLDER, "prism_antiprism.json"), classname="PrismAntiprismFamily", - docstring="""The family of n-gonal prisms and antiprisms with n∈[3,10] (16 total). -The following parameters are required by this class: + docstring="""The family of uniform n-prisms and n-antiprisms with n∈[3,10] \ + (16 total). + + The following parameters are required by this class: - name: The name of the prism or antiprism. Options for prisms are \ "Triangular Prism", "Square Prism", "Pentagonal Prism", "Hexagonal Prism", \ "Heptagonal Prism", "Octagonal Prism", "Nonagonal Prism", and \ diff --git a/doc/source/coxeter.bib b/doc/source/coxeter.bib index 9ea9e977..15a4e432 100644 --- a/doc/source/coxeter.bib +++ b/doc/source/coxeter.bib @@ -50,6 +50,17 @@ @article{Chen2014 doi = {10.1103/PhysRevX.4.011024}, } +@article{Johnson1966, +title={Convex Polyhedra with Regular Faces}, +author={Johnson, Norman W.}, +journal={Canadian Journal of Mathematics}, +volume={18}, +pages={169–200}, +year={1966}, +publisher={Cambridge University Press}, +doi={10.4153/cjm-1966-021-8}, +} + @article{Damasceno2012, author = {Damasceno, Pablo F. and Engel, Michael and Glotzer, Sharon C.}, title = {Crystalline Assemblies and Densest Packings of a Family of Truncated Tetrahedra and the Role of Directional Entropic Forces}, From bbcbb7a6683ce142f76f8273e161407b48c3eb1d Mon Sep 17 00:00:00 2001 From: Jen Bradley <55467578+janbridley@users.noreply.github.com> Date: Wed, 30 Aug 2023 11:25:24 -0400 Subject: [PATCH 2/4] Fix PyramidDipyramidFamily docs Co-authored-by: Domagoj Fijan <50439291+DomFijan@users.noreply.github.com> --- coxeter/families/common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/coxeter/families/common.py b/coxeter/families/common.py index cbf98567..fbfa7996 100644 --- a/coxeter/families/common.py +++ b/coxeter/families/common.py @@ -138,6 +138,7 @@ def make_vertices(cls, n): docstring="""The family of regular equilateral pyramids and dipyramids (6 total). The following parameters are required by this class: + - name: The name of the pyramid or dipyramid. Options are "Triangular Pyramid", \ "Square Pyramid", "Pentagonal Pyramid", "Triangular Dipyramid", \ "Square Dipyramid", and "Pentagonal Dipyramid". From 4a7dfa60c20394821c6738576e2f0de0c9fa731e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 30 Aug 2023 15:25:41 +0000 Subject: [PATCH 3/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- coxeter/families/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coxeter/families/common.py b/coxeter/families/common.py index fbfa7996..8c8de44f 100644 --- a/coxeter/families/common.py +++ b/coxeter/families/common.py @@ -138,7 +138,7 @@ def make_vertices(cls, n): docstring="""The family of regular equilateral pyramids and dipyramids (6 total). The following parameters are required by this class: - + - name: The name of the pyramid or dipyramid. Options are "Triangular Pyramid", \ "Square Pyramid", "Pentagonal Pyramid", "Triangular Dipyramid", \ "Square Dipyramid", and "Pentagonal Dipyramid". From cd06702226511160d6de113bb30c5c2972adca9a Mon Sep 17 00:00:00 2001 From: janbridley Date: Wed, 30 Aug 2023 12:26:45 -0400 Subject: [PATCH 4/4] Replaced plaintext description with parameter definition --- coxeter/families/common.py | 84 +++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 37 deletions(-) diff --git a/coxeter/families/common.py b/coxeter/families/common.py index 8c8de44f..0f5a9ce6 100644 --- a/coxeter/families/common.py +++ b/coxeter/families/common.py @@ -77,10 +77,11 @@ def make_vertices(cls, n): classname="PlatonicFamily", docstring="""The family of Platonic solids (5 total). -The following parameters are required by this class: + Args: + name (str): + The name of the Platonic solid. - - name: The name of the Platonic solid. Options are "Cube", "Dodecahedron", \ - "Icosahedron", "Octahedron", and "Tetrahedron". + Options are "Cube", "Dodecahedron", "Icosahedron", "Octahedron", and "Tetrahedron". """, ) @@ -89,13 +90,15 @@ def make_vertices(cls, n): classname="ArchimedeanFamily", docstring="""The family of Archimedean solids (13 total). -The following parameters are required by this class: - - name: The name of the ArchimedeanFamily solid. Options are "Cuboctahedron", \ - "Icosidodecahedron", "Truncated Tetrahedron", "Truncated Octahedron", \ - "Truncated Cube", "Truncated Icosahedron", "Truncated Dodecahedron", \ - "Rhombicuboctahedron", "Rhombicosidodecahedron", "Truncated \ - Cuboctahedron", "Truncated Icosidodecahedron", "Snub Cuboctahedron", \ - and "Snub Icosidodecahedron". + Args: + name (str): + The name of the Archimedean solid. + + Options are "Cuboctahedron", "Icosidodecahedron", "Truncated Tetrahedron", + "Truncated Octahedron", "Truncated Cube", "Truncated Icosahedron", "Truncated + Dodecahedron", "Rhombicuboctahedron", "Rhombicosidodecahedron", "Truncated \ + Cuboctahedron", "Truncated Icosidodecahedron", "Snub Cuboctahedron", and "Snub + Icosidodecahedron". """, ) @@ -105,14 +108,15 @@ def make_vertices(cls, n): docstring="""The family of Catalan solids, also known as Archimedean duals \ (13 total). -The following parameters are required by this class: - - name: The name of the CatalanFamily solid. Options are "Deltoidal \ - Hexecontahedron", "Deltoidal Icositetrahedron", "Disdyakis \ - Dodecahedron", "Disdyakis Triacontahedron", "Pentagonal \ - Hexecontahedron", "Pentagonal Icositetrahedron", "Pentakis \ - Dodecahedron", "Rhombic Dodecahedron", "Rhombic \ - Triacontahedron", "Triakis Octahedron", "Tetrakis \ - Hexahedron", "Triakis Icosahedron", and "Triakis Tetrahedron". + Args: + name (str): + The name of the Catalan solid. + + Options are "Deltoidal Hexecontahedron", "Deltoidal Icositetrahedron", "Disdyakis \ + Dodecahedron", "Disdyakis Triacontahedron", "Pentagonal Hexecontahedron", + "Pentagonal Icositetrahedron", "Pentakis Dodecahedron", "Rhombic Dodecahedron", + "Rhombic Triacontahedron", "Triakis Octahedron", "Tetrakis Hexahedron", "Triakis + Icosahedron", and "Triakis Tetrahedron". """, ) @@ -122,13 +126,14 @@ def make_vertices(cls, n): docstring="""The family of Johnson solids, as enumerated in \ :cite:`Johnson1966` (92 total). -The following parameters are required by this class: - - name: The name of the JohnsonFamily solid. A full list is available in \ - :cite:`Johnson1966`. In general, shape names \ - should have the first character of each word capitalized, with spaces \ - between words (e.g. "Elongated Triangular Cupola"). Pyramids and \ - dipyramids are named from their base polygon (e.g. "Square Pyramid" \ - or "Elongated Pentagonal Dipyramid"). + Args: + name (str): + The name of the Johnson solid. + + A full list of Johnson solids is available in :cite:`Johnson1966`. In general, shape + names should have the first character of each word capitalized, with spaces between + words (e.g. "Elongated Triangular Cupola"). Pyramids and dipyramids are named from + their base polygon (e.g. "Square Pyramid" or "Elongated Pentagonal Dipyramid"). """, ) @@ -137,11 +142,13 @@ def make_vertices(cls, n): classname="PyramidDipyramidFamily", docstring="""The family of regular equilateral pyramids and dipyramids (6 total). - The following parameters are required by this class: + Args: + name (str): + The name of the pyramid or dipyramid. - - name: The name of the pyramid or dipyramid. Options are "Triangular Pyramid", \ - "Square Pyramid", "Pentagonal Pyramid", "Triangular Dipyramid", \ - "Square Dipyramid", and "Pentagonal Dipyramid". + Options for pyramids are "Triangular Pyramid", "Square Pyramid", and + "Pentagonal Pyramid". Options for dipyramids are "Triangular Dipyramid", + "Square Dipyramid", and "Pentagonal Dipyramid". """, ) @@ -151,13 +158,16 @@ def make_vertices(cls, n): docstring="""The family of uniform n-prisms and n-antiprisms with n∈[3,10] \ (16 total). - The following parameters are required by this class: - - name: The name of the prism or antiprism. Options for prisms are \ - "Triangular Prism", "Square Prism", "Pentagonal Prism", "Hexagonal Prism", \ - "Heptagonal Prism", "Octagonal Prism", "Nonagonal Prism", and \ - "Decagonal Prism". Options for antiprisms are "Triangular Antiprism", \ - "Square Antiprism", "Pentagonal Antiprism", "Hexagonal Antiprism", \ - "Heptagonal Antiprism", "Octagonal Antiprism","Nonagonal Antiprism", \ - and "Decagonal Antiprism". + Args: + name (str): + The name of the prism or antiprism. + + Options for prisms are \ + "Triangular Prism", "Square Prism", "Pentagonal Prism", "Hexagonal Prism", \ + "Heptagonal Prism", "Octagonal Prism", "Nonagonal Prism", and \ + "Decagonal Prism". Options for antiprisms are "Triangular Antiprism", \ + "Square Antiprism", "Pentagonal Antiprism", "Hexagonal Antiprism", \ + "Heptagonal Antiprism", "Octagonal Antiprism","Nonagonal Antiprism", \ + and "Decagonal Antiprism". """, )