Skip to content

Commit c1e6c9d

Browse files
committed
build: update package hygeine and CI
Signed-off-by: Ali Sajid Imami <395482+AliSajid@users.noreply.github.com>
1 parent 0358d30 commit c1e6c9d

18 files changed

Lines changed: 834 additions & 468 deletions
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
on:
2+
push:
3+
branches:
4+
- devel
5+
- RELEASE*
6+
7+
name: Create Github Release
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
12+
jobs:
13+
create-release:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
outputs:
18+
tag_version: ${{ steps.create_release.outputs.tag_version }}
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
with:
23+
fetch-depth: 0
24+
- name: Create Release
25+
id: create_release
26+
env:
27+
GITHUB_TOKEN: ${{ github.token }}
28+
run: ./utilities/create-github-release.sh
29+
30+
create_release_artifacts:
31+
needs: [create-release]
32+
permissions:
33+
contents: write
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
r_version: ['release', 'devel']
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
42+
- name: Update system repositories
43+
run: sudo apt-get update
44+
- name: Install system dependencies
45+
run: |
46+
sudo apt-get install -y libxml2-dev \
47+
libssl-dev libcurl4-openssl-dev \
48+
libharfbuzz-dev libfribidi-dev \
49+
pandoc
50+
- name: Setup R
51+
uses: r-lib/actions/setup-r@bd49c52ffe281809afa6f0fecbf37483c5dd0b93 # v2.11.3
52+
with:
53+
r-version: ${{ matrix.r_version }}
54+
use-public-rspm: true
55+
id: r
56+
- name: Install dependencies
57+
uses: r-lib/actions/setup-renv@bd49c52ffe281809afa6f0fecbf37483c5dd0b93 # v2.11.3
58+
- name: Build Package
59+
run: R CMD build .
60+
- name: Rename Package
61+
run: echo "NEWNAME=$(./utilities/rename-package.R *.tar.gz)" >> "$GITHUB_ENV"
62+
- name: debug
63+
run: |
64+
echo "R version: ${{ steps.r.outputs.installed-r-version }}"
65+
echo "Current Tag: ${{ needs.create-release.outputs.tag_version }}"
66+
echo "Release File Name: ${{ env.NEWNAME }}"
67+
- name: Upload Release Artifact
68+
env:
69+
RELEASE_TAG: ${{ needs.create-release.outputs.tag_version }}
70+
GH_TOKEN: ${{ github.token }}
71+
run: gh release upload ${{ env.RELEASE_TAG }} ${{ env.NEWNAME }}

.github/workflows/draft-paper.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Draft PDF
2+
on:
3+
push:
4+
paths:
5+
- joss/
6+
- .github/workflows/draft-paper.yaml
7+
8+
jobs:
9+
paper:
10+
runs-on: ubuntu-latest
11+
name: Paper Draft
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
15+
- name: Build draft PDF
16+
uses: openjournals/openjournals-draft-action@master
17+
with:
18+
journal: joss
19+
# This should be the path to the paper within your repo.
20+
paper-path: joss/paper.md
21+
- name: Upload
22+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
23+
with:
24+
name: paper
25+
# This is the output path where Pandoc will write the compiled
26+
# PDF. Note, this should be the same directory as the input
27+
# paper.md
28+
path: joss/paper.pdf

.github/workflows/rworkflows.yml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
name: R Build Check with rworkflows
1+
name: Continuous Integration / R Workflows
22
on:
33
workflow_dispatch:
44
push:
5-
branches:
6-
- devel
7-
- issue*/*
8-
- feat/*
5+
branches-ignore:
6+
- master
7+
- main
98
- RELEASE_**
9+
- graphite-**
1010
pull_request:
1111
branches:
12+
- master
13+
- main
1214
- devel
1315
- RELEASE_**
14-
- issue*/*
15-
- feat/*
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
1621
jobs:
1722
rworkflows:
18-
permissions:
19-
contents: write
2023
runs-on: ${{ matrix.config.os }}
2124
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
2225
container: ${{ matrix.config.cont }}
@@ -28,28 +31,26 @@ jobs:
2831
bioc: devel
2932
r: auto
3033
cont: bioconductor/bioconductor_docker:devel
31-
rspm: https://packagemanager.rstudio.com/cran/__linux__/latest/release
34+
rspm: https://packagemanager.rstudio.com/cran/__linux__/focal/release
3235
- os: macOS-latest
33-
bioc: release
36+
bioc: devel
3437
r: auto
3538
- os: windows-latest
36-
bioc: release
39+
bioc: devel
3740
r: auto
3841
steps:
39-
- run: apt-get update && apt-get install -y rsync qpdf
40-
if: runner.os == 'Linux'
4142
- uses: neurogenomics/rworkflows@master
4243
with:
43-
run_bioccheck: ${{ false }}
44-
run_rcmdcheck: ${{ false }}
44+
run_bioccheck: ${{ true }}
45+
run_rcmdcheck: ${{ true }}
4546
as_cran: ${{ true }}
46-
run_vignettes: ${{ false }}
47-
has_testthat: ${{ false }}
47+
run_vignettes: ${{ true }}
48+
has_testthat: ${{ true }}
4849
run_covr: ${{ false }}
4950
run_pkgdown: ${{ false }}
5051
has_runit: ${{ false }}
5152
has_latex: ${{ false }}
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5354
run_docker: ${{ false }}
5455
runner_os: ${{ runner.os }}
5556
cache_version: cache-v1
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master, devel]
6+
pull_request:
7+
branches: [main, master, devel]
8+
9+
name: test-coverage
10+
11+
jobs:
12+
test-coverage:
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
17+
steps:
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
19+
20+
- uses: r-lib/actions/setup-r@bd49c52ffe281809afa6f0fecbf37483c5dd0b93 # v2
21+
with:
22+
use-public-rspm: true
23+
24+
- uses: r-lib/actions/setup-r-dependencies@bd49c52ffe281809afa6f0fecbf37483c5dd0b93 # v2
25+
with:
26+
extra-packages: any::covr
27+
needs: coverage
28+
29+
- name: Test coverage
30+
run: |
31+
covr::codecov(
32+
quiet = FALSE,
33+
clean = FALSE,
34+
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
35+
)
36+
shell: Rscript {0}
37+
38+
- name: Show testthat output
39+
if: always()
40+
run: |
41+
## --------------------------------------------------------------------
42+
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
43+
shell: bash
44+
45+
- name: Upload test results
46+
if: always()
47+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
48+
with:
49+
name: coverage-test-failures
50+
path: ${{ runner.temp }}/package

.gitignore

Lines changed: 40 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Created by https://www.toptal.com/developers/gitignore/api/macos,r,archive,archives,compressed,compression,compressedarchive,windows,linux,visualstudiocode
2-
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,r,archive,archives,compressed,compression,compressedarchive,windows,linux,visualstudiocode
1+
# Created by https://www.toptal.com/developers/gitignore/api/r,macos,archive,archives,compressedarchive,linux,git
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=r,macos,archive,archives,compressedarchive,linux,git
33

44
### Archive ###
55

@@ -65,12 +65,6 @@
6565
*.egg
6666
*.txz
6767

68-
### Compressed ###
69-
*.pkg
70-
*.sit
71-
*.sitx
72-
*.zipx
73-
7468
### CompressedArchive ###
7569

7670

@@ -157,7 +151,9 @@
157151
# An archive format designed for the Apple II series of computers. The canonical implementation is ShrinkIt, which can operate on disk images as well as files. Preferred compression algorithm is a combination of RLE and 12-bit LZW. Archives can be manipulated with the command-line NuLib tool, or the Windows-based CiderPress.
158152
*.shk
159153
# A compression format common on Apple Macintosh computers. The free StuffIt Expander is available for Windows and OS X.
154+
*.sit
160155
# The replacement for the .sit format that supports more compression methods, UNIX file permissions, long file names, very large files, more encryption options, data specific compressors (JPEG, Zip, PDF, 24-bit image, MP3). The free StuffIt Expander is available for Windows and OS X.
156+
*.sitx
161157
# A royalty-free compressing format
162158
*.sqx
163159
# The "tarball" format combines tar archives with a file-based compression scheme (usually gzip). Commonly used for source and binary distribution on Unix-like platforms, widely available elsewhere.
@@ -188,6 +184,7 @@
188184
# Yamazaki zipper archive. Compression format used in DeepFreezer archiver utility created by Yamazaki Satoshi. Read and write support exists in TUGZip, IZArc and ZipZag
189185
*.yz1
190186
# The most widely used compression format on Microsoft Windows. Commonly used on Macintosh and Unix systems as well.
187+
*.zipx
191188
# application/x-zoo zoo Multiple Multiple Yes
192189
*.zoo
193190
# Journaling (append-only) archive format with rollback capability. Supports deduplication and incremental update based on last-modified dates. Multi-threaded. Compresses in LZ77, BWT, and context mixing formats. Open source.
@@ -196,40 +193,20 @@
196193
*.zz
197194

198195

199-
### Compression ###
200-
201-
### From https://en.wikipedia.org/wiki/List_of_archive_formats
202-
203-
## Compression only
204-
# An open source, patent- and royalty-free compression format. The compression algorithm is a Burrows-Wheeler transform followed by a move-to-front transform and finally Huffman coding
205-
# Old compressor for QNX4 OS. The compression algorithm is a modified LZSS, with an adaptive Huffman coding.
206-
*.F
207-
# GNU Zip, the primary compression format used by Unix-like systems. The compression algorithm is DEFLATE.
208-
# An alternate LZMA algorithm implementation, with support for checksums and ident bytes.
209-
*.lz
210-
# The LZMA compression algorithm as used by 7-Zip
211-
# An implementation of the LZO data compression algorithm
212-
*.lzo
213-
# A compression program designed to do particularly well on very large files containing long distance redundancy.
214-
*.rz
215-
# Windows compress/decompress- Linux and Mac OS X decompress only A compression program designed to do high compression on SF2 files (SoundFont)
216-
*.sfark
217-
# A compression format invented by Google and open-sourced in 2011. Snappy aims for very high speeds, reasonable compression, and maximum stability rather than maximum compression or compatibility with any other compression library.
218-
*.sz
219-
# Squeeze: A program which compressed files. A file which was "squeezed" had the middle initial of the name changed to "Q", so that a squeezed text file would end with .TQT, a squeezed executable would end with .CQM or .EQE. Typically used with .LBR archives, either by storing the squeezed files in the archive, or by storing the files decompressed and then compressing the archive, which would have a name ending in ".LQR".
220-
*.?Q?
221-
# A compression program written by Steven Greenberg implementing the LZW algorithm. For several years in the CP/M world when no implementation was available of ARC, CRUNCHed files stored in .LBR archives were very popular. CRUNCH's implementation of LZW had a somewhat unique feature of modifying and occasionally clearing the code table in memory when it became full, resulting in a few percent better compression on many files.
222-
*.?Z?
223-
# A compression format using LZMA2 to yield very high compression ratios.
224-
# The traditional Huffman coding compression format.
225-
*.z
226-
# The traditional LZW compression format.
227-
*.Z
228-
# Joke compression program, actually increasing file size
229-
*.infl
230-
# Compression format(s) used by some DOS and Windows install programs. MS-DOS includes expand.exe to decompress its install files. The compressed files are created with a matching compress.exe command. The compression algorithm is LZSS.
231-
*.??_
196+
### Git ###
197+
# Created by git for backups. To disable backups in Git:
198+
# $ git config --global mergetool.keepBackup false
199+
*.orig
232200

201+
# Created by git when using merge tools for conflicts
202+
*.BACKUP.*
203+
*.BASE.*
204+
*.LOCAL.*
205+
*.REMOTE.*
206+
*_BACKUP_*.txt
207+
*_BASE_*.txt
208+
*_LOCAL_*.txt
209+
*_REMOTE_*.txt
233210

234211
### Linux ###
235212
*~
@@ -302,6 +279,7 @@ Temporary Items
302279

303280
# RStudio files
304281
.Rproj.user/
282+
*.Rproj
305283

306284
# produced vignettes
307285
vignettes/*.html
@@ -334,45 +312,34 @@ rsconnect/
334312
# R package: bookdown caching files
335313
/*_files/
336314

337-
### VisualStudioCode ###
338-
.vscode/*
339-
!.vscode/settings.json
340-
!.vscode/tasks.json
341-
!.vscode/launch.json
342-
!.vscode/extensions.json
343-
!.vscode/*.code-snippets
315+
# R package docs
316+
inst/doc
317+
318+
# Personal R profile
319+
.Rprofile
320+
321+
# Random HTML files
322+
*.html
344323

345-
# Local History for Visual Studio Code
346-
.history/
324+
# End of https://www.toptal.com/developers/gitignore/api/r,macos,archive,archives,compressedarchive,linux,git
347325

348-
# Built Visual Studio Code Extensions
349-
*.vsix
326+
# Additional ignores
350327

351-
### VisualStudioCode Patch ###
352-
# Ignore all local history of files
353-
.history
354-
.ionide
328+
/doc/
329+
/Meta/
330+
**/*.log
331+
test.tsv
355332

356-
### Windows ###
357-
# Windows thumbnail cache files
358-
Thumbs.db
359-
Thumbs.db:encryptable
360-
ehthumbs.db
361-
ehthumbs_vista.db
333+
# Ignore overrides
362334

363-
# Dump file
364-
*.stackdump
335+
!inst/extdata/*
365336

366-
# Folder config file
367-
[Dd]esktop.ini
337+
*.bak
338+
*.pdf
339+
*.jats
368340

369-
# Recycle Bin used on file shares
370-
$RECYCLE.BIN/
371341

372-
# Windows Installer files
373-
*.msix
342+
.vscode/
374343

375-
# Windows shortcuts
376-
*.lnk
377344

378-
# End of https://www.toptal.com/developers/gitignore/api/macos,r,archive,archives,compressed,compression,compressedarchive,windows,linux,visualstudiocode
345+
tests/*.json

0 commit comments

Comments
 (0)