Skip to content

Create end-to-end and quick start guides for new contributors#7568

Merged
cramforce merged 5 commits intoampproject:masterfrom
mrjoro:add-guides
Feb 17, 2017
Merged

Create end-to-end and quick start guides for new contributors#7568
cramforce merged 5 commits intoampproject:masterfrom
mrjoro:add-guides

Conversation

@mrjoro
Copy link
Copy Markdown
Member

@mrjoro mrjoro commented Feb 15, 2017

Create guides to help new contributors who may not be familiar with Git/GitHub, Node, Gulp, etc.

  • the end-to-end guide provides detailed instructions and some background to help familiarize new contributors with the concepts needed to contribute to amphtml
  • the quick start guide is meant as a TL;DR version of the end-to-end guide for people who don't care as much about the concepts involved or to refresh the memories of people who may have had some experience in the past

cc @bpaduch @pbakaus @camelburrito

@mrjoro mrjoro requested a review from cramforce February 15, 2017 06:12
Copy link
Copy Markdown
Member

@cramforce cramforce left a comment

Choose a reason for hiding this comment

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

Nice!

Are you planning to update DEVELOPING.md and CONTRIBUTING.md in a follow up?


* Add this line to your hosts file (`/etc/hosts` on Mac or Linux, `%SystemRoot%\System32\drivers\etc\hosts` on Windows):

```127.0.0.1 ads.localhost iframe.localhost```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Renders fine, but maybe switch to multi line syntax to avoid confusing the highlighter here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

* Change the suffix for the examples from .html to .max.html to use your local JavaScript.

# Test AMP
* Run the tests: `gulp test`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Default to -w or mention it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

When I ran "gulp test --watch" I saw that it reran all tests and wondered why you'd want that. Then I saw the describe.only below and realized it works best when you do that.

Added bullet points for both (and updated the e2e guide).


# Test AMP
* Run the tests: `gulp test`
* Run a single test: `gulp test --files=<filename`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I personally prefer the describe.only method because it allows switching the tested files without restarting gulp test. It is slightly harder to explain, though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I had to look this one up, and now it makes more sense why you'd run "gulp test --watch" since if you use describe.only it would only rerun those tests.

Added this as another bullet point.

# Pull the latest changes

* `git checkout master`
* `git pull --rebase upstream master`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

--rebase is not needed here since there are by definition no changes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@erwinmombay said the same, and then became convinced --rebase was needed after all. Erwin do you remember why?

I suppose since we're saying "never change master" then always at the tip of the history?

* pull the latest changes as described above
* `git checkout <branch name>`
* `git push origin <branch name>`
* go to your fork on `https://github.com/<your username>/amphtml`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I use an easier process:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Made that the default, but mentioned the other way in case the banner doesn't show up. (I'm not sure how long GitHub shows the banner.)

* choose your branch from the "Branch" dropdown and click "New pull request"
* make sure you've signed the CLA (using the same email address as your git config indicates)
* if your reviewer requests changes make them locally and then repeat the steps in this section to push the changes to your branch back up to GitHub again
* once approved your changes are merged into the amphtml repository by a core committer (you don't do this merge)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe add

"If you don't get a new review within 2 business days, always feel free to ping the pull request by adding a comment."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

* if your reviewer requests changes make them locally and then repeat the steps in this section to push the changes to your branch back up to GitHub again
* once approved your changes are merged into the amphtml repository by a core committer (you don't do this merge)

# Delete your branch
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if needed in this guide.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I figured I'd be complete. Made it clear this was optional and that it was for after the changes are merged.

Copy link
Copy Markdown
Member Author

@mrjoro mrjoro left a comment

Choose a reason for hiding this comment

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

I filed Issue #7569 to track updating the other docs to use these.

# Pull the latest changes

* `git checkout master`
* `git pull --rebase upstream master`
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@erwinmombay said the same, and then became convinced --rebase was needed after all. Erwin do you remember why?

I suppose since we're saying "never change master" then always at the tip of the history?

* pull the latest changes as described above
* `git checkout <branch name>`
* `git push origin <branch name>`
* go to your fork on `https://github.com/<your username>/amphtml`
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Made that the default, but mentioned the other way in case the banner doesn't show up. (I'm not sure how long GitHub shows the banner.)

* choose your branch from the "Branch" dropdown and click "New pull request"
* make sure you've signed the CLA (using the same email address as your git config indicates)
* if your reviewer requests changes make them locally and then repeat the steps in this section to push the changes to your branch back up to GitHub again
* once approved your changes are merged into the amphtml repository by a core committer (you don't do this merge)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

* if your reviewer requests changes make them locally and then repeat the steps in this section to push the changes to your branch back up to GitHub again
* once approved your changes are merged into the amphtml repository by a core committer (you don't do this merge)

# Delete your branch
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I figured I'd be complete. Made it clear this was optional and that it was for after the changes are merged.


* Add this line to your hosts file (`/etc/hosts` on Mac or Linux, `%SystemRoot%\System32\drivers\etc\hosts` on Windows):

```127.0.0.1 ads.localhost iframe.localhost```
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

* Change the suffix for the examples from .html to .max.html to use your local JavaScript.

# Test AMP
* Run the tests: `gulp test`
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

When I ran "gulp test --watch" I saw that it reran all tests and wondered why you'd want that. Then I saw the describe.only below and realized it works best when you do that.

Added bullet points for both (and updated the e2e guide).


# Test AMP
* Run the tests: `gulp test`
* Run a single test: `gulp test --files=<filename`
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I had to look this one up, and now it makes more sense why you'd run "gulp test --watch" since if you use describe.only it would only rerun those tests.

Added this as another bullet point.

Copy link
Copy Markdown
Member Author

@mrjoro mrjoro left a comment

Choose a reason for hiding this comment

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

I updated the instructions for yarn after actually running it. :)


* Go to the master branch: `git checkout master`
* Delete your local branch: `git branch -D <branch name>`
* Delete the GitHub fork branch: `git push origin --delete <branch name>`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For follow up: Add information about AMP release cycle for when changes are expected to be available to all AMP pages!

@cramforce cramforce merged commit 17e29ec into ampproject:master Feb 17, 2017
@mrjoro mrjoro deleted the add-guides branch February 18, 2017 03:13
@mrjoro mrjoro mentioned this pull request Feb 20, 2017
mrjoro added a commit to mrjoro/amphtml that referenced this pull request Apr 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants