Today's lab consists of two parts. First, you and your team will resolve a merge conflict. Read the following steps carefully, and follow the steps in order. Part of your grade will be whether you have successfully resolvde the merge conflict. Afterwards, you will complete a lab assignment as usual.
You may have seen this already through the course of your collaboration last week. When two collaborators make changes to a file and push the file to their repository, git merges these two files.
If these two files have conflicting content on the same line, git will produce a merge conflict. Merge conflicts need to be resolved manually, as they require a human intervention:
To resolve the merge conflict, decide if you want to keep only your
text, the text on GitHub, or incorporate changes from both texts. Delete
the conflict markers <<<<<<<,
=======, >>>>>>> and make
the changes you want in the final merge.
Assign numbers 1, 2, 3, and 4 to each of your team members (if only 3 team members, just number 1 through 3). Go through the following steps in detail, which simulate a merge conflict. Completing this exercise will be part of the lab grade.
Step 1: Everyone a repository has been created for you in the course repository. Open the file merge-conflict.qmd. Don’t forget to configure git if you haven’t already done so.
Member 4 should look at the group’s repo on GitHub.com to ensure that the other members’ files are pushed to GitHub after every step.
Step 2: Member 1 Change the team name to your team name. Knit, commit, and push.
Step 3: Member 2 Change the team name to something different (i.e., not your team name). Knit, commit, and push.
You should get an error.
Pull and review the document with the merge conflict. Read the error to your teammates. You can also show them the error by sharing your screen. A merge conflict occurred because you edited the same part of the document as Member 1. Resolve the conflict with whichever name you want to keep, then knit, commit and push again.
Step 4: Member 3 Write some narrative in the space provided. You should get an error.
However, this time no merge conflicts should occur since you edited a different part of the document from Members 1 and 2. Read the error to your teammates. You can also show them the error by sharing your screen.
Click to pull. Then, knit, commit, and push.
We will now use the main lab .qmd file found in your repository.
Hertzsprung–Russell diagrams are visualizations that show the relationship between the brightness of stars and their temperatures. Before continuing the lab, read about H-R diagrams here.
The dataset for this
assignment can be found as a csv file in the data folder of
your repository. This dataset represents data from over six thousand
stars as taken from the General Catalogue of Trigonometric Stellar
Parallaxes. There are only four variables in the provided dataset:
Vmag: Apparently visual band magnitude, a measure of
brightness. Don’t worry about the units for the purposes of this
lab.Bvcol: The color of the star, which usually corresponds
to the temperature of the star (generally, negative values correspond to
hot blueish stars; values around 0.5 are white, and values above 1 or so
are cooler orange to red stars). Don’t worry about the units for the
purposes of this lab.parallax: parallax in arcseconds, a measure of the
distance of the star from Earthclass: the color index of the star, another measure of the
temperature of a star. The stars contained in today's dataset are of the following classes, arranged in order of decreasing temperature (i.e., B class are the hottest in the dataset): B, A, F, G, K, M. (even hotter O class stars exist, but we don't have any today!)#ffc66d for the largest B-V value and
#9bb0ff for the smallest B-V value. Again, please provide strong axis labels, but no need to title your plot. Don't forget to cite any sources
you use in the preparation of this plot!There should only be one submission per team on Gradescope.