Skip to content

Update assignment_2.ipynb#3

Open
peeu32 wants to merge 21 commits intomainfrom
assignment-2
Open

Update assignment_2.ipynb#3
peeu32 wants to merge 21 commits intomainfrom
assignment-2

Conversation

@peeu32
Copy link
Copy Markdown
Owner

@peeu32 peeu32 commented Dec 9, 2024

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

Creating a program to display data from a csv file, computing statistics from the data, detecting errors by checking the irregularities in patient data.

What did you learn from the changes you have made?

How to do the above.

Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

I did, then I researched why certain functions cannot be done as I was planning because of numpy foundations.

Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

I did have faced challenges on github because of the file error.

How were these changes tested?

A reference to a related issue in your repository (if applicable)

Checklist

  • I can confirm that my changes are working as intended

@anjali-deshpande-hub
Copy link
Copy Markdown

  1. Please add comments to Pull request.
  2. The notebook file is invalid. See https://github.com/peeu32/python/blob/assignment-2/02_activities/assignments/assignment_2.ipynb
    image

Copy link
Copy Markdown

@anjali-deshpande-hub anjali-deshpande-hub left a comment

Choose a reason for hiding this comment

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

Please make corrections and re-submit.

@peeu32
Copy link
Copy Markdown
Owner Author

peeu32 commented Dec 10, 2024

Thank you for the notes, Anjali!
I have merged and pushed the file again to Git. However, similar to last time, the Jupyter file is not opening, so I couldn't check if the file got updated. Please let me know if it's still the same.

Copy link
Copy Markdown

@anjali-deshpande-hub anjali-deshpande-hub left a comment

Choose a reason for hiding this comment

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

I can see a valid notebook file (https://github.com/peeu32/python/blob/66d34b6c14d8486cf1091fde077d13f9894206c9/02_activities/assignments/assignment_2.ipynb). Looks good!

One last change. You have changes to assignment_1.ipynb in this branch and PR. It should only have assignment_2.ipynb changes. To fix this go over https://uoft-dsi-certificates.slack.com/archives/C080M1JFJ8G/p1733888574840979

@peeu32
Copy link
Copy Markdown
Owner Author

peeu32 commented Dec 11, 2024

Thanks, Anjali, for providing the commands.
I've made the changes, please let me know if anything else needs to be changed.

I have a few questions that I'd like to ask once you confirm there are no further changes, to avoid any confusion.

Copy link
Copy Markdown

@anjali-deshpande-hub anjali-deshpande-hub left a comment

Choose a reason for hiding this comment

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

Well done!

@peeu32
Copy link
Copy Markdown
Owner Author

peeu32 commented Dec 12, 2024

Your command:
git checkout assignment-2
git checkout main -- assignment_1.ipynb
git add assignment_1.ipynb
git commit -m "Revert assignment_1.ipynb to main branch"
git push origin assignment-2

  1. I was under the impression that a file gets pushed to Git after the 'git push' command. However, with git push origin assignment-2, it didn't push the assignment-2 file to the assignment-2 branch.
  2. With git commit -m "Revert assignment_1.ipynb to main branch", did it push the file? Because I see that the file got updated now. So, does the 'commit' command also serve the function of the 'push' command?

@anjali-deshpande-hub
Copy link
Copy Markdown

  1. git push origin assignment-2: This command pushes your local assignment-2 branch to the remote repository (GitHub in your case). It doesn't push any individual files directly. It pushes the entire branch with all changes (committed files) to GitHub.

2.git commit -m "Revert assignment_1.ipynb to main branch": This command only commits changes to your local repository. It does not send anything to GitHub. The commit operation records changes to the file (assignment_1.ipynb in this case) in your local branch (assignment-2), but it stays on your local machine until you push it to GitHub.

git push origin assignment-2: This pushes your local branch (assignment-2) to the remote repository (GitHub). This command uploads the committed changes (like the updated assignment_1.ipynb file) to GitHub, making them available on the remote repository.

The command git checkout main -- assignment_1.ipynb checks out the file assignment_1.ipynb from the main branch and places it in your current working directory on your assignment-2 branch. This is why you see the file updated locally.
After that, you run git add assignment_1.ipynb to stage the file (marking it for commit), and git commit actually records that change in the local branch.

I hope I have answered your question

@peeu32
Copy link
Copy Markdown
Owner Author

peeu32 commented Dec 13, 2024

Thanks a ton Anjali :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants