Skip to content

Commit

Permalink
Merge branch 'main' into sm-read-offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
malhotrashivam committed Nov 20, 2023
2 parents a6dfba2 + fe4b551 commit 2911749
Show file tree
Hide file tree
Showing 352 changed files with 10,141 additions and 5,587 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,57 @@ jobs:
remote_user: ${{ secrets.DOCS_USER }}
remote_key: ${{ secrets.DEEPHAVEN_CORE_SSH_KEY }}

typedoc:
runs-on: ubuntu-22.04
concurrency:
group: typedoc-${{ github.workflow }}-${{ github.ref }}
# We don't want to cancel in-progress jobs against main because that might leave the upload in a bad state.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup JDK 11
id: setup-java-11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-11.outputs.path }}" >> $GITHUB_ENV

- name: Run typedoc on JS API
uses: burrunan/gradle-cache-action@v1
with:
job-id: typedoc
arguments: --scan :web-client-api:types:typedoc
gradle-version: wrapper
- name: Upload JavaScript/TypeScript docs
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/upload-artifact@v3
with:
name: typedoc
path: 'web/client-api/types/build/documentation/'
- name: Deploy JavaScript/TypeScript docs
if: ${{ github.ref == 'refs/heads/main' }}
uses: burnett01/[email protected]
with:
switches: -avzr --delete
path: web/client-api/types/build/documentation/
remote_path: deephaven-core/client-api/javascript/
remote_host: ${{ secrets.DOCS_HOST }}
remote_port: ${{ secrets.DOCS_PORT }}
remote_user: ${{ secrets.DOCS_USER }}
remote_key: ${{ secrets.DEEPHAVEN_CORE_SSH_KEY }}

pydoc:
runs-on: ubuntu-22.04
concurrency:
Expand Down Expand Up @@ -191,3 +242,51 @@ jobs:
remote_port: ${{ secrets.DOCS_PORT }}
remote_user: ${{ secrets.DOCS_USER }}
remote_key: ${{ secrets.DEEPHAVEN_CORE_SSH_KEY }}

rdoc:
runs-on: ubuntu-22.04
concurrency:
group: rdoc-${{ github.workflow }}-${{ github.ref }}
# We don't want to cancel in-progress jobs against main because that might leave the upload in a bad state.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup JDK 11
id: setup-java-11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-11.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
.github/scripts/gradle-properties.sh >> gradle.properties
cat gradle.properties
- name: Generate R Docs
uses: burrunan/gradle-cache-action@v1
with:
job-id: rDocs
arguments: R:rClientSite
gradle-version: wrapper

- name: Deploy R Docs
if: ${{ github.ref == 'refs/heads/main' }}
uses: burnett01/[email protected]
with:
switches: -avzr --delete
path: R/rdeephaven/docs/
remote_path: deephaven-core/client-api/r/
remote_host: ${{ secrets.DOCS_HOST }}
remote_port: ${{ secrets.DOCS_PORT }}
remote_user: ${{ secrets.DOCS_USER }}
remote_key: ${{ secrets.DEEPHAVEN_CORE_SSH_KEY }}

- name: Upload JVM Error Logs
uses: actions/upload-artifact@v3
if: failure()
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,26 @@ public OHLCDataSeriesInternal createSeries(String seriesName, final BaseTable t,
timeCol, openCol, highCol, lowCol, closeCol);
}

public String getTimeCol() {
return timeCol;
}

public String getOpenCol() {
return openCol;
}

public String getHighCol() {
return highCol;
}

public String getLowCol() {
return lowCol;
}

public String getCloseCol() {
return closeCol;
}

////////////////////////////// CODE BELOW HERE IS GENERATED -- DO NOT EDIT BY HAND //////////////////////////////
////////////////////////////// TO REGENERATE RUN GenerateMultiSeries //////////////////////////////
////////////////////////////// AND THEN RUN GenerateFigureImmutable //////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,30 @@ public XYErrorBarDataSeriesInternal createSeries(String seriesName, final BaseTa
drawXError, drawYError);
}

public boolean getDrawXError() {
return drawXError;
}

public boolean getDrawYError() {
return drawYError;
}

public String getXLow() {
return xLow;
}

public String getXHigh() {
return xHigh;
}

public String getYLow() {
return yLow;
}

public String getYHigh() {
return yHigh;
}

////////////////////////////// CODE BELOW HERE IS GENERATED -- DO NOT EDIT BY HAND //////////////////////////////
////////////////////////////// TO REGENERATE RUN GenerateMultiSeries //////////////////////////////
////////////////////////////// AND THEN RUN GenerateFigureImmutable //////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ public static void assertColumnsInTable(final Table t, final PlotInfo plotInfo,
assertNotNull(t, "t", plotInfo);
assertNotNull(cols, "cols", plotInfo);
for (String c : cols) {
if (!t.getColumnSourceMap().containsKey(c)) {
if (!t.hasColumns(c)) {
throw new PlotIllegalArgumentException("Column " + c + " could not be found in table.", plotInfo);
}
}
Expand Down
52 changes: 40 additions & 12 deletions R/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def buildRClient = Docker.registerDockerTask(project, 'rClient') {
include 'rdeephaven/NAMESPACE'
include 'rdeephaven/README.md'
include 'rdeephaven/inst/**'
include 'rdeephaven/man/**'
include 'rdeephaven/etc/**'
include 'rdeephaven/R/**'
include 'rdeephaven/src/*.cpp'
include 'rdeephaven/src/Makevars'
include 'rdeephaven/vignettes/*.Rmd'
}
}
dockerfile {
Expand All @@ -54,18 +54,18 @@ def buildRClient = Docker.registerDockerTask(project, 'rClient') {
/out \\
${prefix}/log \\
${prefix}/bin/rdeephaven \\
${prefix}/src/rdeephaven/{inst,man,etc,src,R,bin}
${prefix}/src/rdeephaven/{inst,etc,src,R,bin}
""")
copyFile('rdeephaven/DESCRIPTION', "${prefix}/src/rdeephaven/")
copyFile('rdeephaven/LICENSE', "${prefix}/src/rdeephaven/")
copyFile('rdeephaven/NAMESPACE', "${prefix}/src/rdeephaven/")
copyFile('rdeephaven/README.md', "${prefix}/src/rdeephaven/")
copyFile('rdeephaven/inst/', "${prefix}/src/rdeephaven/inst/")
copyFile('rdeephaven/man/', "${prefix}/src/rdeephaven/man/")
copyFile('rdeephaven/etc/', "${prefix}/src/rdeephaven/etc/")
copyFile('rdeephaven/R/', "${prefix}/src/rdeephaven/R/")
copyFile('rdeephaven/src/*.cpp', "${prefix}/src/rdeephaven/src/")
copyFile('rdeephaven/src/Makevars', "${prefix}/src/rdeephaven/src/")
copyFile('rdeephaven/vignettes/*.Rmd', "${prefix}/src/rdeephaven/vignettes/")
copyFile('r-build.sh', "${prefix}/bin/rdeephaven")
runCommand("PREFIX=${prefix}; " +
'''set -eux ; \
Expand Down Expand Up @@ -115,7 +115,7 @@ def rClientDoc = Docker.registerDockerTask(project, 'rClientDoc') {
}
}
copyOut {
into layout.buildDirectory.dir('man')
into layout.projectDirectory.dir('rdeephaven/man')
}
dockerfile {
from('deephaven/r-client:local-build')
Expand Down Expand Up @@ -153,18 +153,46 @@ def rClientDoc = Docker.registerDockerTask(project, 'rClientDoc') {
copyFile('r-doc.sh', "${prefix}/bin/rdeephaven")
}
parentContainers = [ project.tasks.getByName('rClient') ]
entrypoint = ["${prefix}/bin/rdeephaven/r-doc.sh", '/out']
entrypoint = ["${prefix}/bin/rdeephaven/r-doc.sh"]
containerOutPath = "${prefix}/src/rdeephaven/man"
}

task updateRClientDoc {
dependsOn rClientDoc
doLast {
exec {
workingDir '.'
commandLine 'rm', '-f', 'man/*'
commandLine 'tar', '-C', 'rdeephaven', '-zxvf', 'build/man/man.tgz'
def rClientSite = Docker.registerDockerTask(project, 'rClientSite') {
// Only tested on x86-64, and we only build dependencies for x86-64
platform = 'linux/amd64'
copyIn {
from(layout.projectDirectory) {
include 'r-site.sh'
include 'rdeephaven/man/**'
}
}
copyOut {
into layout.projectDirectory.dir('rdeephaven/docs')
}
dockerfile {
from('deephaven/r-client-doc:local-build')
// We need the contents of 'man' to build the docsite
copyFile('rdeephaven/man/**', "${prefix}/src/rdeephaven/man/")
runCommand("mkdir -p ${prefix}/src/rdeephaven/docs")
runCommand('''echo "status = tryCatch(" \
" {" \
" install.packages('pkgdown', repos='http://cran.us.r-project.org'); " \
" 0" \
" }," \
" error=function(e) 1," \
" warning=function(w) 2" \
");" \
"print(paste0('status=', status));" \
"quit(save='no', status=status)" | \
MAKE="make -j`getconf _NPROCESSORS_ONLN`" R --no-save --no-restore
''')
// Keep this after the package installs above;
// it is likely it changes more frequently.
copyFile('r-site.sh', "${prefix}/bin/rdeephaven")
}
parentContainers = [ project.tasks.getByName('rClientDoc') ]
entrypoint = ["${prefix}/bin/rdeephaven/r-site.sh"]
containerOutPath = "${prefix}/src/rdeephaven/docs"
}

deephavenDocker.shouldLogIfTaskFails testRClient
Expand Down
20 changes: 8 additions & 12 deletions R/r-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,14 @@ fi
trap 'rm -f src/*.o src/*.so' 1 2 15
rm -f src/*.o src/*.so

MAKE="make -j${NCPUS}" R --no-save --no-restore <<EOF
status = tryCatch(
{
install.packages(".", repos=NULL, type="source")
0
},
error=function(e) 1,
warning=function(w) 2
)
print(paste0('status=', status))
quit(save='no', status=status)
EOF
MAKE="make -j${NCPUS}"
cd .. && \
rm -f rdeephaven_*.tar.gz && \
R CMD build rdeephaven && \
R CMD INSTALL --no-multiarch --with-keep.source rdeephaven_*.tar.gz && \
rm -f rdeephaven_*.tar.gz && \
cd rdeephaven ||
exit 1

rm -f src/*.o src/*.so

Expand Down
11 changes: 0 additions & 11 deletions R/r-doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

set -euo pipefail

if [ "$#" -ne 1 ]; then
echo "Usage: $0 output-dir" 1>&2
exit 1
fi

if [ -z "${DH_PREFIX}" ]; then
echo "$0: Environment variable DH_PREFIX is not set, aborting." 1>&2
exit 1
Expand All @@ -16,8 +11,6 @@ source $DH_PREFIX/env.sh

cd $DH_PREFIX/src/rdeephaven

OUT_DIR="$1"

R --no-save --no-restore <<EOF
library('roxygen2')
status = tryCatch(
Expand All @@ -30,7 +23,3 @@ status = tryCatch(
print(paste0('status=', status))
quit(save='no', status=status)
EOF

tar -zcf $OUT_DIR/man.tgz man

exit 0
25 changes: 25 additions & 0 deletions R/r-site.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

set -euo pipefail

if [ -z "${DH_PREFIX}" ]; then
echo "$0: Environment variable DH_PREFIX is not set, aborting." 1>&2
exit 1
fi

source $DH_PREFIX/env.sh

cd $DH_PREFIX/src/rdeephaven

R --no-save --no-restore <<EOF
library('pkgdown')
status = tryCatch(
{
pkgdown::build_site()
0
},
error=function(e) 1
)
print(paste0('status=', status))
quit(save='no', status=status)
EOF
5 changes: 5 additions & 0 deletions R/rdeephaven/.Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^doc$
^Meta$
4 changes: 4 additions & 0 deletions R/rdeephaven/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ lib/cpp-dependencies/src
lib/cpp-dependencies/env.sh
*.o
*.so
docs
inst/doc
/doc/
/Meta/
10 changes: 8 additions & 2 deletions R/rdeephaven/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rdeephaven
Type: Package
Title: R Client for Deephaven Core
Version: 0.30.0
Version: 0.31.0
Date: 2023-05-12
Author: Deephaven Data Labs
Maintainer: Alex Peters <[email protected]>
Expand All @@ -16,6 +16,12 @@ License: Apache License (== 2.0)
Depends: R (>= 3.5.3)
Imports: Rcpp (>= 1.0.10), arrow (>= 12.0.0), R6 (>= 2.5.0), dplyr (>= 1.1.0), utils (>= 3.5.3)
LinkingTo: Rcpp
Suggests: testthat (>= 3.0.0), lubridate (>= 1.9.0), zoo (>= 1.8-0)
Suggests:
testthat (>= 3.0.0),
lubridate (>= 1.9.0),
zoo (>= 1.8-0),
knitr,
rmarkdown
Config/testthat/edition: 3
RoxygenNote: 7.2.3
VignetteBuilder: knitr
Loading

0 comments on commit 2911749

Please sign in to comment.