Anita Woodford

CSE 210 | Programming with Classes

Week 3 : Team Challenge

Overview

Distributed version control is a form of version control in which the complete codebase, including its full history, is mirrored on every developer's computer. This improves the ability to work offline and does not rely on a single location for backups.

The purpose of this assignment is to practice the following:

  1. Collaborate with others, using a branch-based workflow in a distributed version control system.

  2. Write a program that spans multiple files.

Instructions

Complete both parts of this assignment to create a program that is spread across multiple files, authored by multiple collaborators, and stored in version control.

Part I - Version Control

  1. Select one person to act as the team lead or the person in charge of creating remote repositories and responding to pull requests.
    • Team Leader = Michael De Spain
  2. Team Leader: Create a new remote repository called cse210-tc03. Initialize the repository with a README. md file.
  3. All Members: Clone the remote repository on your computer.
    • how to clone - get the repository html link go to link - click code - click https - copy the link address
    • go to visual studios - click view - click command palette - git clone - enter clone for the github - save new workspace to desktop
    • Or we can clone it in git
      navigate to correct directory
      ex from book: cd cse210-projects
      clone clone the repository
      ex from book: git clone https://github.com/byui-burton/my-project
  4. All Members: Create a feature branch called [name]-bio. For example, if your first name was Matt your branch would be called matt-bio.
    • ex in terminal: git branch anita-bio
    • Check to see if it was created :
      git branch
    • Switch to new branch
      git switch anita-bio
    • Switch to new branch in visual studio
      go to source control-- more actions or click ... go to branch--- go to create branch-- type branch name
  5. All Members: Change into the new feature branch you created. Modify the README.md file by adding your name and a short paragraph about yourself. Commit your changes and push them to the remote repository.
    • Switch to new branch
      Terminal: git switch anita-bio
    • edit file-- In visual studio- command s (to save)- source control-- enter message-- click commit, push
    • terminal: after edit
      git switch anita-bio--edit file in visual studio--Terminal: git status--git add .--git commit -m "edit read.md file with bio" git push origin anita-bio-- git switch main
  6. All Members: Open a new pull-request for the changes you made in your feature branch.
    • Terminal: git pull
  7. Team Leader: Resolve each pull-request by merging each team member's feature branch into the main branch. Delete the feature branch when you are done. You may need to meet with your team members to make sure that you merge their feature branches correctly.
    • delete branch Terminal :git branch -d anita-bio
    All Members: Synchronize your local repository with the remote repository to obtain everyone's changes.

Part II - Write a program that spans multiple files

For this part, you will follow the same pattern as before, but this time, you will write a program according to the following specifications:

  1. Within your repository, create a folder that will contain your Python code. Make sure to follow the convention to include a special file to make it a package.

  2. Create a new main file. Make sure to follow the naming conventions for this file, so the package can be run directly.

  3. Have this main file output the text, "Welcome to our collaborative program."

  4. Commit this file and folder to version control and make sure it is merged into the main branch.

  5. Ensure that each person can pull this file to their computers and can run the program.

  6. Have each person on the team create their own separate Python file using their last name as the file name (for example, young.py). In that file, create a function to display a greeting that contains your name, such as "Hello from Brigham Young". Then, modify the main program file to include this function from the other file, and call it.

  7. Work through committing and merging this code into your repository one person at a time, so that the end result is a folder that contains a file from each person, and a main program that includes a function from each file and calls them each in turn.

Submitting

All Members: Return to I-Learn and submit the corresponding assignment. Be sure to add the following information in your text entry when you submit. If you do not include all of the information you will not receive a grade for the assignment.

The grading categories are as follows.