Skip to content

Commit

Permalink
Use GHA to build presentation (#8)
Browse files Browse the repository at this point in the history
* use GHA

* fix GHA
  • Loading branch information
IndrajeetPatil authored Nov 10, 2024
1 parent 1122a1f commit a543fd4
Show file tree
Hide file tree
Showing 73 changed files with 294 additions and 16 deletions.
126 changes: 126 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at [email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][https://github.com/mozilla/inclusion].

For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.

[homepage]: https://www.contributor-covenant.org
8 changes: 8 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2

updates:
# Keep dependencies for GitHub Actions up-to-date
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
61 changes: 61 additions & 0 deletions .github/workflows/build-presentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
schedule:
# * is a special character in YAML so you have to quote this string
# Trigger once a week, on a Sunday (0)
- cron: "0 0 * * 0"

name: Build Presentation

jobs:
build-presentation:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "latest"

- uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release
- run: |
quarto --version
quarto install extension quarto-ext/fontawesome --no-prompt
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
extra-packages: |
quarto-dev/quarto-r
r-lib/sessioninfo
- name: Render slides
run: |
options(crayon.enabled = FALSE)
quarto::quarto_render("index.qmd")
shell: Rscript {0}

- name: Build PDF using decktape
run: |
rm -rf slides
mkdir slides && sudo chmod 777 slides
sudo npm install -g --unsafe-perm=true --allow-root decktape
docker run --rm -t -v `pwd`:/slides -v ~:/home/user astefanutti/decktape index.html slides/slides.pdf
- name: Copy PDF slides to top-level directory
run: |
cp slides/slides.pdf . && rm -rf slides
#- uses: stefanzweifel/[email protected]
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
schedule:
- cron: "30 17 * * 2"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Depends:
knitr,
ggiraphExtra,
ggstatsplot,
ggthemes,
packageRank,
quarto,
reticulate
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This is a repository for presentation about the [`{ggstatsplot}`](https://indrajeetpatil.github.io/ggstatsplot/) (prepared using [Quarto](https://quarto.org/)).

The slides are available here:<br>
<https://indrajeetpatil.github.io/ggstatsplot_slides/slides/ggstatsplot_presentation.html#1>
<https://indrajeetpatil.github.io/intro-to-ggstatsplot/slides/ggstatsplot_presentation.html#1>

There is also a dedicated website for this package:<br>
<https://indrajeetpatil.github.io/ggstatsplot/>
Expand Down
9 changes: 5 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@
</div>
</div></div>
</div>
</section></section><section><section id="problems" class="title-slide slide level1 center"><h1>Problems</h1>
</section></section><section><section id="negatives" class="title-slide slide level1 center"><h1>Negatives</h1>

</section><section id="golem-of-prague-issue" class="slide level2 smaller"><h2>“Golem of Prague” issue</h2>
<div class="columns">
Expand Down Expand Up @@ -557,6 +557,7 @@ <h3 class="smaller" id="clunky-api">Clunky API</h3>
</div><div class="column" style="width:50%;">
<p>Healthy code base:</p>
<p><a href="https://indrajeetpatil.github.io/refactoring-ggstatsplot/refactoring-ggstatsplot#1"><img data-src="media/refactoring.png"></a></p>
<p><img data-src="media/ggstats-contributions.png"></p>
</div></div>
</section><section id="reception" class="slide level2 smaller"><h2>Reception</h2>
<div class="columns">
Expand All @@ -578,7 +579,7 @@ <h3 class="smaller" id="clunky-api">Clunky API</h3>
<span id="cb8-5"><a href=""></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output-display">
<div>
<figure><p><img data-src="index_files/figure-revealjs/unnamed-chunk-4-1.png" width="3000"></p>
<figure><p><img data-src="index_files/figure-revealjs/cran_downloads-1.png" width="3000"></p>
</figure>
</div>
</div>
Expand Down Expand Up @@ -608,7 +609,7 @@ <h3 class="smaller" id="clunky-api">Clunky API</h3>
</section><section id="exploring-data-made-easy" class="slide level2 smaller"><h2>Exploring data made easy! 😉</h2>
<p>In summary, the <code>ggstatsplot</code> approach- <br><br> (<em>a</em>) avoids errors in statistical reporting, <br><br> (<em>b</em>) highlights the importance of the effect by providing effect size measures by default, <br><br> (<em>c</em>) provides an easy way to evaluate <em>absence</em> of an effect using Bayesian framework, <br><br> (<em>d</em>) demands to evaluate statistical analysis in the context of the underlying data, <br><br> and is (<em>e</em>) easy and (<em>f</em>) simple enough that somebody with little coding experience can use it without making an error.</p>
</section></section><section id="for-more" class="title-slide slide level1 center"><h1>For more</h1>
<p>Source code for these slides can be found <a href="https://github.com/IndrajeetPatil/ggstatsplot_slides" target="_blank">on GitHub</a>.</p>
<p>Source code for these slides can be found <a href="https://github.com/IndrajeetPatil/intro-to-ggstatsplot" target="_blank">on GitHub</a>.</p>
<p>If you are interested in good programming and software development practices, check out my other <a href="https://sites.google.com/site/indrajeetspatilmorality/presentations" target="_blank">slide decks</a>.</p>
</section><section id="find-me-at" class="title-slide slide level1 center"><h1>Find me at…</h1>
<p><i class="fa-brands fa-twitter" aria-label="twitter"></i> <a href="http://twitter.com/patilindrajeets" target="_blank">Twitter</a></p>
Expand All @@ -633,7 +634,7 @@ <h3 class="smaller" id="clunky-api">Clunky API</h3>
collate en_US.UTF-8
ctype en_US.UTF-8
tz Europe/Berlin
date 2024-11-09
date 2024-11-10
pandoc 3.5 @ /usr/local/bin/ (via rmarkdown)
quarto 1.6.33 @ /usr/local/bin/quarto

Expand Down
Loading

0 comments on commit a543fd4

Please sign in to comment.