Dummy homework for explanation and showing the workflow
- Original repository with homework: MI-AFP/hw00
Your task is just to try the workflow of doing homeworks:
- Create new personal private repository (with some good name like
MI-AFP_hwNN
) for the homework, do not createREADME
,.gitignore
, norLICENSE
yet. You need Student Developer Pack (free private repositories and Travis-CI.com for private repositories), optionally you can use other services after consulation with teacher(s). - Turn on Travis CI for your repository. (It will check the solution for you and makes teacher's life easier! The
.travis.yml
file is prepared for you as well as tests.) - Add teacher(s) as collaborators to the repository - they will inform you about their usernames.
- Clone the repository or use
git init
and add remote as described in showed instructions at GitHub. - In the repository, add the upstream (name it for example
assignment
, see code block below). - Get the assignment and push it to your repository (
pull
&push
). - Try the
stack build
and/orstack test
. It should not end with build error and all tests should be "red". - Now switch to new branch, where you will do the solution (let's say
solution
). - After changes, do commit & push normally to this branch. Good practice is to make atomic commits. Complete the task - use
stack
(esp.stack test
, but alsostack ghci
can be useful), visittest/
to see the expected behavior of your implementation insrc/
. - After finishing all create Pull Request and request a review from teacher(s) which is/are added to collaborators.
- Wait for the review... ☕
~/MI-AFP $ git clone git@github.com:MyUsername/MI-AFP_hw00.git # clone your repo
~/MI-AFP $ cd MI-AFP_hw00
~/MI-AFP/MI-AFP_hw00 (master)$ git remote add assignment git@github.com:MI-AFP/hw00.git # repository with hw
~/MI-AFP/MI-AFP_hw00 (master)$ git pull assignment master # get assignment
~/MI-AFP/MI-AFP_hw00 (master)$ git push origin master # push to your repo
~/MI-AFP/MI-AFP_hw00 (master)$ stack build
~/MI-AFP/MI-AFP_hw00 (master)$ stack test # all "red"
~/MI-AFP/MI-AFP_hw00 (master)$ git checkout -b solution # let's solve it
~/MI-AFP/MI-AFP_hw00 (solution)$ ... # work on hw
~/MI-AFP/MI-AFP_hw00 (solution)$ stack test
~/MI-AFP/MI-AFP_hw00 (solution)$ git add ...
~/MI-AFP/MI-AFP_hw00 (solution)$ git commit ...
~/MI-AFP/MI-AFP_hw00 (solution)$ git push origin
- This homework is optional but highly recommended.
- If you encounter some trouble, create an issue in your repository.
- In case you find a bug or have an idea how to improve the assignment project, create an issue or PR in this repository.
This project is licensed under the MIT License - see the LICENSE file for more details.