Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

36 prepare for cran release 110 #37

Open
wants to merge 24 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
^\.github$
^vignettes/articles$
^CRAN-SUBMISSION$

CONTRIBUTING.md
^revdep$
95 changes: 95 additions & 0 deletions .github/workflows/rhub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
# You can update this file to a newer version using the rhub2 package:
#
# rhub::rhub_setup()
#
# It is unlikely that you need to modify this file manually.

name: R-hub
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"

on:
workflow_dispatch:
inputs:
config:
description: 'A comma separated list of R-hub platforms to use.'
type: string
default: 'linux,windows,macos'
name:
description: 'Run name. You can leave this empty now.'
type: string
id:
description: 'Unique ID. You can leave this empty now.'
type: string

jobs:

setup:
runs-on: ubuntu-latest
outputs:
containers: ${{ steps.rhub-setup.outputs.containers }}
platforms: ${{ steps.rhub-setup.outputs.platforms }}

steps:
# NO NEED TO CHECKOUT HERE
- uses: r-hub/actions/setup@v1
with:
config: ${{ github.event.inputs.config }}
id: rhub-setup

linux-containers:
needs: setup
if: ${{ needs.setup.outputs.containers != '[]' }}
runs-on: ubuntu-latest
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.containers) }}
container:
image: ${{ matrix.config.container }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/run-check@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}

other-platforms:
needs: setup
if: ${{ needs.setup.outputs.platforms != '[]' }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.platforms) }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/setup-r@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/run-check@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: "Contributing"
---


Filing issues
-------------

Please read these points carefully and follow them while filing issues.

- **One issue for one purpose**. Don't add more than one *bug*, *feature request*, or *documentation request* on to the same issue. Take the time to read through the current issues to ensure your issue is not already listed.
- If you've found a *bug*, thank you for reporting! Please include a reproducible example of your bug in the issue.
- If you need *support* or have a general *question*, please consider asking the question on [StackOverflow](http://www.stackoverflow.com)
- For the project contributors, please label new issues using the following rules:
- *bugs* should be labeled "bug"
- *feature requests* or *suggestions* should be labeled "enhancement"
- *questions* or *requests for support* should be labeled "question"

Pull Requests
-------------

Please file an issue before creating PRs so that it can be discussed first *before* you invest time implementing it.

1. Please create all pull requests (PR) against the `dev` branch.
2. Create **one PR per feature/bug fix**. Each PR should be associated with an Issue.
3. Create a branch for that feature/bug fix, named 'issue-N' where N is the Issue number, and use that as a base for your pull requests. Pull requests directly against your version of `dev` will not be accepted.
4. Please squash temporary stage commits together before issuing a PR.
5. All commit messages should have two components: (1) a header on the first line beginning with "issue-N:" and containing no more than 50 characters, and (2) a body with 1 empty line after the header then at least a sentence or two in the commit body detailing all changes and justifications. Lines in the commit body should be wrapped to no more than 72 characters per line, and can contain multiple paragraphs.<sup>[1](#myfootnote1)</sup>
5. In your pull request's description, please state clearly as to what your PR does, i.e., what FR or bug your PR addresses, along with the issue number. For e.g, "Closes #13: Added CRAN version and monthly download bages."
7. Please build and test the package using `R CMD check --as-cran` against your branch source package archive `.tar.gz` file. You may want to add `--no-manual`, `--no-build-vignettes` or `--ignore-vignettes` (R 3.3.0+) options to reduce dependencies required to perform check. PRs that fail `check` cannot be merged.
8. The NEWS file also has to be updated while fixing or implementing an issue. It should mention the issue number and what the issue is being closed. Also add a "Thanks to @your_name for the PR".

**References:** If you are not sure how to issue a PR, but would like to contribute, these links should help get you started:

1. **[How to Github: Fork, Branch, Track, Squash and Pull request](https://gun.io/blog/how-to-github-fork-branch-and-pull-request/)**.
2. **[Squashing Github pull requests into a single commit](http://eli.thegreenplace.net/2014/02/19/squashing-github-pull-requests-into-a-single-commit)**.

*This guide was modified from the contributing guide for the [data.table](https://github.com/Rdatatable/data.table) repository*

<a name="myfootnote1">1</a>: To make it easier to count the characters per line you can edit your $HOME/.vimrc ($HOME/_vimrc on Windows) to include ":set ruler" which will display the line and position numbers in the bottom right corner of the terminal when editing the commit messages.
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: ctxR
Title: Utilities for Interacting with the 'CTX' APIs
Version: 1.0.0.9000
Version: 1.1.0
Authors@R: c(
person("Paul", "Kruse", email = "[email protected]",
role = c("aut", "cre"),
Expand All @@ -19,11 +19,11 @@ Authors@R: c(
)
Description: Access chemical, hazard, bioactivity, and exposure data from the
Computational Toxicology and Exposure ('CTX') APIs
<https://api-ccte.epa.gov/docs/>. 'ctxR' was developed to streamline the
process of accessing the information available through the 'CTX' APIs
without requiring prior knowledge of how to use APIs. Most data is also
available on the CompTox Chemical Dashboard ('CCD')
<https://comptox.epa.gov/dashboard/> and other resources found at the
<https://www.epa.gov/comptox-tools/computational-toxicology-and-exposure-apis>.
'ctxR' was developed to streamline the process of accessing the information
available through the 'CTX' APIs without requiring prior knowledge of how to
use APIs. Most data is also available on the CompTox Chemical Dashboard
('CCD') <https://comptox.epa.gov/dashboard/> and other resources found at the
EPA Computational Toxicology and Exposure Online Resources
<https://www.epa.gov/comptox-tools>.
License: GPL (>= 3)
Expand Down
38 changes: 30 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,48 @@
# ctxR (development version)
# ctxR 1.1.0


## Minor improvements and fixes

* Fixed broken link to `CONTRIBUTING.md` in README (@c1au6i0, #37)

* Updated `get_chemical_synonym()`, `get_chemical_synonym_batch()` to handle returned data more efficiently (#30).

* Updated documentation of internal helper functions `create_data.table_chemical_details()`, `prepare_word()` (#24).

* Fixed `get_bioactivity_details()` to handle case when `mc6Param` field of returned data is NULL (#18).

* Fixed `get_bioactivity_details()` to handle `m4id` parameter values that do not exist (#16).

* Adjusted `chemical_contains()`, `chemical_equal()`, and
`chemical_starts_with()` to handle http 400 errors and returned information from
those requests. Adjusted the `chemical_contains_batch()`,
`chemical_equals_batch()`, and `chemical_starts_with_batch()` to return named
lists of valid and invalid search results, with invalid results containing
information from 400 errors (@kisaacs1, #11).
`chemical_equals_batch()`, and `chemical_starts_with_batch()` to return named lists of valid and invalid search results, with invalid results containing information from 400 errors (@kisaacs1, #12).

* Added examples in `Chemical.Rmd` vignette for `get_chemical_details_batch()` (#8).

## New features

* Added `check_existence_by_dtxsid()`, `check_existence_by_dtxsid_batch()`
functions. Updated the `Chemical.Rmd` vignette to include examples of how to use
these functions (#27).
* Added warning for missing `API_key` parameter and missing stored API key to all functions that wrap API endpoints (#35).

* Added error handling for invalid API key inputs to all functions that wrap an API endpoint (#33).

* Added functions `get_all_list_types()`, `get_chemicals_in_list_start()`, `get_chemicals_in_list_start_batch()` `get_chemicals_in_list_exact()`, `get_chemicals_in_list_exact_batch()`, `get_chemicals_in_lists_contain()`, `get_chemicals_in_lists_contain_batch`(). Added `gsid` parameter to `get_chemical_image()`. Updated `Chemical.rmd` vignette to include examples for new chemical functions and new features (#30).

* Added `check_existence_by_dtxsid()`, `check_existence_by_dtxsid_batch()` functions. Updated the `Chemical.Rmd` vignette to include examples of how to use these functions and `ctxR` hex logo location (#28).

* Added parameter `limit` and default value 200 to `generate_ranges()` function and fixed. Fixed request limit in `chemical_equal_batch()` function (@seanthimons, #26).

* Added pkgdown website for development version of package (#22).

* Added monthly download and CRAN version badges to `README.md` and `README.Rmd` files (#14).

* Added `get_httk_data()`, `get_httk_data_batch()`,
`get_general_exposure_prediction()`, `get_general_exposure_prediction_batch()`,
`get_demographic_exposure_prediction()`,
`get_demographic_exposure_prediction_batch()` functions. Updated the
`Exposure.Rmd` vignette to include examples of how to use these functions (#6).
`Exposure.Rmd` vignette to include examples of how to use these functions (#10).

* Added pkgdown site for CRAN version of `ctxR` (#20).


# ctxR 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ Package website: [release](https://usepa.github.io/ctxR/) | [dev](https://usepa.

## Welcome to the GitHub repository for the ctxR package

<a href="https://cran.r-project.org/web/packages/ctxR/index.html"><img src="vignettes/Pictures/ctxR_hex.png" width="200" align="right" /></a>
<a href="https://CRAN.R-project.org/package=ctxR"><img src="vignettes/Pictures/ctxR_hex.png" width="200" align="right" /></a>

ctxR was developed to streamline the process of accessing the information available through the [Computational Toxicology and Exposure (CTX) APIs](https://www.epa.gov/comptox-tools/computational-toxicology-and-exposure-apis) without requiring prior knowledge of how to use APIs. Chemical, hazard, bioactivity, and exposure data in available from the CTX APIs. Most data is also available on the [CompTox Chemical Dashboard (CCD)](https://comptox.epa.gov/dashboard/) or within other [Computational Toxicology and Exposure Online Resources](https://www.epa.gov/comptox-tools).

If you are interested in contributing or want to report a bug, please submit a issue or start a discussion. See [CONTRIBUTING](CONTRIBUTING.md) for more information.
If you are interested in contributing or want to report a bug, please submit a issue or start a discussion. See [CONTRIBUTING](https://github.com/USEPA/ctxR/blob/dev/CONTRIBUTING.md) for more information.

To install the current development version, run the following command:

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Downloads](https://cranlogs.r-pkg.org/badges/last-month/ctxR?color=7BAFD4)](http

## Welcome to the GitHub repository for the ctxR package

<a href="https://cran.r-project.org/web/packages/ctxR/index.html"><img src="vignettes/Pictures/ctxR_hex.png" width="200" align="right" /></a>
<a href="https://CRAN.R-project.org/package=ctxR"><img src="vignettes/Pictures/ctxR_hex.png" width="200" align="right" /></a>

ctxR was developed to streamline the process of accessing the
information available through the [Computational Toxicology and Exposure
Expand All @@ -32,8 +32,7 @@ is also available on the [CompTox Chemical Dashboard
Resources](https://www.epa.gov/comptox-tools).

If you are interested in contributing or want to report a bug, please
submit a issue or start a discussion. See
[CONTRIBUTING](CONTRIBUTING.md) for more information.
submit a issue or start a discussion.

To install the current development version, run the following command:

Expand Down
54 changes: 19 additions & 35 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,34 @@
## Test environments

* macOS 13.3.1, Apple clang version 14.0.0 (clang-1400.0.29.202), GNU Fortran (GCC) 12.2.0, macOS Ventura 13.3.1
* R Under development (unstable) (2024-11-26 r87383 ucrt), Windows Server 2022 x64 (build 20348)
* local Windows 10 install, R 4.4.0
* R Under development (unstable) (2024-06-27 r86847 ucrt),
Windows Server 2022 x64 (build 20348)


* Rhub/actions Windows Server 2022 x64 (build 20348)
* Rhub/actions Ubuntu 22.04.4 LTS, clang-asan, R-devel (2024-06-27 r86847)
* Rhub/actions macos-13 on GitHub, Apple clang version 14.0.0
(clang-1400.0.29.202), GNU Fortran (GCC) 12.2.0, macOS Venture 13.6.7
* Rhub/actions Ubuntu 22.04.5 LTS, clang-asan, R-devel (2024-11-26 r87383)

## rhub CMD check results

Status: OK

* elapsed time (Windows Server 2022 x64) : 1:50
* elapsed time (Ubuntu 22.04.4 LTS) : 0:56
* elapsed time (macos-13 on GitHub) : 1:50
* elapsed time (Ubuntu 22.04.4 LTS) : 1:38

## mac release check results

0 errors | 0 warnings | 0 notes


## win devel check results
1 NOTE - CRAN incoming feasibility
Indicated possibly misspelled words in DESCRIPTION (APIs, CompTox, bioactivity).
These are all correctly spelled.

* 1 NOTE - CRAN incoming feasibility.
Indicated possible invalid URL. This URL works correctly and is stored in data retrieved from an API request, so we cannot alter it.


## local R CMD check results

* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Paul Kruse <[email protected]>'

New submission


0 errors | 0 warnings | 1 note

* This is a new release. It is a renamed version of the ccdR 1.0.0 package.
There are a few reasons for renaming this package. ccdR was developed when the
APIs it wraps were primarily pulling data from the CompTox Chemicals Dashboard
(CCD) and named to reflect that. More data is now available from the APIs than
is represented by the CCD. The APIs have been renamed to be the
Computational Toxicology and Exposure (CTX) APIs, which is a stable name that
more appropriately represents the data domain and area of research the tools
and resources related to the data represent. ctxR is much more representative
than ccdR of the current APIs and data. Additionally, the US EPA is
coordinating several API clients written in different languages to use the
consistent package name ctx_, where '_' is used to represent the language in
which a client is developed (e.g. ctxR for R, ctxPy for Python). Renaming ccdR
to ctxR reflects this harmonization of CTX API clients across languages.
0 errors | 0 warnings | 0 notes

## revdepcheck results

We checked 1 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
7 changes: 7 additions & 0 deletions revdep/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
checks
library
checks.noindex
library.noindex
cloud.noindex
data.sqlite
*.html
35 changes: 35 additions & 0 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Platform

|field |value |
|:--------|:----------------------------------------|
|version |R version 4.4.0 (2024-04-24 ucrt) |
|os |Windows 11 x64 (build 22621) |
|system |x86_64, mingw32 |
|ui |RStudio |
|language |(EN) |
|collate |English_United States.utf8 |
|ctype |English_United States.utf8 |
|tz |America/New_York |
|date |2024-11-27 |
|rstudio |2024.04.0+735 Chocolate Cosmos (desktop) |
|pandoc |NA |

# Dependencies

|package |old |new |Δ |
|:----------|:-----|:----------|:--|
|ctxR |1.0.0 |1.0.0.9000 |* |
|askpass |NA |1.2.1 |* |
|cli |NA |3.6.3 |* |
|cpp11 |NA |0.5.0 |* |
|curl |NA |6.0.1 |* |
|data.table |NA |1.16.2 |* |
|glue |NA |1.8.0 |* |
|jsonlite |NA |1.8.9 |* |
|openssl |NA |2.2.2 |* |
|Rcpp |NA |1.0.13-1 |* |
|sys |NA |3.4.3 |* |
|withr |NA |3.0.2 |* |

# Revdeps

7 changes: 7 additions & 0 deletions revdep/cran.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## revdepcheck results

We checked 1 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages

1 change: 1 addition & 0 deletions revdep/failures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Wow, no problems at all. :)*
1 change: 1 addition & 0 deletions revdep/problems.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Wow, no problems at all. :)*
2 changes: 1 addition & 1 deletion vignettes/Bioactivity.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ registerS3method(

```

<a href="https://cran.r-project.org/web/packages/ctxR/index.html"><img src="Pictures/ctxR_hex.png" width="200" align="right" style="float: right; margin-left: 10px; margin-bottom: 20px;"/></a>
<a href="https://CRAN.R-project.org/package=ctxR"><img src="Pictures/ctxR_hex.png" width="200" align="right" style="float: right; margin-left: 10px; margin-bottom: 20px;"/></a>

# Introduction

Expand Down
Loading
Loading