Skip to content

Doc cleanups#267

Merged
Joseph-Edwards merged 7 commits into
libsemigroups:v1from
james-d-mitchell:doc-cleanups
Jun 13, 2025
Merged

Doc cleanups#267
Joseph-Edwards merged 7 commits into
libsemigroups:v1from
james-d-mitchell:doc-cleanups

Conversation

@james-d-mitchell

Copy link
Copy Markdown
Member

No description provided.

@Joseph-Edwards Joseph-Edwards left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @james-d-mitchell. There are a few things that this PR highlighted, but I will fix those in separate PRs.

Comment thread src/knuth-bendix.cpp
Comment on lines +335 to +349
m.def(
"knuth_bendix_redundant_rule",
[](Presentation<std::string> const& p, std::chrono::milliseconds t)
-> std::optional<std::pair<std::string, std::string>> {
auto it = knuth_bendix::redundant_rule(p, t);
if (it != p.rules.cend()) {
return std::make_pair(*it, *(it + 1));
}
return {};
},
// Signature required to avoid generating any doc
R"pbdoc(
:sig=(p: Presentation, t: datetime.timedelta) -> tuple[list[int], list[int]] | tuple[str, str] | None:
:only-document-once:
)pbdoc");

@Joseph-Edwards Joseph-Edwards Jun 13, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the doc, but this function probably shouldn't be bound in bind_knuth_bendix, since redundant_rule doesn't depend on the template arguments. Hence, we end up binding the functions 8 times, rather than twice. I will fix this in a separate PR.

Comment thread src/todd-coxeter-impl.cpp
should be performed.)pbdoc")
.value(
"hlt",
// JDM couldn't get the links to work in the following doc string.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if the enums were written like tril, we could get this to work. I'll give it a go, and open a new PR if it works. Otherwise, I think this is fine.

@Joseph-Edwards Joseph-Edwards merged commit 252b70a into libsemigroups:v1 Jun 13, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants