Skip to content

Commit

Permalink
update news.md and DESCRIPTION
Browse files Browse the repository at this point in the history
  • Loading branch information
zoushucai committed Aug 10, 2022
1 parent 4cb5ce5 commit 9fca48b
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 7 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ metadata
^LICENSE\.md$
^cran-comments\.md$
^README\.Rmd$
^codecov\.yml$
31 changes: 31 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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, master]
pull_request:
branches: [main, master]

name: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

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

- name: Test coverage
run: covr::codecov(quiet = FALSE)
shell: Rscript {0}
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ URL: https://github.com/zoushucai/journalabbr
BugReports: https://github.com/zoushucai/journalabbr/issues
Encoding: UTF-8
Depends:
R (>= 4.2.0)
R (>= 4.0.0)
Imports:
data.table,
stringr,
Expand All @@ -23,10 +23,12 @@ Suggests:
testthat (>= 3.0.0),
rclipboard,
tinytex,
roxytest,
DT,
rmarkdown (>= 2.7),
knitr (>= 1.33)
knitr (>= 1.33),
covr
Roxygen: list(markdown = TRUE, roclets = c("namespace", "rd", "roxytest::testthat_roclet"))
RoxygenNote: 7.2.1
Roxygen: list(roclets = c("namespace", "rd", "roxytest::testthat_roclet"))
Date: 2022-08-09
Config/testthat/edition: 3
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The underlying data has been reconstructed. Now, the `data.table` format is adopted.

- Use `use_this` and `lintr` package to build the R package
- Use `usethis` and `lintr` package to build the R package
- Add `NEWS.md`, `cran-comments.md`
- Add shiny: `journalabbr::run_example()`
- Two main functions: `abbr_bib()` and `abbr_bib_only_journal()`, the other functions are auxiliary functions.
Expand Down
15 changes: 15 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,24 @@ knitr::opts_chunk$set(
)
```

```{r echo=FALSE, results="hide", message=FALSE}
library("badger")
```

# journalabbr

<!-- badges: start -->
```{r, echo = FALSE, results='asis'}
cat(
badge_cran_checks("journalabbr"),
badge_cran_download("journalabbr", "grand-total", "green"),
badge_license(),
badge_github_actions()
)
```
[![Codecov test coverage](https://codecov.io/gh/zoushucai/journalabbr/branch/master/graph/badge.svg)](https://app.codecov.io/gh/zoushucai/journalabbr?branch=master)
[![CRAN status](https://www.r-pkg.org/badges/version/journalabbr)](https://CRAN.R-project.org/package=journalabbr)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
<!-- badges: end -->

## Function
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
# journalabbr

<!-- badges: start -->

[![CRAN
checks](https://cranchecks.info/badges/summary/journalabbr)](https://cran.r-project.org/web/checks/check_results_journalabbr.html)
[![](http://cranlogs.r-pkg.org/badges/grand-total/journalabbr?color=green)](https://cran.r-project.org/package=journalabbr)
[![License: GPL (\>=
3)](https://img.shields.io/badge/license-GPL%20(%3E=%203)-blue.svg)](https://cran.r-project.org/web/licenses/GPL%20(%3E=%203))
[![R build
status](https://github.com/zoushucai/journalabbr/workflows/R-CMD-check/badge.svg)](https://github.com/zoushucai/journalabbr/actions)
[![Codecov test
coverage](https://codecov.io/gh/zoushucai/journalabbr/branch/master/graph/badge.svg)](https://app.codecov.io/gh/zoushucai/journalabbr?branch=master)
[![CRAN
status](https://www.r-pkg.org/badges/version/journalabbr)](https://CRAN.R-project.org/package=journalabbr)
[![Lifecycle:
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
<!-- badges: end -->

## Function
Expand Down
14 changes: 14 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true
16 changes: 16 additions & 0 deletions devtools_history.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ rhub::check_on_debian()
rhub::check_for_cran()


use_travis()
use_travis_badge()
use_lifecycle_badge()
use_cran_badge()
covr::package_coverage(type="all")# 本地查看代码覆盖率
use_coverage() # 添加一个徽章到readme中, 以及会创建一个yml, 每次提交github都会检查代码覆盖率

use_github_action("test-coverage")#检测 test的覆盖率

# 创建一系列徽章
use_cran_badge()
use_lifecycle_badge("stable")
use_lifecycle()

devtools::build_readme()
rm(list = ls())
document()

Expand All @@ -112,3 +127,4 @@ kk = abbr_bib(file = "/Users/zsc/Desktop/rmd/weakfuzzyaik.bib",
abbr_bib_only_journal(file = "/Users/zsc/Desktop/rmd/weakfuzzyaik.bib",
out.file = "/Users/zsc/Desktop/aa2.bib",
user.csv = '' )

4 changes: 2 additions & 2 deletions man/abbr_bib.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/read_bib2dt.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9fca48b

Please sign in to comment.