From b0654260917ab81e30362f658095b38a42285ceb Mon Sep 17 00:00:00 2001 From: Adam Blank <blank@caltech.edu> Date: Thu, 24 Jan 2019 08:20:59 -0800 Subject: [PATCH] Updates lab03 --- .gitignore | 66 +++++++++++++ .gitlab-ci.yml | 8 ++ .idea/modules.xml | 4 +- .idea/vcs.xml | 3 +- .idea/workspace.xml | 92 +++++++++---------- ...eganography.iml => lab03-steganography.iml | 0 .../caltech/cs2/{lab02 => lab03}/Image.java | 4 +- .../{lab02 => lab03}/ImageManipulator.java | 4 +- .../ImageManipulatorTests.java | 4 +- 9 files changed, 129 insertions(+), 56 deletions(-) create mode 100644 .gitignore create mode 100644 .gitlab-ci.yml rename lab02-steganography.iml => lab03-steganography.iml (100%) rename src/edu/caltech/cs2/{lab02 => lab03}/Image.java (97%) rename src/edu/caltech/cs2/{lab02 => lab03}/ImageManipulator.java (98%) rename tests/edu/caltech/cs2/{lab02 => lab03}/ImageManipulatorTests.java (99%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..72f4d98 --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..1923709 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,8 @@ +static: + script: "/testers/cs2/lab03/static" +C: + script: "/testers/cs2/lab03/C/test" +B: + script: "/testers/cs2/lab03/B/test" +A: + script: "/testers/cs2/lab03/A/test" diff --git a/.idea/modules.xml b/.idea/modules.xml index 446a25f..ace9172 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ <project version="4"> <component name="ProjectModuleManager"> <modules> - <module fileurl="file://$PROJECT_DIR$/lab02-steganography.iml" filepath="$PROJECT_DIR$/lab02-steganography.iml" /> + <module fileurl="file://$PROJECT_DIR$/lab03-steganography.iml" filepath="$PROJECT_DIR$/lab03-steganography.iml" /> </modules> </component> -</project> \ No newline at end of file +</project> diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 8306744..5ace414 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="VcsDirectoryMappings"> - <mapping directory="" vcs="Git" /> <mapping directory="$PROJECT_DIR$" vcs="Git" /> </component> -</project> \ No newline at end of file +</project> diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a883db8..7d76e0f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,7 @@ <component name="ChangeListManager"> <list default="true" id="35fce098-9be2-4747-bc65-5a45ced07bad" name="Default Changelist" comment="fixed naming on file to transposed"> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/tests/edu/caltech/cs2/lab02/ImageManipulatorTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/tests/edu/caltech/cs2/lab02/ImageManipulatorTests.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/tests/edu/caltech/cs2/lab03/ImageManipulatorTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/tests/edu/caltech/cs2/lab03/ImageManipulatorTests.java" afterDir="false" /> </list> <ignored path="$PROJECT_DIR$/out/" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> @@ -22,7 +22,7 @@ <component name="FileEditorManager"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="600"> <file pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab02/ImageManipulator.java"> + <entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab03/ImageManipulator.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="195"> <caret line="13" column="7" selection-start-line="13" selection-start-column="7" selection-end-line="13" selection-end-column="7" /> @@ -34,7 +34,7 @@ </entry> </file> <file pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab02/Image.java"> + <entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab03/Image.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="180"> <caret line="12" column="37" selection-start-line="12" selection-start-column="37" selection-end-line="12" selection-end-column="37" /> @@ -46,7 +46,7 @@ </entry> </file> <file pinned="false" current-in-tab="true"> - <entry file="file://$PROJECT_DIR$/tests/edu/caltech/cs2/lab02/ImageManipulatorTests.java"> + <entry file="file://$PROJECT_DIR$/tests/edu/caltech/cs2/lab03/ImageManipulatorTests.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="480"> <caret line="68" column="14" selection-start-line="68" selection-start-column="14" selection-end-line="68" selection-end-column="14" /> @@ -99,13 +99,13 @@ <option name="CHANGED_PATHS"> <list> <option value="$PROJECT_DIR$/tests/edu/caltech/cs2/helpers/Reflection.java" /> - <option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab02/Steganography.java" /> + <option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab03/Steganography.java" /> <option value="$PROJECT_DIR$/tests/ImageManipulatorTests.java" /> <option value="$PROJECT_DIR$/tests/edu/caltech/cs2/helpers/Images.java" /> - <option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab02/Image.java" /> - <option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab02/ImageManipulator.java" /> + <option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab03/Image.java" /> + <option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab03/ImageManipulator.java" /> <option value="$PROJECT_DIR$/src/edu/caltech/cs2/libraries/Pixel.java" /> - <option value="$PROJECT_DIR$/tests/edu/caltech/cs2/lab02/ImageManipulatorTests.java" /> + <option value="$PROJECT_DIR$/tests/edu/caltech/cs2/lab03/ImageManipulatorTests.java" /> </list> </option> </component> @@ -131,60 +131,60 @@ <subPane> <expand> <path> - <item name="lab02-alpha" type="b2602c69:ProjectViewProjectNode" /> - <item name="lab02-alpha" type="462c0819:PsiDirectoryNode" /> + <item name="lab03-alpha" type="b2602c69:ProjectViewProjectNode" /> + <item name="lab03-alpha" type="462c0819:PsiDirectoryNode" /> </path> <path> - <item name="lab02-alpha" type="b2602c69:ProjectViewProjectNode" /> - <item name="lab02-alpha" type="462c0819:PsiDirectoryNode" /> + <item name="lab03-alpha" type="b2602c69:ProjectViewProjectNode" /> + <item name="lab03-alpha" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" /> </path> <path> - <item name="lab02-alpha" type="b2602c69:ProjectViewProjectNode" /> - <item name="lab02-alpha" type="462c0819:PsiDirectoryNode" /> + <item name="lab03-alpha" type="b2602c69:ProjectViewProjectNode" /> + <item name="lab03-alpha" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" /> <item name="cs2" type="462c0819:PsiDirectoryNode" /> </path> <path> - <item name="lab02-alpha" type="b2602c69:ProjectViewProjectNode" /> - <item name="lab02-alpha" type="462c0819:PsiDirectoryNode" /> + <item name="lab03-alpha" type="b2602c69:ProjectViewProjectNode" /> + <item name="lab03-alpha" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" /> <item name="cs2" type="462c0819:PsiDirectoryNode" /> - <item name="lab02" type="462c0819:PsiDirectoryNode" /> + <item name="lab03" type="462c0819:PsiDirectoryNode" /> </path> <path> - <item name="lab02-alpha" type="b2602c69:ProjectViewProjectNode" /> - <item name="lab02-alpha" type="462c0819:PsiDirectoryNode" /> + <item name="lab03-alpha" type="b2602c69:ProjectViewProjectNode" /> + <item name="lab03-alpha" type="462c0819:PsiDirectoryNode" /> <item name="tests" type="462c0819:PsiDirectoryNode" /> </path> <path> - <item name="lab02-alpha" type="b2602c69:ProjectViewProjectNode" /> - <item name="lab02-alpha" type="462c0819:PsiDirectoryNode" /> + <item name="lab03-alpha" type="b2602c69:ProjectViewProjectNode" /> + <item name="lab03-alpha" type="462c0819:PsiDirectoryNode" /> <item name="tests" type="462c0819:PsiDirectoryNode" /> <item name="data" type="462c0819:PsiDirectoryNode" /> </path> <path> - <item name="lab02-alpha" type="b2602c69:ProjectViewProjectNode" /> - <item name="lab02-alpha" type="462c0819:PsiDirectoryNode" /> + <item name="lab03-alpha" type="b2602c69:ProjectViewProjectNode" /> + <item name="lab03-alpha" type="462c0819:PsiDirectoryNode" /> <item name="tests" type="462c0819:PsiDirectoryNode" /> <item name="cs2" type="462c0819:PsiDirectoryNode" /> </path> <path> - <item name="lab02-alpha" type="b2602c69:ProjectViewProjectNode" /> - <item name="lab02-alpha" type="462c0819:PsiDirectoryNode" /> + <item name="lab03-alpha" type="b2602c69:ProjectViewProjectNode" /> + <item name="lab03-alpha" type="462c0819:PsiDirectoryNode" /> <item name="tests" type="462c0819:PsiDirectoryNode" /> <item name="cs2" type="462c0819:PsiDirectoryNode" /> <item name="helpers" type="462c0819:PsiDirectoryNode" /> </path> <path> - <item name="lab02-alpha" type="b2602c69:ProjectViewProjectNode" /> - <item name="lab02-alpha" type="462c0819:PsiDirectoryNode" /> + <item name="lab03-alpha" type="b2602c69:ProjectViewProjectNode" /> + <item name="lab03-alpha" type="462c0819:PsiDirectoryNode" /> <item name="tests" type="462c0819:PsiDirectoryNode" /> <item name="cs2" type="462c0819:PsiDirectoryNode" /> - <item name="lab02" type="462c0819:PsiDirectoryNode" /> + <item name="lab03" type="462c0819:PsiDirectoryNode" /> </path> <path> - <item name="lab02-alpha" type="b2602c69:ProjectViewProjectNode" /> + <item name="lab03-alpha" type="b2602c69:ProjectViewProjectNode" /> <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" /> </path> </expand> @@ -204,7 +204,7 @@ <property name="aspect.path.notification.shown" value="true" /> <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1545942890684" /> <property name="last_directory_selection" value="$PROJECT_DIR$/tests/edu/caltech/cs2" /> - <property name="last_opened_file_path" value="$PROJECT_DIR$/../lab02" /> + <property name="last_opened_file_path" value="$PROJECT_DIR$/../lab03" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" /> <property name="project.structure.last.edited" value="Libraries" /> @@ -240,14 +240,14 @@ </component> <component name="RunManager" selected="JUnit.ImageManipulatorTests"> <configuration name="ImageManipulator" type="Application" factoryName="Application"> - <option name="MAIN_CLASS_NAME" value="edu.caltech.cs2.lab02.ImageManipulator" /> - <module name="lab02-steganography" /> + <option name="MAIN_CLASS_NAME" value="edu.caltech.cs2.lab03.ImageManipulator" /> + <module name="lab03-steganography" /> <method v="2"> <option name="Make" enabled="true" /> </method> </configuration> <configuration name="A" type="JUnit" factoryName="JUnit"> - <module name="lab02-steganography" /> + <module name="lab03-steganography" /> <option name="MAIN_CLASS_NAME" value="A" /> <option name="METHOD_NAME" value="" /> <option name="TEST_OBJECT" value="tags" /> @@ -258,7 +258,7 @@ </method> </configuration> <configuration name="B" type="JUnit" factoryName="JUnit"> - <module name="lab02-steganography" /> + <module name="lab03-steganography" /> <option name="MAIN_CLASS_NAME" value="B" /> <option name="METHOD_NAME" value="" /> <option name="TEST_OBJECT" value="tags" /> @@ -269,7 +269,7 @@ </method> </configuration> <configuration name="C" type="JUnit" factoryName="JUnit"> - <module name="lab02-steganography" /> + <module name="lab03-steganography" /> <option name="MAIN_CLASS_NAME" value="" /> <option name="METHOD_NAME" value="" /> <option name="TEST_OBJECT" value="tags" /> @@ -280,15 +280,15 @@ </method> </configuration> <configuration name="ImageManipulatorTests" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true"> - <module name="lab02-steganography" /> + <module name="lab03-steganography" /> <extension name="coverage"> <pattern> - <option name="PATTERN" value="edu.caltech.cs2.lab02.*" /> + <option name="PATTERN" value="edu.caltech.cs2.lab03.*" /> <option name="ENABLED" value="true" /> </pattern> </extension> - <option name="PACKAGE_NAME" value="edu.caltech.cs2.lab02" /> - <option name="MAIN_CLASS_NAME" value="edu.caltech.cs2.lab02.ImageManipulatorTests" /> + <option name="PACKAGE_NAME" value="edu.caltech.cs2.lab03" /> + <option name="MAIN_CLASS_NAME" value="edu.caltech.cs2.lab03.ImageManipulatorTests" /> <method v="2"> <option name="Make" enabled="true" /> </method> @@ -452,7 +452,7 @@ </component> <component name="editorHistoryManager"> <entry file="jar:///Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home/lib/src.zip!/java.desktop/javax/imageio/ImageIO.java" /> - <entry file="file://$PROJECT_DIR$/tests/edu/caltech/cs2/lab02/NBodySimulationTests.java" /> + <entry file="file://$PROJECT_DIR$/tests/edu/caltech/cs2/lab03/NBodySimulationTests.java" /> <entry file="file://$PROJECT_DIR$/tests/edu/caltech/cs2/helpers/Reflection.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="30"> @@ -473,7 +473,7 @@ <entry file="file://$PROJECT_DIR$/tests/data/puppy.png"> <provider selected="true" editor-type-id="images" /> </entry> - <entry file="file://$PROJECT_DIR$/lab02-steganography.iml"> + <entry file="file://$PROJECT_DIR$/lab03-steganography.iml"> <provider selected="true" editor-type-id="text-editor" /> </entry> <entry file="file://$PROJECT_DIR$/tests/edu/caltech/cs2/helpers/ImageFileSource.java"> @@ -534,7 +534,7 @@ <entry file="file://$PROJECT_DIR$/tests/data/guernica.transposed.png"> <provider selected="true" editor-type-id="images" /> </entry> - <entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab02/ImageManipulator.java"> + <entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab03/ImageManipulator.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="195"> <caret line="13" column="7" selection-start-line="13" selection-start-column="7" selection-end-line="13" selection-end-column="7" /> @@ -544,7 +544,7 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab02/Image.java"> + <entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab03/Image.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="180"> <caret line="12" column="37" selection-start-line="12" selection-start-column="37" selection-end-line="12" selection-end-column="37" /> @@ -557,7 +557,7 @@ <entry file="file://$PROJECT_DIR$/tests/data/SpaceElephants.hidden.png"> <provider selected="true" editor-type-id="images" /> </entry> - <entry file="file://$PROJECT_DIR$/tests/edu/caltech/cs2/lab02/ImageManipulatorTests.java"> + <entry file="file://$PROJECT_DIR$/tests/edu/caltech/cs2/lab03/ImageManipulatorTests.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="480"> <caret line="68" column="14" selection-start-line="68" selection-start-column="14" selection-end-line="68" selection-end-column="14" /> @@ -619,7 +619,7 @@ </state> <state key="ModuleStructureConfigurable.UI"> <settings> - <last-edited>lab02-steganography</last-edited> + <last-edited>lab03-steganography</last-edited> <splitter-proportions> <option name="proportions"> <list> @@ -656,4 +656,4 @@ </state> </states> </component> -</project> \ No newline at end of file +</project> diff --git a/lab02-steganography.iml b/lab03-steganography.iml similarity index 100% rename from lab02-steganography.iml rename to lab03-steganography.iml diff --git a/src/edu/caltech/cs2/lab02/Image.java b/src/edu/caltech/cs2/lab03/Image.java similarity index 97% rename from src/edu/caltech/cs2/lab02/Image.java rename to src/edu/caltech/cs2/lab03/Image.java index 7be1f31..107568b 100644 --- a/src/edu/caltech/cs2/lab02/Image.java +++ b/src/edu/caltech/cs2/lab03/Image.java @@ -1,4 +1,4 @@ -package edu.caltech.cs2.lab02; +package edu.caltech.cs2.lab03; import edu.caltech.cs2.libraries.Pixel; @@ -54,4 +54,4 @@ public class Image { e.printStackTrace(); } } -} \ No newline at end of file +} diff --git a/src/edu/caltech/cs2/lab02/ImageManipulator.java b/src/edu/caltech/cs2/lab03/ImageManipulator.java similarity index 98% rename from src/edu/caltech/cs2/lab02/ImageManipulator.java rename to src/edu/caltech/cs2/lab03/ImageManipulator.java index 86267f4..3415b60 100644 --- a/src/edu/caltech/cs2/lab02/ImageManipulator.java +++ b/src/edu/caltech/cs2/lab03/ImageManipulator.java @@ -1,4 +1,4 @@ -package edu.caltech.cs2.lab02; +package edu.caltech.cs2.lab03; import java.io.File; import java.io.IOException; @@ -51,4 +51,4 @@ public class ImageManipulator { } } } -} \ No newline at end of file +} diff --git a/tests/edu/caltech/cs2/lab02/ImageManipulatorTests.java b/tests/edu/caltech/cs2/lab03/ImageManipulatorTests.java similarity index 99% rename from tests/edu/caltech/cs2/lab02/ImageManipulatorTests.java rename to tests/edu/caltech/cs2/lab03/ImageManipulatorTests.java index 651e953..0c67ce3 100644 --- a/tests/edu/caltech/cs2/lab02/ImageManipulatorTests.java +++ b/tests/edu/caltech/cs2/lab03/ImageManipulatorTests.java @@ -1,4 +1,4 @@ -package edu.caltech.cs2.lab02; +package edu.caltech.cs2.lab03; import edu.caltech.cs2.helpers.ImageFileSource; import edu.caltech.cs2.helpers.Images; @@ -125,4 +125,4 @@ public class ImageManipulatorTests { Image newImage = startingImage.hideText(msg); Images.assertImagesEqual(expectedOutput, newImage.toBufferedImage(), 0); } -} \ No newline at end of file +} -- GitLab