-
Notifications
You must be signed in to change notification settings - Fork 37
Contributing Code to iDynomics
This page details how the scientific community can contribute to the future development of iDynomics. This concerns both:
- Code Improvements
- Correcting Code Errors
To do this, you will need:
- A github account
- An understanding of how to use git on your local machine
- Git installed on your local machine
A - Contributing Code to iDynomics
(i) In a web browser, navigate to the github website and log in to your git hub account. Then, search for the iDynomics repository (https://github.com/kreft/iDynoMiCS).
(ii) The first thing to do is to get a copy of the latest release of the iDynomics code. From the iDynomics github repository, press the "Fork" button on the top right of the screen.
(iii) Navigate to your own github account. You will see that you now have an "iDynomics" repository of your own, which you can make the required changes to. You will now want to clone that repository to one on your local machine. The use of git on your local machine is not really within the scope of this wiki, but if you were using a linux/mac machine, you would do this by:
- opening a terminal
- navigating to the folder where you wish to place the iDynomics code
- typing 'git clone [the address of YOUR iDynomics repository]' at the prompt. You can get the address of your iDynomics repository by opening the repository in github and copying the URL at the top of the screen.
(iv) When you have your own local version, you will want to start a development 'branch'. This is required as github only allows you to submit one code change request a time per branch. Again you will need to refer to a tutorial on git for your local system, but in linux/mac you would do this by:
- opening a terminal window and navigating to your local repository
- typing 'git branch [new branch name]'
- changing into that branch by typing 'git checkout [new branch name]'
(v) Make the changes you wish to make to the codebase.
(vi) You are now in the position to submit the code changes for review by those leading the development of iDynomics. To do this, you will need to commit the changes you have made to your iDynomics repository on git hub. If you were using linux/mac, you would do this by:
- opening a terminal and navigating to your local repository
- staging your changes by typing 'git add .' (see a git tutorial for more on 'staging')
- committing your changes by typing 'git commit -m "[a description of the change you have made]"'
- uploading the committed changes to your github repository by typing 'git push origin [new branch name]'
(vii) Your changes will now be within your github repository. You can examine the relevant files on the website if you wish to check. Now you are in the position to ask the iDynomics developers to examine your change and accept this into the codebase. To do this:
- From within your iDynomics repository on Github, press the 'Pull Request' button
- On the right hand side, select the branch that you have uploaded (called [new branch name]). Then, complete the form, telling the iDynomics code developers what you have done. Then submit the request.
(viii) Once submitted, an 'Issue' is opened, and those leading the development of iDynomics will be able to view your changes. If these are accepted, the lead developers will be able to merge your changes into the codebase, and the 'Issue' will then be closed.