From 1f4c6660d848670604f951bd1ae9cd5c581f33ba Mon Sep 17 00:00:00 2001 From: NicolasHuertas Date: Tue, 3 Dec 2024 00:30:14 -0500 Subject: [PATCH] Deleted unremoved occurrences of internship in BUILD files --- java/com/engflow/binaryinput/BUILD | 5 +---- java/com/engflow/binaryinput/Main.java | 2 +- java/com/engflow/binaryinput/README.md | 14 +++++++------- java/com/engflow/cycleexample/README.md | 2 +- java/com/engflow/cycleexample/class_a/BUILD | 2 +- java/com/engflow/cycleexample/class_b/BUILD | 2 +- java/com/engflow/cycleexample/class_c/BUILD | 2 +- java/com/engflow/cycleexample/main/BUILD | 2 +- java/com/engflow/setinput/README.md | 10 +++++----- java/com/engflow/setinput/main/BUILD | 4 ++-- java/com/engflow/varyinginputs/README.md | 12 ++++++------ java/com/engflow/varyinginputs/main/BUILD | 2 +- java/com/engflow/varyinginputs/reader/BUILD | 2 +- java/com/engflow/varyinginputs/writer/BUILD | 2 +- 14 files changed, 30 insertions(+), 33 deletions(-) diff --git a/java/com/engflow/binaryinput/BUILD b/java/com/engflow/binaryinput/BUILD index cabb1782..5b9a1610 100644 --- a/java/com/engflow/binaryinput/BUILD +++ b/java/com/engflow/binaryinput/BUILD @@ -8,12 +8,9 @@ NUM_FILES = 1 [genrule( name = "Hello" + str(x), outs = ["Hello" + str(x) + ".java"], - cmd_bash = "echo 'package com.engflow.internship.binaryinput;" + "\n" + + cmd_bash = "echo 'package com.engflow.binaryinput;" + "\n" + "public class Hello" + str(x) + " { public static void greetNum() { System.out.println(\"Hello " + str(x) + "\"); } }' > $@", - #cmd_ps = "echo 'package com.engflow.internship.binaryinput;" + "\n" + - # "public class Hello" + str(x) + - # " { public static void greetNum() { System.out.println(\"Hello " + str(x) + "\"); } }' > $($outputFile.FullName)", ) for x in range(1,NUM_FILES+1)] #Generates a java library that contains all the generated java files diff --git a/java/com/engflow/binaryinput/Main.java b/java/com/engflow/binaryinput/Main.java index 0c81d257..d430ce2f 100644 --- a/java/com/engflow/binaryinput/Main.java +++ b/java/com/engflow/binaryinput/Main.java @@ -10,7 +10,7 @@ public static void main(String[] args) { // Load and run the greetNum method from each class for(int i = 1; i <= numFiles; i++){ - Class clazz = Class.forName("com.engflow.internship.binaryinput.Hello" + i); + Class clazz = Class.forName("com.engflow.binaryinput.Hello" + i); clazz.getMethod("greetNum").invoke(null); } diff --git a/java/com/engflow/binaryinput/README.md b/java/com/engflow/binaryinput/README.md index e2bd8d72..55cba586 100644 --- a/java/com/engflow/binaryinput/README.md +++ b/java/com/engflow/binaryinput/README.md @@ -6,19 +6,19 @@ The goal of this example project is to test the performance of Engflow's remote ## Project Structure -- `java/com/engflow/internship/binaryinput/Main.java`: Main class that dynamically loads and invokes methods from generated classes. -- `java/com/engflow/internship/binaryinput/BUILD`: Bazel build file for the `main` java binary and the `genbinary` library. +- `java/com/engflow/binaryinput/Main.java`: Main class that dynamically loads and invokes methods from generated classes. +- `java/com/engflow/binaryinput/BUILD`: Bazel build file for the `main` java binary and the `genbinary` library. ## Usage To generate the test files, build the `genbinary` library using the `genrule`: ```sh -bazel build //java/com/engflow/internship/binaryinput:genbinary +bazel build //java/com/engflow/binaryinput:genbinary ``` Then, the program can be run with the following command: ```sh -bazel run //java/com/engflow/internship/binaryinput:main +bazel run //java/com/engflow/binaryinput:main ``` ## How It Works @@ -39,14 +39,14 @@ The number of generated files is controlled by the `NUM_FILES` variable in the ` To generate and run the program with 10 input binary files: -1. Set `NUM_FILES` to 10 in `java/com/engflow/internship/binaryinput/BUILD`. +1. Set `NUM_FILES` to 10 in `java/com/engflow/binaryinput/BUILD`. 2. Build the `genbinary` library: ```sh - bazel build //java/com/engflow/internship/binaryinput:genbinary + bazel build //java/com/engflow/binaryinput:genbinary ``` 3. Run the `main` binary: ```sh - bazel run //java/com/engflow/internship/binaryinput:main + bazel run //java/com/engflow/binaryinput:main ``` This will generate 10 Java classes, build the `genbinary` library, and run the `main` binary, which will print messages from each generated class. \ No newline at end of file diff --git a/java/com/engflow/cycleexample/README.md b/java/com/engflow/cycleexample/README.md index 6f3cd222..ec5a14ba 100644 --- a/java/com/engflow/cycleexample/README.md +++ b/java/com/engflow/cycleexample/README.md @@ -33,4 +33,4 @@ The program takes a text input file and recursively prints each word with each c To run the tests and gather performance data, use the following Bazel command: ```sh -bazel test //java/com/engflow/internship/cycleexample/class_a:class_a_test +bazel test //java/com/engflow/cycleexample/class_a:class_a_test diff --git a/java/com/engflow/cycleexample/class_a/BUILD b/java/com/engflow/cycleexample/class_a/BUILD index e9c4fce8..c7b362c2 100644 --- a/java/com/engflow/cycleexample/class_a/BUILD +++ b/java/com/engflow/cycleexample/class_a/BUILD @@ -12,7 +12,7 @@ java_library( java_test( name = "class_a_test", srcs = ["ClassATest.java"], - test_class = "com.engflow.internship.cycleexample.class_a.ClassATest", + test_class = "com.engflow.cycleexample.class_a.ClassATest", deps = [ ":class_a", "//java/com/engflow/cycleexample/class_b:class_b", diff --git a/java/com/engflow/cycleexample/class_b/BUILD b/java/com/engflow/cycleexample/class_b/BUILD index 27ec0f8d..8cff66a1 100644 --- a/java/com/engflow/cycleexample/class_b/BUILD +++ b/java/com/engflow/cycleexample/class_b/BUILD @@ -12,7 +12,7 @@ java_library( java_test( name = "class_b_test", srcs = ["ClassBTest.java"], - test_class = "com.engflow.internship.cycleexample.class_b.ClassBTest", + test_class = "com.engflow.cycleexample.class_b.ClassBTest", deps = [ ":class_b", "//java/com/engflow/cycleexample/class_c:class_c", diff --git a/java/com/engflow/cycleexample/class_c/BUILD b/java/com/engflow/cycleexample/class_c/BUILD index 89d4745a..baaf955d 100644 --- a/java/com/engflow/cycleexample/class_c/BUILD +++ b/java/com/engflow/cycleexample/class_c/BUILD @@ -12,7 +12,7 @@ java_library( java_test( name = "class_c_test", srcs = ["ClassCTest.java"], - test_class = "com.engflow.internship.cycleexample.class_c.ClassCTest", + test_class = "com.engflow.cycleexample.class_c.ClassCTest", deps = [ ":class_c", "//java/com/engflow/cycleexample/class_a:class_a", diff --git a/java/com/engflow/cycleexample/main/BUILD b/java/com/engflow/cycleexample/main/BUILD index e2741652..b9fa6a1b 100644 --- a/java/com/engflow/cycleexample/main/BUILD +++ b/java/com/engflow/cycleexample/main/BUILD @@ -11,5 +11,5 @@ java_binary( data = [ "//java/com/engflow/cycleexample/input:input", ], - main_class = "com.engflow.internship.cycleexample.main.Main", + main_class = "com.engflow.cycleexample.main.Main", ) \ No newline at end of file diff --git a/java/com/engflow/setinput/README.md b/java/com/engflow/setinput/README.md index da075b01..4e6ae765 100644 --- a/java/com/engflow/setinput/README.md +++ b/java/com/engflow/setinput/README.md @@ -6,21 +6,21 @@ The goal of this example project is to test the performance of Engflow's remote ## Project Structure -- `java/com/engflow/internship/setinput/genfile`: Directory where the `.txt` files generated by the genrule are stored. -- `java/com/engflow/internship/varyinginputs/main`: Contains the `Main` class which orchestrates the reading process. -- `java/com/engflow/internship/varyinginputs/reader`: Contains the `Reader` class responsible for reading the files. +- `java/com/engflow/setinput/genfile`: Directory where the `.txt` files generated by the genrule are stored. +- `java/com/engflow/varyinginputs/main`: Contains the `Main` class which orchestrates the reading process. +- `java/com/engflow/varyinginputs/reader`: Contains the `Reader` class responsible for reading the files. ## Usage To generate the test files, build the filegroup target: ```sh -bazel build //java/com/engflow/internship/setinput/genfile +bazel build //java/com/engflow/setinput/genfile ``` Then, the program can be run with the following command: ```sh -bazel run //java/com/engflow/internship/varyinginputs/main +bazel run //java/com/engflow/varyinginputs/main ``` To modify the amount of files generated, change the value of the `NUM_FILES` in the `BUILD` file inside the `genfile` directory. \ No newline at end of file diff --git a/java/com/engflow/setinput/main/BUILD b/java/com/engflow/setinput/main/BUILD index d57de414..6346ce2c 100644 --- a/java/com/engflow/setinput/main/BUILD +++ b/java/com/engflow/setinput/main/BUILD @@ -6,6 +6,6 @@ java_binary( deps = [ "//java/com/engflow/setinput/genreader:genreader", ], - data = glob(["java/com/engflow/internship/setinput/genfile/*.txt"]), - main_class = "com.engflow.internship.setinput.main.Main", + data = glob(["java/com/engflow/setinput/genfile/*.txt"]), + main_class = "com.engflow.setinput.main.Main", ) \ No newline at end of file diff --git a/java/com/engflow/varyinginputs/README.md b/java/com/engflow/varyinginputs/README.md index 6bff9660..deea7ac1 100644 --- a/java/com/engflow/varyinginputs/README.md +++ b/java/com/engflow/varyinginputs/README.md @@ -6,17 +6,17 @@ The goal of this example project is to test the performance of Engflow's remote ## Project Structure -- `java/com/engflow/internship/varyinginputs/input`: Directory where the generated `.txt` files are saved. -- `java/com/engflow/internship/varyinginputs/main`: Contains the `Main` class which orchestrates the file creation and reading process. -- `java/com/engflow/internship/varyinginputs/reader`: Contains the `Reader` class responsible for reading the files. -- `java/com/engflow/internship/varyinginputs/writer`: Contains the `Writer` class responsible for writing the files. +- `java/com/engflow/varyinginputs/input`: Directory where the generated `.txt` files are saved. +- `java/com/engflow/varyinginputs/main`: Contains the `Main` class which orchestrates the file creation and reading process. +- `java/com/engflow/varyinginputs/reader`: Contains the `Reader` class responsible for reading the files. +- `java/com/engflow/varyinginputs/writer`: Contains the `Writer` class responsible for writing the files. ## Usage To run the project and specify the number of files to be created, use the following command: ```sh -bazel run //java/com/engflow/internship/varyinginputs/main -- +bazel run //java/com/engflow/varyinginputs/main -- ``` Replace `` with the desired number of files to be created. @@ -26,7 +26,7 @@ Replace `` with the desired number of files to be created. To create and read 10 files, you would run: ```sh -bazel run //java/com/engflow/internship/varyinginputs/main -- 10 +bazel run //java/com/engflow/varyinginputs/main -- 10 ``` This command will: diff --git a/java/com/engflow/varyinginputs/main/BUILD b/java/com/engflow/varyinginputs/main/BUILD index a99d0e80..f5302b9e 100644 --- a/java/com/engflow/varyinginputs/main/BUILD +++ b/java/com/engflow/varyinginputs/main/BUILD @@ -10,5 +10,5 @@ java_binary( data = [ "//java/com/engflow/varyinginputs/input:input", ], - main_class = "com.engflow.internship.varyinginputs.main.Main", + main_class = "com.engflow.varyinginputs.main.Main", ) \ No newline at end of file diff --git a/java/com/engflow/varyinginputs/reader/BUILD b/java/com/engflow/varyinginputs/reader/BUILD index 8aaf090b..4033aea4 100644 --- a/java/com/engflow/varyinginputs/reader/BUILD +++ b/java/com/engflow/varyinginputs/reader/BUILD @@ -7,7 +7,7 @@ java_library( java_test( name = "reader_test", srcs = ["ReaderTest.java"], - test_class = "com.engflow.internship.varyinginputs.reader.ReaderTest", + test_class = "com.engflow.varyinginputs.reader.ReaderTest", deps = [ ":reader", ], diff --git a/java/com/engflow/varyinginputs/writer/BUILD b/java/com/engflow/varyinginputs/writer/BUILD index 8391c14a..1fc02ea5 100644 --- a/java/com/engflow/varyinginputs/writer/BUILD +++ b/java/com/engflow/varyinginputs/writer/BUILD @@ -7,7 +7,7 @@ java_library( java_test( name = "writer_test", srcs = ["WriterTest.java"], - test_class = "com.engflow.internship.varyinginputs.writer.WriterTest", + test_class = "com.engflow.varyinginputs.writer.WriterTest", deps = [ ":writer", ],