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

fix: fix reading of LGL and NCOL files (broken in 2.0.0) #1347

Merged
merged 4 commits into from May 23, 2024

Conversation

szhorvat
Copy link
Member

Fixes #1346

I'm sorry, I really don't have time for a test, but I hope someone can add one based on my first comment in #1346.

Copy link
Contributor

aviator-app bot commented Apr 20, 2024

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@knwng
Copy link
Contributor

knwng commented Apr 22, 2024

Tried to add unittest for the change in #1348. I'm new to R, so please let me know if there's anything not following common practices.

@szhorvat
Copy link
Member Author

@krlmlr @Antonov548 One of the CI issues seems to be that GLPK is not found in the macOS image, so it uses the vendored GLPK.

ncol_path <- tempfile("testfile", fileext = ".ncol")
g <- make_graph(c(1, 2, 2, 3))
write_graph(g, ncol_path, "ncol")
expect_no_error(g2 <- read_graph(ncol_path, "ncol"))
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to know more than no error?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is good to merge, and the fix should be released ASAP (I'd consider this a very serious bug).

Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to know more than no error?

I supposed g and g2 are identical at the beginning, but they are not. The graphs have the same structures but there's some difference in properties. So I replaced expect_true(identical_graphs(g, g2)) with expect_no_error to meet the minimum requirement. If that's not expected, there should be other changes after thorough inspection.

Copy link
Member Author

Choose a reason for hiding this comment

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

NCOL will always treat vertex "identifiers" as strings, not numerical vertex IDs, so a difference there is expected.

@szhorvat szhorvat mentioned this pull request May 6, 2024
@maelle maelle requested a review from krlmlr May 7, 2024 07:31
Copy link
Contributor

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

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

Why does CI/CD fail?

R/foreign.R Show resolved Hide resolved
@szhorvat
Copy link
Member Author

Let me know if there's anything else that you need from me here (it seems to me this is good to go).

@krlmlr
Copy link
Contributor

krlmlr commented May 23, 2024

Thanks!

@aviator-app aviator-app bot added the blocked label May 23, 2024
Copy link
Contributor

aviator-app bot commented May 23, 2024

This pull request failed to merge: PR cannot be automatically rebased, please rebase manually to continue. Once the issues are resolved, remove the blocked label and re-queue the pull request. Note that the pull request will be automatically re-queued if it has the mergequeue label.

Additional debug info: Failed to rebase this PR onto the latest changes from the base branch. You will probably need to rebase this PR manually and resolve conflicts).

@szhorvat szhorvat removed the blocked label May 23, 2024
@aviator-app aviator-app bot merged commit 3a46d60 into main May 23, 2024
20 checks passed
@aviator-app aviator-app bot deleted the fix/ncol-lgl branch May 23, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to load graph using read.graph.ncol
4 participants