WorldClimExtractR — Development Document
Thank you for your interest in improving WorldClimExtractR! To maintain software quality and scientific reproducibility, please follow these guidelines.
- Create a branch: Do not work directly on the
mainbranch. Create a descriptive branch for your changes:git checkout -b feature/new-improvement # or: git checkout -b bugfix/fix-error - Make clear commits: Write concise and clear commit messages in English or Spanish:
git commit -m "Add support for BIO20 extraction" - Local testing: Before opening a Pull Request (PR), run the template or example study case (
templateorexample) to verify that the code does not contain syntax errors and runs successfully:Rscript scripts/main.r --case "example" --historical TRUE --future FALSE - Open a Pull Request: Push your branch to your fork/repository and request a merge with the
mainbranch, detailing what problem it fixes or what feature it adds. All proposed changes will be carefully reviewed before integration.
- Readability: Use self-descriptive, lowercase variable names separated by underscores (snake_case).
- Modularity: Encapsulate logic within functions inside
scripts/functions.rand keep thescripts/main.rscript clean of complex declarations. - Memory management: Free large raster objects (
raster::removeTmpFiles()) to avoid running out of disk space or memory, especially when iterating over many plots. - Dependency control: If you add a new library, make sure to add it to the automatic installation section at the beginning of
scripts/main.r.
⚠️ DO NOT upload theclimate_data/folder to GitHub. It is already excluded in the.gitignore.- 💡 Issues: If you have proposals for new features, questions about usage, or detect any bugs in the script, feel free to open an Issue on the repository to suggest improvements or report errors.