Week 1: git… y u do dis

So I’m new to github. And not gonna lie, I feel a little ashamed about it. To me it’s always been one of those things that only the super impressive graduate students know how to use and navigate, but it just never stuck for me. Hence my embarrassingly grey contribution array.

Screen Shot 2019-05-21 at 2.51.12 PM

giphy-1

Fetching, pushing, pulling, it’s all been a little difficult to keep track of. I suspect it’ll get easier as I keep using it, but for now I should probably write down some instructions for myself to reference back to. Like how to properly update my pull requests!

So here’s how it went: I submitted a PR, later saw a change I needed to make, made a new commit, got some comments on things I should/needed to change, made some more commits, and suddenly I had a whole list of small-change commits that I needed to squash. By the way, I love that it’s called squashing. Really captures what’s going on.

Ideally you would just fetch, edit, add, commit, squash, and push right? Well git does not care about your happiness. It will help you collaborate and ease version control with reluctance.

giphy-2
This is how I anthropomorphize git, laughing at me as I try to make it do what I want.

Specifically, I had some struggles rebasing. I kept getting super long lists of commits I didn’t make, commits I did make but weren’t showing up, merge conflicts, all that fun stuff. So I took the tried-and-true IT approach: “Did you try turning it on and off again?”. Otherwise known as “Forget this branch, I’m starting over!”.

Future-self, here’s how to edit PRs in a way that works for you:

>>> git fetch astropy
>>> git fetch tcjansen
>>> git checkout --track tcjansen/<branch>

Make whatever changes to <file>

>>> git add <file>
>>> git commit -m "useful message here"

At this point if you don’t make any more changes you don’t have to rebase. But if you do make changes, do the following:

>>> git rebase -i astropy/master

In the editor window that pops up, “pick” a commit, and “squash” the remaining commits by replacing the “pick” command with “squash”. Once you save the document, a new editor window will come up, in which you want to just delete the commit messages of the ones you squashed. You can also edit the first commit message if you want. Then push it back to your remote repo:

>>> git push -f tcjansen  # use the force young padawan

Now I’m going to be the super impressive graduate student gosh dang it!

Week 0: Hello, World!

Ah, “Hello World,” the classic opening. Today my mentors and I held Meeting 0, where we introduced ourselves and began sketching our way forward with the development of telescopy.

Mainly we brainstormed what to do during the GSoC “Community Bonding Period” and came up with a nice to-do list for me to check off:

      • Make a blog post
      • Create synphot example documentation – this will help me become more familiar with the synphot package and will aid future users by fleshing out the current documentation
        • Compute count rates: Tutorials can be found here!
          • Using the 3.5 m Telescope (at Apache Point Observatory), observe HAT-P-11, a star with T_eff = 4780 K at a distance of 123 light years in a 10 second exposure.
          • Using the 3.5 m Telescope (at Apache Point Observatory), observe TRAPPIST-1, a star with T_eff = 2500 K at a distance of 40 light years in a 1 min exposure
      • Add a quick edit to the astropy.constants/units documentation to help clear up my own misunderstanding of the usage of these packages while also becoming more familiar with contributing to astropy
      • Check out existing astropy issues I can address.
        • Add an example of using dimensionless units (scaled and unscaled) in the “Getting Started” section of the astropy.units documentation.
          Pull request submitted merged!

giphy