diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2021-11-19 07:38:08 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2021-11-19 07:38:08 +0100 |
commit | e7d3077065cd449b234a6b2338efd70a94f94fbd (patch) | |
tree | 5c7e8d64c728b582069b727d85874d6b3f497b5d | |
parent | c9819ab029bb2386d25bfa9be850c9f10478188e (diff) |
Better approach to skip bcpc on travis, update docs
-rw-r--r-- | R/chent.R | 7 | ||||
-rw-r--r-- | docs/index.html | 4 | ||||
-rw-r--r-- | docs/pkgdown.yml | 2 | ||||
-rw-r--r-- | docs/reference/pai.html | 21 | ||||
-rw-r--r-- | man/pai.Rd | 7 |
5 files changed, 30 insertions, 11 deletions
@@ -495,12 +495,17 @@ plot.chent = function(x, ...) { #' @field bcpc List of information retrieved from pesticidecompendium.bcpc.org #' @keywords data #' @examples -#' \dontrun{ +#' # On Travis, we get a certificate validation error, +#' # likely because the system (xenial) is so old, +#' # therefore don't run this example on Travis +#' if (Sys.getenv("TRAVIS") == "") { +#' #' atr <- pai$new("atrazine") #' print(atr) #' if (!is.null(atr$Picture)) { #' plot(atr) #' } +#' #' } pai <- R6Class("pai", diff --git a/docs/index.html b/docs/index.html index 5fadb0b..c64ae68 100644 --- a/docs/index.html +++ b/docs/index.html @@ -117,8 +117,8 @@ <div class="dev-status"> <h2>Dev status</h2> <ul class="list-unstyled"> -<li><a href="https://travis-ci.com/jranke/chents"><img src="https://travis-ci.com/jranke/chents.svg?branch=master" alt="Build Status"></a></li> -<li><a href="https://codecov.io/github/jranke/chents"><img src="https://codecov.io/github/jranke/chents/branch/master/graphs/badge.svg" alt="codecov"></a></li> +<li><a href="https://travis-ci.com/jranke/chents"><img src="https://travis-ci.com/jranke/chents.svg?branch=main" alt="Build Status"></a></li> +<li><a href="https://codecov.io/github/jranke/chents"><img src="https://codecov.io/github/jranke/chents/branch/main/graphs/badge.svg" alt="codecov"></a></li> </ul> </div> </div> diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index e09cce3..82e7ef8 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -2,5 +2,5 @@ pandoc: 2.9.2.1 pkgdown: 1.6.1 pkgdown_sha: ~ articles: {} -last_built: 2021-11-18T23:21Z +last_built: 2021-11-19T06:37Z diff --git a/docs/reference/pai.html b/docs/reference/pai.html index e5ecb99..0bb3399 100644 --- a/docs/reference/pai.html +++ b/docs/reference/pai.html @@ -197,10 +197,20 @@ Additional chemical information is retrieved from the internet if available.</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='va'>atr</span> <span class='op'><-</span> <span class='va'>pai</span><span class='op'>$</span><span class='fu'>new</span><span class='op'>(</span><span class='st'>"atrazine"</span><span class='op'>)</span> + <pre class="examples"><div class='input'><span class='co'># On Travis, we get a certificate validation error,</span> +<span class='co'># likely because the system (xenial) is so old,</span> +<span class='co'># therefore don't run this example on Travis</span> +<span class='kw'>if</span> <span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/Sys.getenv.html'>Sys.getenv</a></span><span class='op'>(</span><span class='st'>"TRAVIS"</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>""</span><span class='op'>)</span> <span class='op'>{</span> + +<span class='va'>atr</span> <span class='op'><-</span> <span class='va'>pai</span><span class='op'>$</span><span class='fu'>new</span><span class='op'>(</span><span class='st'>"atrazine"</span><span class='op'>)</span> +<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>atr</span><span class='op'>)</span> +<span class='kw'>if</span> <span class='op'>(</span><span class='op'>!</span><span class='fu'><a href='https://rdrr.io/r/base/NULL.html'>is.null</a></span><span class='op'>(</span><span class='va'>atr</span><span class='op'>$</span><span class='va'>Picture</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>atr</span><span class='op'>)</span> +<span class='op'>}</span> + +<span class='op'>}</span> </div><div class='output co'>#> <span class='message'>BCPC:</span></div><div class='output co'>#> <span class='message'>PubChem:</span></div><div class='output co'>#> <span class='message'>Trying to get chemical information from RDKit using PubChem_Canonical SMILES</span> -#> <span class='message'>CCNC1=NC(=NC(=N1)Cl)NC(C)C</span></div><div class='output co'>#> <span class='message'>Did not find chyaml file ./atrazine.yaml</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>atr</span><span class='op'>)</span> -</div><div class='output co'>#> <pai> with ISO common name $iso atrazine +#> <span class='message'>CCNC1=NC(=NC(=N1)Cl)NC(C)C</span></div><div class='output co'>#> <span class='message'>Did not find chyaml file ./atrazine.yaml</span></div><div class='img'><img src='pai-1.png' alt='' width='700' height='433' /></div><div class='output co'>#> <pai> with ISO common name $iso atrazine #> <chent> #> Identifier $identifier atrazine #> InChI Key $inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N @@ -210,10 +220,7 @@ Additional chemical information is retrieved from the internet if available.</p> #> Molecular weight $mw: 215.7 #> PubChem synonyms (up to 10): #> [1] "atrazine" "1912-24-9" "Gesaprim" "Oleogesaprim" "Chromozin" -#> [6] "Aktikon" "Atrazin" "Argezin" "Atazinax" "Atranex" </div><div class='input'><span class='kw'>if</span> <span class='op'>(</span><span class='op'>!</span><span class='fu'><a href='https://rdrr.io/r/base/NULL.html'>is.null</a></span><span class='op'>(</span><span class='va'>atr</span><span class='op'>$</span><span class='va'>Picture</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> - <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>atr</span><span class='op'>)</span> -<span class='op'>}</span> -</div><div class='img'><img src='pai-1.png' alt='' width='700' height='433' /></div></pre> +#> [6] "Aktikon" "Atrazin" "Argezin" "Atazinax" "Atranex" </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <nav id="toc" data-toggle="toc" class="sticky-top"> @@ -12,11 +12,18 @@ The class is initialised with an identifier which is generally an ISO common nam Additional chemical information is retrieved from the internet if available. } \examples{ +# On Travis, we get a certificate validation error, +# likely because the system (xenial) is so old, +# therefore don't run this example on Travis +if (Sys.getenv("TRAVIS") == "") { + atr <- pai$new("atrazine") print(atr) if (!is.null(atr$Picture)) { plot(atr) } + +} } \keyword{data} \section{Super class}{ |