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

rm cstdlib include statements from heap.cpp files to fix #260 #261

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 8 additions & 5 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# 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
branches: [main, master]
pull_request:
branches: main

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -20,10 +23,9 @@ jobs:
- {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'}
- {os: ubuntu-latest, r: 'oldrel-1'}

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

Expand All @@ -46,3 +48,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
11 changes: 7 additions & 4 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# 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
branches: [main, master]
pull_request:
branches: main
release:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
Expand Down Expand Up @@ -39,7 +42,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
35 changes: 21 additions & 14 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# 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
branches: [main, master]
pull_request:
branches:
- main

name: test-coverage
name: test-coverage.yaml

jobs:
permissions: read-all

jobs:
test-coverage:

runs-on: ubuntu-latest

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
Expand All @@ -27,29 +24,39 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package"),
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package"),
line_exclusions = list('src/heaps/bheap.cpp','src/heaps/bheap.h','src/heaps/fheap.h','src/heaps/fheap.cpp','src/heaps/heap23.h','src/heaps/heap23.cpp','src/heaps/heap23_2.h','src/heaps/heap.h','src/heaps/heap_lib.h','src/heaps/triheap.h','src/heaps/triheap.cpp','src/heaps/triheap_ext.h','src/heaps/triheap_ext.cpp','src/dgraph.cpp')
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dodgr
Title: Distances on Directed Graphs
Version: 0.4.1.040
Version: 0.4.1.042
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre")),
person("Andreas", "Petutschnig", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"codeRepository": "https://github.com/UrbanAnalyst/dodgr",
"issueTracker": "https://github.com/UrbanAnalyst/dodgr/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.4.1.040",
"version": "0.4.1.042",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
1 change: 0 additions & 1 deletion src/heaps/bheap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* ----------------------------------------------------------------------------
* Mark Padgham, adapted from code by Shane Saunders
*/
#include <cstdlib>
#include "bheap.h"

/* This implementation stores the binary heap in a 1 dimensional array. */
Expand Down
1 change: 0 additions & 1 deletion src/heaps/fheap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* ----------------------------------------------------------------------------
* Mark Padgham, adapted from code by Shane Saunders
*/
#include <cstdlib>
#include <cmath>
#if defined(FHEAP_DUMP) && FHEAP_DUMP > 0
#include <cstdio>
Expand Down
1 change: 0 additions & 1 deletion src/heaps/heap23.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* nodes. In this implementation, the child pointer points to the highest
* dimension child node.
*/
#include <cstdlib>
#include <cmath>
#include <cstdio>
#if defined(TTHEAP_DUMP) && TTHEAP_DUMP > 0
Expand Down
1 change: 0 additions & 1 deletion src/heaps/triheap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/

#include "triheap.h"
#include <cstdlib>
#include <cmath>
#if SHOW_trih
#include <cstdio>
Expand Down
1 change: 0 additions & 1 deletion src/heaps/triheap_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/

#include "triheap_ext.h"
#include <cstdlib>
#include <cmath>
//#if SHOW_trih_ext
#include <cstdio>
Expand Down
Loading