Skip to content

Instantly share code, notes, and snippets.

@heronshoes
Last active January 11, 2023 14:35
Show Gist options
  • Save heronshoes/3333b4946a62d0662ee6632135e12135 to your computer and use it in GitHub Desktop.
Save heronshoes/3333b4946a62d0662ee6632135e12135 to your computer and use it in GitHub Desktop.
GitHub onlyのRed Arrowへのコントリビュート手順(仮)

これは、JIRAを使わないGitHubオンリーのRed Arrowへのパッチを送る手順をまとめたものです。 (公式のマニュアルが未だなので、変更があるかもしれません。お気づきの点がございましたら、ご指摘願います。)

1. Issueの種類の選択

https://github.com/apache/arrow/issues に新規のIssueを立てる。 New Issueをクリックすると、

  • Bug Report : File a bug report
  • Enhancement Request : Request an enhancement to the project
  • Usage Question : Ask a question
  • Report a security vulnerability : Please review our security policy for more details.

の選択肢があるので、適切なものを選ぶ。ここでは、Enhancement requestで説明する。

2. Issue: Enhancement Request の詳細を記入

TitleとDescribe the enhancement requestedを記入し、Component(s)を選ぶ。

タイトルは、

[Ruby] Add a method to return column names in Arrow::Table

のように頭に[component]を付ける。

本文はDescribe the enhancement requestedと、Component(s)そのものがレベル3のタイトルとして挿入されるので、 タイトルを使うときはレベル4で書き始めるとよい。 書き方はわかりやすければ何でもいいと思うが、私は下記のように箇条書きで書けるテンプレートを決めていたら書きやすかった。

作成されたIssue本文:

### Describe the enhancement requested

#### Target method(対象となるメソッド)

Arrow::Table#column_name (new, tentative)

#### Proposed feature(提案する機能)

Return an Array `columns(&name)` in short.

#### Impact of this request(このリクエストの影響または効果)

It will be useful in coming enhancements of #join .

#### Reference of this request(参考情報)

I am testing this feature in RedAmber by refinements.

https://github.com/heronshoes/red_amber/blob/main/lib/red_amber/refinements.rb#L144-L146

### Component(s)

Ruby

生成されたIssue番号をプルリクエストで使うので覚えておく。

3. プルリクエストの作成

PR templateが導入されたので下記の情報は古い(GH-15249: [Documentation] Add PR template (#15250))。

普通にフォークしたリポジトリのパッチブランチからプルリクエストを作成する。タイトルは、

GH-15085: [Ruby] Add Table#column_names

のように、GH-に続けてIssue番号: [コンポーネント名1][コンポーネント名2] タイトル のように書く。

本文は、たぶんわかりやすければ何でもいいと思うが、私は下記のように箇条書きで書けるようなテンプレートを決めて書いたら書きやすかった。

### What I did (このプルリクでやっていること)

* Add `Table#column_names`.
  * Returns `columns.map(&:name)`.
* Add tests for the tables that have unique keys and same keys.
* Add document.

### What I didn't(このプルリクでやっていないこと)

* Check whole code to be replaced for it.

### What I checked(チェックしたこと)

* It works as a method Table#keys in RedAmber using refinements.

### Notes for reviewers(レビュアーへのコメント)

* I will search the code which should be replaced if reviewer requested me.

### Related Issue(関連するIssue)

* Closes: #15085

最後の、* Closes ~ の1行は、自分で書かなくてもタイトルからbotがつけてくれて、PRがクローズしたときにIssueもクローズしてくれる。

あとは普通のプルリクエストと同じ流れ。

@kou
Copy link

kou commented Dec 27, 2022

What I did'nt

didn't のtypoだと思います!

@heronshoes
Copy link
Author

ありがとうございます!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment