Skip to content

Commit

Permalink
Rollback extract_at
Browse files Browse the repository at this point in the history
- `mirai` support is mentioned in the package documentation
- extract_at returns to the original implementation
  • Loading branch information
sigmafelix committed Nov 20, 2024
1 parent a5913ad commit 83c18e7
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 159 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/test-coverage-local.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# also derived from https://github.com/we-cli/coverage-badge-action
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
name: test-coverage-local

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage-local

jobs:
test-coverage:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -43,7 +40,6 @@ jobs:
covr::report(covpack, file = file.path('${{ github.workspace }}', 'chopin-coverage-report.html')); \
covd<-covr::coverage_to_list(covpack)$totalcoverage; \
write.table(covd[length(covd)], file = '${{ github.workspace }}/local_cov.Rout', row.names = F, col.names = F)"
shell: bash
- name: Upload covr report as artifact
uses: actions/upload-artifact@v4
Expand All @@ -70,23 +66,24 @@ jobs:
run: |
npm i -g badgen-cli
export COV=${{ steps.get-values.outputs.coverage }}
COLOR=$(node -p '+process.env.COV >= 95 ? `green` : `orange`')
COLOR=$(node -p '+process.env.COV >= 95 ? "green" : "orange"')
mkdir -p badges
badgen -j coverage -s $COV% -c $COLOR > ${{ github.workspace }}/badges/coverage.svg
badgen -j coverage -s $COV% -c $COLOR > badges/coverage.svg
- name: Checkout artifacts branch
uses: actions/checkout@v4
with:
ref: artifacts
persist-credentials: false
path: artifact-branch # Add a path to avoid conflicts with main checkout

- name: Commit and Push Badge to Artifacts Branch
run: |
cd artifact-branch
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
mkdir -p actions/workflows/test-coverage-local.yaml
mv badges/coverage.svg actions/workflows/test-coverage-local.yaml/coverage.svg
cp ../badges/coverage.svg actions/workflows/test-coverage-local.yaml/
git add actions/workflows/test-coverage-local.yaml/coverage.svg
git commit -m "Update coverage badge [skip ci]"
git commit -m "Update coverage badge [skip ci]" || echo "No changes to commit"
git push origin artifacts
if: success()
if: success()
1 change: 0 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# 0.9
- `mirai` based `par_*` functions for parallelization
- terra::extract mode in `extract_at()` with `terra` argument and auxiliary arguments including exact, weights, touches

# 0.8
- Bumped version from 0.7.8 to 0.8.0: improving package coverage
Expand Down
2 changes: 1 addition & 1 deletion R/chopin-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## usethis namespace: start
#' @importFrom lifecycle deprecated
#' @section Basic functionalities:
#' * Distribute `terra`, `sf`, and `chopin` functions to parallel workers set by `future`
#' * Distribute `terra`, `sf`, and `chopin` functions to parallel workers set by `future` or `mirai`
#' * Set parallelization strategies based on artificial grids, equal-size clusters, hierarchy, and multiple raster files
#' * Convenience functions for raster-vector overlay and weighted summary from vector dataset
#'
Expand Down
Loading

0 comments on commit 83c18e7

Please sign in to comment.