Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep ROpenSci submission #12

Merged
merged 27 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f8f66b1
MAINT: Add codemeta via codemetar
HaoZeke Aug 30, 2023
e1aaa5e
MAINT: Add a contributing.md file and coc
HaoZeke Aug 30, 2023
8ce748c
Add GitHub links to DESCRIPTION
HaoZeke Aug 30, 2023
bfd1805
MAINT,DOC: Switch to .rmd for readme, add GHA
HaoZeke Aug 30, 2023
c397741
MAINT: Minor updates to readme
HaoZeke Aug 30, 2023
ca44e09
MAINT: Ignore precommit config for R
HaoZeke Aug 30, 2023
3dc5739
GEN: Add back generated files to test
HaoZeke Aug 30, 2023
ac9ec41
MAINT: Cleanup build and gitignore
HaoZeke Aug 31, 2023
93bc3d7
MAINT: No GNU extensions in makevars
HaoZeke Aug 31, 2023
0bd885f
DOC: Update description, remove unused, add docs
HaoZeke Aug 31, 2023
666f81c
MAINT: Add an issue template, and update Readme
HaoZeke Aug 31, 2023
ea3fbd4
DOC: Conform to line-length
HaoZeke Aug 31, 2023
c1c947e
MAINT: Switch to returning bool for errors
HaoZeke Aug 31, 2023
c711928
TST: Add some
HaoZeke Aug 31, 2023
5b94d50
GEN: Add generated files
HaoZeke Aug 31, 2023
bb78ae5
MAINT: Add .covrignore
HaoZeke Aug 31, 2023
0f7ec83
DAT,MAINT: Fix whitespace for bundled library
HaoZeke Aug 31, 2023
ad8aee8
MAINT: Fix whitespace for included lib
HaoZeke Aug 31, 2023
4a244fb
TST: Don't use deprecated functions
HaoZeke Aug 31, 2023
15079c8
DOC: Update the readme
HaoZeke Aug 31, 2023
5d9e60f
TST: Pass lint
HaoZeke Aug 31, 2023
d985db3
CI: Use more stringent R-CMD check
HaoZeke Aug 31, 2023
afaea66
CI: Automate generation of files
HaoZeke Aug 31, 2023
61834e3
MAINT: Update ignore rules to fix notes
HaoZeke Aug 31, 2023
e144d6b
CI: Try ROpenSci pkgcheck on PRs
HaoZeke Aug 31, 2023
30f13a5
CI: Minor updates
HaoZeke Aug 31, 2023
b4e405d
MAINT: Disable R pre-commit checks
HaoZeke Aug 31, 2023
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
10 changes: 10 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
^renv$
^renv\.lock$
^LICENSE\.md$
^codemeta\.json$
^README\.Rmd$
^\.github$
^\.pre-commit-config.yaml$
^\.pixi$
^CODE_OF_CONDUCT\.md$
^CONTRIBUTING\.md$
^newsfragments$
^pixi\.*$
^\.covrignore$
4 changes: 4 additions & 0 deletions .covrignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
inst/include/fast_matrix_market/*
inst/include/fast_matrix_market/app/*
inst/include/fast_matrix_market/third_party/*
.pixi/*
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Bug report or feature request
about: Describe a bug you've seen or make a case for a new feature
---

Please briefly describe your problem and what output you expect. If you have a question, please don't use this form. Instead, ask on our discussions page <https://github.com/HaoZeke/fastMatMR/discussions/>.

Please include a minimal reproducible example (AKA a reprex). If you've never heard of a [reprex](http://reprex.tidyverse.org/) before, start by reading <https://www.tidyverse.org/help/#reprex>.

For more advice on how to write a great issue, see <https://code-review.tidyverse.org/issues/>.

Brief description of the problem

```r
# insert reprex here
```
53 changes: 53 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: main
pull_request:
branches: main

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
42 changes: 42 additions & 0 deletions .github/workflows/document.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths: ["R/**"]

name: Document

jobs:
document:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::roxygen2
needs: roxygen2

- name: Document
run: roxygen2::roxygenise()
shell: Rscript {0}

- name: Commit and push changes
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add man/\* NAMESPACE DESCRIPTION
git commit -m "BOT: Update documentation" || echo "No changes to commit"
git pull --ff-only
git push origin
5 changes: 2 additions & 3 deletions .github/workflows/pkgcheck.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name: pkgcheck

# This will cancel running jobs once a new run is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

on:
# Manually trigger the Action under Actions/pkgcheck
workflow_dispatch:
# Run on every push to main
push:
branches:
- main
# pull_request:
# branches: main

jobs:
pkgcheck:
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
issue_comment:
types: [created]

name: Commands

jobs:
document:
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}
name: document
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::roxygen2
needs: pr-document

- name: Document
run: roxygen2::roxygenise()
shell: Rscript {0}

- name: commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add man/\* NAMESPACE
git commit -m 'BOT: Document'

- uses: r-lib/actions/pr-push@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

style:
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/style') }}
name: style
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: r-lib/actions/setup-r@v2

- name: Install dependencies
run: install.packages("styler")
shell: Rscript {0}

- name: Style
run: styler::style_pkg()
shell: Rscript {0}

- name: commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add \*.R
git commit -m 'BOT: Style'

- uses: r-lib/actions/pr-push@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/render-rmarkdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths: ['**.Rmd']

name: render-rmarkdown

jobs:
render-rmarkdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-renv@v2

- name: Render Rmarkdown files and Commit Results
run: |
RMD_PATH=($(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '[.]Rmd$'))
Rscript -e 'for (f in commandArgs(TRUE)) if (file.exists(f)) rmarkdown::render(f)' ${RMD_PATH[*]}
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git commit ${RMD_PATH[*]/.Rmd/.md} -m 'Re-build Rmarkdown files' || echo "No changes to commit"
git push origin || echo "No changes to commit"
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Added
.pixi/
## Generated files
R/cpp11.R
src/cpp11.cpp
*.mtx
### Generated by gibo (https://github.com/simonwhitaker/gibo)
### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Global/macOS.gitignore

Expand Down
25 changes: 1 addition & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,11 @@ repos:
- id: trailing-whitespace
exclude: ^(.lintr/)|^(renv/)
- id: end-of-file-fixer
exclude: ^(inst/)|^(renv/)
exclude: ^(renv/)
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
hooks:
- id: clang-format
exclude: ^(inst)
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.2.0
hooks:
# any R project
# - id: codemeta-description-updated
- id: style-files
args: [--style_pkg=styler, --style_fun=tidyverse_style]
- id: lintr
args: [--warn_only]
verbose: True
- id: parsable-R
- id: no-browser-statement
- id: readme-rmd-rendered
- id: roxygenize
additional_dependencies:
- git2r
- pkgbuild
- brio
- decor
- vctrs
- tibble
- id: use-tidy-description
- id: deps-in-desc
Loading
Loading