Skip to content
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

Support Nauty digraph6 format #162

Merged
merged 3 commits into from
Jan 24, 2019

Conversation

mtorpey
Copy link
Collaborator

@mtorpey mtorpey commented Jan 23, 2019

As discovered in Issue #158, our version of digraph6 differs from that in Nauty, but the two formats cannot be confused with each other (since they start with + and & respectively). This PR adds support for reading the Nauty format, while preserving the ability to read the old one (with an info warning). This PR makes us write the Nauty format, and removes the ability to write the old one (we should use Nauty's format from now on).

Copy link
Collaborator

@wilfwilson wilfwilson left a comment

Choose a reason for hiding this comment

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

Thanks for sorting this out Michael. Please could you do the linting to make the tests pass, and I'd appreciate it if you could expand the info warning along the lines of what I suggested. Although I'm sure you can find a nicer/more succinct way of putting it :)

gap/io.gi Outdated
elif s[1] = '+' then
legacy := true;
Info(InfoDigraphs, 1, "Digraph6 strings beginning with '+' are deprecated");
Info(InfoDigraphs, 1, "and may not be recognised by other programs.");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this warning needs to be more forceful/explicit. You could read this and think that the only thing that changed was that the '+' has been changed to a '&'. But the actual encoding is fundamentally different.

Maybe something like

Digraph6 strings that begin with '+' use an old specification of the Digraph6 format that is incompatible with the current, and now standard, specification. These old strings can still be read by the Digraphs package, but it is unlikely that they can be read correctly by other programs. We recommend that you re-encode your digraphs with the new format.

@mtorpey
Copy link
Collaborator Author

mtorpey commented Jan 24, 2019

Altered as requested. See what you think of the new info warning – succinct enough? 😉

Copy link
Collaborator

@wilfwilson wilfwilson left a comment

Choose a reason for hiding this comment

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

Beautiful.

@wilfwilson wilfwilson merged commit 2bb3660 into digraphs:master Jan 24, 2019
@mtorpey mtorpey deleted the new-digraph6-format branch January 24, 2019 12:10
@james-d-mitchell
Copy link
Member

Great, super thanks @mtorpey !!

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.

3 participants