{"id":26937419,"url":"https://github.com/predictiveecology/spades.project","last_synced_at":"2026-03-15T06:22:19.706Z","repository":{"id":42684952,"uuid":"302519758","full_name":"PredictiveEcology/SpaDES.project","owner":"PredictiveEcology","description":"Project Templates Using 'SpaDES'","archived":false,"fork":false,"pushed_at":"2023-09-22T04:49:01.000Z","size":5625,"stargazers_count":3,"open_issues_count":10,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-09-22T05:45:54.286Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://spades-project.predictiveecology.org","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PredictiveEcology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-10-09T03:11:07.000Z","updated_at":"2023-09-26T01:59:09.481Z","dependencies_parsed_at":"2023-09-22T03:48:01.848Z","dependency_job_id":"38860a8b-0a79-4602-8393-ad027270ec83","html_url":"https://github.com/PredictiveEcology/SpaDES.project","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PredictiveEcology%2FSpaDES.project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PredictiveEcology%2FSpaDES.project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PredictiveEcology%2FSpaDES.project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PredictiveEcology%2FSpaDES.project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PredictiveEcology","download_url":"https://codeload.github.com/PredictiveEcology/SpaDES.project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246819771,"owners_count":20839095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-02T13:15:12.813Z","updated_at":"2026-03-15T06:22:14.651Z","avatar_url":"https://github.com/PredictiveEcology.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- badges: start --\u003e\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/SpaDES.project)](https://cran.r-project.org/package=SpaDES.project)\n[![Downloads](https://cranlogs.r-pkg.org/badges/grand-total/SpaDES.project)](https://cran.r-project.org/package=SpaDES.project)\n[![R build status](https://github.com/PredictiveEcology/SpaDES.project/workflows/R-CMD-check/badge.svg)](https://github.com/PredictiveEcology/SpaDES.project/actions)\n\u003c!-- badges: end --\u003e\n\n\u003cimg align=\"right\" width=\"80\" pad=\"20\" src=\"https://github.com/PredictiveEcology/SpaDES/raw/master/man/figures/SpaDES.png\"\u003e\n\n# SpaDES.project\n\nQuickly setup 'SpaDES' project directories, get modules, and deal with a number of issues related to reproducibility and reusabililty. This package was designed with a PERFICT approach in mind (See [McIntire et al. 2022](https://onlinelibrary.wiley.com/doi/full/10.1111/ele.13994)).\n\n# Why Choose This Package\n\nAchieving **PERFICT** in your projects can be challenging, but it becomes more accessible with the use of `SpaDES`. The `SpaDES.project` tool is designed to streamline the setup of `SpaDES` projects. Complementing the `R` scripting language, there are three valuable tools at your disposal: \n\n1. **Integrated Development Environment (IDE)**: This IDE encourages the organization of your work into projects, enhancing your workflow efficiency. \n2. **Modular Coding Approach**: Embrace a modular approach to coding, allowing for easier maintenance and collaboration. \n3. **Version Control (Optional)**: For those interested in code development, `SpaDES` supports version control through platforms like [GitHub](https://github.com), giving you control over project history and collaboration.\n\n## Our Recommended Tools\n\nOur preferred toolset includes [Posit](https://posit.co) (specifically, `RStudio`), [`SpaDES`](https://spades.predictiveecology.org), and [GitHub](https://github.com). While these are our recommendations, there are alternative options available. We acknowledge that not all users are familiar with Git, and that's perfectly acceptable. `SpaDES.project` has been designed to cater to all users, whether they choose to use a Git-controlled project or not.\n\n## Project Challenges\n\nBeyond these tools, our extensive experience in managing projects with diverse developers, operating systems, users, data sources, and packages has revealed various challenges. These challenges arise due to the nature of open, modular, and interoperable projects. As project complexity increases, typical reproducible workflows may falter. Issues include:\n\n- Variations in `.Rprofile` files.\n- Non-transferable file paths.\n- Incompatibilities between packages on different operating systems.\n- Conflicts between package versions.\n- Problems with the order of package loading and installation (e.g., inability to install a different version of a package while it's already loaded).\n- Spaghetti code, where objects are defined in one file and used in another.\n- Differences in users' familiarity with GitHub.\n- The presence of cryptic code and objects (\"just run that line, don't worry about what it does\").\n- Objects defined by a user lingering in the `.GlobalEnv`, leading to undetected issues.\n- Varying competencies among different users.  \n\nGiven these complexities, it's not enough to create a \"reproducible\" script; it must be a \"reusable\" script that functions flawlessly on any machine, operating system, and for any user.   \n\nUsers can certainly attempt to address these issues individually, but we've developed `SpaDES.project` as a solution. It's derived from our most intricate projects to date, yet it's designed with beginners in mind. We've anticipated these challenges so that users won't encounter them unexpectedly during their project journeys.  \n\n# Getting Started\n\nSee [this package readme](https://htmlpreview.github.io/?https://raw.githubusercontent.com/PredictiveEcology/SpaDES.project/transition/docs/index.html) and vignettes to get started.\n\n1. [Getting started vignette](articles/i-getting-started.html)\n2. [Using `git` and GitHub](articles/iii-using-git-github.html)\n3. [Installing R](articles/iv-Installing-R.html)\n4. [Finding other SpaDES modules](articles/v-finding-other-modules.html)\n\n**Website:** [https://SpaDES.PredictiveEcology.org](https://SpaDES.PredictiveEcology.org)\n\n**Wiki:** [https://github.com/PredictiveEcology/SpaDES/wiki](https://github.com/PredictiveEcology/SpaDES/wiki)\n\n## Installation\n\n### Current stable release\n\n[![R build status](https://github.com/PredictiveEcology/SpaDES.project/workflows/R-CMD-check/badge.svg?branch=main)](https://github.com/PredictiveEcology/SpaDES.project/actions)\n[![Codecov test coverage](https://codecov.io/gh/PredictiveEcology/SpaDES.project/branch/main/graph/badge.svg)](https://app.codecov.io/gh/PredictiveEcology/SpaDES.project?branch=main)\n\n**Install from CRAN:**\n\n```r\n# Not yet on CRAN\n# install.packages(\"SpaDES.project\")\n```\n\n### Development version (unstable)\n\n[![R build status](https://github.com/PredictiveEcology/SpaDES.project/workflows/R-CMD-check/badge.svg?branch=development)](https://github.com/PredictiveEcology/SpaDES.project/actions)\n[![Codecov test coverage](https://codecov.io/gh/PredictiveEcology/SpaDES.project/branch/development/graph/badge.svg)](https://app.codecov.io/gh/PredictiveEcology/SpaDES.project?branch=development)\n\n```r\ninstall.packages(\"SpaDES.project\", repos = c(\"predictiveecology.r-universe.dev\", getOption(\"repos\")))\n```\n\n### Get modules in a new project \n\n\n```r\nsetupProject(paths = list(projectPath = tempdir()),\n             modules = c(\"PredictiveEcology/Biomass_borealDataPrep@development\",\n                         \"PredictiveEcology/Biomass_core@development\"))\n```\n\n### More examples\n\nThe following example provides all that is necessary to run all modules, in a very short set of commands, from (almost) any starting condition. We tend to use this approach is many of our projects.\n\nKey features:\n\n1. The project is fully self contained in a folder, with packages being installed to a unique library based on the `projectPath`.\n1. No use of `install.packages` without an `if`\n2. No `library` or `require` calls before any package installations.\n2. All functions are \"rerun-capable\", meaning they do not \"redo\" the action when rerun if the action is not necessary. e.g., `remotes::install_github` does not reinstall the package if the SHA has not changed.\n3. No assigning of objects into the `.GlobalEnv`. If projects are small/simple, using the `.GlobalEnv` is OK. As a project gets larger, unexpected behaviours arise because objects can be erroneaously found in the `.GlobalEnv` if they have a common name, like `out`, when functions should instead fail.\n4. Minimum packages installed prior to `setupProject`. After `SpaDES.project` and `Require` updates are on CRAN, this will be further simplified.\n5. Minimal use of `setwd`, to allow user's to easily change it (including comment it out) with simple search image.\n\nIt is fully contained as a separate project, separate libraries, which means it doesn't do what it did for me at the start... package collisions.\nI used a setwd(\"~\"), which is the bare minimum ... you can tell a user to change that to a place where this project will live.\n\n\n```\ngetOrUpdatePkg \u003c- function(p, minVer = \"0\") {\n  if (!isFALSE(try(packageVersion(p) \u003c minVer, silent = TRUE) )) {\n    repo \u003c- c(\"predictiveecology.r-universe.dev\", getOption(\"repos\"))\n    install.packages(p, repos = repo)\n  }\n}\n\ngetOrUpdatePkg(\"remotes\")\nremotes::install_github(\"PredictiveEcology/Require\", ref = \"bda9fa50003981880c06287fea1db9272b62912c\", upgrade = FALSE)# getOrUpdatePkg(\"reproducible\", \"2.0.9\")\ngetOrUpdatePkg(\"SpaDES.project\", \"0.0.8.9040\")\n\nsetwd(\"~\")\nout \u003c- SpaDES.project::setupProject(\n  runName = \"Example\",\n  paths = list(projectPath = \"integratingSpaDESmodules\",\n               modulePath = \"SpaDES_Modules\",\n               outputPath = file.path(\"outputs\", runName)),\n  modules = c(\"tati-micheletti/speciesAbundance@main\",\n              \"tati-micheletti/temperature@main\",\n              \"tati-micheletti/speciesAbundTempLM@main\"),\n  times = list(start = 2013,\n               end = 2032),\n  updateRprofile = TRUE,\n  Restart = TRUE\n)\n\nsnippsim \u003c- do.call(SpaDES.core::simInitAndSpades, out)\n\n```\nSee [Getting Started Vignette](articles/i-getting-started.html)\n\n## Contributions\n\nPlease see [CONTRIBUTING.md](CONTRIBUTING.md) for information on how to contribute to this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpredictiveecology%2Fspades.project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpredictiveecology%2Fspades.project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpredictiveecology%2Fspades.project/lists"}