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 function to create extendr package infrastructure #53

Merged
merged 5 commits into from
Mar 5, 2021

Conversation

clauswilke
Copy link
Member

I have added a function use_extendr() to add an extendr scaffolding to an R package. There is currently no unit testing for this, it's a bit difficult to set up.

@Ilia-Kosenkov Could you try this on Windows?

Copy link
Contributor

@yutannihilation yutannihilation left a comment

Choose a reason for hiding this comment

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

Do we add src/.gitignore?

*.o
*.so
*.dll
target
Cargo.lock

https://github.com/extendr/helloextendr/blob/main/src/.gitignore

R/use_extendr.R Outdated Show resolved Hide resolved
R/use_extendr.R Show resolved Hide resolved
@clauswilke
Copy link
Member Author

I can add src/.gitignore. There's some discussion on whether Cargo.lock should or should not get version tracked, (don't track for Rust library crates, track for enduser applications) so maybe leave out of default .gitignore?

@yutannihilation
Copy link
Contributor

Ah, I agree we should leave Cargo.lock, but I think taget should be ignored in any case.

@yutannihilation
Copy link
Contributor

Also, these are not included in .gitignore if I create a package on RStudio. What do you mean by "default .gitignore"?

*.o
*.so
*.dll

@clauswilke
Copy link
Member Author

What do you mean by "default .gitignore"?

I was looking here, since I'm copying helloextendr basically:
https://github.com/extendr/helloextendr/blob/main/src/.gitignore

@clauswilke
Copy link
Member Author

.gitignore added.

@yutannihilation
Copy link
Contributor

Thanks, looks good now. Let me try creating a package using this before approving.

@Ilia-Kosenkov
Copy link
Member

@clauswilke,
If it is OK, please delay merging a little bit - I'd like to test a few things.

@andy-thomason
Copy link

Very nice. I fully intend to use this to generate some example packages
as soon as I am able.

@clauswilke
Copy link
Member Author

@Ilia-Kosenkov Sure, no problem.

Copy link
Member

@Ilia-Kosenkov Ilia-Kosenkov left a comment

Choose a reason for hiding this comment

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

@clauswilke,
It works fine under Windows.
However, I suggest using to_toml to generate the skeleton Cargo.toml (see comments).

R/use_extendr.R Show resolved Hide resolved
R/use_extendr.R Show resolved Hide resolved
@Ilia-Kosenkov
Copy link
Member

@clauswilke,
I was thinking about adding a test CI step that generates a dummy package, uses use_extendr() and then runs rcmdcheck on a simple test that calls hello_world(). If everything works as expected, the R CMD check will be successful.
Would you consider adding it here or should we discuss it in a separate issue/pr?

@clauswilke
Copy link
Member Author

@Ilia-Kosenkov I think it's easier if I merge this and then you make a separate PR for the test.

Copy link
Member

@Ilia-Kosenkov Ilia-Kosenkov left a comment

Choose a reason for hiding this comment

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

Sure, go ahead.

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.

4 participants