From 86a6fe42c743d076f05a5466edc2d4d1589d6d9e Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Fri, 30 Jul 2021 00:56:12 -0400 Subject: [PATCH 01/41] Create r.yml --- .github/workflows/r.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/r.yml diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml new file mode 100644 index 0000000..1d68121 --- /dev/null +++ b/.github/workflows/r.yml @@ -0,0 +1,27 @@ +on: + push: + branches: + - master + pull_request: + branches: + - master + +name: lint-project + +jobs: + lint-project: + runs-on: macOS-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v1 + + - name: Install lintr + run: install.packages("lintr") + shell: Rscript {0} + + - name: Lint root directory + run: lintr::lint_dir() + shell: Rscript {0} From 2b463c43181c3dfc74280c620fb4ab6c7c6c604b Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Fri, 30 Jul 2021 01:02:59 -0400 Subject: [PATCH 02/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 1d68121..a6bb093 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -23,5 +23,5 @@ jobs: shell: Rscript {0} - name: Lint root directory - run: lintr::lint_dir() + run: lintr::lint_dir( exclusions = list("R/ClassifyData.R", "FetchData", "learning")) shell: Rscript {0} From 579b123541abae9b5e22aceec79c2a9b98e18bc6 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Fri, 30 Jul 2021 01:07:58 -0400 Subject: [PATCH 03/41] Update FetchBeerRatings.R --- FetchData/FetchBeerRatings.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FetchData/FetchBeerRatings.R b/FetchData/FetchBeerRatings.R index 174a726..f8a587f 100644 --- a/FetchData/FetchBeerRatings.R +++ b/FetchData/FetchBeerRatings.R @@ -7,7 +7,7 @@ # For more information see: https://creativecommons.org/licenses/by-nc/3.0/ # All rights reserved. require(data.table) -startup <- function() { +startup <- function( { #initialize system initializeSystem(0) @@ -43,4 +43,4 @@ setkey(beer.data, beer_beerid) b.d.500 <- beer.data[, list(no_of_reviews=nrow(.SD)), by=beer_beerid][no_of_reviews >= 500] setkey(b.d.500, beer_beerid) #merge to get all records ofbeers which have 500 or more reviews -b.d.500 <- merge(b.d.500, beer.data, all=F) \ No newline at end of file +b.d.500 <- merge(b.d.500, beer.data, all=F) From 06fad36b52d1ec5948700ed1a4851b6002051129 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Fri, 30 Jul 2021 01:12:18 -0400 Subject: [PATCH 04/41] Update CreatePADS.R --- CreatePADS.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CreatePADS.R b/CreatePADS.R index 73040c0..f12bfd5 100644 --- a/CreatePADS.R +++ b/CreatePADS.R @@ -75,7 +75,7 @@ loadStates <- function(){ # # Initialize Padification Process # -initializeSystem <- function(stack=0){ +initializeSystem <- function(stack=0{ # turn off scientific formatting - getOption("scipen") options(scipen=999) @@ -87,7 +87,7 @@ initializeSystem <- function(stack=0){ assign("lDays", lDays, envir=.GlobalEnv) #loadStates - loadStates() + loadStates( #initialize solr docs #assign("solr.index.docs", list(), envir=.GlobalEnv) @@ -278,4 +278,4 @@ padify <- function(series, series.data, x.plot.band=NULL, y.plot.band=NULL){ # "subcategory"=pmd$subcategory, "tags"=pmd$tags, "author"="system") # solr.index.docs[[length(solr.index.docs)+1]] <<- doc } -} \ No newline at end of file +} From af9990098d9088affd7f3a430c721231f5e96bf0 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Fri, 30 Jul 2021 01:17:41 -0400 Subject: [PATCH 05/41] Update CreatePADS.R --- CreatePADS.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CreatePADS.R b/CreatePADS.R index f12bfd5..9dec68d 100644 --- a/CreatePADS.R +++ b/CreatePADS.R @@ -78,7 +78,7 @@ loadStates <- function(){ initializeSystem <- function(stack=0{ # turn off scientific formatting - getOption("scipen") - options(scipen=999) + options(scipen=999; # day and months facors lMonths <- c("January","February","March", "April","May","June","July","August","September", "October","November","December") From c30f7f4104949bb7beaf5cf49514d69fcff1b9a4 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Fri, 30 Jul 2021 01:18:24 -0400 Subject: [PATCH 06/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index a6bb093..1d68121 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -23,5 +23,5 @@ jobs: shell: Rscript {0} - name: Lint root directory - run: lintr::lint_dir( exclusions = list("R/ClassifyData.R", "FetchData", "learning")) + run: lintr::lint_dir() shell: Rscript {0} From 95a8e1d2710c86ac71cdf07b72e01eda52913fd7 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Fri, 30 Jul 2021 01:31:35 -0400 Subject: [PATCH 07/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 1d68121..4f6067b 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -23,5 +23,5 @@ jobs: shell: Rscript {0} - name: Lint root directory - run: lintr::lint_dir() + run: lintr::lint('CreatePADS.R') shell: Rscript {0} From 1356790d273cb0a5a4dee77f69522b041f51be54 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Fri, 30 Jul 2021 01:47:35 -0400 Subject: [PATCH 08/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 4f6067b..40d2acc 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -23,5 +23,5 @@ jobs: shell: Rscript {0} - name: Lint root directory - run: lintr::lint('CreatePADS.R') + run: lintr::lint('CreatePADS.R',type = c("error")) shell: Rscript {0} From e750f6fa66f22bc4d939c58ca976f1470a0ec446 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Fri, 30 Jul 2021 01:49:51 -0400 Subject: [PATCH 09/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 40d2acc..4f6067b 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -23,5 +23,5 @@ jobs: shell: Rscript {0} - name: Lint root directory - run: lintr::lint('CreatePADS.R',type = c("error")) + run: lintr::lint('CreatePADS.R') shell: Rscript {0} From b8f6d3791de7f705d50ad40c85d26c57bb6161fd Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Fri, 30 Jul 2021 01:55:55 -0400 Subject: [PATCH 10/41] Update ClassifyData.R --- ClassifyData.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ClassifyData.R b/ClassifyData.R index deb46ca..085cc93 100644 --- a/ClassifyData.R +++ b/ClassifyData.R @@ -10,8 +10,8 @@ # # Generate extra date cols # -generateExtraDateCols <- function(data, col.index) { - lMonths <- c("January","February","March", "April","May","June","July","August","September", "October","November","December") +generateExtraDateCols < function(data, col.index) + lMonths <- c("January","February","March", "April,"May","June","July","August","September", "October","November","December") lDays <- c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday") #data$Day_generated=factor(weekdays(data[,col.index]), levels=lDays, ordered=TRUE) data$Day_g=factor(weekdays(data[,col.index]), levels=lDays) @@ -264,4 +264,4 @@ testClassification <- function() { # #`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/] - } \ No newline at end of file + } From 7eb63ccf26ae137207687050cf6cbf0fa2f504c1 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Fri, 30 Jul 2021 01:56:56 -0400 Subject: [PATCH 11/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 4f6067b..ca2259b 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -23,5 +23,5 @@ jobs: shell: Rscript {0} - name: Lint root directory - run: lintr::lint('CreatePADS.R') + run: lintr::lint('ClassifyData.R') shell: Rscript {0} From d5bc5926ac372c37804d16775cb514710f12b031 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Sun, 1 Aug 2021 15:08:59 -0400 Subject: [PATCH 12/41] Delete r.yml --- .github/workflows/r.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/workflows/r.yml diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml deleted file mode 100644 index ca2259b..0000000 --- a/.github/workflows/r.yml +++ /dev/null @@ -1,27 +0,0 @@ -on: - push: - branches: - - master - pull_request: - branches: - - master - -name: lint-project - -jobs: - lint-project: - runs-on: macOS-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v1 - - - name: Install lintr - run: install.packages("lintr") - shell: Rscript {0} - - - name: Lint root directory - run: lintr::lint('ClassifyData.R') - shell: Rscript {0} From 90ef026404f57fcdde0b201aaf87d0586aaa6a52 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Sun, 1 Aug 2021 15:09:11 -0400 Subject: [PATCH 13/41] Create r.yml --- .github/workflows/r.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/r.yml diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml new file mode 100644 index 0000000..cad232b --- /dev/null +++ b/.github/workflows/r.yml @@ -0,0 +1,37 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# +# See https://github.com/r-lib/actions/tree/master/examples#readme for +# additional example workflows available for the R community. + +name: R + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: macOS-latest + strategy: + matrix: + r-version: [3.5, 3.6] + + steps: + - uses: actions/checkout@v2 + - name: Set up R ${{ matrix.r-version }} + uses: r-lib/actions/setup-r@ffe45a39586f073cc2e9af79c4ba563b657dc6e3 + with: + r-version: ${{ matrix.r-version }} + - name: Install dependencies + run: | + install.packages(c("remotes", "rcmdcheck")) + remotes::install_deps(dependencies = TRUE) + shell: Rscript {0} + - name: Check + run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + shell: Rscript {0} From 3b8d0a5b67c3fd0d1b06668884089da8569d9990 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Sun, 1 Aug 2021 15:14:55 -0400 Subject: [PATCH 14/41] Update r.yml --- .github/workflows/r.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index cad232b..abde42a 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -17,16 +17,11 @@ on: jobs: build: runs-on: macOS-latest - strategy: - matrix: - r-version: [3.5, 3.6] + steps: - uses: actions/checkout@v2 - - name: Set up R ${{ matrix.r-version }} - uses: r-lib/actions/setup-r@ffe45a39586f073cc2e9af79c4ba563b657dc6e3 - with: - r-version: ${{ matrix.r-version }} + - uses: r-lib/actions/setup-r@v1 - name: Install dependencies run: | install.packages(c("remotes", "rcmdcheck")) From 1311d6547d7a12553ade1f387887b23692a1794a Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Sun, 1 Aug 2021 15:19:56 -0400 Subject: [PATCH 15/41] Update r.yml --- .github/workflows/r.yml | 45 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index abde42a..e776e67 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -1,32 +1,31 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# -# See https://github.com/r-lib/actions/tree/master/examples#readme for -# additional example workflows available for the R community. - -name: R - on: push: - branches: [ master ] + branches: + - main + - master pull_request: - branches: [ master ] + branches: + - main + - master + +name: lint-project jobs: - build: + lint-project: runs-on: macOS-latest - - + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 + - uses: r-lib/actions/setup-r@v1 - - name: Install dependencies - run: | - install.packages(c("remotes", "rcmdcheck")) - remotes::install_deps(dependencies = TRUE) - shell: Rscript {0} - - name: Check - run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") - shell: Rscript {0} + + - name: R-actions + # You may pin to the exact commit or the version. + # uses: Swechhya/R-actions@772117ee961f81f5e2b00c2406e84456dd62f7a4 + uses: Swechhya/R-actions@v1.2 + with: + # What should be run? One of: ["all", "build"] + action: all # optional, default is all + # Is Bioconductor package needed? One of [true, false] + needsBioc: false# optional From 8c7034a1a6a164dac84d71b8d41dcf2177156ecc Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Sun, 1 Aug 2021 15:21:36 -0400 Subject: [PATCH 16/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index e776e67..9f93485 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -12,7 +12,7 @@ name: lint-project jobs: lint-project: - runs-on: macOS-latest + runs-on: linux env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: From 2561e26e3d0fa3e0dde9034c9fa765d3f08b4a44 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Sun, 1 Aug 2021 15:24:45 -0400 Subject: [PATCH 17/41] Update r.yml --- .github/workflows/r.yml | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 9f93485..e6b2453 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -1,31 +1,13 @@ -on: - push: - branches: - - main - - master - pull_request: - branches: - - main - - master - -name: lint-project +name: R Build and Checks +on: [push, pull_request] jobs: - lint-project: - runs-on: linux - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + build: + runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v1 - - - name: R-actions - # You may pin to the exact commit or the version. - # uses: Swechhya/R-actions@772117ee961f81f5e2b00c2406e84456dd62f7a4 - uses: Swechhya/R-actions@v1.2 - with: - # What should be run? One of: ["all", "build"] - action: all # optional, default is all - # Is Bioconductor package needed? One of [true, false] - needsBioc: false# optional + - uses: actions/checkout@v1 + - name: R Build and Checks + uses: Swechhya/R-actions@v1.2 + with: + action: 'all' + needsBioc: false From 61b42f72711241ad8f5fe1b378f879c99784b611 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Sun, 1 Aug 2021 15:45:43 -0400 Subject: [PATCH 18/41] Update r.yml --- .github/workflows/r.yml | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index e6b2453..27678e7 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -1,13 +1,29 @@ -name: R Build and Checks -on: [push, pull_request] +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + +name: lint-project jobs: - build: - runs-on: ubuntu-18.04 + lint-project: + runs-on: macOS-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v1 - - name: R Build and Checks - uses: Swechhya/R-actions@v1.2 - with: - action: 'all' - needsBioc: false + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v1 + + - name: Install lintr + run: install.packages("lintr") + shell: Rscript {0} + + - name: Lint root directory + run: lintr::lint(filename = "ClassifyData.R") + shell: Rscript {0} From aaa712ae47ab500f38c4d4763d9958b8f05eede6 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Sun, 1 Aug 2021 15:49:31 -0400 Subject: [PATCH 19/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 27678e7..95230b1 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -25,5 +25,5 @@ jobs: shell: Rscript {0} - name: Lint root directory - run: lintr::lint(filename = "ClassifyData.R") + run: lintr::lint(filename = "ClassifyDat.R") shell: Rscript {0} From 4fa20c871d16d463a2a8b2aca4ccba97f859a86a Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Sun, 1 Aug 2021 21:24:25 -0400 Subject: [PATCH 20/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 95230b1..a9b7312 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -25,5 +25,5 @@ jobs: shell: Rscript {0} - name: Lint root directory - run: lintr::lint(filename = "ClassifyDat.R") + run: lintr::lint(filename = "DefaultChartForPAD.R") shell: Rscript {0} From 74188ff77e445d290c33cb23239f0f2d55927910 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Sun, 1 Aug 2021 21:58:47 -0400 Subject: [PATCH 21/41] Update DefaultChartForPAD.R --- DefaultChartForPAD.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DefaultChartForPAD.R b/DefaultChartForPAD.R index 15c87a8..1f994fe 100644 --- a/DefaultChartForPAD.R +++ b/DefaultChartForPAD.R @@ -16,7 +16,7 @@ # Get default info for pad # getDefault <- function(){ - return(list(dim="", mea="", size="", yaxis=list(), xaxis=list(), chart=list())) + return(list(dim="", mea="", size="", yaxis=list(), xaxis=list(), chart=list()) } # From 9accfb985f4a1b16d4aff8b2cd65741607c8ffdf Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 17:15:59 -0400 Subject: [PATCH 22/41] Update r.yml --- .github/workflows/r.yml | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index a9b7312..5896242 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -1,29 +1,21 @@ -on: - push: - branches: - - main - - master - pull_request: - branches: - - main - - master +name: Push-to-EC2 -name: lint-project +on: push jobs: - lint-project: - runs-on: macOS-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v1 + deploy: + name: Push to EC2 Instance + runs-on: ubuntu-latest - - name: Install lintr - run: install.packages("lintr") - shell: Rscript {0} + steps: + - name: Checkout the code + uses: actions/checkout@v1 - - name: Lint root directory - run: lintr::lint(filename = "DefaultChartForPAD.R") - shell: Rscript {0} + - name: Deploy to my EC2 instance + uses: easingthemes/ssh-deploy@v2.1.5 + env: + SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY }} + SOURCE: "./" + REMOTE_HOST: "ec2-3-234-99-37.compute-1.amazonaws.com" + REMOTE_USER: "sujaykhandekar" + TARGET: "/newstorage/users/sujay/R_check" From 4d0ee05d966f352eb94a718dcb9668ae860a20b7 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 17:22:33 -0400 Subject: [PATCH 23/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 5896242..06de8e2 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -16,6 +16,6 @@ jobs: env: SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY }} SOURCE: "./" - REMOTE_HOST: "ec2-3-234-99-37.compute-1.amazonaws.com" + REMOTE_HOST: "ec2-3-234-99-37.us-east-1.compute-1.amazonaws.com" REMOTE_USER: "sujaykhandekar" TARGET: "/newstorage/users/sujay/R_check" From d93924c48869c0b036a33bd57f9c7c8a34d1591b Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 17:23:50 -0400 Subject: [PATCH 24/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 06de8e2..5896242 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -16,6 +16,6 @@ jobs: env: SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY }} SOURCE: "./" - REMOTE_HOST: "ec2-3-234-99-37.us-east-1.compute-1.amazonaws.com" + REMOTE_HOST: "ec2-3-234-99-37.compute-1.amazonaws.com" REMOTE_USER: "sujaykhandekar" TARGET: "/newstorage/users/sujay/R_check" From d898495d4d654d804e029b15daab795ded663d22 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 17:34:47 -0400 Subject: [PATCH 25/41] Update r.yml --- .github/workflows/r.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 5896242..f7248e8 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -11,11 +11,12 @@ jobs: - name: Checkout the code uses: actions/checkout@v1 - - name: Deploy to my EC2 instance - uses: easingthemes/ssh-deploy@v2.1.5 - env: - SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY }} - SOURCE: "./" - REMOTE_HOST: "ec2-3-234-99-37.compute-1.amazonaws.com" - REMOTE_USER: "sujaykhandekar" - TARGET: "/newstorage/users/sujay/R_check" + - name: copy file via ssh key + uses: appleboy/scp-action@master + with: + host: 'ec2-3-234-99-37.compute-1.amazonaws.com' + username: 'sujay' + port: 22 + key: ${{ secrets.EC2_SSH_KEY }} + source: "./" + target: "/newstorage/users/sujay/" From 0dcd94eb9212c53adf46dcb155b094a5130fd6f6 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 17:36:30 -0400 Subject: [PATCH 26/41] Update r.yml --- .github/workflows/r.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index f7248e8..6704600 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -18,5 +18,5 @@ jobs: username: 'sujay' port: 22 key: ${{ secrets.EC2_SSH_KEY }} - source: "./" - target: "/newstorage/users/sujay/" + source: "/." + target: "/newstorage/users/sujay/R_check" From d89b81da1eb51b339fdfd20b95ef9000ea1a9a5a Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 17:37:42 -0400 Subject: [PATCH 27/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 6704600..32be143 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -15,7 +15,7 @@ jobs: uses: appleboy/scp-action@master with: host: 'ec2-3-234-99-37.compute-1.amazonaws.com' - username: 'sujay' + username: 'sujaykhandekar' port: 22 key: ${{ secrets.EC2_SSH_KEY }} source: "/." From 13dcf4db0419201460edef1f28c3ee7d337a8c24 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 17:39:37 -0400 Subject: [PATCH 28/41] Update r.yml --- .github/workflows/r.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 32be143..9e3b1ad 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -18,5 +18,5 @@ jobs: username: 'sujaykhandekar' port: 22 key: ${{ secrets.EC2_SSH_KEY }} - source: "/." - target: "/newstorage/users/sujay/R_check" + source: "R_check/ClassifyData.R" + target: "/newstorage/users/sujay" From 17154c16c6ba9350fb494ec92aa6be9ed5c0f774 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 17:45:02 -0400 Subject: [PATCH 29/41] Update r.yml --- .github/workflows/r.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 9e3b1ad..e70d54c 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -19,4 +19,15 @@ jobs: port: 22 key: ${{ secrets.EC2_SSH_KEY }} source: "R_check/ClassifyData.R" - target: "/newstorage/users/sujay" + target: "/newstorage/users/sujay/" + + # - name: Deploy Files + # uses: appleboy/scp-action@master + # env: + # HOST: 'ec2-3-234-99-37.compute-1.amazonaws.com' + # USERNAME: 'sujaykhandekar' + # KEY: ${{ secrets.EC2_SSH_KEY }} + # with: + # source: R_check/ + # target: "/newstorage/users/sujay/" + # strip_components: 1 From 619413089aeb24ceacd997ae8d39250504aed708 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 17:47:20 -0400 Subject: [PATCH 30/41] Update r.yml --- .github/workflows/r.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index e70d54c..ba94470 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -11,23 +11,23 @@ jobs: - name: Checkout the code uses: actions/checkout@v1 - - name: copy file via ssh key +# - name: copy file via ssh key +# uses: appleboy/scp-action@master +# with: +# host: 'ec2-3-234-99-37.compute-1.amazonaws.com' +# username: 'sujaykhandekar' +# port: 22 +# key: ${{ secrets.EC2_SSH_KEY }} +# source: "R_check/ClassifyData.R" +# target: "/newstorage/users/sujay/" + + - name: Deploy Files uses: appleboy/scp-action@master + env: + HOST: 'ec2-3-234-99-37.compute-1.amazonaws.com' + USERNAME: 'sujaykhandekar' + KEY: ${{ secrets.EC2_SSH_KEY }} with: - host: 'ec2-3-234-99-37.compute-1.amazonaws.com' - username: 'sujaykhandekar' - port: 22 - key: ${{ secrets.EC2_SSH_KEY }} - source: "R_check/ClassifyData.R" + source: R_check/ target: "/newstorage/users/sujay/" - - # - name: Deploy Files - # uses: appleboy/scp-action@master - # env: - # HOST: 'ec2-3-234-99-37.compute-1.amazonaws.com' - # USERNAME: 'sujaykhandekar' - # KEY: ${{ secrets.EC2_SSH_KEY }} - # with: - # source: R_check/ - # target: "/newstorage/users/sujay/" - # strip_components: 1 + strip_components: 1 From ebc1cae0879e73f1f2582812acc84566d8944fba Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 17:48:46 -0400 Subject: [PATCH 31/41] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index ba94470..81dc348 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -28,6 +28,6 @@ jobs: USERNAME: 'sujaykhandekar' KEY: ${{ secrets.EC2_SSH_KEY }} with: - source: R_check/ + source: FetchData/ target: "/newstorage/users/sujay/" strip_components: 1 From 9b4d8b0c9af9c7a1c3ada46900f9259df4bedf1f Mon Sep 17 00:00:00 2001 From: sujay Date: Mon, 2 Aug 2021 21:39:13 -0400 Subject: [PATCH 32/41] added sh file --- deploy_to_aws.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 deploy_to_aws.sh diff --git a/deploy_to_aws.sh b/deploy_to_aws.sh new file mode 100644 index 0000000..16cd2c5 --- /dev/null +++ b/deploy_to_aws.sh @@ -0,0 +1,9 @@ +echo 'Starting to Deploy...' +ssh ubuntu@ubuntu@3.234.99.37 " sudo docker image prune -f + cd /newstorage/users/sujay/R_check + sudo docker-compose down + git fetch origin + git reset --hard origin && echo 'You are doing well' + sudo docker-compose build && sudo docker-compose up -d + " +echo 'Deployment completed successfully' From 26f8d63a5bf6a8488409f23b290bf0b11ca7d40f Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 21:40:11 -0400 Subject: [PATCH 33/41] Update deploy_to_aws.sh --- deploy_to_aws.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy_to_aws.sh b/deploy_to_aws.sh index 16cd2c5..456bd42 100644 --- a/deploy_to_aws.sh +++ b/deploy_to_aws.sh @@ -1,5 +1,5 @@ echo 'Starting to Deploy...' -ssh ubuntu@ubuntu@3.234.99.37 " sudo docker image prune -f +ssh ubuntu@3.234.99.37 " sudo docker image prune -f cd /newstorage/users/sujay/R_check sudo docker-compose down git fetch origin From 876ffbc5b246f165e85df1e22b444d04a8f0b4db Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 21:57:10 -0400 Subject: [PATCH 34/41] Update r.yml --- .github/workflows/r.yml | 47 ++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 81dc348..65bf1f2 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -1,33 +1,22 @@ -name: Push-to-EC2 - -on: push - +name: Deploy EC2 +on: + push: + branches: + - master + pull_request: + types: [closed] jobs: - deploy: - name: Push to EC2 Instance + merge-PR: + if: github.event.pull_request.merged == true runs-on: ubuntu-latest - steps: - - name: Checkout the code - uses: actions/checkout@v1 - -# - name: copy file via ssh key -# uses: appleboy/scp-action@master -# with: -# host: 'ec2-3-234-99-37.compute-1.amazonaws.com' -# username: 'sujaykhandekar' -# port: 22 -# key: ${{ secrets.EC2_SSH_KEY }} -# source: "R_check/ClassifyData.R" -# target: "/newstorage/users/sujay/" - - - name: Deploy Files - uses: appleboy/scp-action@master - env: - HOST: 'ec2-3-234-99-37.compute-1.amazonaws.com' - USERNAME: 'sujaykhandekar' - KEY: ${{ secrets.EC2_SSH_KEY }} + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 with: - source: FetchData/ - target: "/newstorage/users/sujay/" - strip_components: 1 + key: ${{ secrets.EC2_SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.KNOWN_HOSTS }} + - name: rsync over ssh + run: ./deploy_to_aws.sh From 282861ec0a368fad668f363c9829ebd58fc6e571 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Mon, 2 Aug 2021 21:59:55 -0400 Subject: [PATCH 35/41] Update ClassifyData.R --- ClassifyData.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ClassifyData.R b/ClassifyData.R index 085cc93..3d908c6 100644 --- a/ClassifyData.R +++ b/ClassifyData.R @@ -4,7 +4,7 @@ # Copyright (c) 2011, under the Creative Commons Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0) License # For more information see: https://creativecommons.org/licenses/by-nc/3.0/ # All rights reserved. - +# new addition # From aeae799fd74f6411b935133e35cd82155a9074be Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Wed, 4 Aug 2021 11:09:17 -0400 Subject: [PATCH 36/41] Update r.yml --- .github/workflows/r.yml | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 65bf1f2..0177748 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -1,22 +1,29 @@ -name: Deploy EC2 on: push: branches: + - main - master pull_request: - types: [closed] + branches: + - main + - master + +name: lint-project + jobs: - merge-PR: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest + lint-project: + runs-on: macOS-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.EC2_SSH_KEY }} - name: id_rsa - known_hosts: ${{ secrets.KNOWN_HOSTS }} - - name: rsync over ssh - run: ./deploy_to_aws.sh + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v1 + + - name: Install lintr + run: install.packages("lintr") + shell: Rscript {0} + + - name: Lint root directory + run: lintr::lint(filename = 'ClassifyData.R') + shell: Rscript {0} From 6f8a659dc1beedcb7f69013d00fb2a12fd8a714d Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Thu, 5 Aug 2021 12:18:54 -0400 Subject: [PATCH 37/41] Update deploy_to_aws.sh --- deploy_to_aws.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy_to_aws.sh b/deploy_to_aws.sh index 456bd42..1375f0a 100644 --- a/deploy_to_aws.sh +++ b/deploy_to_aws.sh @@ -1,3 +1,4 @@ +#!/bin/bash echo 'Starting to Deploy...' ssh ubuntu@3.234.99.37 " sudo docker image prune -f cd /newstorage/users/sujay/R_check From 8fe3177ea2be03e9f037645955ccd21e718e1eb1 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Thu, 5 Aug 2021 12:35:54 -0400 Subject: [PATCH 38/41] Update r.yml --- .github/workflows/r.yml | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 0177748..65f708d 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -1,29 +1,21 @@ +name: Deploy EC2 on: push: - branches: - - main - - master + branches: [ master ] pull_request: - branches: - - main - - master - -name: lint-project - + branches: [ master ] jobs: - lint-project: - runs-on: macOS-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + merge-PR: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v1 - - - name: Install lintr - run: install.packages("lintr") - shell: Rscript {0} - - - name: Lint root directory - run: lintr::lint(filename = 'ClassifyData.R') - shell: Rscript {0} + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.EC2_SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.KNOWN_HOSTS }} + - name: rsync over ssh + run: ./deploy_to_aws.sh From 1297f89458d70616607e62613c73e79f08074943 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Thu, 5 Aug 2021 12:37:00 -0400 Subject: [PATCH 39/41] Update ClassifyData.R --- ClassifyData.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ClassifyData.R b/ClassifyData.R index 3d908c6..b24c8cd 100644 --- a/ClassifyData.R +++ b/ClassifyData.R @@ -5,7 +5,7 @@ # For more information see: https://creativecommons.org/licenses/by-nc/3.0/ # All rights reserved. # new addition - +#cool # # Generate extra date cols From 5dfb06d6932dc55b28e9b33d2e79c12b6a4b0e76 Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Thu, 5 Aug 2021 12:38:49 -0400 Subject: [PATCH 40/41] Update r.yml --- .github/workflows/r.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 65f708d..65bf1f2 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -1,9 +1,10 @@ name: Deploy EC2 on: push: - branches: [ master ] + branches: + - master pull_request: - branches: [ master ] + types: [closed] jobs: merge-PR: if: github.event.pull_request.merged == true From 96332bf7caa58ebdac13caf577ea1aab0550bf0d Mon Sep 17 00:00:00 2001 From: Sujay khandekar Date: Thu, 5 Aug 2021 12:41:38 -0400 Subject: [PATCH 41/41] Update deploy_to_aws.sh --- deploy_to_aws.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy_to_aws.sh b/deploy_to_aws.sh index 1375f0a..4cb22dc 100644 --- a/deploy_to_aws.sh +++ b/deploy_to_aws.sh @@ -1,6 +1,6 @@ #!/bin/bash echo 'Starting to Deploy...' -ssh ubuntu@3.234.99.37 " sudo docker image prune -f +ssh ubuntu@3.234.99.37 -i ~/.ssh/id_rsa " sudo docker image prune -f cd /newstorage/users/sujay/R_check sudo docker-compose down git fetch origin