Repository navigation
Conversation
bpuchala
left a comment
There was a problem hiding this comment.
Thank you for this, I agree it is helpful.
A couple other requests besides the review comments:
- Merge conflict. GitHub marks it CONFLICTING after #62 merged. The only conflict is in test_supercell_set.py, where both PRs appended tests at the end of the file. A rebase is needed.
- Add a CHANGELOG entry
- Add full docstrings on the get_* methods. The matching add_* methods have full Parameters/Returns sections, but these are one-liners. They should say what's returned (
Optional[SupercellRecord]) and that the name lookup only finds canonical supercells.
| py::arg("record")) | ||
| // get | ||
| .def( | ||
| "get_supercell", |
There was a problem hiding this comment.
I think this should be get_by_supercell.
| )pbdoc", | ||
| py::arg("transformation_matrix_to_super").noconvert()) | ||
| .def( | ||
| "get_record", |
There was a problem hiding this comment.
I don't think this is necessary? I would remove it.
| )pbdoc", | ||
| py::arg("record")) | ||
| .def( | ||
| "get", |
| Notes | ||
| ----- | ||
|
|
||
| .. rubric:: Special Methods |
There was a problem hiding this comment.
I'd like to keep the .. rubric:: Special Methods section pattern to document special methods that don't show up in the class documentation otherwise. I'm happy if the contents of the section include nicer .. code-block:: Python examples like you've done here than the previous short bullets.
| )pbdoc", | ||
| py::arg("data"), py::arg("supercells")) | ||
| .def( | ||
| "supercell_name", |
There was a problem hiding this comment.
Make supercell_name a read-only property, not a method. SupercellRecord.supercell_name is an attribute, and on Supercell the cheap derived values (n_sites, n_unitcells, superlattice, transformation_matrix_to_super) are all properties. This will avoid the confusion of record.supercell_name but supercell.supercell_name().
SupercellSet