Skip to content

Commit efe68e0

Browse files
committed
Major changes including website and tests
1 parent 07f800d commit efe68e0

File tree

100 files changed

+2653
-1808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+2653
-1808
lines changed

.Rbuildignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
^LICENSE\.md$
44
^data-raw$
55
^README\.Rmd$
6+
^_pkgdown\.yml$
7+
^docs$
8+
^pkgdown$
9+
^\.github$

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/Linux.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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]
6+
pull_request:
7+
8+
name: R-CMD-check.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
R-CMD-check:
14+
runs-on: ${{ matrix.config.os }}
15+
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
23+
- {os: ubuntu-latest, r: 'release'}
24+
- {os: ubuntu-latest, r: 'oldrel-1'}
25+
26+
env:
27+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
28+
R_KEEP_PKG_SOURCE: yes
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- uses: r-lib/actions/setup-pandoc@v2
34+
35+
- uses: r-lib/actions/setup-r@v2
36+
with:
37+
r-version: ${{ matrix.config.r }}
38+
http-user-agent: ${{ matrix.config.http-user-agent }}
39+
use-public-rspm: true
40+
41+
- uses: r-lib/actions/setup-r-dependencies@v2
42+
with:
43+
extra-packages: any::rcmdcheck
44+
needs: check
45+
46+
- uses: r-lib/actions/check-r-package@v2
47+
with:
48+
upload-snapshots: true
49+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/MacOS.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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]
6+
pull_request:
7+
8+
name: R-CMD-check.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
R-CMD-check:
14+
runs-on: ${{ matrix.config.os }}
15+
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- {os: macos-latest, r: 'release'}
23+
24+
env:
25+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
26+
R_KEEP_PKG_SOURCE: yes
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: r-lib/actions/setup-pandoc@v2
32+
33+
- uses: r-lib/actions/setup-r@v2
34+
with:
35+
r-version: ${{ matrix.config.r }}
36+
http-user-agent: ${{ matrix.config.http-user-agent }}
37+
use-public-rspm: true
38+
39+
- uses: r-lib/actions/setup-r-dependencies@v2
40+
with:
41+
extra-packages: any::rcmdcheck
42+
needs: check
43+
44+
- uses: r-lib/actions/check-r-package@v2
45+
with:
46+
upload-snapshots: true
47+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/Windows.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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]
6+
pull_request:
7+
8+
name: R-CMD-check.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
R-CMD-check:
14+
runs-on: ${{ matrix.config.os }}
15+
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- {os: windows-latest, r: 'release'}
23+
24+
env:
25+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
26+
R_KEEP_PKG_SOURCE: yes
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: r-lib/actions/setup-pandoc@v2
32+
33+
- uses: r-lib/actions/setup-r@v2
34+
with:
35+
r-version: ${{ matrix.config.r }}
36+
http-user-agent: ${{ matrix.config.http-user-agent }}
37+
use-public-rspm: true
38+
39+
- uses: r-lib/actions/setup-r-dependencies@v2
40+
with:
41+
extra-packages: any::rcmdcheck
42+
needs: check
43+
44+
- uses: r-lib/actions/check-r-package@v2
45+
with:
46+
upload-snapshots: true
47+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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]
6+
pull_request:
7+
8+
name: test-coverage.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
test-coverage:
14+
runs-on: ubuntu-latest
15+
env:
16+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: r-lib/actions/setup-r@v2
22+
with:
23+
use-public-rspm: true
24+
25+
- uses: r-lib/actions/setup-r-dependencies@v2
26+
with:
27+
extra-packages: any::covr, any::xml2
28+
needs: coverage
29+
30+
- name: Test coverage
31+
run: |
32+
cov <- covr::package_coverage(
33+
quiet = FALSE,
34+
clean = FALSE,
35+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
36+
)
37+
print(cov)
38+
covr::to_cobertura(cov)
39+
shell: Rscript {0}
40+
41+
- uses: codecov/codecov-action@v5
42+
with:
43+
# Fail if error if not on PR, or if on PR and token is given
44+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
45+
files: ./cobertura.xml
46+
plugins: noop
47+
disable_search: true
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
50+
- name: Show testthat output
51+
if: always()
52+
run: |
53+
## --------------------------------------------------------------------
54+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
55+
shell: bash
56+
57+
- name: Upload test results
58+
if: failure()
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: coverage-test-failures
62+
path: ${{ runner.temp }}/package

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ RawOutput/*
77
Ancillary/*
88

99
inst/doc
10+
docs

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ Roxygen: list(markdown = TRUE)
3939
RoxygenNote: 7.3.2
4040
Suggests:
4141
knitr,
42-
rmarkdown
42+
rmarkdown,
43+
testthat (>= 3.0.0)
4344
VignetteBuilder: knitr
4445
Imports:
4546
assertthat,
4647
dplyr,
4748
ggplot2,
4849
patchwork,
4950
progress,
50-
purrr,
5151
readr,
5252
rlang,
5353
tibble,
@@ -56,3 +56,4 @@ Imports:
5656
Depends:
5757
R (>= 3.5)
5858
LazyData: true
59+
Config/testthat/edition: 3

NAMESPACE

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,29 @@
11
# Generated by roxygen2: do not edit by hand
22

33
export("%>%")
4+
export(averageTimeSeries)
5+
export(calculatePhytoParam)
6+
export(createEnviroData)
7+
export(createInputParams)
8+
export(extractPPMR)
9+
export(extractSizeRange)
10+
export(extractTrophicLevels)
11+
export(getBiomass)
12+
export(getGroups)
13+
export(plotEnvironment)
14+
export(plotPPMR)
15+
export(plotSizeSpectra)
16+
export(plotTimeSeries)
17+
export(reduceAll)
18+
export(reduceSize)
19+
export(reduceSpecies)
420
export(untibble)
5-
export(zAveOutput)
6-
export(zBiomass)
7-
export(zCalculatePhytoParam)
8-
export(zCarbonBiomass)
9-
export(zConvert2Tibble)
10-
export(zCreateInputs)
11-
export(zCreateSimpleTimeSeries)
12-
export(zExtractAllSum)
13-
export(zExtractBiomassSize)
14-
export(zExtractBiomassSpecies)
15-
export(zExtractSizeRange)
16-
export(zExtractSizeSum)
17-
export(zExtractSpeciesSum)
18-
export(zExtractTrophicLevels)
19-
export(zExtract_PPMR)
20-
export(zGetGroups)
21-
export(zMakeDietTibble)
22-
export(zPlotEnvironment)
23-
export(zPlot_AbundTimeSeries)
24-
export(zPlot_BiomassTimeSeries)
25-
export(zPlot_GrowthTimeSeries)
26-
export(zPlot_PPMR)
27-
export(zPlot_PredTimeSeries)
28-
export(zPlot_SizeSpectra)
29-
export(zSpeciesCarbonBiomass)
30-
export(zValidateGroups)
21+
export(validateGroups)
3122
export(zoomss_model)
3223
export(zoomss_mvf)
3324
export(zoomss_params)
3425
export(zoomss_run)
3526
export(zoomss_setup)
3627
importFrom(magrittr,"%>%")
28+
importFrom(rlang,":=")
3729
importFrom(rlang,.data)

0 commit comments

Comments
 (0)