Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
096a7d5
renv
linogaliana Oct 17, 2024
bf14dfe
modify docker image
linogaliana Oct 17, 2024
1e655ed
restore
linogaliana Oct 17, 2024
793ad34
Add renv lock and co
linogaliana Oct 17, 2024
e3e37ab
restore
linogaliana Oct 17, 2024
45fb292
upload artifact v4
linogaliana Oct 17, 2024
df4c470
rm cdoe
linogaliana Oct 17, 2024
e649db4
add yaml to test
linogaliana Oct 17, 2024
10f821e
update lockfile
linogaliana Oct 17, 2024
b7bc513
upgrade R version
linogaliana Oct 17, 2024
7231e99
use from documentation
linogaliana Oct 17, 2024
afbb95d
ici aussi
linogaliana Oct 17, 2024
aac9a57
use example doc
linogaliana Oct 17, 2024
8d06db2
add yaml install
linogaliana Oct 17, 2024
315846e
install yaml then renv
linogaliana Oct 18, 2024
e134a6e
status
linogaliana Oct 18, 2024
76aced5
renv yaml
linogaliana Oct 18, 2024
5321b74
try using actions
linogaliana Oct 18, 2024
68a6071
change rbanch
linogaliana Oct 18, 2024
134e8c0
r version
linogaliana Oct 18, 2024
b7f3431
ajoute des data au lockfile
linogaliana Nov 6, 2024
a43eb53
remove activate
linogaliana Nov 6, 2024
3832d92
remove unfinished
linogaliana Nov 6, 2024
9793ae2
force install yaml
linogaliana Nov 6, 2024
3427f1d
rm DESCRIPTION
linogaliana Nov 6, 2024
6f7b7e4
Update .github/workflows/prod.yaml
linogaliana Dec 12, 2024
f7b1021
Update README.md
linogaliana Apr 19, 2025
1fa400d
logical order
linogaliana Apr 19, 2025
7a365d6
upgraded envir
linogaliana Apr 19, 2025
535f794
install yaml
linogaliana Apr 19, 2025
7a4a1fa
restore
linogaliana Apr 19, 2025
4cc5934
force install yaml
linogaliana Apr 19, 2025
e9fc117
change location
linogaliana Apr 19, 2025
bdf4427
install renv
linogaliana Apr 19, 2025
10d5ec7
remove renv
linogaliana Apr 21, 2025
14b3a82
remove rpfo
linogaliana Apr 21, 2025
b30d8cf
rm renv
linogaliana Apr 22, 2025
1961ba8
rprofile
linogaliana Apr 22, 2025
a58e0ad
install terra dependencies
linogaliana Apr 22, 2025
4072d1f
libdunits
linogaliana Apr 22, 2025
5d91140
rm keys
linogaliana Apr 22, 2025
b3b8eef
rm fonts
linogaliana Apr 22, 2025
ea124ca
update
linogaliana Apr 22, 2025
d809332
eval false
linogaliana Apr 22, 2025
8d658ed
with_def
linogaliana Apr 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
^renv$
^renv\.lock$
^LICENSE\.md$
^\.github$
1 change: 1 addition & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source("renv/activate.R")
if (file.exists('~/.Rprofile')) sys.source('~/.Rprofile', envir = environment())

with_def <- (function() {
Expand Down
40 changes: 31 additions & 9 deletions .github/workflows/bookdown-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,45 @@ on:
- main
- master

name: preview bookdown
name: Preview website

jobs:
build:
if: "!contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-latest
container: inseefrlab/utilitr:latest
steps:
- name: Checkout Repository
if: ${{ github.repository == 'inseefrlab/utilitr' }}
env:
GITHUB_PAT: ${{ secrets.PAT }}
uses: actions/checkout@master
- name: Install Dependencies
if: ${{ github.repository == 'inseefrlab/utilitr' }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Configure safe repository
run: |
git config --global --add safe.directory /__w/utilitR/utilitR
- name: Set RENV_PATHS_ROOT
shell: bash
run: |
Rscript -e "install.packages(c('remotes', 'htmltools', 'sf'))"
echo "RENV_PATHS_ROOT=${{ runner.temp }}/renv" >> $GITHUB_ENV
- name: Install and activate renv
run: |
install.packages("yaml")
install.packages("renv")
renv::status()
renv::activate()
shell: Rscript {0}
- name: Get R and OS version
id: get-version
run: |
cat("##[set-output name=os-version;]", sessionInfo()$running, "\n", sep = "")
cat("##[set-output name=r-version;]", R.Version()$version.string, sep = "")
shell: Rscript {0}
- name: Restore Renv package cache
uses: actions/cache@v4
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{ inputs.cache-version }}-${{ hashFiles('renv.lock') }}
restore-keys: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{inputs.cache-version }}-
env:
GITHUB_PAT: ${{ secrets.PAT }}
- name: Render Book
Expand Down
104 changes: 32 additions & 72 deletions .github/workflows/prod.yaml
Original file line number Diff line number Diff line change
@@ -1,82 +1,42 @@
name: Production de la documentation


on:
workflow_dispatch:
push:
branches:
- main
- master
- test
branches: renv

name: Quarto Publish

jobs:
docker:
if: "!contains(github.event.commits[0].message, '[skip ci]')"
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
if: ${{ github.repository == 'inseefrlab/utilitr' }}
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
if: ${{ github.repository == 'inseefrlab/utilitr' }}
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
if: ${{ github.repository == 'inseefrlab/utilitr' }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
if: ${{ github.repository == 'inseefrlab/utilitr' }}
id: docker_build
uses: docker/build-push-action@v2
env:
GITHUB_PAT: ${{ secrets.PAT }}
with:
push: true
context: .
tags: |
inseefrlab/utilitr:latest
inseefrlab/utilitr:0.9.1
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
website:
name: Render website
if: "!contains(github.event.commits[0].message, '[skip ci]')"
needs: docker
runs-on: ubuntu-latest
container: inseefrlab/utilitr:latest
steps:
- uses: actions/checkout@v4
- name: Check out repository
uses: actions/checkout@v4

- name: Install R
uses: r-lib/actions/setup-r@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
r-version: '4.4.1'

- name: Install dependencies
run: |
git config --global --add safe.directory /__w/utilitR/utilitR
Rscript -e "install.packages(c('remotes'))"
Rscript -e "remotes::install_github('rstudio/htmltools')"
Rscript -e "remotes::install_github('r-spatial/sf', dependencies = TRUE)"
env:
GITHUB_PAT: ${{ secrets.PAT }}
- name: Render Book
run: |
ls
git remote -v
git config --global user.email quarto-github-actions-publish@example.com
git config --global user.name "Quarto GHA Workflow Runner"
quarto render --to html
quarto publish gh-pages --no-render --no-browser
- uses: actions/upload-artifact@v2
sudo ./docker/dependencies.sh
rm -rf renv/
rm .Rprofile
Rscript -e "install.packages('yaml')"

- name: Install renv packages
uses: r-lib/actions/setup-renv@v2
with:
name: _public
path: _public/
retention-days: 5
cache-version: 2

- name: Set up Quarto environment
uses: quarto-dev/quarto-actions/setup@v2

- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion 01_R_Insee/Fiche_installer_packages.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ contiendra les modifications les plus récentes. Installer depuis une forge
permet ainsi de récupérer la version de développement d'un _package_
(seules les versions stables sont en général disponibles sur le CRAN). Pour installer
un _package_ tel qu'il était à un moment donné, il est également possible de
faire suivre le nom du dépôt par une référence à un `r with_def("commit")`, à un _tag_ (une version) ou à une `r with_def("branche")`. Voici un exemple avec un _tag_ : `remotes::install_gitlab("py_b/funprog@v-0.3.0")`. Voici un exemple avec un commit : `remotes::install_github("InseeFrLab/doremifasolData@a9df2d3d0e372")`.
faire suivre le nom du dépôt par une référence à un `commit`, à un _tag_ (une version) ou à une ` branche`. Voici un exemple avec un _tag_ : `remotes::install_gitlab("py_b/funprog@v-0.3.0")`. Voici un exemple avec un commit : `remotes::install_github("InseeFrLab/doremifasolData@a9df2d3d0e372")`.

::: {.callout-note}
Lorsque vous installez un _package_ depuis une forge logicielle, `R` crée automatiquement une archive temporaire (un fichier `.tar.gz`), puis installe le _package_ à partir de celle-ci. Si vous travaillez dans un environnement Windows, il est nécessaire que `Rtools` soit installé sur votre poste pour que `R` puisse construire l'archive.
Expand Down
Loading
Loading