Skip to content

Commit 063ae22

Browse files
Merge branch 'main' into species_max_length
2 parents b15e4e7 + 08f4449 commit 063ae22

41 files changed

Lines changed: 1598 additions & 1142 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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@v6
20+
21+
- uses: r-lib/actions/setup-r@v2
22+
23+
- uses: r-lib/actions/setup-r-dependencies@v2
24+
with:
25+
extra-packages: any::covr, any::xml2
26+
needs: coverage
27+
28+
- name: Prepare optional ASPE data
29+
run: |
30+
R CMD INSTALL .
31+
Rscript -e "options(timeout = 3600); fishdatabuilder::download_optional_data(); fishdatabuilder::extract_optional_data()"
32+
shell: bash
33+
34+
- name: Test coverage
35+
run: |
36+
cov <- covr::package_coverage(
37+
quiet = FALSE,
38+
clean = FALSE,
39+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
40+
)
41+
print(cov)
42+
covr::to_cobertura(cov)
43+
shell: Rscript {0}
44+
45+
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
46+
with:
47+
# Fail if error if not on PR, or if on PR and token is given
48+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
49+
files: ./cobertura.xml
50+
plugins: noop
51+
disable_search: true
52+
token: ${{ secrets.CODECOV_TOKEN }}
53+
54+
- name: Show testthat output
55+
if: always()
56+
run: |
57+
## --------------------------------------------------------------------
58+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
59+
shell: bash
60+
61+
- name: Upload test results
62+
if: failure()
63+
uses: actions/upload-artifact@v7
64+
with:
65+
name: coverage-test-failures
66+
path: ${{ runner.temp }}/package

DESCRIPTION

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
11
Package: fishdatabuilder
2-
Title: What the Package Does (One Line, Title Case)
2+
Title: Tools to Make Analysis of Fish Monitoring Data Easier
33
Version: 0.0.0.9000
4-
Authors@R:
5-
person("First", "Last", , "first.last@example.com", role = c("aut", "cre"),
6-
comment = c(ORCID = "YOUR-ORCID-ID"))
7-
Description: What the package does (one paragraph).
4+
Authors@R: c(
5+
person("Alain", "Danet", , "alain.danet@inrae.fr", role = c("aut", "cre"),
6+
comment = c(ORCID = "0000-0002-1592-9483")),
7+
person("Camille", "Leclerc", role = "aut",
8+
comment = c(ORCID = "0000-0001-5830-1787")),
9+
person("Willem", "Bonnaffé", role = "aut",
10+
comment = c(ORCID = "0000-0002-5053-8891"))
11+
)
12+
Description: Collection of tools to clean, filter, rearrange, and augment fish monitoring data.
813
License: GPL (>= 3)
9-
Suggests:
14+
Suggests:
1015
covr,
1116
knitr,
12-
mockery,
1317
quarto,
14-
testthat (>= 3.0.0),
15-
truncdist
18+
testthat (>= 3.0.0)
1619
Config/testthat/edition: 3
1720
Encoding: UTF-8
1821
LazyData: true
1922
Roxygen: list(markdown = TRUE)
20-
RoxygenNote: 7.3.2
2123
Imports:
22-
pkgfilecache
24+
dplyr,
25+
lubridate,
26+
pkgfilecache,
27+
purrr,
28+
rfishbase,
29+
rlang,
30+
sf,
31+
stringr,
32+
tibble,
33+
tidyr,
34+
truncdist
2335
VignetteBuilder: quarto
36+
Config/roxygen2/version: 8.0.0

NAMESPACE

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Generated by roxygen2: do not edit by hand
22

33
export(check_aspe_fish_species)
4-
export(check_batch)
54
export(clean_description_operation_aspe)
65
export(clean_fish_batch)
76
export(clean_individual_measurement_aspe)
@@ -14,16 +13,16 @@ export(cleaning_ref_length_type_aspe)
1413
export(cleaning_species_ref_aspe)
1514
export(coefficients_fork2total)
1615
export(convert_fork_to_total)
16+
export(convert_length_to_weight)
1717
export(delete_all_optional_data)
1818
export(download_optional_data)
1919
export(extract_optional_data)
2020
export(filter_operation_batch_measure)
2121
export(filter_operation_id)
22-
export(gen_fish_from_batch)
2322
export(generate_individual_sizes)
24-
export(get_check_batch)
2523
export(get_description_operation_aspe)
2624
export(get_elementary_sampling_aspe)
25+
export(get_environmental_data_operation_aspe)
2726
export(get_fish_batch_aspe)
2827
export(get_individual_measurement_aspe)
2928
export(get_objective_operation_aspe)
@@ -53,7 +52,10 @@ export(species_latin_name_to_replace)
5352
export(vec_op_objective_to_exclude)
5453
importFrom(dplyr,all_of)
5554
importFrom(dplyr,anti_join)
55+
importFrom(dplyr,arrange)
5656
importFrom(dplyr,bind_rows)
57+
importFrom(dplyr,case_when)
58+
importFrom(dplyr,coalesce)
5759
importFrom(dplyr,distinct)
5860
importFrom(dplyr,everything)
5961
importFrom(dplyr,filter)
@@ -66,20 +68,27 @@ importFrom(dplyr,recode)
6668
importFrom(dplyr,relocate)
6769
importFrom(dplyr,rename)
6870
importFrom(dplyr,rename_with)
71+
importFrom(dplyr,right_join)
6972
importFrom(dplyr,select)
7073
importFrom(dplyr,summarise)
7174
importFrom(dplyr,ungroup)
7275
importFrom(lubridate,date)
7376
importFrom(lubridate,ymd_hms)
7477
importFrom(purrr,map2)
78+
importFrom(rfishbase,length_weight)
79+
importFrom(rfishbase,popchar)
7580
importFrom(rfishbase,validate_names)
7681
importFrom(rlang,.data)
7782
importFrom(sf,st_as_sf)
7883
importFrom(sf,st_coordinates)
7984
importFrom(sf,st_transform)
8085
importFrom(stats,sd)
86+
importFrom(stats,setNames)
8187
importFrom(stringr,str_replace_all)
88+
importFrom(tibble,as_tibble)
89+
importFrom(tibble,tibble)
8290
importFrom(tidyr,nest)
8391
importFrom(tidyr,unnest)
8492
importFrom(truncdist,rtrunc)
8593
importFrom(utils,read.csv2)
94+
importFrom(utils,unzip)

0 commit comments

Comments
 (0)