Skip to content

Conversation

@nealrichardson
Copy link
Member

@nealrichardson nealrichardson commented Feb 12, 2020

I'm tired of forgetting to update the rendered docs (in r/man/), so this workflow does it for us. It's designed to run only on your fork, not on apache/arrow. It can't just work on pull requests, IIUC, because the GITHUB_TOKEN only had read permissions on a PR.

This PR includes a change to the doclets in the .R source that triggers a rendering of the .Rd man pages. https://github.com/nealrichardson/arrow/runs/442280907?check_suite_focus=true is the workflow run that updated and pushed the changes. The subsequent push doesn't trigger the job to run again because of the path filtering.

In a different PR, I've removed README.Rmd, so updating that is no longer an issue. For linting, that should be handled in the main lint job. I'll look to do it there and if that's too much trouble, I'll probably add a workflow to lint.sh --fix the r/src.

@github-actions
Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on JIRA?
https://issues.apache.org/jira/browse/ARROW

Then could you also rename pull request title in the following format?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

See also:

@nealrichardson nealrichardson changed the title Test autogeneration of R documentation on GHA ARROW-7801: [R][CI] Add lint and doc GitHub Action workflows Feb 12, 2020
@nealrichardson nealrichardson marked this pull request as ready for review February 12, 2020 22:29
@github-actions
Copy link

@nealrichardson nealrichardson requested a review from kou February 12, 2020 22:33
@pitrou
Copy link
Member

pitrou commented Feb 13, 2020

Does this mean it's going to push to my fork behind my back? If so, then -1 from me. I'd rather see a CI entry that fails if the man pages weren't updated.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

I'd rather see a CI entry that fails if the man pages weren't updated.

I think that we need it too.

@nealrichardson Could you also add it too?

Anyway, this will be useful to generate consistent man pages. (I'm not sure that generated man pages may depend on environment.)

@nealrichardson
Copy link
Member Author

I'd rather see a CI entry that fails if the man pages weren't updated.

I think that we need it too.

@nealrichardson Could you also add it too?

The CI jobs we already have will fail if the man pages don't match the code.

Anyway, this will be useful to generate consistent man pages. (I'm not sure that generated man pages may depend on environment.)

They shouldn't.

Since there seems to be some difference of opinion as to whether this is a good idea, I'll open a thread on the mailing list before proceeding.

@nealrichardson
Copy link
Member Author

Closing since the discussion on the mailing list showed opposition to auto-fixing things.

nealrichardson added a commit that referenced this pull request Apr 16, 2020
…codegen

#6411 tried to do this work automatically, but some were uncomfortable with that; this version instead is triggered by PR comment.

Currently implemented:

* R documentation (`roxygen2`, updating `r/man/*.Rd` based on docstrings in `r/R/*.R`)
* clang-format on changes to `cpp/src` or `r/src`
* cmake_format is currently disabled because I didn't feel like fighting further with python versions and environments; in https://github.com/nealrichardson/arrow/runs/590355718?check_suite_focus=true#step:5:34 you can see that it pip installs cmake_format but then in the next line can't find cmake_format 🤷

To trigger the build, add a comment with the message "autotune" (seemed appropriate since this is using computers to make sure our code stays in harmony). By default it will check for which files changed and only run the relevant tasks, but if you comment "autotune everything" it will run everything.

Since `issue_comment` workflows are only run off the master branch, I tested this by merging these commits to master on my fork and triggering it on a PR there. See e.g. nealrichardson#2 (comment)

Closes #6932 from nealrichardson/autotune2

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
kszucs pushed a commit that referenced this pull request Apr 20, 2020
…codegen

#6411 tried to do this work automatically, but some were uncomfortable with that; this version instead is triggered by PR comment.

Currently implemented:

* R documentation (`roxygen2`, updating `r/man/*.Rd` based on docstrings in `r/R/*.R`)
* clang-format on changes to `cpp/src` or `r/src`
* cmake_format is currently disabled because I didn't feel like fighting further with python versions and environments; in https://github.com/nealrichardson/arrow/runs/590355718?check_suite_focus=true#step:5:34 you can see that it pip installs cmake_format but then in the next line can't find cmake_format 🤷

To trigger the build, add a comment with the message "autotune" (seemed appropriate since this is using computers to make sure our code stays in harmony). By default it will check for which files changed and only run the relevant tasks, but if you comment "autotune everything" it will run everything.

Since `issue_comment` workflows are only run off the master branch, I tested this by merging these commits to master on my fork and triggering it on a PR there. See e.g. nealrichardson#2 (comment)

Closes #6932 from nealrichardson/autotune2

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
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.

3 participants