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

Add ellipsis #1045

Open
krlmlr opened this issue Dec 29, 2023 · 11 comments
Open

Add ellipsis #1045

krlmlr opened this issue Dec 29, 2023 · 11 comments
Labels
Milestone

Comments

@krlmlr
Copy link
Contributor

krlmlr commented Dec 29, 2023

#1028 (comment)

@krlmlr krlmlr added this to the autogen milestone Dec 29, 2023
@krlmlr
Copy link
Contributor Author

krlmlr commented Dec 29, 2023

@ntamas: Works like a charm, idempotent, fd74ecf is an example of an added * . We'll wait for those to be available in the C core.

What does it take to add a check_dots_empty() call when a * is present in PARAMS?

@ntamas
Copy link
Member

ntamas commented Dec 30, 2023

check_dots_empty() added in Stimulus 0.21.1.

@krlmlr
Copy link
Contributor Author

krlmlr commented Dec 30, 2023

Works as expected, in 8940156.

@szhorvat
Copy link
Member

check_dots_empty()

Is this function waiting to be implemented? Let me know when that's done and I'll continue with #1028 afterwards.

@szhorvat
Copy link
Member

Ah, so this is an rlang thing. Should it be called as rlang::check_dots_empty()? Or what is the solution to the following?

> k_shortest_paths(make_ring(5),1,2)
Error in check_dots_empty() : could not find function "check_dots_empty"

@szhorvat
Copy link
Member

I guess I need to add #' @importFrom rlang check_dots_empty?

@krlmlr
Copy link
Contributor Author

krlmlr commented Dec 30, 2023

Thanks, missed that. Waiting for * to be configured in the core, eager to roll out here and run revdepchecks.

@krlmlr
Copy link
Contributor Author

krlmlr commented Dec 30, 2023

One more thing: in my book, the weights argument should always come after the ellipsis (if it exists, which I assume it will for most functions). This is contrary to https://github.com/igraph/igraph/wiki/Guidelines-for-function-argument-ordering .

#1028 (comment)

@ntamas
Copy link
Member

ntamas commented Dec 30, 2023

The guidelines you cited above are for the C core. High-level interfaces are free to come up with their own guidelines in order to make the generated functions fit better with the conventions of the high-level language.

@krlmlr
Copy link
Contributor Author

krlmlr commented Dec 30, 2023

Could Stimulus take care of that for the autogenerated code? Do we agree it's a good idea?

@ntamas
Copy link
Member

ntamas commented Jan 2, 2024

It could, but I'm not sure whether it's in the scope of the project.

I'd say that in the long term Stimulus should probably be refactored such that the repo contains the core only and the individual language-specific generators are in the repositories of the higher-level interfaces (with some kind of a plug-in system using Python's standard entry points from importlib). If that happens, you could do whatever you want with the R code generator as it would be entirely within your domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants