-
Notifications
You must be signed in to change notification settings - Fork 4
ergm development workflow
The procedure for ergm will be slightly different than for EpiModel. This page will be updated accordingly: If you're reading these words, come back in two hours.
Establish a (Local) Clone of the EpiModel Github Repository
-
Open Github Desktop
-
Click 'File' -> 'Clone Respository...'
-
Under the URL tab, enter "https://github.com/statnet/EpiModel.git" into the 'URL or username/repository'. Make note of the default local path, or choose one of your own.
Create a New Project in RStudio
-
Open R and start a New Session (Session -> New Session)
-
Start a New Project (File -> New Project)
-
When the 'New Project' window appears, select 'Existing Directory'
-
Browse for the location of your local EpiModel repository
-
Click 'Create Project'
Create a New Branch
Create a new branch based off of the EpiModel "master" branch for each new issue/feature/enhancement
-
In Github Desktop, click the 'Current Branch' drop-down tab.
-
Click 'New Branch'
-
Name your new branch
-
Click 'Create Branch'
Develop and Test in R
Make updates to files according to the root cause of the issue or the requirements of the enhancement being addressed
- Install the following packages:
- EpiModel - ex. install.packages("EpiModel")
- Devtools
- Testthat
-
Code!
-
Determine system test cases and test developed code against those cases
a. Use the 'devtools' package functions 'build()' followed by 'install()' to build and install EpiModel using the updates made to the files in your local EpiModel repository
b. Run the system test scripts and check if desired/expected result is achieved
-
Add unit tests to the 'EpiModel' -> 'tests' -> 'testthat' folder, if applicable
-Note: Please check if a test already exists for the modified function (ex. test-netdx.R)
Pull origin, Commit, Push, Pull Request, Merge
1. Pull Origin
Updates may have been made to other files in the remote master repository (on GitHub.com) between the time that the local repository was created and the time that you push your changes.
Pull origin allows any changes to the remote master repository to be applied to your local repository.
The pull/fetch origin tab can be found next to the 'Current Branch' tab at the top of the screen of Github Desktop
2. Commit
Capture the changes you have made to files in your local repository by using 'Commit to (branch name)'.
Be sure to include a summary and description for your commit.
3. Push
Once changes have been committed, the 'Pull/Fetch Origin' tab next to the 'Current Branch' tab will read something like 'Push' commits. This will send your committed changes to the corresponding branch on the remote repository.
4. Pull Request
Create a pull request in GitHub by navigating to https://github.com/statnet/EpiModel
Click the 'Branches' tab.
Find your branch and click 'New pull request'.
TravisCI will conduct unit and integration tests and Sam will be notified that your commits are ready for peer review.
NOTE: Once a pull request is open, pull requests are not required for subsequent commits to the branch until the pull request is closed.
5. Merge
After testing and peer review complete without issue, the updates may be merged into the EpiModel master branch. Sam or another power user with merge privileges will handle this.