-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements for Families Module (interactive docs, better io, typo fixes) #252
Open
josephburkhart
wants to merge
37
commits into
master
Choose a base branch
from
shape-families-tables
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…/coxeter into shape-families-tables
This commit resolves an issue where Sphinx will not copy static X3D files from the source to the build directory before loading extensions, which results in a FileNotFoundError and causes the build process to exit. It is documented in Sphinx issues #2090 and #1810 that this is expected behavior.
for more information, see https://pre-commit.ci
…/coxeter into shape-families-tables
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I have made several changes related to the
families
module:I have created interactive documentation for each of the shape families. Previously, users had to go digging through the SI of cited papers in order to know what ID and name they needed to get a specific shape. Now, there is a new section of the documentation, accessible via the sidebar, titled "Shape Family Tables". Tables contain basic information about the shapes (ID, name, number of vertices, number of faces), as well as interactive models that allow users to actually see what the shapes look like.
To make these new pages, I created a minimal sphinx extension, some CSV data tables, and exported X3D models for all of the members of the discrete shape families. I also modified the default page template and created some custom CSS.
Two things I need feedback on:
PyramidDipyramidFamily
andPrismAntiprismFamily
are deprecated, so I went ahead and made their pages anyway.In order to make the interactive models more clear, I modified
io.to_x3d()
to highlight the shape edges. Sinceio.to_html()
callsto_x3d()
under the hood, it was also affected. I created new control files for the io unit tests to reflect the updated functionality. In the process, I also tweakedtest_io.py
so that it generated new control files better.During the development process, I encountered several typos in the reference geometry data stored in JSON files in
families/data
. These typos are as follows:science1220869.json
: for shapeJ86
, the name was given as "Spenocorona", but it should be "Sphenocorona"_previous_science1220869.json
: same as previousjohnson.json
: for shape "Sphenocorona" (note the spelling is already correct here), the vertices did not match those inscience1220869.json
, so I updated the vertices in this file to match those in that file.That last typo is concerning. I only found it because when I corrected the spelling of "Sphenocorona" in the first two files, I stated getting an
AssertionError
intests/test_shape_families.py::test_science_family()
forname="J86"
. If you look at the code for that test,KeyError
s for shapes in the Johnson Family cause a short-circuit in the check for vertices equality. As far as I can tell, there are no more misspellings in shape names, but there may still be name mismatches that I haven't found yet. Therefore, I strongly suggest we check every one of the names injohnson.json
to make sure this problem doesn't happen again.Personally, I'm not sure I really understand why we need
test_science_family()
. It seems to me that its only function is to check that shapes instantiated through data in individual family JSON files (platonic.json
,archimedean.json
, etc.) match those have the same vertices as shapes instantiated through data from the Damasceno paper (science1220869.json
), and since those JSON files should not ever change (except clearly here), I don't see why we should test that equivalency more than once. Perhaps I'm missing something?Motivation and Context
These changes make the documentation for the
families
module more accessible and correct several bugs in the internal data and testing apparatus.Types of Changes
1The change breaks (or has the potential to break) existing functionality.
Checklist: