Web-based integrated development environment (IDE) can let us manage code and develop model every time and in everywhere. Version control has become the essential tool to track our projects and collaborate with other people as well. They allow us edit and backup our scripts and easy collaboration on complex projects. In this section, we use GNU MCSim in the Cloud9 online code editor and combine with GitHub version control system to improve the efficiency in model development.
1. Get the account in GitHub and Cloud9
2. Create the repository
- Name the repository and check Create repository
- Copy the site of repository
3. Create the new workspace in Cloud9
- Name the repository
- Paste the URL of repository from GitHub
- Choose a template (we use blank in this case, which has already includes the basic Ubuntu installation)
4. Install MCSim in the Cloud9 IDE
Now, we are in the Cloud 9 IDE interface. We’ll use terminal to do the following work:
- Download the latest version of MCSim in our workspace from the main GNU server
- Extract the file
tar -xzvf mcsim-5.6.6.tar.gz
- Use pwd to check our working directory. In this case, we want to install MCSim in the /home/ubuntu
- Since we don’t have the access rights in Cloud9, we need to use ./configure –prefix=/home/ubuntu to install MCSim
- Compile the package
- Run self-tests
5. Test MCSim
- Make sure we have installed the MCSim, successfully. Check the directory, and we’ll find the bin, include, lib, and share folders have been added.
- To test run the MCsim we need to compile the model file first. We also need to use command makemcsims to create the standalone model.
- Use the compiled program to run the input file. We can get the output file in the current directory.
6. Apply git version control
- Check the current status and untracked files
- Track the new files and revised files
git add .
- Enter our commit message to help us remember what we were done in this period
git commit -m “Install MCSim”
- Push our commit to GitHub
- Check GitHub repository. We’ll see our latest commit
7. By Using this method, we can…
- Edit and develop our MCSim’s model in the Cloud9 IDE,
- Check output result,
- Furthermore, we can track our code and model history in our GitHub repository!