This document describes how to set up a local CUDEM development environment, connect a GitHub fork, keep your code in sync with the main project, and submit pull requests (PRs) to the CUDEM repository.
It is intended for developers working on CUDEM modules (e.g., blend.py) or contributing new tools, enhancements, or documentation.
Set your Git identity so commits appear correctly on GitHub:
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"Use the same email associated with your GitHub account.
- Visit the official CUDEM repository:
https://github.com/ciresdem/cudem - Ensure you are signed into GitHub.
- Click Fork (top-right).
Your fork will be created at:
https://github.com/<your-username>/cudem
git clone https://github.com/<your-username>/cudem.git
cd cudemThis creates a local working copy linked to your fork.
To receive updates from the main CUDEM project, add an upstream remote:
git remote add upstream https://github.com/ciresdem/cudem.gitVerify setup:
git remote -vExpected:
origin https://github.com/<your-username>/cudem.git
upstream https://github.com/ciresdem/cudem.git
- origin → your fork
- upstream → official CUDEM repo
CUDEM development occurs in the dev branch.
Switch to it:
git checkout devAlways sync before making changes:
git fetch upstream
git merge upstream/devOptional but recommended:
git push origin devThis keeps your fork’s dev branch updated.
Overwrite an existing file:
cp /path/to/your/blend.py cudem/grits/blend.pyCheck what changed:
git statusStage the modified file:
git add cudem/grits/blend.pyCommit with a clear message:
git commit -m "Improve blend.py with slope-gated blending and parameter updates"Push to your fork:
git push origin devIn your browser:
- Go to your fork:
https://github.com//cudem - GitHub will suggest:
"Compare & pull request"
Set PR parameters:
| Setting | Value |
|---|---|
| Base repository | ciresdem/cudem |
| Base branch | dev |
| Head repository | <your-username>/cudem |
| Head branch | dev |
Write a brief description of the changes and click Create Pull Request.
To update your fork with changes from the main repository:
git checkout dev
git fetch upstream
git merge upstream/dev
git push origin devThis prevents merge conflicts and ensures your development environment matches current CUDEM code.
To run CUDEM directly from your local source tree:
pip install -e .This installs console entry points (e.g., grits) and ensures that edits in the source directory are immediately reflected in your environment.
- Fork → Clone → Add upstream
- Switch to
dev - Sync with upstream
- Make code changes
- Commit and push to your fork
- Open PR against
ciresdem/cudem:dev
This standard open-source workflow ensures clean version control and smooth collaboration across contributors.
Contributors are encouraged to enhance this document with:
- Environment setup instructions (conda or virtualenv)
- Testing workflows
- Style guidelines
- Example CI-relevant commands
- Module-specific development notes
Additional PRs improving documentation are welcome.