Skip to content

Latest commit

ย 

History

History
131 lines (87 loc) ยท 4.44 KB

File metadata and controls

131 lines (87 loc) ยท 4.44 KB

โ€˜๋ชจ๋‘๊ฐ€ ๋งŒ๋“œ๋Š” ๋ชจ๋‘๋ฅผ ์œ„ํ•œ ๋”ฅ๋Ÿฌ๋‹โ€™ ์ฐธ์—ฌ ๋ฐฉ๋ฒ•!! (Contribution)

Precheck steps : ์‚ฌ์ „ ํ™•์ธ

  • ์ž‘์—…์„ ์‹œ์ž‘ํ•˜๊ธฐ ์ „์— ๋จผ์ € ์ด์Šˆ๋ฅผ ๋‚จ๊ฒจ ๋‘์„ธ์š”. ์™œ๋ƒ๋ฉด
    • ์—ฌ๋Ÿฌ๋ถ„์ด ๋ฌด์—‡์„ ํ•˜๊ณ  ์žˆ๋Š”์ง€ ์‚ฌ๋žŒ๋“ค์—๊ฒŒ ์•Œ๋ฆฌ๋Š” ๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค.
    • ์ œ์•ˆํ•˜๋Š” ๋ฌธ์ œ๊ฐ€ ์ด Repo์™€ ๋ฌด๊ด€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    • ๊ทธ๋Ÿฐ ๋ฐฉ์‹์œผ๋กœ ์ฝ”๋“œ๋ฅผ ์œ ์ง€ํ•˜๋Š” ๊ฒŒ ์šฐ๋ฆฌ์˜ ์˜๋„์ผ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. (KISS)
  • ์—ฌ๋Ÿฌ๋ถ„์€ Git์„ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๋Š”์ง€ ์•Œ์•„์•ผํ•ฉ๋‹ˆ๋‹ค.
    • ๊ทธ๋ ‡์ง€ ์•Š๋‹ค๋ฉด, "Git ์‚ฌ์šฉ ๋ฐฉ๋ฒ•"์„ ๊ฒ€์ƒ‰ํ•œ ํ›„, ๋ฌด์–ธ๊ฐ€๋ฅผ ํ•˜๊ธฐ ์ „์— ๊ทธ๊ฒƒ๋“ค์„ ์ฝ์–ด ๋ณด์„ธ์š”. ๊ฐœ๋ฐœ์ž๋กœ์„œ ์‚ด์•„๋‚จ๊ธฐ ์œ„ํ•ด์„œ๋Š” ํ•„์ˆ˜์ ์ธ ๊ธฐ์ˆ ์ž…๋‹ˆ๋‹ค.
    • Git tutorial์„ ์ฐธ๊ณ ํ•˜์„ธ์š”.

Contribution guidelines

์ด ๋ฌธ์„œ๋Š” Contribution ํ”„๋กœ์„ธ์Šค๋ฅผ ์•ˆ๋‚ดํ•ฉ๋‹ˆ๋‹ค.

Step 1: Fork

Fork ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ GitHub์— ํ”„๋กœ์ ํŠธ๋ฅผ Forkํ•˜์„ธ์š”. ์ด ๋‹จ๊ณ„๋Š” ์ž‘์—…์„ ์‹œ์ž‘ํ•  ์ˆ˜ ์žˆ๊ฒŒ ์—ฌ๋Ÿฌ๋ถ„์˜ ๊ณ„์ •์— ๋ณต์‚ฌํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

Step 2: Local computer์— ๋‹ค์šด๋กœ๋“œํ•˜์„ธ์š”

$ git clone https://github.com/`YOUR_GITHUB_NAME`/PyTorch.git 
$ cd TensorFlow

Step 3: Setup an upstream

๋ณ€๊ฒฝ ์‚ฌํ•ญ์ด ์žˆ์„ ๊ฒฝ์šฐ, ์‰ฝ๊ฒŒ Pullํ•  ์ˆ˜ ์žˆ๋„๋ก ์ด Repo์— ๋Œ€ํ•œ ๋งํฌ๋ฅผ ์„ค์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

$ git remote add upstream https://github.com/deeplearningzerotoall/PyTorch.git

์ €์žฅ์†Œ์— ์—…๋ฐ์ดํŠธ๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ ๋กœ์ปฌ ๋ณต์‚ฌ๋ณธ๊ณผ repository ๋ฅผ ์—…๋ฐ์ดํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

$ git pull upstream master && git push origin master

Step 4: Make a branch

Master branch๋Š” Pull Request๋“ค์„ ๊ณ„์† ๋ณ‘ํ•ฉ๋˜๊ณ  ์ˆ˜์ •๋˜๊ธฐ ๋•Œ๋ฌธ์— Master branch๋ฅผ ์ง์ ‘ ์ˆ˜์ •ํ•˜์ง€๋Š” ์•Š๋Š” ๊ฒŒ ์ข‹์Šต๋‹ˆ๋‹ค.

๊ทธ๋ฆฌ๊ณ  ์˜๋ฏธ ์žˆ๋Š” ์ด๋ฆ„์œผ๋กœ Branch๋ฅผ ๋งŒ๋“œ๋Š” ๊ฑธ ์žŠ์ง€๋งˆ์„ธ์š”!

Example:

$ git checkout -b hotfix/lab10 -t origin/master

์ƒˆ๋กœ์šด Branch๋ฅผ ๋งŒ๋“  ํ›„์— ์ž์œ ๋กญ๊ฒŒ ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜์„ธ์š”!

์ฃผ์˜: ์—ฌ๋Ÿฌ๋ถ„ ์ œ์•ˆํ•œ Issue์™€ ๊ด€๋ จ์ด ์—†๋Š” ๋‹ค๋ฅธ ๊ฒƒ๋“ค์„ ๊ณ ์น˜๊ณ  ๋งˆ์„ธ์š”!

๋งŒ์•ฝ์— ๋‹ค๋ฅธ ๋ฌธ์ œ๊ฐ€ ์žˆ๋‹ค๋ฉด, ๋”ฐ๋กœ ์ด์Šˆ๋ฅผ ์ œ์•ˆํ•˜์‹œ๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค.

Step 5: Commit

์ด๋ฉ”์ผ/์‚ฌ์šฉ์ž ์ด๋ฆ„์„ ์„ค์ •ํ•˜์„ธ์š”.

$ git config --global user.name "Sung Kim"
$ git config --global user.email "sungkim@email.com"

๊ทธ๋ฆฌ๊ณ  ํ•„์š”ํ•œ ํŒŒ์ผ์„ ์ถ”๊ฐ€ ํ›„, Commit ํ•˜์„ธ์š”.

$ git add my/changed/files
$ git commit

Notes

  • ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค๋„ ์•Œ์•„ ๋ณผ ์ˆ˜ ์žˆ๊ฒŒ ๋ช…ํ™•ํ•œ Commit ๋ฉ”์‹œ์ง€๋ฅผ ์“ฐ์„ธ์š”!

  • ์˜ˆ์‹œ:

Short (50 chars or less) summary of changes

More detailed explanatory text, if necessary.  Wrap it to about 72
characters or so.  In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body.  The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.

Further paragraphs come after blank lines.

  - Bullet points are okay, too

  - Typically a hyphen or asterisk is used for the bullet, preceded by a
    single space, with blank lines in between, but conventions vary here

Step 6: (Optional) Rebase your branch

์ˆ˜์ •์ด ํ‰์†Œ๋ณด๋‹ค ๋” ์˜ค๋ž˜ ๊ฑธ๋ ค์„œ, ์—ฌ๋Ÿฌ๋ถ„์˜ ๋ ˆํฌ์ง€ํ† ๋ฆฌ๋Š” ๋’ค์ณ์ง„ ์˜›๋‚  ๋ฒ„์ „์ผ ๊ฐ€๋Šฅ์„ฑ์ด ๋†’์Šต๋‹ˆ๋‹ค. ํ•ญ์ƒ ๋ ˆํฌ์ง€ํ† ๋ฆฌ๋ฅผ ์ตœ์‹  ๋ฒ„์ „์œผ๋กœ ๋™๊ธฐํ™”ํ•˜์„ธ์š”.

$ git fetch upstream
$ git rebase upstream/master

Step 7: Push

์—ฌ๋Ÿฌ๋ถ„์˜ repo๋ฅผ pushํ•˜๊ธฐ์ „์— โ€˜Autopep8โ€™์„ ์‹คํ–‰ํ•ด์ฃผ์„ธ์š”!

E501(์ตœ๋Œ€ ๋ฌธ์ž ์ค„ ์ œํ•œ)์„ ์ œ์™ธํ•œ ๋ชจ๋“  PEP8ํ˜•์‹์„ ๋”ฐ๋ผ์ฃผ์„ธ์š”.

์žŠ์ง€๋งˆ์„ธ์š”, ๊ฐ€๋…์„ฑ์ด ์ตœ์šฐ์„ ์ž…๋‹ˆ๋‹ค!

  • ์˜ˆ์‹œ:
$ autopep8 . -r -i --ignore E501
$ git push -u origin hotfix/lab10

Step 8: Creating the PR

์ด์ œ ์—ฌ๋Ÿฌ๋ถ„์˜ ๋ธŒ๋ผ์šฐ์ €์™€ repo๋ฅผ ์—ด๋ฉด "compare & pull request."๋ผ๋Š” ์ดˆ๋ก์ƒ‰ ๋ฒ„ํŠผ์„ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • ์ข‹์€ ์ œ๋ชฉ์„ ์ž‘์„ฑํ•˜์„ธ์š”.
  • ์—ฌ๋Ÿฌ๋ถ„์ด ์ˆ˜์ •ํ•œ ํŒŒ์ผ ์ด๋ฆ„๋งŒ ์“ฐ์ง€๋งˆ์‹œ๊ณ  ์ž์„ธํ•˜๊ฒŒ ์„ค๋ช…ํ•ด์ฃผ์„ธ์š”.
  • ์—ฌ๋Ÿฌ๋ถ„์ด ํ–ˆ๋˜ ๊ฒƒ๊ณผ ์—ฌ๋Ÿฌ๋ถ„์ด ์™œ ํ–ˆ์—ˆ๋Š”์ง€๋ฅผ ์„ค๋ช…ํ•ด์ฃผ์„ธ์š”.
  • ๊ด€๋ จ๋œ issue๋ฒˆํ˜ธ๋„ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”.

์ถ•ํ•˜ํ•ฉ๋‹ˆ๋‹ค! ์—ฌ๋Ÿฌ๋ถ„์˜ PR์€ Collaborator๋“ค์—๊ฒŒ ๊ฒ€ํ† ๋ฐ›์„๊ฒ๋‹ˆ๋‹ค.
์—ฌ๋Ÿฌ๋ถ„์˜ PR์ด CI Test๋„ ํ†ต๊ณผํ–ˆ๋Š”์ง€ ์ฒดํฌํ•˜์„ธ์š”.