From ab2670ff6746c08b95ca2d903b6a849aeccee193 Mon Sep 17 00:00:00 2001 From: Nikos Pagonas Date: Tue, 6 Jun 2023 12:40:37 +0300 Subject: [PATCH 1/4] Add r_split usage string Signed-off-by: Nikos Pagonas --- runtime/r_split.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/runtime/r_split.c b/runtime/r_split.c index 92331fe61..ebe59d31a 100644 --- a/runtime/r_split.c +++ b/runtime/r_split.c @@ -39,13 +39,13 @@ int find_new_line_pivot(char *buffer, int start_pos, int end_pos, bool backward) if (backward) { for (int i = end_pos; i >= start_pos; i--) { if (buffer[i] == '\n') - return i; + return i; } } else { for (int i = start_pos; i <= end_pos; i++) { if (buffer[i] == '\n') - return i; + return i; } } return -1; @@ -73,7 +73,7 @@ void SplitByLines(FILE *inputFile, int batchSize, FILE *outputFiles[], unsigned if (len < full_payload) { init_batch_size = len/numOutputFiles; } - + for (current_file_id = 0; current_file_id < numOutputFiles; current_file_id++) { outputFile = outputFiles[current_file_id]; int next_start = 0; @@ -89,7 +89,7 @@ void SplitByLines(FILE *inputFile, int batchSize, FILE *outputFiles[], unsigned next_start = pivot + 1; blockSize = next_start - start_pos; } - + } else { // Process output for last node blockSize = len - start_pos; @@ -98,14 +98,14 @@ void SplitByLines(FILE *inputFile, int batchSize, FILE *outputFiles[], unsigned } else { is_last = false; } - + } - + if (add_header) writeHeader(outputFile, id, blockSize, is_last); safeWriteWithFlush(init_buffer + start_pos, 1, blockSize, outputFile); - + start_pos = next_start; if (is_last) { @@ -113,7 +113,7 @@ void SplitByLines(FILE *inputFile, int batchSize, FILE *outputFiles[], unsigned } } - // This will wrap around if the last chunk was complete + // This will wrap around if the last chunk was complete // otherwise keep pointer on the last file if (is_last) { current_file_id = 0; @@ -146,7 +146,7 @@ void SplitByLines(FILE *inputFile, int batchSize, FILE *outputFiles[], unsigned headSize = len; blockSize = prevRestSize + headSize; if (add_header) { - if (feof(inputFile)) + if (feof(inputFile)) writeHeader(outputFile, id, blockSize, 1); else writeHeader(outputFile, id, blockSize, 0); @@ -283,8 +283,12 @@ int main(int argc, char *argv[]) // flags: -b to use bytes (batch_size will be exact number of bytes instead of approximating to the closest line) if (argc < 4) { - // TODO print usage string - fprintf(stderr, "missing input!\n"); + // TODO: document -r flag + fprintf(stderr, + "\n" + "Usage: %s [-b] [-r] input_file batch_size output_file_1 output_file_2 [output_file_3 ...]\n\n" + " -b: use bytes (batch_size will be exact number of bytes instead of approximating to the closest line)\n\n", + argv[0]); exit(1); } bool useBytes = 0, offset = 0, raw = 0; From 73519093a24c85551a711a47728782c2f9093041 Mon Sep 17 00:00:00 2001 From: Konstantinos Kallas Date: Tue, 29 Aug 2023 11:58:28 -0400 Subject: [PATCH 2/4] Add github workflow --- .github/workflows/github-repo-stats.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/github-repo-stats.yml diff --git a/.github/workflows/github-repo-stats.yml b/.github/workflows/github-repo-stats.yml new file mode 100644 index 000000000..fb130a1b8 --- /dev/null +++ b/.github/workflows/github-repo-stats.yml @@ -0,0 +1,19 @@ +name: github-repo-stats + +on: + schedule: + # Run this once per day, towards the end of the day for keeping the most + # recent data point most meaningful (hours are interpreted in UTC). + - cron: "0 23 * * *" + workflow_dispatch: # Allow for running this manually. + +jobs: + j1: + name: github-repo-stats + runs-on: ubuntu-latest + steps: + - name: run-ghrs + # Use latest release. + uses: jgehrcke/github-repo-stats@RELEASE + with: + ghtoken: ${{ secrets.ghrs_github_api_token }} From d18f7bcf0c9dc65ed1449792d1d6cc921eae908c Mon Sep 17 00:00:00 2001 From: Konstantinos Kallas Date: Tue, 29 Aug 2023 12:18:15 -0400 Subject: [PATCH 3/4] Remove stats workflow --- .github/workflows/github-repo-stats.yml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .github/workflows/github-repo-stats.yml diff --git a/.github/workflows/github-repo-stats.yml b/.github/workflows/github-repo-stats.yml deleted file mode 100644 index fb130a1b8..000000000 --- a/.github/workflows/github-repo-stats.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: github-repo-stats - -on: - schedule: - # Run this once per day, towards the end of the day for keeping the most - # recent data point most meaningful (hours are interpreted in UTC). - - cron: "0 23 * * *" - workflow_dispatch: # Allow for running this manually. - -jobs: - j1: - name: github-repo-stats - runs-on: ubuntu-latest - steps: - - name: run-ghrs - # Use latest release. - uses: jgehrcke/github-repo-stats@RELEASE - with: - ghtoken: ${{ secrets.ghrs_github_api_token }} From 911110d3be5e9fe0a50694f12f5fe9fe3b2d70c9 Mon Sep 17 00:00:00 2001 From: Seong-Heon Jung Date: Tue, 28 Nov 2023 11:03:05 -0500 Subject: [PATCH 4/4] Pin pash-annotations version PaSh Annotations will have some breaking changes introduced soon to its new minor version, so I pin its version to 0.2 --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index c40d1dbfa..09124b40f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ graphviz libdash -pash-annotations>=0.2.0 +pash-annotations==0.2.0 shasta==0.1.0 -sh-expand \ No newline at end of file +sh-expand