Skip to content

Commit 467fa6a

Browse files
committed
Pkg dev tools
1 parent 9ec1826 commit 467fa6a

6 files changed

Lines changed: 56 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ See more details on the state of the tree sequence ecosystem and aims for
1818

1919
## Status
2020

21+
<!-- badges: start -->
22+
[![R-CMD-check](https://github.com/HighlanderLab/tskitr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/HighlanderLab/tskitr/actions/workflows/R-CMD-check.yaml)
23+
24+
[![Codecov test coverage](https://codecov.io/gh/HighlanderLab/tskitr/graph/badge.svg)](https://app.codecov.io/gh/HighlanderLab/tskitr)
25+
<!-- badges: end -->
26+
2127
TODO: Add R package badges (build status, CRAN version, etc.) to README.md #1
2228
https://github.com/HighlanderLab/tskitr/issues/1
2329

tskitr/.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
^.*\.Rproj$
33
^\.Rproj\.user$
44
^[.]?air[.]toml$
5+
^[.]?jarl[.]toml$
56
^test\.trees$
67
^.*\.o$
78
^.*\.so$
89
^\.github$
10+
pkg_dev_notes.md
11+
^codecov\.yml$
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Workflow derived from https://github.com/posit-dev/setup-air/tree/main/examples
2+
3+
on:
4+
push:
5+
branches: [main, devel]
6+
pull_request:
7+
8+
name: jarl-check.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
jarl-check:
14+
name: jarl-check
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install
20+
uses: etiennebacher/setup-jarl@v0.1.0
21+
22+
- name: Check
23+
run: jarl check --fix

tskitr/codecov.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
comment: false
2+
3+
coverage:
4+
status:
5+
project:
6+
default:
7+
target: auto
8+
threshold: 1%
9+
informational: true
10+
patch:
11+
default:
12+
target: auto
13+
threshold: 1%
14+
informational: true

tskitr/jarl.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[lint]
2+
# Set the default assignment operator to report cases where "=" is used.
3+
assignment = "<-"
4+
# Use the default set of excluded files (mostly files that are automatically
5+
# generated by other tools).
6+
default-exclude = true

tskitr/src/tskitr_minimal.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Rcpp::IntegerVector tskit_version() {
3737
Rcpp::_["patch"] = TSK_VERSION_PATCH);
3838
}
3939

40+
// # nocov start
4041
// TODO: Decide what tskit functionality we want to expose as R functions #21
4142
// https://github.com/HighlanderLab/tskitr/issues/21
4243
int table_collection_num_nodes_zero_check() {
@@ -50,6 +51,7 @@ int table_collection_num_nodes_zero_check() {
5051
tsk_table_collection_free(&tables);
5152
return n;
5253
}
54+
// # nocov end
5355

5456
// Finaliser function to free tsk_treeseq_t when it is garbage collected
5557
//
@@ -282,6 +284,7 @@ Rcpp::String ts_time_units(SEXP ts) {
282284
return Rcpp::String(std::string(p, p + n));
283285
}
284286

287+
// # nocov start
285288
// This is how we would get metadata, but it will be raw bytes,
286289
// so would have to work with schema and codes ...
287290
// ts_file <- system.file("examples/test.trees", package = "tskitr")
@@ -294,6 +297,7 @@ Rcpp::String ts_metadata(SEXP ts) {
294297
tsk_size_t n = tsk_treeseq_get_metadata_length(xptr);
295298
return Rcpp::String(std::string(p, p + n));
296299
}
300+
// # nocov end
297301

298302
//' @name ts_metadata_length
299303
//' @title Get the length of metadata in a tree sequence and its tables

0 commit comments

Comments
 (0)