Before writing your first line of code in VOCAL, give the user and developer documentation a read through!
Make sure your python skills are up to date. Check out the Code Academy website for an interactive python tutorial. Refer to the python 2.7 documentation for help with specific commands. VOCAL is based heavily on Tk/Tkinter. Documetaion and examples can be found on a multitude of sites, but Effbot has some good examples and explanations. Finally, check out the GitHub to see VOCAL’s repository. Try looking through the code to get a feeling for the flow and organization of the program before you start making additions.
Many DEVELOPers have put their hands on VOCAL’s code and can provide you with some great insight into how the program is structured and what challenges they faced. Join the Slack or just send an email to one of the previous project leads.
Before you start making changes, learn how to use Git for version control. GitHub provides an interactive tutorial on using Git, but there a resources all over the web. For VOCAL, we stick to several best practices in order to streamline development. If you plan on developing VOCAL, you must use Git.
The IDE, Debugger, or text editor you use are all up to you , as long as you use Git. Pycharm is a great IDE with debugging, syntax highlighting, formatting suggestions, and Git capabilities. You can grab the free community version from their website here. If you prefer a more basic environment, you can always use your favorite text editor (Sublime Text is a great option) along with Gitbash to interact with the GitHub repository.
If you plan on using an IDE or debugging software, then simply follow the directions provided by their documentation to clone from GitHub. Make sure you select the Anaconda python 2.7 version as your compiler.
Otherwise, you can use Git Bash to clone the repository.
cd
to reach the folder where you would like to develop VOCALgit clone https://github.com/NASA-DEVELOP/VOCAL.git
git fetch
to make sure the branches are up to datepython VOCAL/calipso/Calipso.py
To begin developing, you will need a new branch.
Warning
never update the master branch directly unless you are making small changes or it is absolutly necessary.
git checkout -b newbranch
to create a branch called newbranchgit add newfile
to add the file newfile. Similarly, use
git rm oldfile
to remove a file called oldfilegit commit -m "Your commit message here"
to commit changes to your
branch with a short messagegit push origin newbranch
(replace newbranch with the name of your branch)After you work on your branch for a while and find that your changes have not cause any further errors, you can merge it back into the master
After you have made updates or fixed bugs on your own branch, you can merge it back into the master. make sure your files are saved and you latest commit is up to date.
VOCAL’s master branch is now up to date with yours. Once some more people have tested the new master branch, go ahead and delete the newbranch that you created earlier. All of the changes you made are on the master branch now, so you won’t need it anymore
At the end of your session, you should do a few things to make development easier for the next team.
If you believe that the changes you have made to VOCAL constitute a new version, it should be named 1.YY.MM where YY is the year of the release and MM is the month. VOCAL 2 will be deployed as a web app.