uwhpsc-2016 / syllabus

Spring 2016 Course Syllabus and Information
15 stars 20 forks source link

Files in SMC #22

Open anders34 opened 8 years ago

anders34 commented 8 years ago

For HW #1 when I go into SMC to clone the private repo I just made, am I supposed to be working in the AMATH 483 project that was set up for us, or am I supposed to make a new project?

cswiercz commented 8 years ago

For HW #1 when I go into SMC to clone the private repo I just made, am I supposed to be working in the AMATH 483 project that was set up for us, or am I supposed to make a new project?

Use the repo that was set up for you. (homework1-anders34) Push all changes to there.

anders34 commented 8 years ago

But isn't that repo in GitHub? And aren't we supposed to clone it in to SMC?

cswiercz commented 8 years ago

I think I understand the confusion now.

Remember that the only way to interact with the GitHub repo is to have a local clone of that repo on your computer. In this class, "your computer" = "SMC". You make changes to the local repo and push those changes (commits) to the public-facing clone on GitHub.

anders34 commented 8 years ago

Okay, that makes sense. But then in SMC, we have that project that was automatically put there with the name " - AMath 483/583 -High Performance Scientific Computing." Are we supposed to create a file in that project to complete this assisgnment, or does it not matter which project we do it in?

cswiercz commented 8 years ago

You should think of the SMC project titled “AMath 483/583 - …” as your “computer”. The $9 you paid to SMC made only this project a members-only project which grants you better performance, etc., and the ability to perform git pull / git push.

To lay out the steps:

  1. Click the link I sent to the class to create your private copy of the uwhpsc-2016/homework1 repo. (In your case, it's uwhpsc-2016/homework1-anders34.
  2. Log into SMC and open your "AMath 483/583 - HPSC" project.
  3. Enter

    $ git clone https://github.com/uwhpsc-2016/homework1-anders34.git

    in a terminal instance to create a local clone of your GitHub repo. This is where you write your code.

  4. Solve the problems given and write your function definitions in the homework1 Python module located at homework1-anders34/homework1. (e.g. supply the definition of collatz in homework1.exercise1.collatz1)
  5. To test your code write some test functions in the supplied test suite. This is merely the preferred way for you to determine if your code works. Some students are just using a Jupyter notebook to test things you.
  6. Commit working parts of your code to your local repo.
  7. Push these commits to your GitHub repo. (uwhpsc-2016/homework1-anders34) *This is very important since the TAs and I only have access to your GitHub remote, not anything on SMC. Think of the SMC clone as your "private copy" and the GitHub clone as the "public / submitted copy".
  8. Repeat Steps 4-7 until the homework is complete.

Hopefully the homework process is a bit more clear. I've written it this way in part so that you get a feel as to how the git workflow is done. I'll do a live demonstration (and even give a partial answer to collatz_step!) on Tuesday.

anders34 commented 8 years ago

Awesome! Thanks so much for the explanation.

anders34 commented 8 years ago

Okay, so now why can't I edit the python file once I open it?

mvelegar commented 8 years ago

@anders34 which editor are you using to edit the Python file?

anders34 commented 8 years ago

emacs

mvelegar commented 8 years ago

You need to tell us more. Are you seeing an error message?

anders34 commented 8 years ago

When I open up the exercise1.py and arrow down to where I want to type, I can't type anything. And also, in messing around with it, I've somehow now created another file in homework1 with the name "#exercise1.py#" and I don't know what these # symbols are supposed to mean.

cswiercz commented 8 years ago

If you're having trouble using emacs (not required in this course) you can always switch for now to the SMC built-in text editor. You can edit a text file by clicking on it in the file browser.

As for the # files, those are temporary files created by emacs for backup purposes.

Concerning the particular emacs issue, it might be that you entered a partial emacs command and it's waiting for the rest. For example M-x (the escape key + x) only starts a command. Focus is placed on the command entry buffer at the bottom of the screen until you finish the command. (e.g. M-x comment-region)