-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Custom code style #1340
Comments
In the PR, there are two scripts defining the same function |
I'd suggest:
Does that sound good @krlmlr? |
Can that be a function in the igraph package too? (Not sure a whole new repo is justified here.) |
I suppose it could, but I find it cleaner this way. https://github.com/igraph/igraph.r2cdocs is a separate package for instance. If it is a function in the igraph package, could we export it? Styling graphs might be relevant for igraph users too. |
Yeah, let's start with a separate package. Merging is easier than tearing apart. We have infrastructure to run styler on every PR, need to understand how to make it work with that new package or style guide. No PR command workflow needed. |
@krlmlr are all these snaps correct? https://github.com/igraph/igraph.style/blob/main/tests/testthat/_snaps/igraph-style.md In the PR you had linked to, I think all versions of |
|
Right, so does it mean you had used other code in your PR? I'm confused. |
oh maybe the functions aren't the same (I had tried to compare them with version control, maybe I pasted the wrong one 🫠 ) |
RHS problem fixed but did the styling of |
Might not have worked ever, or styler changed in the meantime. |
Do you still remember enough about the code to fix {igraph.style} yourself or should I try? |
I don't have the capacity to deal with that at the moment. |
Seems to work now. Next steps:
I can help with the third step. |
For graph literals.
#673 contains the logic that was used in a one-off run. It would be nice to have the code styled on a regular basis, e.g., in a pre-commit hook.
The text was updated successfully, but these errors were encountered: