This is the repository for the first exercise of 120.050 Introduction to Python programming for geoscience. This exercise will be handed in via Github. The process of doing this can be daunting for a first time user so we will try to provide detailed instructions below and we will also show it during the exercise handout.
All of the functions you will write during this exercise have a test associated
with it which can be found in the tests
folder. If an explanation of what a
function should do is not completely clear then look at the test function for an
example of the expected output.
You can find numerous tutorials about the Git basics on the web. A first start can be
To complete the exercise follow these steps:
- Create an account on github
- Login
- Setup Git
- Fork this repository to your account. What does this mean?
- Clone this repository to your development machine. This is also step 2 in the forking tutorial
- You should now have folder on your Computer that contains the files listed above.
- Try switching to the directory where you have the code in the console and
run
python setup.py test
. This should run all the tests in thetests
folder. One test will pass while all the others will fail. - Look into the
.py
files in theex1
folder. In there you will find instructions about the things you have to program to make all the tests pass. - Write code and commit your changes to git.
- Push your commits to Github
- Repeat 8. to 10. as often as necessary.
When you want to hand in the exercise
create a Pull Request (PR)
against the TUW-GEO-python-intro/ex1
repository. You should not have to change
any settings in the Pull Request dialog to do that.
Opening a PR will automatically run the test scripts so that we can both see if the tests pass, or why they fail. The PR also allows us to review your code and give comments on the implementation.
Please open a Pull Request by the 30th of November.
The grade for this exercise will be 80 % based on the percentage of passed tests and 20 % on the implementation style/documentation of your code.
- Comment your code to explain why it works. How it works should be obvious from the source code. We do not need line by line subtitles for the code.
- Document the functions you write.
- Good commit messages see this article
The recieved percentage score translates to grades in the following way:
- 91-100
- 81-90
- 66-80
- 51-65
- < 51