Conversation
I've added punctuation at the end of most messages in the C core now, but a few are still left out. This is a nice-to-have aesthetic feature, it's not an absolute must unless you want to append extra text at the end of the message. We do correct for missing punctuation in both the Python and Mathematica interfaces. |
Isn't this already there with LGTM, but I didn't test. |
Co-authored-by: Szabolcs Horvát <szhorvat@gmail.com>
|
Thank you @szhorvat @schochastics! |
|
@szhorvat with your change the path wasn't simplified any longer, does my fix make any sense? |
|
I'm sorry, I can't seem to see your fix, but I'm in a rush and may be missing something. I believe my mistake is that 1 needs to be subtracted from |
src/rinterface_extra.c
Outdated
| * build procedure, namely on the directory that the compiler is invoked from. */ | ||
| static inline const char* simplify_file_path(const char *file) { | ||
| const char prefix[] = "vendor/cigraph/src/"; | ||
| const size_t prefix_len = sizeof(prefix) / sizeof(prefix[0]); |
There was a problem hiding this comment.
| const size_t prefix_len = sizeof(prefix) / sizeof(prefix[0]); | |
| const size_t prefix_len = sizeof(prefix) / sizeof(prefix[0]) - 1; |
|
oops my push hadn't worked... anyhow thanks a ton!! |
tests/testthat/test-centrality.R
Outdated
| expect_snapshot(error = TRUE, { | ||
| arpack(f, options = list(nev = 2, ncv = 4), sym = TRUE) | ||
| }) | ||
| expect_snapshot( |
There was a problem hiding this comment.
Create a new wrapper for expect_snapshot(error = TRUE, transform = ...) . Use where applicable.
…function (#2522) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com> Co-authored-by: Kirill Müller <krlmlr@users.noreply.github.com>
krlmlr
left a comment
There was a problem hiding this comment.
@copilot: Use expect_snapshot_igraph_error() everywhere instead of expect_snapshot(error = TRUE), except in tests/testthat/test-error-formatting.R . Search in tests/testthat for a literal expect_snapshot(error = TRUE first to find many occurrences, then search for error = TRUE and look for a surrounding expect_snapshot() call. Ensure all calls are transformed, except the one where we add a comment to explain why we keep the test. Move Rx_igraph_test_error_with_source() into a separate C file to keep the line number in the error message stable.
…raph_error()` (#2528) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
|
@copilot: Change |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
| Error in `sample_degseq()`: | ||
| ! At vendor/cigraph/src/games/degree_sequence_vl/gengraph_mr-connected.cpp:<linenumber> : Cannot make a connected graph from the given degree sequence. Invalid value | ||
| ! Cannot make a connected graph from the given degree sequence. Invalid value | ||
| Source: games/degree_sequence_vl/gengraph_mr-connected.cpp:<linenumber> |
| Warning in `connect_neighborhood_impl()`: | ||
| At vendor/cigraph/src/operators/connect_neighborhood.c:85 : Order smaller than two, graph will be unchanged. | ||
| Order smaller than two, graph will be unchanged. | ||
| Source: operators/connect_neighborhood.c:85 |
| Condition | ||
| Error in `hrg_sample_impl()`: | ||
| ! At vendor/cigraph/src/hrg/hrg_types.cc:xx : Assertion failed: n >= 0. This is an unexpected igraph error; please report this as a bug, along with the steps to reproduce it. | ||
| ! At <file>:<line> : Assertion failed: n >= 0. This is an unexpected igraph error; please report this as a bug, along with the steps to reproduce it. |
There was a problem hiding this comment.
These and similar errors hint at an error in the wrapping code. Fix.
|
Thanks! |
Fix #2202
One thing we might consider adding, is a period at the end of the message if it's not already there.