From d5d75bde34bfd8efefc2dc383f6891a72f1c5b75 Mon Sep 17 00:00:00 2001 From: Github Action Date: Mon, 26 Aug 2024 00:01:53 +0000 Subject: [PATCH] New data collected at 2024-08-26_00-01-53 --- .../data.table/R-CMD-check-occasional.yaml | 50 ++--- github-actions/data.table/code-quality.yaml | 12 +- github-actions/fs/R-CMD-check.yaml | 3 +- github-actions/mlflow/maintainer-approval.yml | 22 ++ github-actions/rcpp/macos.yaml | 40 ++++ gitignore/xgboost.gitignore | 1 + gitlab-ci/data.table.gitlab-ci.yml | 11 +- pkgdown/reticulate_pkgdown.yml | 1 + pkgdown/tidyquant_pkgdown.yml | 197 ++++++++++-------- 9 files changed, 202 insertions(+), 135 deletions(-) create mode 100644 github-actions/mlflow/maintainer-approval.yml create mode 100644 github-actions/rcpp/macos.yaml diff --git a/github-actions/data.table/R-CMD-check-occasional.yaml b/github-actions/data.table/R-CMD-check-occasional.yaml index fe7f3a1..dee8bf4 100644 --- a/github-actions/data.table/R-CMD-check-occasional.yaml +++ b/github-actions/data.table/R-CMD-check-occasional.yaml @@ -1,6 +1,6 @@ on: schedule: - - cron: '17 13 18 * *' # 18th of month at 13:17 UTC + - cron: '17 13 23 * *' # 23rd of month at 13:17 UTC # A more complete suite of checks to run monthly; each PR/merge need not pass all these, but they should pass before CRAN release name: R-CMD-check-occasional @@ -42,7 +42,6 @@ jobs: r: '4.1' env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: @@ -76,54 +75,32 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get install -y libcurl4-openssl-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev + sudo apt-get install -y libcurl4-openssl-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev pandoc - name: Install check dependencies (macOS) if: matrix.os == 'macOS-latest' run: brew install gdal proj - - name: Install remotes - env: - R_LIBS_USER: /home/runner/work/r-lib - run: install.packages("remotes") - shell: Rscript {0} - - - name: Install system dependencies - if: runner.os == 'Linux' - env: - R_LIBS_USER: /home/runner/work/r-lib - run: | - while read -r cmd - do - eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') - - name: Check env: # several Suggests dependencies have R dependencies more recent than ours _R_CHECK_FORCE_SUGGESTS_: false _R_CHECK_CRAN_INCOMING_REMOTE_: false _R_CHECK_TESTS_NLINES_: 0 - R_LIBS_USER: /home/runner/work/r-lib run: | options(crayon.enabled = TRUE) - install.packages("remotes") # different R_LIBS_USER now... - remotes::install_deps(dependencies=TRUE, force=TRUE) - - # we define this in data.table namespace, but it appears to be exec - if (!exists("isFALSE", "package:base")) { # R>=3.5.0 - if (!exists("isFALSE", asNamespace("data.table"))) { - message("isFALSE not found in base, but data.table did not define it either!\n") - } - # attempt defining it here as a workaround... - isFALSE = function(x) is.logical(x) && length(x) == 1L && !is.na(x) && !x - } + message("*** Using the following repos for installation ***") + print(getOption("repos")) + message("*** Installing Suggested packages ***") + sugg <- names(tools:::.split_dependencies(read.dcf("DESCRIPTION", "Suggests"))) + install.packages(sugg) other_deps_expr = parse('inst/tests/other.Rraw', n=1L) eval(other_deps_expr) other_pkgs = get(as.character(other_deps_expr[[1L]][[2L]])) # Many will not install on oldest R versions - try(remotes::install_cran(c(other_pkgs, "rcmdcheck"), force=TRUE)) + message("*** Installing fully optional packages ***") + try(install.packages(c(other_pkgs, "rcmdcheck"))) has_other_pkg = sapply(other_pkgs, requireNamespace, quietly=TRUE) run_other = all(has_other_pkg) @@ -133,8 +110,7 @@ jobs: message("Will try and set TEST_DATA_TABLE_WITH_OTHER_PACKAGES=", as.character(run_other), " in R CMD check.") # IINM rcmdcheck isolates its env from the calling process', besides what's passed to env= env = c( - TEST_DATA_TABLE_WITH_OTHER_PACKAGES=as.character(run_other), - R_LIBS_USER=Sys.getenv("R_LIBS_USER") + TEST_DATA_TABLE_WITH_OTHER_PACKAGES=as.character(run_other) ) do_vignettes = requireNamespace("knitr", quietly=TRUE) @@ -153,9 +129,9 @@ jobs: system2(Rbin, c("CMD", "build", ".", build_args)) dt_tar = list.files(pattern = "^data[.]table_.*[.]tar[.]gz$") if (!length(dt_tar)) stop("Built tar.gz not found among: ", toString(list.files())) - res = system2(Rbin, c("CMD", "check", dt_tar[1L], check_args), stdout=TRUE, env=sprintf("%s=%s", names(env), env)) - if (!is.null(attr(res, "status")) || grep("^Status:.*(ERROR|WARNING)", res)) { - writeLines(res) + res = system2(Rbin, c("CMD", "check", dt_tar[1L], check_args), stdout=TRUE, stderr=TRUE, env=sprintf("%s=%s", names(env), env)) + if (!is.null(attr(res, "status")) || is.na(res) || grep("^Status:.*(ERROR|WARNING)", res)) { + writeLines(as.character(res)) stop("R CMD check failed") } } diff --git a/github-actions/data.table/code-quality.yaml b/github-actions/data.table/code-quality.yaml index 21b416d..69bdd57 100644 --- a/github-actions/data.table/code-quality.yaml +++ b/github-actions/data.table/code-quality.yaml @@ -43,7 +43,9 @@ jobs: linter_env = new.env() for (f in list.files('.ci/linters/c', full.names=TRUE)) sys.source(f, linter_env) for (f in list.files('src', pattern='[.][ch]$', full.names=TRUE)) { - for (linter in ls(linter_env)) linter_env[[linter]](f) + c_obj = list(path = f, lines = readLines(f)) + c_obj$preprocessed = system2("gcc", c("-fpreprocessed", "-E", f), stdout=TRUE, stderr=FALSE) + for (linter in ls(linter_env)) linter_env[[linter]](c_obj) # TODO(#6272): Incorporate more checks from CRAN_Release } shell: Rscript {0} @@ -70,8 +72,10 @@ jobs: } cat("All translation quality checks completed successfully!\n") shell: Rscript {0} - lint-md: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - name: Lint - run: | - for (f in list.files('.ci/linters/md', full.names=TRUE)) source(f) + run: for (f in list.files('.ci/linters/md', full.names=TRUE)) source(f) + shell: Rscript {0} diff --git a/github-actions/fs/R-CMD-check.yaml b/github-actions/fs/R-CMD-check.yaml index 1a9854a..24da56d 100644 --- a/github-actions/fs/R-CMD-check.yaml +++ b/github-actions/fs/R-CMD-check.yaml @@ -23,6 +23,7 @@ jobs: matrix: config: - {os: macos-latest, r: 'release'} + - {os: macos-13, r: 'devel'} - {os: windows-latest, r: 'release'} # Use 3.6 to trigger usage of RTools35 @@ -61,7 +62,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::rcmdcheck + extra-packages: any::rcmdcheck, r-lib/xml2@fix/compile-macos-devel, gaborcsardi/sass@fix/compile-macos-devel needs: check - uses: r-lib/actions/check-r-package@v2 diff --git a/github-actions/mlflow/maintainer-approval.yml b/github-actions/mlflow/maintainer-approval.yml new file mode 100644 index 0000000..8cbaa80 --- /dev/null +++ b/github-actions/mlflow/maintainer-approval.yml @@ -0,0 +1,22 @@ +name: Maintainer approval + +on: + pull_request: + +permissions: + pull-requests: read + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: | + .github + - name: Fail without core maintainer approval + uses: actions/github-script@v7 + with: + script: | + const script = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/require-core-maintainer-approval.js`); + await script({ context, github, core }); diff --git a/github-actions/rcpp/macos.yaml b/github-actions/rcpp/macos.yaml new file mode 100644 index 0000000..c86c635 --- /dev/null +++ b/github-actions/rcpp/macos.yaml @@ -0,0 +1,40 @@ +# Run CI for R using https://eddelbuettel.github.io/r-ci/ + +name: macos + +on: + push: + pull_request: + +env: + _R_CHECK_FORCE_SUGGESTS_: "false" + +jobs: + ci: + strategy: + matrix: + include: + - {os: macOS-latest} + #- {os: ubuntu-latest} + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: eddelbuettel/github-actions/r-ci-setup@master + + - name: Bootstrap + run: ./run.sh bootstrap + + - name: Dependencies + run: ./run.sh install_deps + + - name: Test + run: ./run.sh run_tests + + #- name: Coverage + # if: ${{ matrix.os == 'ubuntu-latest' }} + # run: ./run.sh coverage diff --git a/gitignore/xgboost.gitignore b/gitignore/xgboost.gitignore index a53ce7f..4a780c3 100644 --- a/gitignore/xgboost.gitignore +++ b/gitignore/xgboost.gitignore @@ -84,6 +84,7 @@ target *.gcov *.gcda *.gcno +*.ubj build_tests /tests/cpp/xgboost_test diff --git a/gitlab-ci/data.table.gitlab-ci.yml b/gitlab-ci/data.table.gitlab-ci.yml index 83def11..139a092 100644 --- a/gitlab-ci/data.table.gitlab-ci.yml +++ b/gitlab-ci/data.table.gitlab-ci.yml @@ -205,11 +205,15 @@ test-lin-dev-clang-cran: # stated dependency on R test-lin-ancient-cran: - image: registry.gitlab.com/jangorecki/dockerfiles/r-3.3.0 <<: *test-lin + image: registry.gitlab.com/jangorecki/dockerfiles/r-3.3.0 + variables: + _R_CHECK_FORCE_SUGGESTS_: "FALSE" # can be removed if all dependencies are available (knitr, xts, etc.) script: - *install-deps - - R CMD check --no-manual $(ls -1t data.table_*.tar.gz | head -n 1) + # knitr requires evaluate, which requires R 3.6.0. + # Restore checking vignettes if upgrading our R dependency means knitr can be installed. + - R CMD check --no-manual --no-build-vignettes --ignore-vignettes $(ls -1t data.table_*.tar.gz | head -n 1) .test-win-template: &test-win <<: *test @@ -279,8 +283,7 @@ test-win-old: - echo $CI_JOB_IMAGE > bus/$CI_JOB_NAME/image ## R-release on MacOS -# no macosx runner set yet -.test-mac-rel: +test-mac-rel: <<: *test-mac variables: R_VERSION: "$R_REL_VERSION" diff --git a/pkgdown/reticulate_pkgdown.yml b/pkgdown/reticulate_pkgdown.yml index c92cbe2..5dc4be4 100644 --- a/pkgdown/reticulate_pkgdown.yml +++ b/pkgdown/reticulate_pkgdown.yml @@ -68,6 +68,7 @@ reference: - py_to_r - r_to_py - as.character.python.builtin.bytes + - as.character.python.builtin.str - py_is_null_xptr - py_id - py_len diff --git a/pkgdown/tidyquant_pkgdown.yml b/pkgdown/tidyquant_pkgdown.yml index a8e2bc2..f465123 100644 --- a/pkgdown/tidyquant_pkgdown.yml +++ b/pkgdown/tidyquant_pkgdown.yml @@ -3,105 +3,124 @@ template: bootstrap: 5 bootswatch: lux params: - ganalytics: UA-76139189-2 + ganalytics: G-20GDZ5LL77 navbar: bg: primary - structure: - left: [intro, articles, reference, news] - components: - intro: - text: Start - href: articles/TQ00-introduction-to-tidyquant.html - news: - text: News - href: news/index.html + title: tidyquant + left: + - icon: fa-home + href: index.html + - text: Start + href: articles/TQ00-introduction-to-tidyquant.html + - text: Articles + href: articles/index.html + menu: + - text: Getting Started + - text: Introduction to Tidyquant + href: articles/TQ00-introduction-to-tidyquant.html + - text: Core Functions in Tidyquant + href: articles/TQ01-core-functions-in-tidyquant.html + - text: Quant Integrations in Tidyquant + href: articles/TQ02-quant-integrations-in-tidyquant.html + - text: Scaling and Modeling with Tidyquant + href: articles/TQ03-scaling-and-modeling-with-tidyquant.html + - text: Charting with Tidyquant + href: articles/TQ04-charting-with-tidyquant.html + - text: Performance Analysis with Tidyquant + href: articles/TQ05-performance-analysis-with-tidyquant.html + - text: Excel Integrations in R + href: articles/TQ06-excel-in-r.html + - text: API + href: reference/index.html + menu: + - text: API Functions + href: reference/index.html + - text: News + href: news/index.html + - icon: fab fa-github + href: https://github.com/business-science/tidyquant -articles: -- title: Financial - navbar: Financial Workflow +reference: +- title: Financial APIs + desc: Functions for getting financial data from various API sources. +- subtitle: Get Data from APIs contents: - - TQ00-introduction-to-tidyquant - - TQ01-core-functions-in-tidyquant - - TQ02-quant-integrations-in-tidyquant - - TQ03-scaling-and-modeling-with-tidyquant - - TQ04-charting-with-tidyquant - - TQ05-performance-analysis-with-tidyquant -- title: Excel - navbar: Excel Users + - starts_with("tq_get") + - starts_with("tq_index") + - starts_with("tq_exchange") +- subtitle: API Keys contents: - - TQ06-excel-in-r + - starts_with("quandl") + - contains("api") -reference: +- title: Financial Analysis + desc: Functions for performing various financial analyses. + +- subtitle: Quantitative Transformations + desc: Functions for mutating quantitative data. + contents: + - starts_with("tq_mutate") + - starts_with("tq_transmute") +- subtitle: Portfolio Aggregation + desc: Functions for aggregating 1 or more portfolios. + contents: + - starts_with("tq_portfolio") +- subtitle: Performance Analytics + desc: Functions for performing various financial performance analyses. + contents: + - starts_with("tq_performance") +- subtitle: Charting with ggplot2 + desc: Functions for creating `ggplots` for financial charting. + contents: + - starts_with("geom_") + - starts_with("theme_") + - starts_with("palette_") + - starts_with("scale_") + - starts_with("coord_") + +- title: Excel + desc: Functions providing Excel-like functionality. - - title: Financial APIs - desc: Functions for getting financial data from various API sources. - - subtitle: Get Data from APIs - contents: - - starts_with("tq_get") - - starts_with("tq_index") - - starts_with("tq_exchange") - - subtitle: API Keys - contents: - - starts_with("quandl") - - contains("api") +- subtitle: Pivot Table, VLOOKUP, & Sum-Ifs + desc: Common functions for Excel power-users. + contents: + - pivot_table + - VLOOKUP + - ends_with("_IFS") +- subtitle: Summary Functions + desc: Functions returning a single value from a vector of values. + contents: + - SUM +- subtitle: Mutation Functions + desc: Functions returning multiple values from a vector. + contents: + - ABS +- subtitle: Date & Time Functions + desc: Functions providing date and time functionality. + contents: + - HOLIDAY_SEQUENCE +- subtitle: Financial Functions + desc: Common financial calculations from Excel. + contents: + - NPV - - title: Financial Analysis +- title: Data Sets + contents: + - FANG - - subtitle: Quantitative Transformations - desc: Functions for mutating quantitative data. - contents: - - starts_with("tq_mutate") - - starts_with("tq_transmute") - - subtitle: Portfolio Aggregation - desc: Functions for aggregating 1 or more portfolios. - contents: - - starts_with("tq_portfolio") - - subtitle: Performance Analytics - desc: Functions for performing various financial performance analyses. - contents: - - starts_with("tq_performance") - - subtitle: Charting with ggplot2 - desc: Functions for creating `ggplots` for financial charting. - contents: - - starts_with("geom_") - - starts_with("theme_") - - starts_with("palette_") - - starts_with("scale_") - - starts_with("coord_") +- title: Tidyquant + desc: Package-level information. + contents: + - starts_with("tidyquant") - - title: Excel +- title: Deprecated + contents: + - starts_with("deprecated") - - subtitle: Pivot Table, VLOOKUP, & Sum-Ifs - desc: These __Power-Excel Functions__ provide common functionality that power-users coming from Excel use frequently. - contents: - - "pivot_table" - - "VLOOKUP" - - ends_with("_IFS") - - subtitle: Summary Functions - desc: These functions return a __single value__ from a vector of values - contents: - - SUM - - subtitle: Mutation Functions - desc: These functions return a vector of __multiple values__ the length of the input vector - contents: - - ABS - - subtitle: Date & Time Functions - desc: These functions provide `lubridate` (__date & date-time__) and `timeDate` (__Business Calendar Holiday__) functionality - contents: - - HOLIDAY_SEQUENCE - - subtitle: Financial Functions - desc: These functions provide common financial calcuations from Excel - contents: - - NPV - - title: Data Sets - contents: - - FANG - - title: Tidyquant - desc: Package level information. - contents: - - starts_with("tidyquant") - - title: Deprecated - contents: - - starts_with("deprecated") +repo: + url: + home: https://github.com/business-science/tidyquant + source: https://github.com/business-science/tidyquant/blob/master/ + issue: https://github.com/business-science/tidyquant/issues/