Skip to content

Commit 80075a6

Browse files
authored
Merge branch 'master' into dev_webtest_comptox
2 parents 437f150 + 718b1d4 commit 80075a6

100 files changed

Lines changed: 9474 additions & 2589 deletions

Some content is hidden

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

.Rbuildignore

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66
.gitignore
77
.github
88

9-
# Travis
10-
.travis.yml
11-
pkg-build.sh
12-
13-
# appveyor
14-
^appveyor\.yml$
15-
travis-tool.sh.cmd
169

1710
# READMES
1811
README.html
@@ -29,3 +22,7 @@ README_cache
2922
^pkgdown$
3023

3124
.Rmd.orig
25+
^\.github$
26+
27+
codemeta.json
28+
^codemeta\.json$

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
tests/fixtures/**/* -diff

.github/.gitignore

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

.github/workflows/R-CMD-check.yaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
2+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
name: R-CMD-check
12+
13+
jobs:
14+
R-CMD-check:
15+
runs-on: ${{ matrix.config.os }}
16+
17+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
config:
23+
- {os: windows-latest, r: 'release'}
24+
- {os: macOS-latest, r: 'release'}
25+
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
26+
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
27+
28+
env:
29+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
30+
_R_CHECK_CRAN_INCOMING_: false
31+
RSPM: ${{ matrix.config.rspm }}
32+
33+
steps:
34+
- uses: actions/checkout@v2
35+
36+
- uses: r-lib/actions/setup-r@master
37+
with:
38+
r-version: ${{ matrix.config.r }}
39+
40+
- uses: r-lib/actions/setup-pandoc@master
41+
42+
- name: Query dependencies
43+
run: |
44+
install.packages('remotes')
45+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
46+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
47+
shell: Rscript {0}
48+
49+
- name: Cache R packages
50+
if: runner.os != 'Windows'
51+
uses: actions/cache@v1
52+
with:
53+
path: ${{ env.R_LIBS_USER }}
54+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
55+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
56+
57+
- name: Install system dependencies
58+
if: runner.os == 'Linux'
59+
run: |
60+
while read -r cmd
61+
do
62+
eval sudo $cmd
63+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
64+
65+
- name: Install dependencies
66+
run: |
67+
remotes::install_deps(dependencies = TRUE)
68+
remotes::install_cran("rcmdcheck")
69+
shell: Rscript {0}
70+
71+
- name: Check
72+
run: |
73+
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran","--no-build-vignettes", "--timings", "--no-examples", "--as-cran"),
74+
error_on = "warning", check_dir = "check")
75+
shell: Rscript {0}
76+
77+
- name: Show testthat output
78+
if: always()
79+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
80+
shell: bash
81+
82+
- name: Upload check results
83+
if: failure()
84+
uses: actions/upload-artifact@main
85+
with:
86+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
87+
path: check
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
name: test-coverage
10+
11+
jobs:
12+
test-coverage:
13+
runs-on: macOS-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: r-lib/actions/setup-r@master
17+
with:
18+
r-version: 'release'
19+
20+
- name: Install dependencies
21+
run: |
22+
install.packages(c("remotes", "rcmdcheck"))
23+
remotes::install_deps(dependencies = TRUE)
24+
remotes::install_cran("covr")
25+
shell: Rscript {0}
26+
27+
- name: Test coverage
28+
run: covr::codecov()
29+
shell: Rscript {0}

.travis.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ Some consistency guidelines:
6464

6565
13. SMILES strings may use special characters like "#". `URLencode()` does not encode this as "%23" by default, so use `URLencode(query, reserved = TRUE)` instead. It's important to note that it's the query that has to be encoded like this, not the full url.
6666

67+
14. Print verbose messages. Use `httr::message_for_status()` and `webchem_message()` functions to generate standard messages when possible.
68+
6769
### Data Sources
6870

6971
You might think all webscraping is perfectly legal but it is unfortunately not that simple.

DESCRIPTION

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Description: Chemical information from around the web. This package interacts
77
Flavornet, NIST Chemistry WebBook, OPSIN, PAN Pesticide Database, PubChem,
88
SRS, Wikidata.
99
Type: Package
10-
Version: 1.0.0.9000
11-
Date: 2020-05-27
10+
Version: 1.1.1
11+
Date: 2021-02-07
1212
License: MIT + file LICENSE
13-
URL: https://docs.ropensci.org/webchem, https://github.com/ropensci/webchem
13+
URL: https://docs.ropensci.org/webchem/, https://github.com/ropensci/webchem
1414
BugReports: https://github.com/ropensci/webchem/issues
1515
Authors@R: c(person("Eduard", "Szöcs", role = "aut"),
1616
person("Robert", "Allaway", role = "ctb"),
@@ -19,6 +19,7 @@ Authors@R: c(person("Eduard", "Szöcs", role = "aut"),
1919
person("Andreas", "Scharmüller", role = "ctb"),
2020
person("Eric R", "Scott", role = "ctb"),
2121
person("Jan", "Stanstrup", role = "ctb"),
22+
person("João Vitor", "F Cavalcante", role = "ctb"),
2223
person("Gordon", "Getzinger", role = "ctb"),
2324
person("Tamás", "Stirling", email = "stirling.tamas@gmail.com", role = c("ctb", "cre")))
2425
Maintainer: Tamás Stirling <stirling.tamas@gmail.com>
@@ -31,7 +32,6 @@ Imports:
3132
xml2,
3233
httr,
3334
rvest,
34-
RCurl,
3535
jsonlite,
3636
stringr,
3737
methods,
@@ -48,6 +48,10 @@ Suggests:
4848
robotstxt,
4949
knitr,
5050
rmarkdown,
51-
plot.matrix
51+
plot.matrix,
52+
usethis,
53+
vcr
5254
RoxygenNote: 7.1.1
5355
VignetteBuilder: knitr
56+
Config/testthat/edition:3
57+
Config/testthat/parallel:true

NAMESPACE

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ S3method(smiles,pc_prop)
3131
S3method(smiles,wd_ident)
3232
export(as.cas)
3333
export(aw_query)
34-
export(build_aw_idx)
3534
export(cas)
3635
export(chebi_comp_entity)
3736
export(ci_query)
3837
export(cid_compinfo)
3938
export(cir)
39+
export(cir_img)
4040
export(cir_query)
4141
export(cs_check_key)
4242
export(cs_compinfo)
@@ -90,22 +90,13 @@ import(rvest)
9090
import(stringr)
9191
import(tibble)
9292
import(xml2)
93-
importFrom(base64enc,base64decode)
9493
importFrom(data.tree,Do)
9594
importFrom(data.tree,FindNode)
9695
importFrom(data.tree,as.Node)
9796
importFrom(dplyr,bind_rows)
9897
importFrom(dplyr,everything)
99-
importFrom(dplyr,left_join)
10098
importFrom(dplyr,select)
101-
importFrom(httr,GET)
102-
importFrom(httr,POST)
103-
importFrom(httr,add_headers)
104-
importFrom(httr,content)
105-
importFrom(httr,http_status)
106-
importFrom(httr,message_for_status)
10799
importFrom(jsonlite,fromJSON)
108-
importFrom(jsonlite,toJSON)
109100
importFrom(methods,is)
110101
importFrom(purrr,map)
111102
importFrom(purrr,map2)
@@ -114,16 +105,13 @@ importFrom(purrr,map_dfr)
114105
importFrom(rlang,as_function)
115106
importFrom(rlang,fn_fmls)
116107
importFrom(rvest,html_table)
117-
importFrom(stats,rexp)
118-
importFrom(stats,rgamma)
119-
importFrom(stats,setNames)
108+
importFrom(stringr,str_trunc)
120109
importFrom(tibble,as_tibble)
121110
importFrom(tibble,enframe)
122111
importFrom(tibble,tibble)
123112
importFrom(utils,URLdecode)
124113
importFrom(utils,URLencode)
125114
importFrom(utils,adist)
126115
importFrom(utils,globalVariables)
127-
importFrom(utils,head)
128116
importFrom(utils,menu)
129117
importFrom(utils,read.table)

0 commit comments

Comments
 (0)