{"id":26937285,"url":"https://github.com/predictiveecology/libcbmr","last_synced_at":"2025-04-02T13:15:05.831Z","repository":{"id":71544161,"uuid":"569425115","full_name":"PredictiveEcology/libcbmr","owner":"PredictiveEcology","description":"R interface to the carbon budget model library based on CBM-CFS3","archived":false,"fork":false,"pushed_at":"2024-11-16T00:54:48.000Z","size":4532,"stargazers_count":3,"open_issues_count":6,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-16T01:28:00.542Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PredictiveEcology.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2022-11-22T19:52:58.000Z","updated_at":"2024-11-16T00:54:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"42a24771-06c5-4bb5-880c-94e451319db7","html_url":"https://github.com/PredictiveEcology/libcbmr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PredictiveEcology%2Flibcbmr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PredictiveEcology%2Flibcbmr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PredictiveEcology%2Flibcbmr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PredictiveEcology%2Flibcbmr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PredictiveEcology","download_url":"https://codeload.github.com/PredictiveEcology/libcbmr/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:04.830Z","updated_at":"2025-04-02T13:15:05.760Z","avatar_url":"https://github.com/PredictiveEcology.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libcbmr\n\nR interface to the carbon budget model library based on CBM-CFS3 (\u003chttps://github.com/cat-cfs/libcbm_py/tree/cbm_exn\u003e).\n\n## R package installation\n\n### local installation\n\n```r\n# install.packages(\"devtools\")\n# devtools::install_dev_deps()\ndevtools::install(\"~/GitHub/libcbmr\") ## source package directory\n```\n\n### from GitHub\n\n```r\n# install.packages(\"remotes\")\nremotes::install_github(\"PredictiveEcology/libcbmr\")\n```\n\n## Prerequisites for users on NRCAN machines\n\nUsers on NRCAN machines may need to configure the use of the NRCAN root certificate in order to resolve SSL issues accessing HTTPS sites from R and python.\n\n### Download NRCAN root certificate\n\n1. Open Firefox and go to any website with https, for example \u003chttps://www.anaconda.com/\u003e.\n2. Click on the lock icon in the address bar to view the website's security certificate.\n3. In the \"Connection Secure\" window, click on \"More Information\" to open the \"Page Info\" window.\n4. In the \"Page Info\" window, click on the \"Security\" tab.\n5. Click on \"View Certificate\" to open the \"Certificate Viewer\" tab.\n6. Click on the \"NRCAN-RootCA\" tab.\n7. Scroll down to the \"Miscellaneous\" section and select download pem (cert).\n8. Save this file to a convenient location (make note of the full file path you use).\n\n### Set the `REQUESTS_CA_BUNDLE` environment variable\n\nUse either of the approaches below (not both) to set the variable for all R sessions or system-wide.\n\n#### Setting for your R sessions\n\nUse `usethis::edit_r_environ(\"user\")` to edit your user's `.Renviron` file.\n\nAdd the following (using the actual path to the certificate file):\n\n```\nREQUESTS_CA_BUNDLE='/path/to/NRCAN-RootCA'\n```\n\n#### Setting system-wide\n\nSetting this system-wide will affect all programs, not just R.\n\n1. Press the Windows key and type \"env\" to search for the \"Environment Variables\" settings.\n2. Create a new environment variable for your user named `REQUESTS_CA_BUNDLE` and set its value to the full file path of the certificate you downloaded.\n3. Click Apply and OK to apply the changes.\n\n## Python and `libcbmr` installation and configuration\n\nUse **one** of the installation methods below.\n\n1. Install using conda:\n\n**NOTE:** the full installation path cannot contain spaces, e.g. in your Windows user name.\n\n```r\n## install python\nlibrary(reticulate)\n\ncondaVersion \u003c- tryCatch(conda_version(conda = \"auto\"),\n                         error = function(e) NA_character_)\nif (is.na(condaVersion)) {\n  reticulate::install_miniconda() ## full path cannot contain spaces!\n  conda_create(\"r-reticulate\")\n}\n\n## install libcbm (python package)\nlibrary(libcbmr)\nenvname \u003c- \"r-reticulate\" ## default used by reticulate\ninstall_libcbm(method = \"conda\", envname = envname)\n```\n\n2. Install using pyenv/pyenv-win:\n\n```r\n## install python\nlibrary(reticulate)\n\n# pypath \u003c- install_python(version = \"3.11:latest\")\n\n## instead of using reticulate to install python,\n## install manually from https://www.python.org/downloads/\n## make note of the install location\npypath \u003c- Sys.which(\"python\")\n\nenvname \u003c- \"r-reticulate\" ## default used by reticulate\nenvpath \u003c- reticulate:::virtualenv_path(envname)\nif (!dir.exists(envpath)) {\n  dir.create(envpath, recursive = TRUE)\n}\nvirtualenv_create(envname, pypath)\n\nlibrary(libcbmr)\ninstall_libcbm(method = \"virtualenv\", envname = envname)\n```\n\n## Using `libcbmr`\n\n```r\nlibrary(reticulate)\nlibrary(libcbmr)\n\npy_use_env(envname)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpredictiveecology%2Flibcbmr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpredictiveecology%2Flibcbmr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpredictiveecology%2Flibcbmr/lists"}