diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index a3ac618..7f33a21 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -5,6 +5,9 @@ on: branches: [main, master] pull_request: branches: [main, master] + schedule: + - cron: + '0 8 1,15 * *' # At 08:00AM on 1st and 15th of month name: R-CMD-check @@ -29,7 +32,7 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 diff --git a/.github/workflows/taxonomy-version-check.yaml b/.github/workflows/taxonomy-version-check.yaml deleted file mode 100644 index 51d1915..0000000 --- a/.github/workflows/taxonomy-version-check.yaml +++ /dev/null @@ -1,71 +0,0 @@ -name: taxonomy-version-check - -env: - ISSUE_TITLE: 'eBird taxonomy has updated' - ISSUE_BODY: | - This issue has been opened by the GitHub Action workflow `taxonomy-version-check`. - - There is an update to the eBird taxonomy. The `rebird::tax` dataset and documentation needs to be updated. - -on: - workflow_run: - workflows: ["R-CMD-check"] - types: - - completed - -jobs: - taxonomy-version-check-job: - outputs: - check-failed: ${{ steps.check-taxonomy-version.outputs.failed }} - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'failure' }} - steps: - - name: check-taxonomy-version-step - id: check-taxonomy-version - run: | - Rscript -e "testthat::test_file('tests/testthat/test-data.R', load_package = 'source', stop_on_failure = TRUE)" && echo "failed=false" >> "$GITHUB_OUTPUT" || echo "failed=true" >> "$GITHUB_OUTPUT" - - check-and-create-issue-job: - needs: taxonomy-version-check-job - if: needs.taxonomy-version-check-job.outputs.check-failed == 'true' - runs-on: ubuntu-latest - steps: - - name: check-issue-step - id: check-issue - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const issueTitle = process.env.ISSUE_TITLE; - const { owner, repo } = context.repo; - - const issues = await github.rest.issues.listForRepo({ - owner, - repo, - state: 'open', - }); - - const existingIssue = issues.data.find(issue => issue.title === issueTitle); - - if (existingIssue) { - core.setOutput('exists', 'true'); - } else { - core.setOutput('exists', 'false'); - } - - - name: create-issue-step - if: ${{ steps.check-issue.outputs.exists == 'false' }} - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const issueTitle = process.env.ISSUE_TITLE; - const issueBody = process.env.ISSUE_BODY; - const { owner, repo } = context.repo; - - await github.rest.issues.create({ - owner, - repo, - title: issueTitle, - body: issueBody, - }); diff --git a/DESCRIPTION b/DESCRIPTION index 2192e9e..a694f4c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: rebird -Version: 1.3.9005 +Version: 1.3.9006 Title: R Client for the eBird Database of Bird Observations Description: A programmatic client for the eBird database (), including functions for searching for bird diff --git a/NEWS.md b/NEWS.md index 3699087..a0d8aaa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ -# rebird 1.3.9005 +# rebird 1.3.9006 +- Added `ebirdtaxonomyversion()` which retrieves data on available taxonomy versions. +The version is added as an attribute to `rebird::tax` (#131). - Added `ebirdchecklist()`, which lets you view individual checklists (thanks @RichardLitt and @Rafnuss, #108). - Made `ebirdregioncheck()`, `ebirdhotspot()`, `ebirdloc()` defunct. - API tests now use `vcr`, which saves "cassettes" of the tests which can be played diff --git a/man/ebirdtaxonomyversion.Rd b/man/ebirdtaxonomyversion.Rd index 1dbac67..b413002 100644 --- a/man/ebirdtaxonomyversion.Rd +++ b/man/ebirdtaxonomyversion.Rd @@ -18,9 +18,8 @@ supply the key, and to avoid accidentally sharing it publicly.} data.frame containing the collected information: "authorityVer": Character of version. - -"latest": Boolean indicating whether `authorityVer`` is the latest taxonomy version +"latest": Boolean indicating whether `authorityVer` is the latest taxonomy version } \description{ Returns a data.frame of available version numbers of the eBird taxonomy