diff --git a/.github/workflows/validate_jsons.yaml b/.github/workflows/validate_jsons.yaml index a4d8614..22d9ad8 100644 --- a/.github/workflows/validate_jsons.yaml +++ b/.github/workflows/validate_jsons.yaml @@ -1,5 +1,8 @@ on: + workflow_dispatch: pull_request: + branches: + - main paths: - 'blogs/**' @@ -7,15 +10,11 @@ name: Validate and clean jsons jobs: validate: - runs-on: macOS-latest + runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 - with: - fetch-depth: 5 - - uses: r-lib/actions/setup-r@v2 - - uses: r-lib/actions/setup-renv@v2 - + uses: actions/checkout@v4 + - name: Get changed files id: changed-files uses: tj-actions/changed-files@v12 @@ -23,13 +22,26 @@ jobs: files: blogs/ - name: Cleanup json template comments + if: ${{ steps.changed-files.outputs.any_changed }} run: | for f in ${{ steps.changed-files.outputs.all_changed_files }}; do echo Cleaning $f - sed -i .bk 's.//required..g' $f - rm ${f}.bk + sed -i 's.//required..g' $f done - + + - name: Install cURL Headers + run: | + sudo apt-get update + sudo apt-get install libcurl4-openssl-dev + + - name: Setup R + uses: r-lib/actions/setup-r@v2 + with: + version: 'renv' + + - name: Setup renv + uses: r-lib/actions/setup-renv@v2 + - name: Validate jsons run: Rscript 'scripts/validate_jsons.R' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 46661b4..d76eda3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ Now we will focus on adding new entries directly through GitHub, but you could a ## Create a new file -Create a new file in the [blogs/](blogs/) folder by [using this link](https://github.com/rladies/awesome-rladies-blogs/new/main/?filename=blogs/your-blog-url.com.json&value=%7B%0A%20%20%22title%22%3A%20%22Your%20title%22%2C%20%2F%2Frequired%0A%20%20%22subtitle%22%3A%20%22subtitle%20or%20tagline%22%2C%20%2F%2Foptional%0A%20%20%22type%22%3A%20%22blog%22%2C%20%2F%2Frequired%0A%20%20%22url%22%3A%20%22https%3A%2F%2Fyour_blog.com%22%2C%20%2F%2Frequired%0A%20%20%22photo_url%22%3A%20%22https%3A%2F%2Fyour_blog.com%2Fyour_photo.png%22%2C%20%2F%2Frequired%0A%20%20%22description%22%3A%20%22Short%20description%20of%20what%20you%20blog%20about%22%2C%0A%20%20%22language%22%3A%20%22en%22%2C%20%2F%2Frequired%0A%20%20%22rss_feed%22%3A%20%22%5Burl%5D%2Ffile.xml%22%2C%20%2F%2Frequired%0A%20%20%22authors%22%3A%20%5B%20%2F%2Frequired%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22name%22%3A%20%22Your%20Name%22%2C%20%2F%2Frequired%0A%20%20%20%20%20%20%22social_media%22%3A%20%5B%7B%0A%20%20%20%20%20%20%20%20%20%22twitter%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22mastodon%22%3A%20%22%40username%40server.org%22%2C%0A%20%20%20%20%20%20%20%20%20%22github%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22instagram%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22youtube%22%3A%20%22username%2Fend-url%22%2C%0A%20%20%20%20%20%20%20%20%20%22tiktok%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22periscope%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22researchgate%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22website%22%3A%20%22url%22%2C%0A%20%20%20%20%20%20%20%20%20%22linkedin%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22facebook%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22orcid%22%3A%20%22member%20number%22%2C%0A%20%20%20%20%20%20%20%20%20%22meetup%22%3A%20%22end-url%22%0A%20%20%20%20%20%20%7D%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D). +Create a new file in the [blogs/](blogs/) folder by [using this link](https://github.com/rladies/awesome-rladies-blogs/new/main/?filename=blogs/your-blog-url.com.json&value=%7B%0A%20%20%22title%22%3A%20%22Your%20title%22%2C%20%2F%2Frequired%0A%20%20%22subtitle%22%3A%20%22subtitle%20or%20tagline%22%2C%20%2F%2Foptional%0A%20%20%22type%22%3A%20%22blog%22%2C%20%2F%2Frequired%0A%20%20%22url%22%3A%20%22https%3A%2F%2Fyour_blog.com%22%2C%20%2F%2Frequired%0A%20%20%22photo_url%22%3A%20%22https%3A%2F%2Fyour_blog.com%2Fyour_photo.png%22%2C%20%2F%2Frequired%0A%20%20%22description%22%3A%20%22Short%20description%20of%20what%20you%20blog%20about%22%2C%0A%20%20%22language%22%3A%20%22en%22%2C%20%2F%2Frequired%0A%20%20%22rss_feed%22%3A%20%22%5Burl%5D%2Ffile.xml%22%2C%20%2F%2Frequired%0A%20%20%22authors%22%3A%20%5B%20%2F%2Frequired%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22name%22%3A%20%22Your%20Name%22%2C%20%2F%2Frequired%0A%20%20%20%20%20%20%22social_media%22%3A%20%5B%7B%0A%20%20%20%20%20%20%20%20%20%22twitter%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22mastodon%22%3A%20%22%40username%40server.org%22%2C%0A%20%20%20%20%20%20%20%20%20%22bluesky%22%3A%20%22%40username.domain%22%2C%0A%20%20%20%20%20%20%20%20%20%22github%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22instagram%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22youtube%22%3A%20%22username%2Fend-url%22%2C%0A%20%20%20%20%20%20%20%20%20%22tiktok%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22periscope%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22researchgate%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22website%22%3A%20%22url%22%2C%0A%20%20%20%20%20%20%20%20%20%22linkedin%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22facebook%22%3A%20%22username%22%2C%0A%20%20%20%20%20%20%20%20%20%22orcid%22%3A%20%22member%20number%22%2C%0A%20%20%20%20%20%20%20%20%20%22meetup%22%3A%20%22end-url%22%0A%20%20%20%20%20%20%7D%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D). This link will fork the repository to your user account, and initiate a new file with some template content in it. After filling the file, please [create a PR to the main branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). @@ -128,6 +128,7 @@ For rendering on the website, only the three first social media items for each a ```json "twitter": "username" "mastodon": "@username@instance" +"bluesky": "@username.domain" "github": "username" "instagram": "username" "youtube": "username/end-url" diff --git a/blogs/beatrizmilz.com.json b/blogs/beatrizmilz.com.json index fa496ea..bb06afb 100644 --- a/blogs/beatrizmilz.com.json +++ b/blogs/beatrizmilz.com.json @@ -16,7 +16,8 @@ "instagram": "beatrizmilz", "youtube": "UCJ3RjWuqWNfKiAthnNgcv-w", "orcid": "0000-0001-7648-6578", - "website": "https://beatrizmilz.com/" + "website": "https://beatrizmilz.com/", + "bluesky": "@beatrizmilz.bsky.social" }] } ] diff --git a/blogs/blog.djnavarro.net.json b/blogs/blog.djnavarro.net.json index 7ee6b94..9f1da0e 100644 --- a/blogs/blog.djnavarro.net.json +++ b/blogs/blog.djnavarro.net.json @@ -15,7 +15,8 @@ "instagram": "daniellenavarro77", "youtube": "daniellenavarro77", "orcid": "0000-0001-7648-6578", - "website": "https://djnavarro.net" + "website": "https://djnavarro.net", + "bluesky": "@djnavarro.bsky.social" }] } ] diff --git a/blogs/cararthompson.com.json b/blogs/cararthompson.com.json index 4f1eca5..4d92673 100644 --- a/blogs/cararthompson.com.json +++ b/blogs/cararthompson.com.json @@ -15,7 +15,8 @@ "mastodon": "@cararthompson@fosstodon.org", "github": "cararthompson", "website": "cararthompson.com", - "linkedin": "cararthompson" + "linkedin": "cararthompson", + "bluesky": "@cararthompson.bsky.social" }] } ] diff --git a/blogs/cghlewis.com.json b/blogs/cghlewis.com.json new file mode 100644 index 0000000..46a648a --- /dev/null +++ b/blogs/cghlewis.com.json @@ -0,0 +1,17 @@ +{ + "title": "Crystal Lewis", + "type": "blog", + "url": "https://www.cghlewis.com", + "photo_url": "https://github.com/Cghlewis/crystal_site/blob/main/static/img/me2022v02.JPG", + "language": "en", + "authors": [ + { + "name": "Crystal Lewis", + "social_media": [{ + "twitter": "Cghlewis", + "bluesky": "@cghlewis.bsky.social", + "website": "https://www.cghlewis.com", + "linkedin": "crystal-lewis-922b4193/"}] + } + ] +} diff --git a/blogs/citizen-statistician.org.json b/blogs/citizen-statistician.org.json index 574f195..a7c8951 100644 --- a/blogs/citizen-statistician.org.json +++ b/blogs/citizen-statistician.org.json @@ -14,7 +14,8 @@ "mastodon": "@minecr@fosstodon.org", "github": "mine-cetinkaya-rundel", "orcid": "0000-0001-6452-2420", - "website": "http://mine-cr.com/" + "website": "http://mine-cr.com/", + "bluesky": "@minecr.bsky.social" }] }, { diff --git a/blogs/cosimameyer.com.json b/blogs/cosimameyer.com.json index 9e2ba5b..ea0e849 100644 --- a/blogs/cosimameyer.com.json +++ b/blogs/cosimameyer.com.json @@ -13,7 +13,8 @@ "mastodon": "@cosima_meyer@mas.to", "github": "cosimameyer", "website": "https://cosimameyer.com/", - "linkedin": "cosimameyer/" + "linkedin": "cosimameyer/", + "bluesky": "@cosima.bsky.social" }] } ] diff --git a/blogs/datapedagogy.com.json b/blogs/datapedagogy.com.json index ad9ec47..4653f7f 100644 --- a/blogs/datapedagogy.com.json +++ b/blogs/datapedagogy.com.json @@ -12,7 +12,8 @@ "social_media": [{ "twitter": "MineDogucu", "github": "mdogucu", - "linkedin": "minedogucu" + "linkedin": "minedogucu", + "bluesky": "@minedogucu.bsky.social" }] } ] diff --git a/blogs/drmowinckels.io.json b/blogs/drmowinckels.io.json index 60e553a..a0e2faf 100644 --- a/blogs/drmowinckels.io.json +++ b/blogs/drmowinckels.io.json @@ -12,7 +12,8 @@ "name": "Athanasia Monika Mowinckel", "social_media": [{ "mastodon": "@Drmowinckels@fosstodon.org", - "github": "drmowinckels" + "github": "drmowinckels", + "bluesky": "@drmowinckels.io" }] } ] diff --git a/blogs/ellakaye.co.uk.json b/blogs/ellakaye.co.uk.json index 4d5b6a0..15e7090 100644 --- a/blogs/ellakaye.co.uk.json +++ b/blogs/ellakaye.co.uk.json @@ -14,7 +14,8 @@ "mastodon": "@ellakaye@fosstodon.org", "linkedin": "ellakaye/", "website": "https://ellakaye.co.uk", - "orcid": "0000-0002-7300-3718" + "orcid": "0000-0002-7300-3718", + "bluesky": "@ellamkaye.bsky.social" }] } ] diff --git a/blogs/isabelizimm.github.io.json b/blogs/isabelizimm.github.io.json index 5b8aee1..83d63df 100644 --- a/blogs/isabelizimm.github.io.json +++ b/blogs/isabelizimm.github.io.json @@ -1,19 +1,19 @@ { - "title": "Isabel Zimmerman", - "type": "blog", - "url": "https://isabelizimm.github.io/", - "rss_feed": "https://isabelizimm.github.io/blog-r.xml", - "photo_url": "https://isabelizimm.github.io/profile.jpg", - "language": "en", - "authors": [ - { - "name": "Isabel Zimmerman", - "social_media": [{ - "twitter": "@isabelizimm", - "mastodon": "@isabelizimm@fosstodon.org", - "github": "isabelizimm", - "linkedin": "isabel-zimmerman" - }] - } - ] - } \ No newline at end of file + "title": "Isabel Zimmerman", + "type": "blog", + "url": "https://isabelizimm.github.io/", + "rss_feed": "https://isabelizimm.github.io/blog-r.xml", + "photo_url": "https://isabelizimm.github.io/profile.jpg", + "language": "en", + "authors": [ + { + "name": "Isabel Zimmerman", + "social_media": [{ + "twitter": "@isabelizimm", + "mastodon": "@isabelizimm@fosstodon.org", + "github": "isabelizimm", + "linkedin": "isabel-zimmerman" + }] + } + ] +} diff --git a/renv.lock b/renv.lock index 566c25e..278b66b 100644 --- a/renv.lock +++ b/renv.lock @@ -1,22 +1,10 @@ { "R": { - "Version": "4.2.0", + "Version": "4.3.3", "Repositories": [ - { - "Name": "ggseg", - "URL": "https://ggseg.r-universe.dev" - }, - { - "Name": "lcbc", - "URL": "https://lcbc-uio.r-universe.dev" - }, - { - "Name": "stan", - "URL": "https://mc-stan.org/r-packages" - }, { "Name": "CRAN", - "URL": "https://cloud.r-project.org" + "URL": "https://cran.rstudio.com" } ] }, @@ -25,328 +13,386 @@ "Package": "R6", "Version": "2.5.1", "Source": "Repository", - "Repository": "CRAN", - "Hash": "470851b6d5d0ac559e9d01bb352b4021", - "Requirements": [] + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "470851b6d5d0ac559e9d01bb352b4021" }, "Rcpp": { "Package": "Rcpp", - "Version": "1.0.9", + "Version": "1.0.13-1", "Source": "Repository", "Repository": "CRAN", - "Hash": "e9c08b94391e9f3f97355841229124f2", - "Requirements": [] + "Requirements": [ + "methods", + "utils" + ], + "Hash": "6b868847b365672d6c1677b1608da9ed" }, "V8": { "Package": "V8", - "Version": "4.2.1", + "Version": "6.0.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "2f56b7e2f0d534f3c4022e48c33835ce", "Requirements": [ "Rcpp", "curl", - "jsonlite" - ] + "jsonlite", + "utils" + ], + "Hash": "6603bfcbc7883a5fed41fb13042a3899" }, "base64enc": { "Package": "base64enc", "Version": "0.1-3", "Source": "Repository", - "Repository": "CRAN", - "Hash": "543776ae6848fde2f48ff3816d0628bc", - "Requirements": [] + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "543776ae6848fde2f48ff3816d0628bc" }, "bslib": { "Package": "bslib", - "Version": "0.4.1", + "Version": "0.8.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "89a0cd0c45161e3bd1c1e74a2d65e516", "Requirements": [ + "R", + "base64enc", "cachem", + "fastmap", + "grDevices", "htmltools", "jquerylib", "jsonlite", + "lifecycle", "memoise", + "mime", "rlang", "sass" - ] + ], + "Hash": "b299c6741ca9746fb227debcb0f9fb6c" }, "cachem": { "Package": "cachem", - "Version": "1.0.6", + "Version": "1.1.0", "Source": "Repository", - "Repository": "CRAN", - "Hash": "648c5b3d71e6a37e3043617489a0a0e9", + "Repository": "RSPM", "Requirements": [ "fastmap", "rlang" - ] + ], + "Hash": "cd9a672193789068eb5a2aad65a0dedf" + }, + "cli": { + "Package": "cli", + "Version": "3.6.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "b21916dd77a27642b447374a5d30ecf3" }, "curl": { "Package": "curl", - "Version": "4.3.3", + "Version": "6.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "0eb86baa62f06e8855258fa5a8048667", - "Requirements": [] + "Requirements": [ + "R" + ], + "Hash": "e8ba62486230951fcd2b881c5be23f96" }, "digest": { "Package": "digest", - "Version": "0.6.31", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "8b708f296afd9ae69f450f9640be8990", - "Requirements": [] - }, - "ellipsis": { - "Package": "ellipsis", - "Version": "0.3.2", + "Version": "0.6.37", "Source": "Repository", "Repository": "CRAN", - "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077", "Requirements": [ - "rlang" - ] + "R", + "utils" + ], + "Hash": "33698c4b3127fc9f506654607fb73676" }, "evaluate": { "Package": "evaluate", - "Version": "0.17", + "Version": "1.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "9171b012a55a1ef53f1442b1d798a3b4", - "Requirements": [] + "Requirements": [ + "R" + ], + "Hash": "3fd29944b231036ad67c3edb32e02201" }, "fastmap": { "Package": "fastmap", - "Version": "1.1.0", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.5.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "77bd60a6157420d4ffa93b27cf6a58b8", - "Requirements": [] + "Requirements": [ + "R", + "htmltools", + "rlang" + ], + "Hash": "bd1297f9b5b1fc1372d19e2c4cd82215" }, "fs": { "Package": "fs", - "Version": "1.5.2", + "Version": "1.6.5", "Source": "Repository", "Repository": "CRAN", - "Hash": "7c89603d81793f0d5486d91ab1fc6f1d", - "Requirements": [] + "Requirements": [ + "R", + "methods" + ], + "Hash": "7f48af39fa27711ea5fbd183b399920d" }, "glue": { "Package": "glue", - "Version": "1.6.2", + "Version": "1.8.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e", - "Requirements": [] + "Requirements": [ + "R", + "methods" + ], + "Hash": "5899f1eaa825580172bb56c08266f37c" }, "here": { "Package": "here", "Version": "1.0.1", "Source": "Repository", - "Repository": "CRAN", - "Hash": "24b224366f9c2e7534d2344d10d59211", + "Repository": "RSPM", "Requirements": [ "rprojroot" - ] + ], + "Hash": "24b224366f9c2e7534d2344d10d59211" }, "highr": { "Package": "highr", - "Version": "0.9", + "Version": "0.11", "Source": "Repository", - "Repository": "CRAN", - "Hash": "8eb36c8125038e648e5d111c0d7b2ed4", + "Repository": "RSPM", "Requirements": [ + "R", "xfun" - ] + ], + "Hash": "d65ba49117ca223614f71b60d85b8ab7" }, "htmltools": { "Package": "htmltools", - "Version": "0.5.4", + "Version": "0.5.8.1", "Source": "Repository", - "Repository": "CRAN", - "Hash": "9d27e99cc90bd701c0a7a63e5923f9b7", + "Repository": "RSPM", "Requirements": [ + "R", "base64enc", "digest", - "ellipsis", "fastmap", - "rlang" - ] + "grDevices", + "rlang", + "utils" + ], + "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" }, "jquerylib": { "Package": "jquerylib", "Version": "0.1.4", "Source": "Repository", - "Repository": "CRAN", - "Hash": "5aab57a3bd297eee1c1d862735972182", + "Repository": "RSPM", "Requirements": [ "htmltools" - ] + ], + "Hash": "5aab57a3bd297eee1c1d862735972182" }, "jsonlite": { "Package": "jsonlite", - "Version": "1.8.4", + "Version": "1.8.9", "Source": "Repository", "Repository": "CRAN", - "Hash": "a4269a09a9b865579b2635c77e572374", - "Requirements": [] + "Requirements": [ + "methods" + ], + "Hash": "4e993b65c2c3ffbffce7bb3e2c6f832b" }, "jsonvalidate": { "Package": "jsonvalidate", "Version": "1.3.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "cdc2843ef7f44f157198bb99aea7552d", "Requirements": [ "V8" - ] + ], + "Hash": "cdc2843ef7f44f157198bb99aea7552d" }, "knitr": { "Package": "knitr", - "Version": "1.40", + "Version": "1.49", "Source": "Repository", "Repository": "CRAN", - "Hash": "caea8b0f899a0b1738444b9bc47067e7", "Requirements": [ + "R", "evaluate", "highr", - "stringr", + "methods", + "tools", "xfun", "yaml" - ] + ], + "Hash": "9fcb189926d93c636dea94fbe4f44480" }, - "magrittr": { - "Package": "magrittr", - "Version": "2.0.3", + "lifecycle": { + "Package": "lifecycle", + "Version": "1.0.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "7ce2733a9826b3aeb1775d56fd305472", - "Requirements": [] + "Requirements": [ + "R", + "cli", + "glue", + "rlang" + ], + "Hash": "b8552d117e1b808b09a832f589b79035" }, "memoise": { "Package": "memoise", "Version": "2.0.1", "Source": "Repository", - "Repository": "CRAN", - "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c", + "Repository": "RSPM", "Requirements": [ "cachem", "rlang" - ] + ], + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "tools" + ], + "Hash": "18e9c28c1d3ca1560ce30658b22ce104" }, "rappdirs": { "Package": "rappdirs", "Version": "0.3.3", "Source": "Repository", - "Repository": "CRAN", - "Hash": "5e3c5dc0b071b21fa128676560dbe94d", - "Requirements": [] + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" }, "renv": { "Package": "renv", - "Version": "0.16.0", + "Version": "1.0.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "c9e8442ab69bc21c9697ecf856c1e6c7", - "Requirements": [] + "Requirements": [ + "utils" + ], + "Hash": "4b22ac016fe54028b88d0c68badbd061" }, "rlang": { "Package": "rlang", - "Version": "1.0.6", + "Version": "1.1.4", "Source": "Repository", - "Repository": "CRAN", - "Hash": "4ed1f8336c8d52c3e750adcdc57228a7", - "Requirements": [] + "Repository": "RSPM", + "Requirements": [ + "R", + "utils" + ], + "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" }, "rmarkdown": { "Package": "rmarkdown", - "Version": "2.16", + "Version": "2.29", "Source": "Repository", "Repository": "CRAN", - "Hash": "0f3eaa1547e2c6880d4de1c043ac6826", "Requirements": [ + "R", "bslib", "evaluate", + "fontawesome", "htmltools", "jquerylib", "jsonlite", "knitr", - "stringr", + "methods", "tinytex", + "tools", + "utils", "xfun", "yaml" - ] + ], + "Hash": "df99277f63d01c34e95e3d2f06a79736" }, "rprojroot": { "Package": "rprojroot", - "Version": "2.0.3", + "Version": "2.0.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "1de7ab598047a87bba48434ba35d497d", - "Requirements": [] + "Requirements": [ + "R" + ], + "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" }, "sass": { "Package": "sass", - "Version": "0.4.4", + "Version": "0.4.9", "Source": "Repository", - "Repository": "CRAN", - "Hash": "c76cbac7ca04ce82d8c38e29729987a3", + "Repository": "RSPM", "Requirements": [ "R6", "fs", "htmltools", "rappdirs", "rlang" - ] - }, - "stringi": { - "Package": "stringi", - "Version": "1.7.8", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a68b980681bcbc84c7a67003fa796bfb", - "Requirements": [] - }, - "stringr": { - "Package": "stringr", - "Version": "1.4.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a66ad12140cd34d4f9dfcc19e84fc2a5", - "Requirements": [ - "glue", - "magrittr", - "stringi" - ] + ], + "Hash": "d53dbfddf695303ea4ad66f86e99b95d" }, "tinytex": { "Package": "tinytex", - "Version": "0.42", + "Version": "0.54", "Source": "Repository", "Repository": "CRAN", - "Hash": "7629c6c1540835d5248e6e7df265fa74", "Requirements": [ "xfun" - ] + ], + "Hash": "3ec7e3ddcacc2d34a9046941222bf94d" }, "xfun": { "Package": "xfun", - "Version": "0.36", + "Version": "0.49", "Source": "Repository", "Repository": "CRAN", - "Hash": "f5baec54606751aa53ac9c0e05848ed6", - "Requirements": [] + "Requirements": [ + "R", + "grDevices", + "stats", + "tools" + ], + "Hash": "8687398773806cfff9401a2feca96298" }, "yaml": { "Package": "yaml", - "Version": "2.3.5", + "Version": "2.3.10", "Source": "Repository", "Repository": "CRAN", - "Hash": "458bb38374d73bf83b1bb85e353da200", - "Requirements": [] + "Hash": "51dab85c6c98e50a18d7551e9d49f76c" } } } diff --git a/renv/activate.R b/renv/activate.R index 019b5a6..2969c73 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,11 +2,27 @@ local({ # the requested version of renv - version <- "0.16.0" + version <- "1.0.2" + attr(version, "sha") <- NULL # the project directory project <- getwd() + # use start-up diagnostics if enabled + diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE") + if (diagnostics) { + start <- Sys.time() + profile <- tempfile("renv-startup-", fileext = ".Rprof") + utils::Rprof(profile) + on.exit({ + utils::Rprof(NULL) + elapsed <- signif(difftime(Sys.time(), start, units = "auto"), digits = 2L) + writeLines(sprintf("- renv took %s to run the autoloader.", format(elapsed))) + writeLines(sprintf("- Profile: %s", profile)) + print(utils::summaryRprof(profile)) + }, add = TRUE) + } + # figure out whether the autoloader is enabled enabled <- local({ @@ -60,21 +76,75 @@ local({ # load bootstrap tools `%||%` <- function(x, y) { - if (is.environment(x) || length(x)) x else y + if (is.null(x)) y else x + } + + catf <- function(fmt, ..., appendLF = TRUE) { + + quiet <- getOption("renv.bootstrap.quiet", default = FALSE) + if (quiet) + return(invisible()) + + msg <- sprintf(fmt, ...) + cat(msg, file = stdout(), sep = if (appendLF) "\n" else "") + + invisible(msg) + + } + + header <- function(label, + ..., + prefix = "#", + suffix = "-", + n = min(getOption("width"), 78)) + { + label <- sprintf(label, ...) + n <- max(n - nchar(label) - nchar(prefix) - 2L, 8L) + if (n <= 0) + return(paste(prefix, label)) + + tail <- paste(rep.int(suffix, n), collapse = "") + paste0(prefix, " ", label, " ", tail) + + } + + startswith <- function(string, prefix) { + substring(string, 1, nchar(prefix)) == prefix } bootstrap <- function(version, library) { + friendly <- renv_bootstrap_version_friendly(version) + section <- header(sprintf("Bootstrapping renv %s", friendly)) + catf(section) + # attempt to download renv - tarball <- tryCatch(renv_bootstrap_download(version), error = identity) - if (inherits(tarball, "error")) - stop("failed to download renv ", version) + catf("- Downloading renv ... ", appendLF = FALSE) + withCallingHandlers( + tarball <- renv_bootstrap_download(version), + error = function(err) { + catf("FAILED") + stop("failed to download:\n", conditionMessage(err)) + } + ) + catf("OK") + on.exit(unlink(tarball), add = TRUE) # now attempt to install - status <- tryCatch(renv_bootstrap_install(version, tarball, library), error = identity) - if (inherits(status, "error")) - stop("failed to install renv ", version) + catf("- Installing renv ... ", appendLF = FALSE) + withCallingHandlers( + status <- renv_bootstrap_install(version, tarball, library), + error = function(err) { + catf("FAILED") + stop("failed to install:\n", conditionMessage(err)) + } + ) + catf("OK") + + # add empty line to break up bootstrapping from normal output + catf("") + return(invisible()) } renv_bootstrap_tests_running <- function() { @@ -83,28 +153,32 @@ local({ renv_bootstrap_repos <- function() { + # get CRAN repository + cran <- getOption("renv.repos.cran", "https://cloud.r-project.org") + # check for repos override repos <- Sys.getenv("RENV_CONFIG_REPOS_OVERRIDE", unset = NA) - if (!is.na(repos)) + if (!is.na(repos)) { + + # check for RSPM; if set, use a fallback repository for renv + rspm <- Sys.getenv("RSPM", unset = NA) + if (identical(rspm, repos)) + repos <- c(RSPM = rspm, CRAN = cran) + return(repos) + } + # check for lockfile repositories repos <- tryCatch(renv_bootstrap_repos_lockfile(), error = identity) if (!inherits(repos, "error") && length(repos)) return(repos) - # if we're testing, re-use the test repositories - if (renv_bootstrap_tests_running()) - return(getOption("renv.tests.repos")) - # retrieve current repos repos <- getOption("repos") # ensure @CRAN@ entries are resolved - repos[repos == "@CRAN@"] <- getOption( - "renv.repos.cran", - "https://cloud.r-project.org" - ) + repos[repos == "@CRAN@"] <- cran # add in renv.bootstrap.repos if set default <- c(FALLBACK = "https://cloud.r-project.org") @@ -143,33 +217,34 @@ local({ renv_bootstrap_download <- function(version) { - # if the renv version number has 4 components, assume it must - # be retrieved via github - nv <- numeric_version(version) - components <- unclass(nv)[[1]] - - # if this appears to be a development version of 'renv', we'll - # try to restore from github - dev <- length(components) == 4L - - # begin collecting different methods for finding renv - methods <- c( - renv_bootstrap_download_tarball, - if (dev) - renv_bootstrap_download_github - else c( - renv_bootstrap_download_cran_latest, - renv_bootstrap_download_cran_archive + sha <- attr(version, "sha", exact = TRUE) + + methods <- if (!is.null(sha)) { + + # attempting to bootstrap a development version of renv + c( + function() renv_bootstrap_download_tarball(sha), + function() renv_bootstrap_download_github(sha) ) - ) + + } else { + + # attempting to bootstrap a release version of renv + c( + function() renv_bootstrap_download_tarball(version), + function() renv_bootstrap_download_cran_latest(version), + function() renv_bootstrap_download_cran_archive(version) + ) + + } for (method in methods) { - path <- tryCatch(method(version), error = identity) + path <- tryCatch(method(), error = identity) if (is.character(path) && file.exists(path)) return(path) } - stop("failed to download renv ", version) + stop("All download methods failed") } @@ -233,8 +308,6 @@ local({ type <- spec$type repos <- spec$repos - message("* Downloading renv ", version, " ... ", appendLF = FALSE) - baseurl <- utils::contrib.url(repos = repos, type = type) ext <- if (identical(type, "source")) ".tar.gz" @@ -251,13 +324,10 @@ local({ condition = identity ) - if (inherits(status, "condition")) { - message("FAILED") + if (inherits(status, "condition")) return(FALSE) - } # report success and return - message("OK (downloaded ", type, ")") destfile } @@ -314,8 +384,6 @@ local({ urls <- file.path(repos, "src/contrib/Archive/renv", name) destfile <- file.path(tempdir(), name) - message("* Downloading renv ", version, " ... ", appendLF = FALSE) - for (url in urls) { status <- tryCatch( @@ -323,14 +391,11 @@ local({ condition = identity ) - if (identical(status, 0L)) { - message("OK") + if (identical(status, 0L)) return(destfile) - } } - message("FAILED") return(FALSE) } @@ -344,8 +409,7 @@ local({ return() # allow directories - info <- file.info(tarball, extra_cols = FALSE) - if (identical(info$isdir, TRUE)) { + if (dir.exists(tarball)) { name <- sprintf("renv_%s.tar.gz", version) tarball <- file.path(tarball, name) } @@ -354,7 +418,7 @@ local({ if (!file.exists(tarball)) { # let the user know we weren't able to honour their request - fmt <- "* RENV_BOOTSTRAP_TARBALL is set (%s) but does not exist." + fmt <- "- RENV_BOOTSTRAP_TARBALL is set (%s) but does not exist." msg <- sprintf(fmt, tarball) warning(msg) @@ -363,10 +427,7 @@ local({ } - fmt <- "* Bootstrapping with tarball at path '%s'." - msg <- sprintf(fmt, tarball) - message(msg) - + catf("- Using local tarball '%s'.", tarball) tarball } @@ -393,8 +454,6 @@ local({ on.exit(do.call(base::options, saved), add = TRUE) } - message("* Downloading renv ", version, " from GitHub ... ", appendLF = FALSE) - url <- file.path("https://api.github.com/repos/rstudio/renv/tarball", version) name <- sprintf("renv_%s.tar.gz", version) destfile <- file.path(tempdir(), name) @@ -404,26 +463,105 @@ local({ condition = identity ) - if (!identical(status, 0L)) { - message("FAILED") + if (!identical(status, 0L)) return(FALSE) - } - message("OK") + renv_bootstrap_download_augment(destfile) + return(destfile) } + # Add Sha to DESCRIPTION. This is stop gap until #890, after which we + # can use renv::install() to fully capture metadata. + renv_bootstrap_download_augment <- function(destfile) { + sha <- renv_bootstrap_git_extract_sha1_tar(destfile) + if (is.null(sha)) { + return() + } + + # Untar + tempdir <- tempfile("renv-github-") + on.exit(unlink(tempdir, recursive = TRUE), add = TRUE) + untar(destfile, exdir = tempdir) + pkgdir <- dir(tempdir, full.names = TRUE)[[1]] + + # Modify description + desc_path <- file.path(pkgdir, "DESCRIPTION") + desc_lines <- readLines(desc_path) + remotes_fields <- c( + "RemoteType: github", + "RemoteHost: api.github.com", + "RemoteRepo: renv", + "RemoteUsername: rstudio", + "RemotePkgRef: rstudio/renv", + paste("RemoteRef: ", sha), + paste("RemoteSha: ", sha) + ) + writeLines(c(desc_lines[desc_lines != ""], remotes_fields), con = desc_path) + + # Re-tar + local({ + old <- setwd(tempdir) + on.exit(setwd(old), add = TRUE) + + tar(destfile, compression = "gzip") + }) + invisible() + } + + # Extract the commit hash from a git archive. Git archives include the SHA1 + # hash as the comment field of the tarball pax extended header + # (see https://www.kernel.org/pub/software/scm/git/docs/git-archive.html) + # For GitHub archives this should be the first header after the default one + # (512 byte) header. + renv_bootstrap_git_extract_sha1_tar <- function(bundle) { + + # open the bundle for reading + # We use gzcon for everything because (from ?gzcon) + # > Reading from a connection which does not supply a 'gzip' magic + # > header is equivalent to reading from the original connection + conn <- gzcon(file(bundle, open = "rb", raw = TRUE)) + on.exit(close(conn)) + + # The default pax header is 512 bytes long and the first pax extended header + # with the comment should be 51 bytes long + # `52 comment=` (11 chars) + 40 byte SHA1 hash + len <- 0x200 + 0x33 + res <- rawToChar(readBin(conn, "raw", n = len)[0x201:len]) + + if (grepl("^52 comment=", res)) { + sub("52 comment=", "", res) + } else { + NULL + } + } + renv_bootstrap_install <- function(version, tarball, library) { # attempt to install it into project library - message("* Installing renv ", version, " ... ", appendLF = FALSE) dir.create(library, showWarnings = FALSE, recursive = TRUE) + output <- renv_bootstrap_install_impl(library, tarball) + + # check for successful install + status <- attr(output, "status") + if (is.null(status) || identical(status, 0L)) + return(status) + + # an error occurred; report it + header <- "installation of renv failed" + lines <- paste(rep.int("=", nchar(header)), collapse = "") + text <- paste(c(header, lines, output), collapse = "\n") + stop(text) + + } + + renv_bootstrap_install_impl <- function(library, tarball) { # invoke using system2 so we can capture and report output bin <- R.home("bin") exe <- if (Sys.info()[["sysname"]] == "Windows") "R.exe" else "R" - r <- file.path(bin, exe) + R <- file.path(bin, exe) args <- c( "--vanilla", "CMD", "INSTALL", "--no-multiarch", @@ -431,19 +569,7 @@ local({ shQuote(path.expand(tarball)) ) - output <- system2(r, args, stdout = TRUE, stderr = TRUE) - message("Done!") - - # check for successful install - status <- attr(output, "status") - if (is.numeric(status) && !identical(status, 0L)) { - header <- "Error installing renv:" - lines <- paste(rep.int("=", nchar(header)), collapse = "") - text <- c(header, lines, output) - writeLines(text, con = stderr()) - } - - status + system2(R, args, stdout = TRUE, stderr = TRUE) } @@ -653,34 +779,62 @@ local({ } - renv_bootstrap_validate_version <- function(version) { + renv_bootstrap_validate_version <- function(version, description = NULL) { - loadedversion <- utils::packageDescription("renv", fields = "Version") - if (version == loadedversion) - return(TRUE) + # resolve description file + # + # avoid passing lib.loc to `packageDescription()` below, since R will + # use the loaded version of the package by default anyhow. note that + # this function should only be called after 'renv' is loaded + # https://github.com/rstudio/renv/issues/1625 + description <- description %||% packageDescription("renv") - # assume four-component versions are from GitHub; three-component - # versions are from CRAN - components <- strsplit(loadedversion, "[.-]")[[1]] - remote <- if (length(components) == 4L) - paste("rstudio/renv", loadedversion, sep = "@") + # check whether requested version 'version' matches loaded version of renv + sha <- attr(version, "sha", exact = TRUE) + valid <- if (!is.null(sha)) + renv_bootstrap_validate_version_dev(sha, description) else - paste("renv", loadedversion, sep = "@") + renv_bootstrap_validate_version_release(version, description) + + if (valid) + return(TRUE) + + # the loaded version of renv doesn't match the requested version; + # give the user instructions on how to proceed + remote <- if (!is.null(description[["RemoteSha"]])) { + paste("rstudio/renv", description[["RemoteSha"]], sep = "@") + } else { + paste("renv", description[["Version"]], sep = "@") + } + + # display both loaded version + sha if available + friendly <- renv_bootstrap_version_friendly( + version = description[["Version"]], + sha = description[["RemoteSha"]] + ) fmt <- paste( "renv %1$s was loaded from project library, but this project is configured to use renv %2$s.", - "Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.", - "Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", + "- Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.", + "- Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", sep = "\n" ) - - msg <- sprintf(fmt, loadedversion, version, remote) - warning(msg, call. = FALSE) + catf(fmt, friendly, renv_bootstrap_version_friendly(version), remote) FALSE } + renv_bootstrap_validate_version_dev <- function(version, description) { + expected <- description[["RemoteSha"]] + is.character(expected) && startswith(expected, version) + } + + renv_bootstrap_validate_version_release <- function(version, description) { + expected <- description[["Version"]] + is.character(expected) && identical(expected, version) + } + renv_bootstrap_hash_text <- function(text) { hashfile <- tempfile("renv-hash-") @@ -700,6 +854,12 @@ local({ # warn if the version of renv loaded does not match renv_bootstrap_validate_version(version) + # execute renv load hooks, if any + hooks <- getHook("renv::autoload") + for (hook in hooks) + if (is.function(hook)) + tryCatch(hook(), error = warnify) + # load the project renv::load(project) @@ -839,14 +999,79 @@ local({ } + renv_bootstrap_version_friendly <- function(version, shafmt = NULL, sha = NULL) { + sha <- sha %||% attr(version, "sha", exact = TRUE) + parts <- c(version, sprintf(shafmt %||% " [sha: %s]", substring(sha, 1L, 7L))) + paste(parts, collapse = "") + } + + renv_bootstrap_exec <- function(project, libpath, version) { + if (!renv_bootstrap_load(project, libpath, version)) + renv_bootstrap_run(version, libpath) + } + + renv_bootstrap_run <- function(version, libpath) { + + # perform bootstrap + bootstrap(version, libpath) + + # exit early if we're just testing bootstrap + if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA))) + return(TRUE) + + # try again to load + if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { + return(renv::load(project = getwd())) + } + + # failed to download or load renv; warn the user + msg <- c( + "Failed to find an renv installation: the project will not be loaded.", + "Use `renv::activate()` to re-initialize the project." + ) + + warning(paste(msg, collapse = "\n"), call. = FALSE) + + } + + + renv_bootstrap_in_rstudio <- function() { + commandArgs()[[1]] == "RStudio" + } + + # Used to work around buglet in RStudio if hook uses readline + renv_bootstrap_flush_console <- function() { + tryCatch({ + tools <- as.environment("tools:rstudio") + tools$.rs.api.sendToConsole("", echo = FALSE, focus = FALSE) + }, error = function(cnd) {}) + } renv_json_read <- function(file = NULL, text = NULL) { + jlerr <- NULL + # if jsonlite is loaded, use that instead - if ("jsonlite" %in% loadedNamespaces()) - renv_json_read_jsonlite(file, text) + if ("jsonlite" %in% loadedNamespaces()) { + + json <- catch(renv_json_read_jsonlite(file, text)) + if (!inherits(json, "error")) + return(json) + + jlerr <- json + + } + + # otherwise, fall back to the default JSON reader + json <- catch(renv_json_read_default(file, text)) + if (!inherits(json, "error")) + return(json) + + # report an error + if (!is.null(jlerr)) + stop(jlerr) else - renv_json_read_default(file, text) + stop(json) } @@ -960,35 +1185,17 @@ local({ # construct full libpath libpath <- file.path(root, prefix) - # attempt to load - if (renv_bootstrap_load(project, libpath, version)) - return(TRUE) - - # load failed; inform user we're about to bootstrap - prefix <- paste("# Bootstrapping renv", version) - postfix <- paste(rep.int("-", 77L - nchar(prefix)), collapse = "") - header <- paste(prefix, postfix) - message(header) - - # perform bootstrap - bootstrap(version, libpath) - - # exit early if we're just testing bootstrap - if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA))) - return(TRUE) - - # try again to load - if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { - message("* Successfully installed and loaded renv ", version, ".") - return(renv::load()) + if (renv_bootstrap_in_rstudio()) { + # RStudio only updates console once .Rprofile is finished, so + # instead run code on sessionInit + setHook("rstudio.sessionInit", function(...) { + renv_bootstrap_exec(project, libpath, version) + renv_bootstrap_flush_console() + }) + } else { + renv_bootstrap_exec(project, libpath, version) } - # failed to download or load renv; warn the user - msg <- c( - "Failed to find an renv installation: the project will not be loaded.", - "Use `renv::activate()` to re-initialize the project." - ) - - warning(paste(msg, collapse = "\n"), call. = FALSE) + invisible() }) diff --git a/renv/settings.dcf b/renv/settings.dcf deleted file mode 100644 index 169d82f..0000000 --- a/renv/settings.dcf +++ /dev/null @@ -1,10 +0,0 @@ -bioconductor.version: -external.libraries: -ignored.packages: -package.dependency.fields: Imports, Depends, LinkingTo -r.version: -snapshot.type: implicit -use.cache: TRUE -vcs.ignore.cellar: TRUE -vcs.ignore.library: TRUE -vcs.ignore.local: TRUE diff --git a/scripts/.entry_schema.json b/scripts/.entry_schema.json index c2cc01e..ab02821 100644 --- a/scripts/.entry_schema.json +++ b/scripts/.entry_schema.json @@ -24,6 +24,7 @@ "properties": { "twitter": {"type": "string"}, "mastodon": {"type": "string"}, + "bluesky": {"type": "string"}, "linkedin": {"type": "string"}, "facebook": {"type": "string"}, "github": {"type": "string"},