Skip to content

Commit

Permalink
Merge branch 'main' into 125_xportr_0_4_0
Browse files Browse the repository at this point in the history
  • Loading branch information
sadchla-codes authored Mar 14, 2024
2 parents 038de0a + e831623 commit f2f41f0
Show file tree
Hide file tree
Showing 15 changed files with 724 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ https://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numb
https://go.appsilon.com/demo-apps
https://doi.org/10.1177/17407745221123244
https://appsilon.com/static/35215a117d1bc17fac2179f059c3709f/rhino_fda_pilot_r_shiny_app_e-ctd.webm
http://localhost:8787/
https://github.com/pharmaverse/blog/pkgs/container/blog
https://stackoverflow.com/*
https://stackoverflow.com/questions/12688717/round-up-from-5#comment110611119_12688836
https://appsilon.com/docker-vs-podman-vs-singularity/amp/
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM rocker/rstudio:latest

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& curl -o quarto.deb -L https://github.com/quarto-dev/quarto-cli/releases/download/v1.4.550/quarto-1.4.550-linux-amd64.deb \
&& dpkg --install quarto.deb \
&& rm -f quarto.deb \
&& R -e 'install.packages(c( \
"jsonlite", \
"tidyverse", \
"spelling", \
"janitor", \
"diffdf", \
"admiral", \
"patchwork", \
"here", \
"reactable", \
"pharmaversesdtm", \
"metacore", \
"metatools", \
"xportr", \
"pharmaverseadam"))'
6 changes: 3 additions & 3 deletions R/create_blogpost.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ c(

# Fill in the info, e.g.:
create_post(
post_name = "iscr_conference", # needs to be character vector (length 1)
post_date = "2024-02-17", # needs to be character vector (length 1)
post_name = "My Blog", # needs to be character vector (length 1)
post_date = "2024-12-01", # needs to be character vector (length 1)
description = "", # you can fill the description in later as well
author = c("Pooja Kumari"), # one or more authors are permitted
author = c("My Name"), # one or more authors are permitted
cover_image = "pharmaverse", # chose one of the above (see line 8)
tags = c("submission", "ADaMs", "conferences", "admiral", "xportr", "metatools", "metacore") # chose (multiple) from line 10
)
Expand Down
65 changes: 53 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ As the CWG is a small team, we hope to make the blog development process easy en

## Spirit of a Blog Post

The CWG believes that the following 4 points will help guide the creation of Blog Posts.
The CWG believes that the following 4 points will help guide the creation of Blog Posts.

* **Short**
* **Personalized**
* **Reproducible**
* **Readable**
* **Readable**

**Short:** Posts should aim to be under a 10 minute read. We encourage longer posts to be broken up into multiple posts.
**Short:** Posts should aim to be under a 10 minute read. We encourage longer posts to be broken up into multiple posts.

**Personalized:** Posts should have a personality! For example, a person wishing to post on a function in a package needs to differentiate the post from the documentation for function, i.e. we don't want to just recycle the documentation. How can you add your voice and experience? A bit of cheeky language is also encouraged.

**Reproducible:** Posts should work with minimal dependencies with data, packages and outside sources. Every dependency introduced in a post adds some risk to the post longevity. As package dependencies change, posts should be built in a way that they can be updated to stay relevant.

**Readable:** The CWG sees this site as more of introductory site rather advanced user site. Therefore, the CWG feels that code should be introduced in a way that promotes readability over complexity.
**Readable:** The CWG sees this site as more of introductory site rather advanced user site. Therefore, the CWG feels that code should be introduced in a way that promotes readability over complexity.


## What types of posts are allowed on this site?
Expand Down Expand Up @@ -49,31 +49,72 @@ That is it! After that you can go wild, but we do ask that it is kept short!

**Step 2:** Branch off `main`

**Step 3:** Create a new Blog Post skeleton using the `create_blog_post.R` script in the `R/` folder.
**Step 3:** Create a new Blog Post skeleton using the `create_blog_post.R` script in the `R/` folder.

- Open the `create_blogpost.R` file.

- Source the script `help_create_blogpost.R` from within the `create_blogpost.R` file.

- Enter your information into the `create_post` function.
- Enter your information into the `create_post` function.
Please note that we do not currently allow users to specify their own categories (or `tags`),
so you must chose (possibly several) from this list:
`c("metadata", "submission", "qc", "ADaMs", "SDTMs", "community", "conferences",
"admiral", "roak", "xportr", "metatools", "metacore")`.


- Running that function will create a subfolder with a quarto file (`*.qmd`) in the `posts/` folder.
Both should be named based on the supplied `post_date` and `post_name` information.
- Running that function will create a subfolder with a quarto file (`*.qmd`) in the `posts/` folder.
Both should be named based on the supplied `post_date` and `post_name` information.

- Open the newly created folder and start working within the `*.qmd` file.
- Open the newly created folder and start working within the `*.qmd` file.

**Step 4:** After you have finished your Blog Post, open the `CICD.R` file in the `R/` folder.
Run the script line by line to first check the spelling in your post and then to make sure your code is compatible with our code-style.
**Step 4:** After you have finished your Blog Post, open the `CICD.R` file in the `R/` folder.
Run the script line by line to first check the spelling in your post and then to make sure your code is compatible with our code-style.

**Step 5:** Push to your branch, create a Pull Request, and review the Spirit of the Blog Post in the Pull Request Template.

**Step 6:** Poke us to do a review!
**Step 6:** Poke us to do a review!

Most importantly:

**Step 7:** Have fun :)

## How to Use the `blog` Docker Image for Local Development

Contributors can benefit from using the [`blog` Docker image](https://github.com/pharmaverse/blog/pkgs/container/blog) when creating their blog posts. This way, contributors don't have to install all dependencies from other blog posts and can solely focus on their own blog post and its dependencies.

Here are the steps to use the blog's Docker image:

1. Ensure you have [Docker Desktop](https://docs.docker.com/get-docker/) installed.
2. Start Docker Desktop on your machine.
3. Perform a Docker pull from the blog's GitHub registry by running this code:

```bash
docker pull ghcr.io/pharmaverse/blog:latest
```

4. Clone this `blog` repository and take note of the location of the repo in your local machine.
5. Update the code below specifying the location of your 'blog' repository and execute the script:
```bash
docker run --rm -ti -e PASSWORD=yourpassword -p 8787:8787 -v <location of your blog repo>:/home/rstudio/work ghcr.io/pharmaverse/blog
```

Here's an example:

```bash
docker run --rm -ti -e PASSWORD=yourpassword -p 8787:8787 -v ~/Documents/blog:/home/rstudio/work ghcr.io/pharmaverse/blog
```

This command will run the `blog` Docker image and mount your local folder to the image.

6. Open http://localhost:8787/ and you should see the RStudio welcome page.
7. The username will be `rstudio`, and the password is `yourpassword`.
8. Once logged in, go to the work folder, and you should see the contents of the `blog` repository.
9. Click the `quarto-blog.Rproj` file to open the project.
10. You can test by opening the `index.qmd` and rendering the document.
11. Quarto should run, and you should be able to see the rendered blog locally.
12. Develop your blog post and re-render as needed.
13. Once complete, you can close the RStudio session, shut down the image, and push your update to the blog repo.

Please note that there is no SSH or git capability in the docker image, so you can't push your update to the repo from the image directly. To push the update, you would have to do it from your local RStudio or terminal.

A Dockerfile is also provided in this repo if you want to build the image locally and add more functionalities.
49 changes: 42 additions & 7 deletions inst/WORDLIST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ CDER
cdisc
CDISC
ceil
Celine
changelog
ChatGPT
cheatsheet
Expand All @@ -138,6 +139,7 @@ comms
comparators
compatibilities
config
Coretta
cosa
COUNTRYL
COUNTRYN
Expand Down Expand Up @@ -389,6 +391,7 @@ pharmaverseadam
pharmaversesdtm
phuse
PHUSE
Piraux's
pkglite
pKobZqjlXChj
png
Expand Down Expand Up @@ -612,10 +615,42 @@ zhu
Zhu
zMachine
zxqguo
deepdive
feedbacks
IoT
JSON's
magrittr
NotUsed
xport
amongst
enablement
GxP
now’
nyone
phar
phriends
PHUSE’s
riskassessment
yay
ari
farrugia
kalappurakal
knoph
michael
michaelrimler
ross
siggaard
stackhouse
sumesh
ari
farrugia
kalappurakal
knoph
michael
michaelrimler
ross
siggaard
stackhouse
sumesh
atkr
devtools
ic
Olo
QKz
scm
ytJ
yv
zt
2 changes: 1 addition & 1 deletion posts/2023-08-08_study_day/study_day.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ long_slug <- "2023-08-08_study_day"

<!--------------- post begins here ----------------->

Creating `--DY` variables for your ADaMs is super easy using [`derive_vars_dy()`](https://pharmaverse.github.io/admiral/v0.11.1/reference/derive_vars_dy.html) from the [admiral package](https://pharmaverse.github.io/admiral/).
Creating `--DY` variables for your ADaMs is super easy using [`derive_vars_dy()`](https://pharmaverse.github.io/admiral/reference/derive_vars_dy.html) from the [admiral package](https://pharmaverse.github.io/admiral/).


Let's build some dummy data with 4 subjects, a start date/time for treatment (`TRTSDTM`), an analysis start date/time variable (`ASTDTM`) and an analysis end date variable (`AENDT`).
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f2f41f0

Please sign in to comment.