This is the repo for the CourseMatch term project of our course.
- implement a
Studentstruct to carry all relevant information - implement
student's demand function: given prices, preferences and constraints, which is the optimal choice of courses - test demand function
- translate pseudo code of main price search algo from paper (algo 1)
- test pseudo code translation
- implement algo 2: refinement of price vector
- implement neighboring price vector function
- test neighboring price vector function
- Please never push anything onto the
masterbranch. - Please always submit a pull request instead.
So:
- step one should be for everyone to fork this repo to your github account. This will create a new repo on your account at
https://github.com/YOUR_GITHUB_USER/CourseMatch.jl.git. Notice that you have to replaceYOUR_GITHUB_USERwith your github username - step two should be for everyone to get the code from their fork into their computer to start developing it. type
]to activate your package manager. then:This will clone this repository to your computer at location# you typed ] dev https://github.com/YOUR_GITHUB_USER/CourseMatch.jl.git
~/.julia/dev/CourseMatch. Remember that your~/.juliacan be seen by typingDEPOT_PATH[1]into your REPL. - You can now use the code in the package. In particular your should do in your REPL
] # turn on Pkg mode activate CourseMatch # activate pkg manager for this project instantiate # download all required packages precompile # precompile all test # run the test suite of CourseMatch activate # go back to main env (notice no arg given!)
- If that works, exit pkg mode by hitting
Ctrl-c. Let's see if the package also works in the main environment now. - Type
using CourseMatchin the julia REPL (no longer in Pkg mode!) - Type
CourseMatch.VERSION. you should see the current version.
- Change the code on your computer in
~/.julia/dev/CourseMatchin your text editor / juno. - Notice that if you set up
Revise.jlin yourstartup.jlfile as demonstrated, you can change the code in your editor, and your REPL will immediately reflect those changes (no manual reloading of the module needed!) - Once you are happy with your work, create a new git branch in the
~/.julia/dev/CourseMatchfolder. This is a live git repo. - For example
# you have made changes to the code in your text editor. cd ~/.julia/dev/CourseMatch git branch my_new_feature # create a new branch git checkout my_new_feature # checkout this branch git add . # this would add everything in current dir to your commit. alternatively give file names/paths git commit -m 'I added a new feature' # commit to your branch git push origin my_new_feature # push your work to your fork on github
- Finally, go to your fork at
https://github.com/YOUR_GITHUB_USER/CourseMatch.jland click on "new pull request" to create a new pull request (PR) on the origin repo. This PR will contain the changes from your branchmy_new_feature
- You should make your contributions always on top of the most recent master branch.
- You want to syncronize your fork with what is going on upstream, i.e. the original master branch.
- Here is how to set this up.
- You will place your new stuff on top of the most recent
masterbranch version on a repo we'll call upstream:- add the
upstreamrepo as a remote:git remote add upstream [email protected]:ScPo-CompEcon/CourseMatch.jl.git - Use the
rebasecommand
git checkout master # make sure you are on your fork's master branch git fetch upstream # get stuff from `upstream` git rebase upstream/master # merge upstream master and put your local commits on top of it- Then continue as above in point 4. i.e. make your changes, create a new branch, and push that to your fork.
- add the
- Indent by 4 whitespaces
- DOCUMENT EACH FUNCTION like here: https://docs.julialang.org/en/v1/manual/documentation/