The communications working group (CWG) seeks to promote and showcase how R can be used in the Clinical Reporting pipeline through short and informative blog posts. These posts will be hosted on this pharmaverse blog and promoted on the pharmaverse slack channels as well as on LinkedIn.
As the CWG is a small team, we hope to make the blog development process easy enough that pharmaverse community members will be able to easily write blog posts with guidance from the CWG team.
The CWG believes that the following 4 points will help guide the creation of Blog Posts.
- Short
- Personalized
- Reproducible
- Readable
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.
Overall, we want to stay focus on the Clinical Reporting Pipeline, which we see as the following topics:
- Packages in the Clinical Reporting Pipeline
- Functions from packages in the Clinical Reporting Pipeline
- Wider experiences of using R in the Clinical Reporting Pipeline
- Conference experiences and the Clinical Reporting Pipeline
However, it never hurts to ask if you topic might fit into this medium!.
- A unique image to help showcase the post.
- Working Code
- Self-contained data or package data.
- Documentation of package versions
That is it! After that you can go wild, but we do ask that it is kept short!
Step 1: Reach out to us through pharmaverse/slack or make an issue on our GitHub.
Step 2: Branch off main
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 thecreate_blogpost.R
file. -
Enter your information into the
create_post
function. Please note that we do not currently allow users to specify their own categories (ortags
), so you must choose (possibly several) from this list:c("Metadata", "SDTM", "ADaM", "TLG", "Shiny", "Community", "Conferences", "Submissions", "Technical")
. -
Running that function will create a subfolder with a quarto file (
*.qmd
) in theposts/
folder. Both should be named based on the suppliedpost_date
andpost_name
information. -
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 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!
Most importantly:
Step 7: Have fun :)
Contributors can benefit from using the blog
Docker image 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:
- Ensure you have Docker Desktop installed.
- Start Docker Desktop on your machine.
- Perform a Docker pull from the blog's GitHub registry by running this code:
docker pull ghcr.io/pharmaverse/blog:latest
- Clone this
blog
repository and take note of the location of the repo in your local machine. - Update the code below specifying the location of your 'blog' repository and execute the script:
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:
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.
- Open https://localhost:8787/ and you should see the RStudio welcome page.
- The username will be
rstudio
, and the password isyourpassword
. - Once logged in, go to the work folder, and you should see the contents of the
blog
repository. - Click the
quarto-blog.Rproj
file to open the project. - You can test by opening the
index.qmd
and rendering the document. - Quarto should run, and you should be able to see the rendered blog locally.
- Develop your blog post and re-render as needed.
- 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.