Conversation
|
This looks great, thank you! I've just put some comments below. :) |
| gap: G := TransitiveGroup({n}, {t}); | ||
|
|
||
| n32_dbs: | ||
| comment: Databases for transitive groups of order 32 |
| for lang in self.code[prop]: | ||
| self.code[prop][lang] = self.code[prop][lang].format(**{'n':self.n(), 't':self.t()}) | ||
| self.code['show'] = { lang:'' for lang in self.code['prompt'] } | ||
| # For transitive groups of order 32, the user needs to load an extra package |
| if isinstance(code[item][L],str): | ||
| lines = code[item][L].split('\n')[:-1] if '\n' in code[item][L] else [code[item][L]] | ||
| lines = code[item][L].split('\n') if '\n' in code[item][L] else [code[item][L]] | ||
| # remove trailing empty line if any |
There was a problem hiding this comment.
Technically, I think this would remove all blank lines in lines, not necessarily just the trailing one. Though I don't think we have any code snippets with interior blank lines, so I think this is fine :)
There was a problem hiding this comment.
Fair point, I've updated the comment!
There was a problem hiding this comment.
I think this can now just be code[item][L].split('\n') since "".split('\n') is [""].
|
Another side-effect I've noticed is that, in the Galois group code download pages, there is no longer a newline between defining the transitive group G, and the code snippet for the abstract group. E.g. compare these pages: https://beta.lmfdb.org/GaloisGroup/32T14/download/gap I think an easy fix is to replace line 131 (second last line) of |
|
Thanks, I've addressed your comments now, let me know if you spot anything else! |
Gap currently does not have transitive groups of degree 32. Therefore the code snippets on the pages for these groups will give errors unless the user has installed the relevant databases.
This PR adds comments with the relevant links to the transitive groups pages, as well as cleans up newline stripping in utils/place_code.py