Skip to content

Commit

Permalink
Merge pull request #34 from alephnull7/master
Browse files Browse the repository at this point in the history
Use `windowSize` to determine `sizeThreshold`
  • Loading branch information
michaelgruenstaeudl authored Feb 28, 2024
2 parents 7e1e66c + 80a5382 commit 76825df
Show file tree
Hide file tree
Showing 18 changed files with 170 additions and 189 deletions.
67 changes: 0 additions & 67 deletions .github/workflows/R-CMD-check.yaml

This file was deleted.

30 changes: 12 additions & 18 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,32 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths: ["CHANGELOG.md"]
branches:
- master
- main
paths:
- 'CHANGELOG.md'

name: create-release

jobs:
release-documentation:
create-release:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CHANGELOG: "CHANGELOG.md"
DESCRIPTION: "DESCRIPTION"
outputs:
version: ${{ steps.extract-version.outputs.version }}
steps:
- uses: actions/checkout@v3
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Extract release version from first level 4 heading
id: extract-version
run: |
version=$(grep -oP '####[^0-9]*\K\d+\.\d+\.\d+' -m 1 $CHANGELOG)
echo "version=$version" >> $GITHUB_ENV
echo "version=$version" >> $GITHUB_OUTPUT
echo "Version: $version"
- name: Get current UTC timestamp
Expand Down Expand Up @@ -62,19 +66,10 @@ jobs:
git add ./R/*.R
git add DESCRIPTION
git add CHANGELOG.md
git commit -m "Updated documentation for release" || echo "No changes to commit"
git commit -m "Update documentation for version" || echo "No changes to commit"
git pull --ff-only
git push origin
release-build:
runs-on: ubuntu-latest
needs: release-documentation
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CHANGELOG: "CHANGELOG.md"
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-tinytex@v2
- run: |
tlmgr --version
Expand Down Expand Up @@ -117,8 +112,7 @@ jobs:
- name: Make release properties
id: release-fields
run: |
version="${{ needs.release-documentation.outputs.version }}"
echo "version=$version" >> $GITHUB_ENV
version="${{ env.version }}"
echo "Version: $version"
tag="v${version}"
echo "tag=$tag" >> $GITHUB_ENV
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/document.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/dos2unix.yaml

This file was deleted.

131 changes: 131 additions & 0 deletions .github/workflows/prepare-pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# 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:
pull_request:
types:
- opened
- reopened
- ready_for_review

name: prepare-pull-request

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-tinytex@v2
- run: |
tlmgr --version
tlmgr update --self
- name: Install additional LaTeX packages
run: |
tlmgr install preprint
tlmgr install listings
tlmgr install tcolorbox
tlmgr install pgf
tlmgr install environ
tlmgr install tikzfill
tlmgr install pdfcol
tlmgr install grfext
tlmgr list --only-installed
- 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:
build_args: 'c("--compact-vignettes=gs+qpdf")'

document:
runs-on: ubuntu-latest
needs: R-CMD-check
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 "Update documentation" || echo "No changes to commit"
git pull --ff-only
git push origin
line-break-fix:
runs-on: ubuntu-latest
needs: document
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up dos2unix
run: sudo apt-get install dos2unix

- name: Run dos2unix
run: |
find ./R -type f -name "*.R" -exec dos2unix {} \;
find ./tests/testthat -type f -name "*.R" -exec dos2unix {} \;
- 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 ./R/*.R
git add ./tests/testthat/*.R
git commit -m "Conversion of R files from CRLF to LF" || echo "No changes to commit"
git pull --ff-only
git push origin
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CHANGELOG
---------
#### Version 1.0.8 (2024.02.23)
#### Version 1.0.8 (2024.02.25)
* Handling of GenBank features with multiple qualifiers of the same name
* Coverage summaries added to `verbose` output files
* Parameters `syntenyLineType` and `regionsCheck` for `PACVr.complete()` have been combined into `IRCheck`
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: PACVr
Version: 1.0.8
Date: 2024-02-23
Date: 2024-02-25
Title: Plastome Assembly Coverage Visualization
Authors@R: c(person("Gregory", "Smith", role=c("ctb")),
person("Nils", "Jenke", role=c("ctb")),
Expand Down
2 changes: 1 addition & 1 deletion R/IRoperations.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env RScript
#contributors=c("Gregory Smith", "Nils Jenke", "Michael Gruenstaeudl")
#email="m_gruenstaeudl@fhsu.edu"
#version="2024.02.23.0220"
#version="2024.02.25.0307"

checkIREquality <- function(gbkSeq, regions, dir, sample_name) {
if ("IRb" %in% regions[, 4] && "IRa" %in% regions[, 4]) {
Expand Down
2 changes: 1 addition & 1 deletion R/PACVr.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env RScript
#contributors=c("Gregory Smith", "Nils Jenke", "Michael Gruenstaeudl")
#email="m_gruenstaeudl@fhsu.edu"
#version="2024.02.23.0220"
#version="2024.02.25.0307"

PACVr.read.gb <- function(gbkFile) {
gbkRaw <- getGbkRaw(gbkFile)
Expand Down
2 changes: 1 addition & 1 deletion R/customizedRCircos.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env RScript
#contributors=c("Gregory Smith", "Nils Jenke", "Michael Gruenstaeudl")
#email="m_gruenstaeudl@fhsu.edu"
#version="2024.02.23.0220"
#version="2024.02.25.0307"


# The following R functions were taken from the R package RCircos and then modified.
Expand Down
Loading

0 comments on commit 76825df

Please sign in to comment.