-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6500fe
commit f6261ee
Showing
3 changed files
with
104 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# https://github.com/Appsilon/shiny.blueprint | ||
name: pkgdown | ||
on: push | ||
permissions: | ||
|
@@ -19,34 +18,68 @@ jobs: | |
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
r-version: 'release' | ||
|
||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev | ||
sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev libgit2-dev | ||
- name: Print R session info | ||
run: | | ||
Rscript -e "sessionInfo()" | ||
Rscript -e "installed.packages()[, c('Package', 'Version')]" | ||
- name: Install R package dependencies | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::pkgdown, github::dereckmezquita/kucoin, local::. | ||
- name: Debug environment before dependency installation | ||
run: | | ||
echo "R version:" | ||
R --version | ||
echo "R library paths:" | ||
Rscript -e ".libPaths()" | ||
echo "System libraries:" | ||
dpkg -l | grep -E 'libcurl4-openssl-dev|libssl-dev|libxml2-dev|libgit2-dev' | ||
echo "Contents of DESCRIPTION file:" | ||
cat DESCRIPTION | ||
echo "Available disk space:" | ||
df -h | ||
- name: Install R package dependencies (with debug) | ||
run: | | ||
options(warn = 2) | ||
tryCatch({ | ||
remotes::install_deps(dependencies = TRUE, upgrade = "never") | ||
remotes::install_github("dereckmezquita/kucoin") | ||
remotes::install_cran(c("pkgdown", "rcmdcheck", "remotes")) | ||
}, error = function(e) { | ||
message("Error occurred during dependency installation:") | ||
print(e) | ||
message("Session info:") | ||
print(sessionInfo()) | ||
message("Installed packages:") | ||
print(installed.packages()[, c("Package", "Version")]) | ||
stop("Dependency installation failed") | ||
}) | ||
shell: Rscript {0} | ||
|
||
- name: Configure git | ||
if: success() | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: List package contents | ||
if: success() | ||
run: | | ||
ls -R | ||
- name: Build package | ||
if: success() | ||
run: | | ||
R CMD build . --no-build-vignettes | ||
- name: Install and check package | ||
if: success() | ||
run: | | ||
R CMD INSTALL --build . | ||
R CMD check --no-manual --no-tests --no-examples --no-codoc --no-vignettes --no-build-vignettes *tar.gz | ||
|
@@ -63,6 +96,7 @@ jobs: | |
find . -name "*.fail" -exec cat {} \; | ||
- name: Deploy to branch | ||
if: success() | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
shell: Rscript {0} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: dmplot | ||
Title: A framework and toolkit for financial and time series data | ||
Title: A Framework and Toolkit for Financial and Time Series Data | ||
Version: 1.5.0 | ||
URL: https://github.com/dereckmezquita/dmplot | ||
Authors@R: | ||
|
@@ -9,7 +9,7 @@ Authors@R: | |
email = "[email protected]", | ||
comment = c(ORCID = "0000-0002-9307-6762")) | ||
Maintainer: Dereck Mezquita <[email protected]> | ||
Description: A plotting toolkit for financial and time series data. The package provides algorithms, functions, layers and outlines a framework for working with working with and analysing financial and time series data. | ||
Description: A plotting toolkit for financial and time series data. The package provides algorithms, functions, layers and outlines a framework for working with and analysing financial and time series data. | ||
Depends: R (>= 4.1.0) | ||
LinkingTo: Rcpp | ||
Imports: | ||
|
@@ -28,6 +28,8 @@ Suggests: | |
rcmdcheck, | ||
TTR, | ||
remotes, | ||
gridExtra | ||
gridExtra, | ||
testthat (>= 3.0.0) | ||
Remotes: | ||
dereckmezquita/kucoin | ||
Config/testthat/edition: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Debug script for dmplot package build | ||
|
||
library(devtools) | ||
|
||
# Check R version and installed packages | ||
cat("R version:\n") | ||
print(R.version) | ||
|
||
cat("\nInstalled packages:\n") | ||
print(installed.packages()[, c("Package", "Version")]) | ||
|
||
# Check if required system libraries are installed | ||
system_libs <- c("libcurl4-openssl-dev", "libssl-dev", "libxml2-dev", "libgit2-dev") | ||
for (lib in system_libs) { | ||
status <- system(paste("dpkg -s", lib, ">/dev/null 2>&1"), intern = TRUE) | ||
cat(sprintf("%s installed: %s\n", lib, ifelse(status == 0, "Yes", "No"))) | ||
} | ||
|
||
# Attempt to load and build the package | ||
cat("\nAttempting to load and build the package:\n") | ||
tryCatch({ | ||
load_all() | ||
document() | ||
build() | ||
}, error = function(e) { | ||
cat("Error occurred during package build:\n") | ||
print(e) | ||
}) | ||
|
||
# Check for common issues | ||
cat("\nChecking for common issues:\n") | ||
|
||
if (!file.exists("DESCRIPTION")) { | ||
cat("DESCRIPTION file is missing.\n") | ||
} else { | ||
cat("DESCRIPTION file exists.\n") | ||
} | ||
|
||
if (!dir.exists("R")) { | ||
cat("R directory is missing.\n") | ||
} else { | ||
cat("R directory exists.\n") | ||
} | ||
|
||
if (!dir.exists("src")) { | ||
cat("src directory is missing.\n") | ||
} else { | ||
cat("src directory exists.\n") | ||
cpp_files <- list.files("src", pattern = "\\.cpp$") | ||
if (length(cpp_files) == 0) { | ||
cat("No .cpp files found in src directory.\n") | ||
} else { | ||
cat("Found", length(cpp_files), ".cpp files in src directory.\n") | ||
} | ||
} | ||
|
||
# Additional checks can be added here | ||
|
||
cat("\nDebug script completed.\n") |