AguaClara / Textbook

The AguaClara textbook.
6 stars 6 forks source link

Define development process #14

Closed eak24 closed 6 years ago

eak24 commented 6 years ago

The master branch was left broken today, which luckily didn't break the website (because the gh-pages branch is pushed to exclusively by travis) however, we shouldn't ever let the master branch not pass Travis. Never ever. Master branches should always pass the tests to ensure that whoever attempts to work on the text next can pick up from where the last left off. Therefore I propose the ONLY way we update the branch is through pull requests. Basically, just work on your own branch, and once you're done (or even before! - it'll update as you keep changing code!), just start a pull request here to master, from your branch. Just click on "new pull request" in the upper right. Once your request is placed, Travis will check to see that your pull request can get merged in successfully. If it can, Travis will give you a green check. Finally, you can also request reviewers to review your proposed changes.

I don't know how we should define this process... perhaps in the Readme for the textbook? Thoughts?

juanchon998 commented 6 years ago

That'd my bad, I think I left it broken last night with my final commit and merge. I like the idea of using pull requests to prevent this. I will think about where this should go and write it in today.

juanchon998 commented 6 years ago

This has been implemented

eak24 commented 6 years ago

Hi @AguaClara/textbook

I've been solidifying the deploy process as of late and I think I have finally developed a process that will work well. Here is the documentation.

In summary, in order to get code onto the official site, it needs to pass the Travis checks (doctests, html generation without errors, and link and image validity) as well as get reviewed by one other person. Once all that is done, you can merge the branch into master. After that, you have to tag the master branch to actually release a new version of the textbook. Only then will the official site (hosted on gh-pages branch) be pushed.

I just added a "test" branch that attempts to hold the latest code built. So no matter which branch you are working on, if you are the latest one to push a commit, the test branch will house the output. You can view it using rawgit here. So, if you want to share what your latest branch developments look like without having whoever is viewing it actually have to build it, you can push a commit, and find the rawgit URL to link with this site. Furthermore, if you want to point to the commit so that even if someone else pushes, the URL will still point to the code you intend it to, make sure to include the commit SHA within the rawgit URL like so: https://rawgit.com/AguaClara/Textbook/e5693e0485702b95e11d4d6bdf76d07c42fdbf99/html/index.html. That link will never change where it is pointing.

My hope is that this process will ensure that we always publish a functioning, high-quality textbook, while still allowing us to easily share output from what we're working on and test proposed changes. Please let me know any suggestions/complaints/etc here!

juanchon998 commented 6 years ago

I am a little confused by this. I recently worked on, commited, and pushed changes to the convention_setup branch. And yet the remote test branch does not show my commits. Am I misunderstanding the function of the branch? rawgit is super cool!

eak24 commented 6 years ago

@juanchon998 I just looked into this. What I implemented isn't available until the code I wrote yesterday (and that has an outstanding PR) is incorporated into the master branch. Once that is incorporated, and your up to date with master AND your convention_setup branch is passing (right now it is failing because of 9 broken external links 9 of them) then it'll push to the test branch. It won't push to test unless the build is successful and you have the new "add_push_to_test" code from the PR. Does that clear it up?

eak24 commented 6 years ago

I'm gonna close this. @juanchon998 let me know if this answer didn't clear things up

juanchon998 commented 6 years ago

Yes, everything is cleared up!