{"id":21025757,"url":"https://github.com/koderkow/workspace","last_synced_at":"2025-04-28T10:49:18.273Z","repository":{"id":172582514,"uuid":"649470569","full_name":"KoderKow/workspace","owner":"KoderKow","description":"Effortlessly create and restore dev environments","archived":false,"fork":false,"pushed_at":"2025-04-07T17:25:36.000Z","size":86,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T18:35:21.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://koderkow.github.io/workspace/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KoderKow.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-04T23:53:13.000Z","updated_at":"2024-11-01T17:01:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"79a56875-2f95-46a6-804d-3c34a11ce751","html_url":"https://github.com/KoderKow/workspace","commit_stats":null,"previous_names":["koderkow/workspace"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KoderKow%2Fworkspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KoderKow%2Fworkspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KoderKow%2Fworkspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KoderKow%2Fworkspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KoderKow","download_url":"https://codeload.github.com/KoderKow/workspace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251299256,"owners_count":21567182,"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":"2024-11-19T11:36:29.413Z","updated_at":"2025-04-28T10:49:18.238Z","avatar_url":"https://github.com/KoderKow.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# {workspace}\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/KoderKow/workspace/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/KoderKow/workspace/actions/workflows/R-CMD-check.yaml)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/KoderKow/workspace/main.svg)](https://results.pre-commit.ci/latest/github/KoderKow/workspace/main)\n[![Codecov test coverage](https://codecov.io/gh/KoderKow/workspace/branch/main/graph/badge.svg)](https://app.codecov.io/gh/KoderKow/workspace?branch=main)\n[![CRAN status](https://www.r-pkg.org/badges/version/workspace)](https://CRAN.R-project.org/package=workspace)\n\u003c!-- badges: end --\u003e\n\nWelcome to {workspace}, where magic happens! 🎇 This package aims to make your RStudio sessions more exciting and efficient by allowing you to effortlessly create and restore dev environments.\n\n## Installation\n\n``` r\ndevtools::install_github(\"KoderKow/workspace\")\n```\n\n## Example scenario\n\nImagine it's a brand new day, and you're starting a fresh RStudio session! 🌟 \n\nThe workspace is clean and empty:\n\n```r\nls()\n\n#\u003e character(0)\n```\n\n*8 hours later*\n\nWow! It has been a long and challenging day of development\n\nLet's review what you've accomplished:\n\n```r\na \u003c- 1\nb \u003c- 2\n\nls()\n\n#\u003e \"a\" \"b\"\n```\n\nFascinating, isn't it? 🤩\n\nNow, let's save our progress using the {workspace} package! 📦\n\n```r\nworkspace_save()\n\n#\u003e v Created the folder '_workspace' in the current working directory\n#\u003e v '_workspace' added to '.gitignore'\n#\u003e v '_workspace' added to '.Rbuildignore'\n#\u003e v Restore point created: _workspace/ws-2023-06-06-23-34-12_.qs\n```\n\nAssuming this is the first time using {workspace} in this project, let's go over what is happening here 👨‍🏫\n\n1. The function creates a folder named '_workspace' to store restore point files\n1. If your project has a '.gitignore' file, the '_workspace' folder is automatically excluded\n1. Similarly, if your project has a '.Rbuildignore' file, the '_workspace' folder is ignored during builds\n1. The function generates a restore point file, and a message confirms the successful creation\n\nTime to go shutdown RStudio and go home for the day 😴\n\n```r\nrm(list = ls())\n\nls()\n\n#\u003e character(0)\n```\n\n*Morning time* 🌞\n\nIt's a new day, lets bring back the environment we ended yesterday with. Using `workspace_restore()` let's restore from the latest restore point\n\n```r\nworkspace_restore()\n\n#\u003e * Would you like to use the latest or a specific restore point?\n#\u003e \n#\u003e 1: Latest\n#\u003e 2: List out the restore points\n#\u003e \n#\u003e Selection: 1\n#\u003e * WARNING! Restoring will reset your global environment. Continue?\n#\u003e \n#\u003e 1: Yes\n#\u003e 2: No\n#\u003e \n#\u003e Selection: 1\n#\u003e v Restore complete\n```\n\nLet's confirm the variables are back\n\n```r\nls()\n\n#\u003e \"a\" \"b\"\n```\n\nExcellent! Let's pretend the following took use hours to create and we want to save before getting some lunch 🌮\n\n```r\nd \u003c- data.frame(\n  a = a,\n  b = b\n)\n\nworkspace_save(\"data created\")\n\n#\u003e v Restore point created: _workspace/ws-2023-06-06-23-35-33_data created.qs\n```\n\nView of what variables we have\n\n```r\nls()\n\n#\u003e \"a\" \"b\" \"d\"\n```\n\nAlright, were back from lunch and we're ready to ... oh no! RStudio froze! We are about to lose our entire environment\n\n```r\nrm(list = ls())\n\nls()\n\n#\u003e character(0)\n```\n\nGood thing we created a restore point after a breakthrough dev moment! Using `workspace_restore()` let's restore by viewing all restore points in a list\n\n```r\nworkspace_restore()\n\n#\u003e * Would you like to use the latest or a specific restore point?\n#\u003e \n#\u003e 1: Latest\n#\u003e 2: List out the restore points\n#\u003e \n#\u003e Selection: 2\n#\u003e * Enter a number corresponding to the wanted workspace restore point:\n#\u003e \n#\u003e 1: 2023-06-06 23:34:12\n#\u003e 2: 2023-06-06 23:35:33 | data created\n#\u003e \n#\u003e Selection: 2\n#\u003e * WARNlNG! Restoring will reset your global environment. Continue?\n#\u003e \n#\u003e 1: Yes\n#\u003e 2: No\n#\u003e \n#\u003e Selection: 1\n#\u003e v Restore complete\n```\n\nIs it back? 😥\n\n```r\nd\n\n#\u003e   a b\n#\u003e 1 1 2\n```\n\nIt's back! Woo! 💃\n\n## Contributing\n\nContributing is welcome! This package uses the [precommit framework](https://lorenzwalthert.github.io/precommit/index.html) and passing the precommit test for PRs is required.\n\n```r\nremotes::install_github(\"lorenzwalthert/precommit\")\nprecommit::install_precommit()\nprecommit::use_precommit()\n```\n\n## Recognitions\n\n- Thanks to `save.image()` for frustrating me enough to make this package\n- [{qs}](https://github.com/traversc/qs) package for the fast save/read speeds\n- [{qsimage}](https://github.com/sellorm/qsimage) package for the code utilizing {qs} to mimic the actions of `save.image()`\n- Jason Carey ([@jasoncareyco95](https://github.com/jasoncareyco95)) for the inspiration for creating this package\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoderkow%2Fworkspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoderkow%2Fworkspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoderkow%2Fworkspace/lists"}