From 5119d87e39fe651ab7d8dcabfa631b08219c6c0a Mon Sep 17 00:00:00 2001 From: Eric Loots Date: Thu, 12 Oct 2023 11:36:59 +0200 Subject: [PATCH] Adapt organisation & package name after move to Scala Center (#302) * Prepare move of repo to the Scala Center --- .github/workflows/release.yml | 4 +-- build.sbt | 12 +++---- .../cmt/client/command/Executable.scala | 7 ----- .../cmt => coursemgmt}/CMTaConfig.scala | 2 +- .../cmt => coursemgmt}/CMTcConfig.scala | 2 +- .../cmt => coursemgmt}/ConsoleFunctions.scala | 2 +- .../lunatech/cmt => coursemgmt}/Domain.scala | 2 +- .../lunatech/cmt => coursemgmt}/Error.scala | 2 +- .../cmt => coursemgmt}/ExerciseMetadata.scala | 2 +- .../lunatech/cmt => coursemgmt}/Filters.scala | 2 +- .../lunatech/cmt => coursemgmt}/Helpers.scala | 8 ++--- .../cmt => coursemgmt}/ProcessDSL.scala | 6 ++-- .../cmt => coursemgmt}/Releasables.scala | 2 +- .../cmt => coursemgmt}/Validations.scala | 3 +- .../client/Configuration.scala | 12 +++---- .../client/cli/CmtcCommand.scala | 8 ++--- .../client/command/Executable.scala | 7 +++++ .../core/GeneratorInfo.scala | 2 +- .../core/cli/ArgParsers.scala | 8 ++--- .../core/cli/CmtCommand.scala | 4 +-- .../core/command/Package.scala | 2 +- .../core/execution/Executable.scala | 4 +-- .../core/validation/FileValidations.scala | 4 +-- .../core/validation/Validatable.scala | 4 +-- .../client/ConfigurationSpec.scala | 10 +++--- .../client/command/InstallSpec.scala | 2 +- .../core/cli/CmtCommandSpec.scala | 2 +- .../support/CommandLineParseTestBase.scala | 4 +-- .../support/EitherSupport.scala | 2 +- .../support/ExtractUniquePathsSpec.scala | 4 +-- .../support/TestDirectories.scala | 6 ++-- .../cmt => coursemgmt}/admin/Domain.scala | 8 ++--- .../cmt => coursemgmt}/admin/Main.scala | 4 +-- .../admin/TargetFolderValidation.scala | 6 ++-- .../admin/cli/ArgParsers.scala | 6 ++-- .../admin/cli/SharedOptions.scala | 6 ++-- .../admin/command/Delinearize.scala | 20 ++++++------ .../admin/command/DuplicateInsertBefore.scala | 23 ++++++-------- .../admin/command/Linearize.scala | 20 ++++++------ .../admin/command/New.scala | 22 ++++++------- .../admin/command/Package.scala | 4 +-- .../admin/command/RenumberExercises.scala | 25 ++++++--------- .../admin/command/Studentify.scala | 27 ++++++++-------- .../admin/command/Version.scala | 14 ++++----- .../RenumberExercisesSpec.scala | 10 +++--- .../cmt => coursemgmt}/TestHelpers.scala | 2 +- .../admin/cli/CommandLineArgumentsSpec.scala | 8 ++--- .../admin/cli/DelinearizeArgumentsSpec.scala | 12 +++---- .../DuplicateInsertBeforeArgumentsSpec.scala | 12 +++---- .../admin/cli/LinearizeArgumentsSpec.scala | 12 +++---- .../admin/cli/RenumberArgumentsSpec.scala | 12 +++---- .../admin/cli/StudentifyArgumentsSpec.scala | 12 +++---- .../admin/cli/VersionArguments.scala | 6 ++-- .../cmt => coursemgmt}/client/Domain.scala | 2 +- .../cmt => coursemgmt}/client/Main.scala | 4 +-- .../client/cli/ArgParsers.scala | 4 +-- .../client/command/GotoExercise.scala | 31 +++++++------------ .../client/command/GotoFirstExercise.scala | 20 ++++++------ .../client/command/Install.scala | 26 ++++++++-------- .../client/command/ListExercises.scala | 18 +++++------ .../client/command/ListSavedStates.scala | 16 +++++----- .../client/command/NextExercise.scala | 31 +++++++------------ .../client/command/Package.scala | 6 ++-- .../client/command/PreviousExercise.scala | 31 +++++++------------ .../client/command/PullSolution.scala | 20 ++++++------ .../client/command/PullTemplate.scala | 31 +++++++------------ .../client/command/RestoreState.scala | 22 ++++++------- .../client/command/SaveState.scala | 20 ++++++------ .../client/command/SetCurrentCourse.scala | 20 ++++++------ .../client/command/Version.scala | 14 ++++----- .../client/cli/CommandLineArgumentsSpec.scala | 8 ++--- .../cli/GotoExerciseArgumentsSpec.scala | 14 ++++----- .../client/cli/GotoFirstExerciseSpec.scala | 6 ++-- .../client/cli/InstallArgumentsSpec.scala | 12 +++---- .../client/cli/ListExercisesSpec.scala | 6 ++-- .../client/cli/ListSavedStatesSpec.scala | 6 ++-- .../client/cli/NextExerciseSpec.scala | 6 ++-- .../client/cli/PreviousExercise.scala | 6 ++-- .../client/cli/PullSolutionSpec.scala | 6 ++-- .../client/cli/PullTemplateSpec.scala | 6 ++-- .../client/cli/RestoreStateSpec.scala | 6 ++-- .../client/cli/SaveStateSpec.scala | 6 ++-- .../client/cli/SetCurrentCourseSpec.scala | 12 +++---- .../client/cli/VersionArguments.scala | 6 ++-- .../StudentificationFunctionalSpec.scala | 6 ++-- ...tificationMovingBetweenExercisesSpec.scala | 4 +-- .../support/TestSupport.scala | 26 ++++++++-------- project/Build.scala | 2 +- 88 files changed, 416 insertions(+), 456 deletions(-) delete mode 100644 cmt-core/src/main/scala/com/lunatech/cmt/client/command/Executable.scala rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/CMTaConfig.scala (99%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/CMTcConfig.scala (99%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/ConsoleFunctions.scala (98%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/Domain.scala (96%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/Error.scala (99%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/ExerciseMetadata.scala (96%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/Filters.scala (97%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/Helpers.scala (99%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/ProcessDSL.scala (93%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/Releasables.scala (93%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/Validations.scala (96%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/Configuration.scala (93%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/cli/CmtcCommand.scala (69%) create mode 100644 cmt-core/src/main/scala/coursemgmt/client/command/Executable.scala rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/core/GeneratorInfo.scala (72%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/core/cli/ArgParsers.scala (92%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/core/cli/CmtCommand.scala (95%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/core/command/Package.scala (90%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/core/execution/Executable.scala (91%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/core/validation/FileValidations.scala (93%) rename cmt-core/src/main/scala/{com/lunatech/cmt => coursemgmt}/core/validation/Validatable.scala (51%) rename cmt-core/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/ConfigurationSpec.scala (85%) rename cmt-core/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/command/InstallSpec.scala (89%) rename cmt-core/src/test/scala/{com/lunatech/cmt => coursemgmt}/core/cli/CmtCommandSpec.scala (92%) rename cmt-core/src/test/scala/{com/lunatech/cmt => coursemgmt}/support/CommandLineParseTestBase.scala (97%) rename cmt-core/src/test/scala/{com/lunatech/cmt => coursemgmt}/support/EitherSupport.scala (97%) rename cmt-core/src/test/scala/{com/lunatech/cmt => coursemgmt}/support/ExtractUniquePathsSpec.scala (95%) rename cmt-core/src/test/scala/{com/lunatech/cmt => coursemgmt}/support/TestDirectories.scala (92%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/Domain.scala (94%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/Main.scala (93%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/TargetFolderValidation.scala (87%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/cli/ArgParsers.scala (95%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/cli/SharedOptions.scala (79%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/command/Delinearize.scala (91%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/command/DuplicateInsertBefore.scala (87%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/command/Linearize.scala (87%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/command/New.scala (91%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/command/Package.scala (76%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/command/RenumberExercises.scala (89%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/command/Studentify.scala (89%) rename cmta/src/main/scala/{com/lunatech/cmt => coursemgmt}/admin/command/Version.scala (71%) rename cmta/src/test/scala/{com/lunatech/cmt => coursemgmt}/RenumberExercisesSpec.scala (97%) rename cmta/src/test/scala/{com/lunatech/cmt => coursemgmt}/TestHelpers.scala (98%) rename cmta/src/test/scala/{com/lunatech/cmt => coursemgmt}/admin/cli/CommandLineArgumentsSpec.scala (94%) rename cmta/src/test/scala/{com/lunatech/cmt => coursemgmt}/admin/cli/DelinearizeArgumentsSpec.scala (90%) rename cmta/src/test/scala/{com/lunatech/cmt => coursemgmt}/admin/cli/DuplicateInsertBeforeArgumentsSpec.scala (88%) rename cmta/src/test/scala/{com/lunatech/cmt => coursemgmt}/admin/cli/LinearizeArgumentsSpec.scala (88%) rename cmta/src/test/scala/{com/lunatech/cmt => coursemgmt}/admin/cli/RenumberArgumentsSpec.scala (87%) rename cmta/src/test/scala/{com/lunatech/cmt => coursemgmt}/admin/cli/StudentifyArgumentsSpec.scala (95%) rename cmta/src/test/scala/{com/lunatech/cmt => coursemgmt}/admin/cli/VersionArguments.scala (83%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/Domain.scala (97%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/Main.scala (95%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/cli/ArgParsers.scala (83%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/GotoExercise.scala (80%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/GotoFirstExercise.scala (73%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/Install.scala (92%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/ListExercises.scala (72%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/ListSavedStates.scala (78%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/NextExercise.scala (81%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/Package.scala (93%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/PreviousExercise.scala (78%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/PullSolution.scala (79%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/PullTemplate.scala (79%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/RestoreState.scala (81%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/SaveState.scala (79%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/SetCurrentCourse.scala (75%) rename cmtc/src/main/scala/{com/lunatech/cmt => coursemgmt}/client/command/Version.scala (71%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/CommandLineArgumentsSpec.scala (95%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/GotoExerciseArgumentsSpec.scala (81%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/GotoFirstExerciseSpec.scala (82%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/InstallArgumentsSpec.scala (69%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/ListExercisesSpec.scala (82%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/ListSavedStatesSpec.scala (82%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/NextExerciseSpec.scala (82%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/PreviousExercise.scala (82%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/PullSolutionSpec.scala (82%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/PullTemplateSpec.scala (82%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/RestoreStateSpec.scala (82%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/SaveStateSpec.scala (82%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/SetCurrentCourseSpec.scala (92%) rename cmtc/src/test/scala/{com/lunatech/cmt => coursemgmt}/client/cli/VersionArguments.scala (84%) rename functional-tests/src/test/scala/{com/lunatech/cmt => coursemgmttools}/StudentificationFunctionalSpec.scala (99%) rename functional-tests/src/test/scala/{com/lunatech/cmt => coursemgmttools}/StudentificationMovingBetweenExercisesSpec.scala (98%) rename functional-tests/src/test/scala/{com/lunatech/cmt => coursemgmttools}/support/TestSupport.scala (92%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74a0ecf2..1b8ff21c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,8 +52,8 @@ jobs: - name: Package Binaries run: | mkdir -p course-management-tools-bin/bin - ./coursier bootstrap com.lunatech:cmta_3:${{ env.RELEASE_VERSION }} -o course-management-tools-bin/bin/cmta --standalone --bat - ./coursier bootstrap com.lunatech:cmtc_3:${{ env.RELEASE_VERSION }} -o course-management-tools-bin/bin/cmtc --standalone --bat + ./coursier bootstrap ch.epfl.scala:cmta_3:${{ env.RELEASE_VERSION }} -o course-management-tools-bin/bin/cmta --standalone --bat + ./coursier bootstrap ch.epfl.scala:cmtc_3:${{ env.RELEASE_VERSION }} -o course-management-tools-bin/bin/cmtc --standalone --bat zip -r course-management-tools.zip course-management-tools-bin - name: Upload artefacts diff --git a/build.sbt b/build.sbt index 0f2e4d10..91dbcf16 100644 --- a/build.sbt +++ b/build.sbt @@ -2,10 +2,10 @@ import Build.* inThisBuild( List( - organization := "com.lunatech", - organizationName := "Lunatech", - organizationHomepage := Some(url("https://lunatech.com")), - homepage := Some(url("https://cmt.lunatech.com")), + organization := "ch.epfl.scala", + organizationName := "Scala Center", + organizationHomepage := Some(url("https://scala.epfl.ch")), + homepage := Some(url("https://scala.epfl.ch")), developers := List(Developer("eloots", "Eric Loots", "eric.loots@lunatech.com", url("https://github.com/eloots"))), licenses := Seq("Apache-2.0" -> url("http://www.apache.org/license/LICENSE-2.0")))) @@ -32,7 +32,7 @@ lazy val cmta = project .dependsOn(`cmt-core`, `cmt-core` % "test->test") .settings(commonSettings: _*) .settings(nativeImageSettings: _*) - .settings(Compile / mainClass := Some("com.lunatech.cmt.admin.Main")) + .settings(Compile / mainClass := Some("coursemgmt.admin.Main")) .settings(buildInfoKeys := buildKeysWithName("cmta:Course Management Tools (Admin)")) lazy val cmtc = project @@ -43,7 +43,7 @@ lazy val cmtc = project .settings(commonSettings: _*) .settings(nativeImageSettings: _*) .settings(libraryDependencies ++= Dependencies.cmtcDependencies) - .settings(Compile / mainClass := Some("com.lunatech.cmt.client.Main")) + .settings(Compile / mainClass := Some("coursemgmt.client.Main")) .settings(buildInfoKeys := buildKeysWithName("Course Management Tools (Client)")) lazy val `functional-tests` = project diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/client/command/Executable.scala b/cmt-core/src/main/scala/com/lunatech/cmt/client/command/Executable.scala deleted file mode 100644 index 16b6f08e..00000000 --- a/cmt-core/src/main/scala/com/lunatech/cmt/client/command/Executable.scala +++ /dev/null @@ -1,7 +0,0 @@ -package com.lunatech.cmt.client.command - -import com.lunatech.cmt.CmtError -import com.lunatech.cmt.client.Configuration - -trait Executable[T]: - extension (t: T) def execute(configuration: Configuration): Either[CmtError, String] diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/CMTaConfig.scala b/cmt-core/src/main/scala/coursemgmt/CMTaConfig.scala similarity index 99% rename from cmt-core/src/main/scala/com/lunatech/cmt/CMTaConfig.scala rename to cmt-core/src/main/scala/coursemgmt/CMTaConfig.scala index 451c902d..83a6cf54 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/CMTaConfig.scala +++ b/cmt-core/src/main/scala/coursemgmt/CMTaConfig.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/CMTcConfig.scala b/cmt-core/src/main/scala/coursemgmt/CMTcConfig.scala similarity index 99% rename from cmt-core/src/main/scala/com/lunatech/cmt/CMTcConfig.scala rename to cmt-core/src/main/scala/coursemgmt/CMTcConfig.scala index 09bd0731..1fabe750 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/CMTcConfig.scala +++ b/cmt-core/src/main/scala/coursemgmt/CMTcConfig.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/ConsoleFunctions.scala b/cmt-core/src/main/scala/coursemgmt/ConsoleFunctions.scala similarity index 98% rename from cmt-core/src/main/scala/com/lunatech/cmt/ConsoleFunctions.scala rename to cmt-core/src/main/scala/coursemgmt/ConsoleFunctions.scala index 90314d35..7c8476ac 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/ConsoleFunctions.scala +++ b/cmt-core/src/main/scala/coursemgmt/ConsoleFunctions.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/Domain.scala b/cmt-core/src/main/scala/coursemgmt/Domain.scala similarity index 96% rename from cmt-core/src/main/scala/com/lunatech/cmt/Domain.scala rename to cmt-core/src/main/scala/coursemgmt/Domain.scala index 263c21f8..254a48fc 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/Domain.scala +++ b/cmt-core/src/main/scala/coursemgmt/Domain.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt import sbt.io.syntax.{File, file} diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/Error.scala b/cmt-core/src/main/scala/coursemgmt/Error.scala similarity index 99% rename from cmt-core/src/main/scala/com/lunatech/cmt/Error.scala rename to cmt-core/src/main/scala/coursemgmt/Error.scala index ed7d7407..76e02092 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/Error.scala +++ b/cmt-core/src/main/scala/coursemgmt/Error.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt sealed trait CmtError { def prettyPrint: String diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/ExerciseMetadata.scala b/cmt-core/src/main/scala/coursemgmt/ExerciseMetadata.scala similarity index 96% rename from cmt-core/src/main/scala/com/lunatech/cmt/ExerciseMetadata.scala rename to cmt-core/src/main/scala/coursemgmt/ExerciseMetadata.scala index 0e9b31c4..d6c2b61f 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/ExerciseMetadata.scala +++ b/cmt-core/src/main/scala/coursemgmt/ExerciseMetadata.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt import java.util.Map.Entry import scala.jdk.CollectionConverters.* diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/Filters.scala b/cmt-core/src/main/scala/coursemgmt/Filters.scala similarity index 97% rename from cmt-core/src/main/scala/com/lunatech/cmt/Filters.scala rename to cmt-core/src/main/scala/coursemgmt/Filters.scala index 5efdfb75..1254463b 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/Filters.scala +++ b/cmt-core/src/main/scala/coursemgmt/Filters.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/Helpers.scala b/cmt-core/src/main/scala/coursemgmt/Helpers.scala similarity index 99% rename from cmt-core/src/main/scala/com/lunatech/cmt/Helpers.scala rename to cmt-core/src/main/scala/coursemgmt/Helpers.scala index 2cfe5cea..94a578b0 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/Helpers.scala +++ b/cmt-core/src/main/scala/coursemgmt/Helpers.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,9 +13,9 @@ package com.lunatech.cmt * See the License for the specific language governing permissions and limitations under the License. */ -import com.lunatech.cmt.ProcessDSL.ProcessCmd -import com.lunatech.cmt.core.GeneratorInfo -import com.lunatech.cmt.core.command.Package.* +import coursemgmt.ProcessDSL.ProcessCmd +import coursemgmt.core.GeneratorInfo +import coursemgmt.core.command.Package.* import com.typesafe.config.{ConfigFactory, ConfigRenderOptions} import sbt.io.IO as sbtio import sbt.io.syntax.* diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/ProcessDSL.scala b/cmt-core/src/main/scala/coursemgmt/ProcessDSL.scala similarity index 93% rename from cmt-core/src/main/scala/com/lunatech/cmt/ProcessDSL.scala rename to cmt-core/src/main/scala/coursemgmt/ProcessDSL.scala index 4b79c0d2..046ad129 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/ProcessDSL.scala +++ b/cmt-core/src/main/scala/coursemgmt/ProcessDSL.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,9 +13,9 @@ package com.lunatech.cmt * See the License for the specific language governing permissions and limitations under the License. */ -import com.lunatech.cmt.toExecuteCommandErrorMessage +import coursemgmt.toExecuteCommandErrorMessage import sbt.io.syntax.* -import com.lunatech.cmt.Helpers.ignoreProcessStdOutStdErr +import coursemgmt.Helpers.ignoreProcessStdOutStdErr import scala.sys.process.Process import scala.util.{Failure, Success, Try} diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/Releasables.scala b/cmt-core/src/main/scala/coursemgmt/Releasables.scala similarity index 93% rename from cmt-core/src/main/scala/com/lunatech/cmt/Releasables.scala rename to cmt-core/src/main/scala/coursemgmt/Releasables.scala index 6d0aaf8d..f8fb90e8 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/Releasables.scala +++ b/cmt-core/src/main/scala/coursemgmt/Releasables.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt import sbt.io.IO as sbtio import sbt.io.syntax.* diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/Validations.scala b/cmt-core/src/main/scala/coursemgmt/Validations.scala similarity index 96% rename from cmt-core/src/main/scala/com/lunatech/cmt/Validations.scala rename to cmt-core/src/main/scala/coursemgmt/Validations.scala index 19ca0644..3a28cf89 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/Validations.scala +++ b/cmt-core/src/main/scala/coursemgmt/Validations.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,7 +13,6 @@ package com.lunatech.cmt * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.{FileValidations, IntValidations, StringValidations} import sbt.io.syntax.File object ValidationExtensions: diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/client/Configuration.scala b/cmt-core/src/main/scala/coursemgmt/client/Configuration.scala similarity index 93% rename from cmt-core/src/main/scala/com/lunatech/cmt/client/Configuration.scala rename to cmt-core/src/main/scala/coursemgmt/client/Configuration.scala index 9666fa88..875ccd8b 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/client/Configuration.scala +++ b/cmt-core/src/main/scala/coursemgmt/client/Configuration.scala @@ -1,9 +1,9 @@ -package com.lunatech.cmt.client +package coursemgmt.client -import com.lunatech.cmt.Helpers.{adaptToNixSeparatorChar, adaptToOSSeparatorChar} -import com.lunatech.cmt.client.Configuration.* -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.{CmtError, FailedToWriteGlobalConfiguration, printMessage} +import coursemgmt.Helpers.{adaptToNixSeparatorChar, adaptToOSSeparatorChar} +import coursemgmt.client.Configuration.* +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.{CmtError, FailedToWriteGlobalConfiguration, printMessage} import com.typesafe.config.{Config, ConfigFactory} import dev.dirs.ProjectDirectories import sbt.io.IO.* @@ -46,7 +46,7 @@ object Configuration: private val projectDirectories = ProjectDirectories.from("com", "lunatech", "cmt") val UserConfigDir = projectDirectories.configDir - val CmtGlobalConfigName = "com.lunatech.cmt.conf" + val CmtGlobalConfigName = "coursemgmt.conf" val CoursesDirectoryToken = "COURSES_DIRECTORY" val CurrentCourseToken = "CURRENT_COURSE" val CmtHomeEnvKey = "CMT_HOME" diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/client/cli/CmtcCommand.scala b/cmt-core/src/main/scala/coursemgmt/client/cli/CmtcCommand.scala similarity index 69% rename from cmt-core/src/main/scala/com/lunatech/cmt/client/cli/CmtcCommand.scala rename to cmt-core/src/main/scala/coursemgmt/client/cli/CmtcCommand.scala index 749a8b56..1f06894b 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/client/cli/CmtcCommand.scala +++ b/cmt-core/src/main/scala/coursemgmt/client/cli/CmtcCommand.scala @@ -1,11 +1,11 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli import caseapp.core.help.Help import caseapp.core.parser.Parser import cats.syntax.either.* -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.core.cli.CmtCommand -import com.lunatech.cmt.printErrorAndExit +import coursemgmt.client.Configuration +import coursemgmt.core.cli.CmtCommand +import coursemgmt.printErrorAndExit abstract class CmtcCommand[T](using parser: Parser[T], help: Help[T]) extends CmtCommand[T] { diff --git a/cmt-core/src/main/scala/coursemgmt/client/command/Executable.scala b/cmt-core/src/main/scala/coursemgmt/client/command/Executable.scala new file mode 100644 index 00000000..4545249b --- /dev/null +++ b/cmt-core/src/main/scala/coursemgmt/client/command/Executable.scala @@ -0,0 +1,7 @@ +package coursemgmt.client.command + +import coursemgmt.CmtError +import coursemgmt.client.Configuration + +trait Executable[T]: + extension (t: T) def execute(configuration: Configuration): Either[CmtError, String] diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/core/GeneratorInfo.scala b/cmt-core/src/main/scala/coursemgmt/core/GeneratorInfo.scala similarity index 72% rename from cmt-core/src/main/scala/com/lunatech/cmt/core/GeneratorInfo.scala rename to cmt-core/src/main/scala/coursemgmt/core/GeneratorInfo.scala index c6f7f110..6cde8391 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/core/GeneratorInfo.scala +++ b/cmt-core/src/main/scala/coursemgmt/core/GeneratorInfo.scala @@ -1,3 +1,3 @@ -package com.lunatech.cmt.core +package coursemgmt.core final case class GeneratorInfo(generatorName: String, generatorVersion: String) diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/core/cli/ArgParsers.scala b/cmt-core/src/main/scala/coursemgmt/core/cli/ArgParsers.scala similarity index 92% rename from cmt-core/src/main/scala/com/lunatech/cmt/core/cli/ArgParsers.scala rename to cmt-core/src/main/scala/coursemgmt/core/cli/ArgParsers.scala index d80cd035..3bbc7e24 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/core/cli/ArgParsers.scala +++ b/cmt-core/src/main/scala/coursemgmt/core/cli/ArgParsers.scala @@ -1,13 +1,13 @@ -package com.lunatech.cmt.core.cli +package coursemgmt.core.cli import caseapp.core.Error import caseapp.core.Error.Other import caseapp.core.argparser.{ArgParser, SimpleArgParser} import cats.syntax.apply.* import cats.syntax.either.* -import com.lunatech.cmt.Domain.{InstallationSource, StudentifiedRepo} -import com.lunatech.cmt.Domain.InstallationSource.{GithubProject, LocalDirectory, ZipFile} -import com.lunatech.cmt.core.validation.FileValidations.* +import coursemgmt.Domain.{InstallationSource, StudentifiedRepo} +import coursemgmt.Domain.InstallationSource.{GithubProject, LocalDirectory, ZipFile} +import coursemgmt.core.validation.FileValidations.* import sbt.io.syntax.{File, file} object ArgParsers: diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/core/cli/CmtCommand.scala b/cmt-core/src/main/scala/coursemgmt/core/cli/CmtCommand.scala similarity index 95% rename from cmt-core/src/main/scala/com/lunatech/cmt/core/cli/CmtCommand.scala rename to cmt-core/src/main/scala/coursemgmt/core/cli/CmtCommand.scala index 3555bf08..a422f6af 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/core/cli/CmtCommand.scala +++ b/cmt-core/src/main/scala/coursemgmt/core/cli/CmtCommand.scala @@ -1,10 +1,10 @@ -package com.lunatech.cmt.core.cli +package coursemgmt.core.cli import caseapp.{Command, RemainingArgs} import caseapp.core.Error import caseapp.core.help.Help import caseapp.core.parser.Parser -import com.lunatech.cmt.{ +import coursemgmt.{ CmtError, MissingTrailingArguments, NoTrailingArguments, diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/core/command/Package.scala b/cmt-core/src/main/scala/coursemgmt/core/command/Package.scala similarity index 90% rename from cmt-core/src/main/scala/com/lunatech/cmt/core/command/Package.scala rename to cmt-core/src/main/scala/coursemgmt/core/command/Package.scala index 5bfbd815..5b9a30f2 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/core/command/Package.scala +++ b/cmt-core/src/main/scala/coursemgmt/core/command/Package.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.core.command +package coursemgmt.core.command import sbt.io.syntax.File import sbt.io.IO as sbtio diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/core/execution/Executable.scala b/cmt-core/src/main/scala/coursemgmt/core/execution/Executable.scala similarity index 91% rename from cmt-core/src/main/scala/com/lunatech/cmt/core/execution/Executable.scala rename to cmt-core/src/main/scala/coursemgmt/core/execution/Executable.scala index e03c7af2..d7521e1e 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/core/execution/Executable.scala +++ b/cmt-core/src/main/scala/coursemgmt/core/execution/Executable.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.core.execution +package coursemgmt.core.execution /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,7 +13,7 @@ package com.lunatech.cmt.core.execution * See the License for the specific language governing permissions and limitations under the License. */ -import com.lunatech.cmt.CmtError +import coursemgmt.CmtError trait Executable[T]: extension (t: T) def execute(): Either[CmtError, String] diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/core/validation/FileValidations.scala b/cmt-core/src/main/scala/coursemgmt/core/validation/FileValidations.scala similarity index 93% rename from cmt-core/src/main/scala/com/lunatech/cmt/core/validation/FileValidations.scala rename to cmt-core/src/main/scala/coursemgmt/core/validation/FileValidations.scala index 7c0e13b2..5ca36a61 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/core/validation/FileValidations.scala +++ b/cmt-core/src/main/scala/coursemgmt/core/validation/FileValidations.scala @@ -1,9 +1,9 @@ -package com.lunatech.cmt.core.validation +package coursemgmt.core.validation import caseapp.core.Error import cats.data.{NonEmptyList, ValidatedNel} import cats.syntax.either.* -import com.lunatech.cmt.Helpers +import coursemgmt.Helpers import sbt.io.syntax.File object FileValidations: diff --git a/cmt-core/src/main/scala/com/lunatech/cmt/core/validation/Validatable.scala b/cmt-core/src/main/scala/coursemgmt/core/validation/Validatable.scala similarity index 51% rename from cmt-core/src/main/scala/com/lunatech/cmt/core/validation/Validatable.scala rename to cmt-core/src/main/scala/coursemgmt/core/validation/Validatable.scala index d238b1ef..7b991a67 100644 --- a/cmt-core/src/main/scala/com/lunatech/cmt/core/validation/Validatable.scala +++ b/cmt-core/src/main/scala/coursemgmt/core/validation/Validatable.scala @@ -1,6 +1,6 @@ -package com.lunatech.cmt.core.validation +package coursemgmt.core.validation -import com.lunatech.cmt.CmtError +import coursemgmt.CmtError trait Validatable[T]: extension (t: T) def validated(): Either[CmtError, T] diff --git a/cmt-core/src/test/scala/com/lunatech/cmt/client/ConfigurationSpec.scala b/cmt-core/src/test/scala/coursemgmt/client/ConfigurationSpec.scala similarity index 85% rename from cmt-core/src/test/scala/com/lunatech/cmt/client/ConfigurationSpec.scala rename to cmt-core/src/test/scala/coursemgmt/client/ConfigurationSpec.scala index c2844725..47eb2487 100644 --- a/cmt-core/src/test/scala/com/lunatech/cmt/client/ConfigurationSpec.scala +++ b/cmt-core/src/test/scala/coursemgmt/client/ConfigurationSpec.scala @@ -1,8 +1,8 @@ -package com.lunatech.cmt.client +package coursemgmt.client -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.client.Configuration.CmtHome -import com.lunatech.cmt.support.EitherSupport +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.client.Configuration.CmtHome +import coursemgmt.support.EitherSupport import dev.dirs.ProjectDirectories import org.scalatest.BeforeAndAfterEach import org.scalatest.matchers.should.Matchers @@ -27,7 +27,7 @@ final class ConfigurationSpec extends AnyWordSpecLike with Matchers with BeforeA // other specs _may_ have run before this one and already created the config file // so that's why we ensure that the cmt config file is removed before we execute // otherwise, if the file exists, it will likely not contain default values and the assertion below will fail - sbtio.delete(configDir / "com.lunatech.cmt.conf") + sbtio.delete(configDir / "coursemgmt.conf") val receivedConfiguration = assertRight(Configuration.load()) diff --git a/cmt-core/src/test/scala/com/lunatech/cmt/client/command/InstallSpec.scala b/cmt-core/src/test/scala/coursemgmt/client/command/InstallSpec.scala similarity index 89% rename from cmt-core/src/test/scala/com/lunatech/cmt/client/command/InstallSpec.scala rename to cmt-core/src/test/scala/coursemgmt/client/command/InstallSpec.scala index 6d38346d..0c191b4b 100644 --- a/cmt-core/src/test/scala/com/lunatech/cmt/client/command/InstallSpec.scala +++ b/cmt-core/src/test/scala/coursemgmt/client/command/InstallSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpecLike diff --git a/cmt-core/src/test/scala/com/lunatech/cmt/core/cli/CmtCommandSpec.scala b/cmt-core/src/test/scala/coursemgmt/core/cli/CmtCommandSpec.scala similarity index 92% rename from cmt-core/src/test/scala/com/lunatech/cmt/core/cli/CmtCommandSpec.scala rename to cmt-core/src/test/scala/coursemgmt/core/cli/CmtCommandSpec.scala index cf00a1ab..01c79cf7 100644 --- a/cmt-core/src/test/scala/com/lunatech/cmt/core/cli/CmtCommandSpec.scala +++ b/cmt-core/src/test/scala/coursemgmt/core/cli/CmtCommandSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.core.cli +package coursemgmt.core.cli //import caseapp.core.{Indexed, RemainingArgs} import org.scalatest.wordspec.AnyWordSpecLike diff --git a/cmt-core/src/test/scala/com/lunatech/cmt/support/CommandLineParseTestBase.scala b/cmt-core/src/test/scala/coursemgmt/support/CommandLineParseTestBase.scala similarity index 97% rename from cmt-core/src/test/scala/com/lunatech/cmt/support/CommandLineParseTestBase.scala rename to cmt-core/src/test/scala/coursemgmt/support/CommandLineParseTestBase.scala index bbe71bb9..d9298a6e 100644 --- a/cmt-core/src/test/scala/com/lunatech/cmt/support/CommandLineParseTestBase.scala +++ b/cmt-core/src/test/scala/coursemgmt/support/CommandLineParseTestBase.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.support +package coursemgmt.support /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -24,7 +24,7 @@ import org.scalatest.wordspec.AnyWordSpecLike import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks import sbt.io.IO import sbt.io.syntax.* -import com.lunatech.cmt.{CmtError, toCmtError} +import coursemgmt.{CmtError, toCmtError} import scala.language.postfixOps diff --git a/cmt-core/src/test/scala/com/lunatech/cmt/support/EitherSupport.scala b/cmt-core/src/test/scala/coursemgmt/support/EitherSupport.scala similarity index 97% rename from cmt-core/src/test/scala/com/lunatech/cmt/support/EitherSupport.scala rename to cmt-core/src/test/scala/coursemgmt/support/EitherSupport.scala index e2c9ffff..b426345a 100644 --- a/cmt-core/src/test/scala/com/lunatech/cmt/support/EitherSupport.scala +++ b/cmt-core/src/test/scala/coursemgmt/support/EitherSupport.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.support +package coursemgmt.support /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * diff --git a/cmt-core/src/test/scala/com/lunatech/cmt/support/ExtractUniquePathsSpec.scala b/cmt-core/src/test/scala/coursemgmt/support/ExtractUniquePathsSpec.scala similarity index 95% rename from cmt-core/src/test/scala/com/lunatech/cmt/support/ExtractUniquePathsSpec.scala rename to cmt-core/src/test/scala/coursemgmt/support/ExtractUniquePathsSpec.scala index d2ef20d8..0687d8e5 100644 --- a/cmt-core/src/test/scala/com/lunatech/cmt/support/ExtractUniquePathsSpec.scala +++ b/cmt-core/src/test/scala/coursemgmt/support/ExtractUniquePathsSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.support +package coursemgmt.support import org.scalatest.wordspec.AnyWordSpec import org.scalatest.matchers.should.Matchers @@ -14,7 +14,7 @@ trait ExtractUniquePathsFixture { final class ExtractUniquePathsSpec extends AnyWordSpec with Matchers with ExtractUniquePathsFixture { - import com.lunatech.cmt.Helpers.extractUniquePaths + import coursemgmt.Helpers.extractUniquePaths "extractUniquePaths" when { "given a series of paths that don't share any common prefix" should { diff --git a/cmt-core/src/test/scala/com/lunatech/cmt/support/TestDirectories.scala b/cmt-core/src/test/scala/coursemgmt/support/TestDirectories.scala similarity index 92% rename from cmt-core/src/test/scala/com/lunatech/cmt/support/TestDirectories.scala rename to cmt-core/src/test/scala/coursemgmt/support/TestDirectories.scala index fb4b7300..96e06182 100644 --- a/cmt-core/src/test/scala/com/lunatech/cmt/support/TestDirectories.scala +++ b/cmt-core/src/test/scala/coursemgmt/support/TestDirectories.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.support +package coursemgmt.support /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,9 +13,9 @@ package com.lunatech.cmt.support * See the License for the specific language governing permissions and limitations under the License. */ -import com.lunatech.cmt.Helpers +import coursemgmt.Helpers import sbt.io.syntax.{File, file} -import com.lunatech.cmt.Helpers.adaptToOSSeparatorChar +import coursemgmt.Helpers.adaptToOSSeparatorChar trait TestDirectories { diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/Domain.scala b/cmta/src/main/scala/coursemgmt/admin/Domain.scala similarity index 94% rename from cmta/src/main/scala/com/lunatech/cmt/admin/Domain.scala rename to cmta/src/main/scala/coursemgmt/admin/Domain.scala index 72b93002..418717b9 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/Domain.scala +++ b/cmta/src/main/scala/coursemgmt/admin/Domain.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.admin +package coursemgmt.admin /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,12 +13,12 @@ package com.lunatech.cmt.admin * See the License for the specific language governing permissions and limitations under the License. */ -import com.lunatech.cmt.CmtError +import coursemgmt.CmtError import sbt.io.syntax.File -import com.lunatech.cmt.* +import coursemgmt.* import cats.syntax.either.* -import com.lunatech.cmt.Domain.InstallationSource +import coursemgmt.Domain.InstallationSource object Domain: diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/Main.scala b/cmta/src/main/scala/coursemgmt/admin/Main.scala similarity index 93% rename from cmta/src/main/scala/com/lunatech/cmt/admin/Main.scala rename to cmta/src/main/scala/coursemgmt/admin/Main.scala index 20405a16..945cfb76 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/Main.scala +++ b/cmta/src/main/scala/coursemgmt/admin/Main.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.admin +package coursemgmt.admin /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -14,7 +14,7 @@ package com.lunatech.cmt.admin */ import caseapp.core.app.CommandsEntryPoint -import com.lunatech.cmt.admin.command.{ +import coursemgmt.admin.command.{ Delinearize, DuplicateInsertBefore, Linearize, diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/TargetFolderValidation.scala b/cmta/src/main/scala/coursemgmt/admin/TargetFolderValidation.scala similarity index 87% rename from cmta/src/main/scala/com/lunatech/cmt/admin/TargetFolderValidation.scala rename to cmta/src/main/scala/coursemgmt/admin/TargetFolderValidation.scala index a27af8eb..2b3dc999 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/TargetFolderValidation.scala +++ b/cmta/src/main/scala/coursemgmt/admin/TargetFolderValidation.scala @@ -1,8 +1,8 @@ -package com.lunatech.cmt.admin +package coursemgmt.admin -import com.lunatech.cmt.CmtError +import coursemgmt.CmtError import java.io.File -import com.lunatech.cmt.toExecuteCommandErrorMessage +import coursemgmt.toExecuteCommandErrorMessage def validateDestinationFolder(mainRepository: File, destination: File): Either[CmtError, Unit] = val canonicalTarget = destination.getCanonicalPath diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/cli/ArgParsers.scala b/cmta/src/main/scala/coursemgmt/admin/cli/ArgParsers.scala similarity index 95% rename from cmta/src/main/scala/com/lunatech/cmt/admin/cli/ArgParsers.scala rename to cmta/src/main/scala/coursemgmt/admin/cli/ArgParsers.scala index cfb674b1..1814ba9a 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/cli/ArgParsers.scala +++ b/cmta/src/main/scala/coursemgmt/admin/cli/ArgParsers.scala @@ -1,9 +1,9 @@ -package com.lunatech.cmt.admin.cli +package coursemgmt.admin.cli import caseapp.core.argparser.{ArgParser, FlagArgParser, SimpleArgParser} import cats.syntax.apply.* -import com.lunatech.cmt.admin.Domain.* -import com.lunatech.cmt.core.validation.FileValidations.* +import coursemgmt.admin.Domain.* +import coursemgmt.core.validation.FileValidations.* import sbt.io.syntax.file import caseapp.core.Error import cats.syntax.either.* diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/cli/SharedOptions.scala b/cmta/src/main/scala/coursemgmt/admin/cli/SharedOptions.scala similarity index 79% rename from cmta/src/main/scala/com/lunatech/cmt/admin/cli/SharedOptions.scala rename to cmta/src/main/scala/coursemgmt/admin/cli/SharedOptions.scala index 1d54be0a..a9a0dad1 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/cli/SharedOptions.scala +++ b/cmta/src/main/scala/coursemgmt/admin/cli/SharedOptions.scala @@ -1,8 +1,8 @@ -package com.lunatech.cmt.admin.cli +package coursemgmt.admin.cli import caseapp.{ExtraName, Help, HelpMessage, Parser, ValueDescription} -import com.lunatech.cmt.admin.Domain.{ConfigurationFile, MainRepository} -import com.lunatech.cmt.admin.cli.ArgParsers.{configurationFileArgParser, mainRepositoryArgParser} +import coursemgmt.admin.Domain.{ConfigurationFile, MainRepository} +import coursemgmt.admin.cli.ArgParsers.{configurationFileArgParser, mainRepositoryArgParser} final case class SharedOptions( @ExtraName("m") diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/command/Delinearize.scala b/cmta/src/main/scala/coursemgmt/admin/command/Delinearize.scala similarity index 91% rename from cmta/src/main/scala/com/lunatech/cmt/admin/command/Delinearize.scala rename to cmta/src/main/scala/coursemgmt/admin/command/Delinearize.scala index 26934f4b..822dc7da 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/command/Delinearize.scala +++ b/cmta/src/main/scala/coursemgmt/admin/command/Delinearize.scala @@ -1,17 +1,17 @@ -package com.lunatech.cmt.admin.command +package coursemgmt.admin.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, Recurse, RemainingArgs, ValueDescription} -import com.lunatech.cmt.* -import com.lunatech.cmt.Helpers.* -import com.lunatech.cmt.ProcessDSL.toProcessCmd -import com.lunatech.cmt.admin.Domain.LinearizeBaseDirectory -import com.lunatech.cmt.admin.cli.SharedOptions -import com.lunatech.cmt.core.execution.Executable -import com.lunatech.cmt.core.validation.Validatable +import coursemgmt.* +import coursemgmt.Helpers.* +import coursemgmt.ProcessDSL.toProcessCmd +import coursemgmt.admin.Domain.LinearizeBaseDirectory +import coursemgmt.admin.cli.SharedOptions +import coursemgmt.core.execution.Executable +import coursemgmt.core.validation.Validatable import sbt.io.IO as sbtio import sbt.io.syntax.* -import com.lunatech.cmt.admin.cli.ArgParsers.linearizeBaseDirectoryArgParser -import com.lunatech.cmt.core.cli.CmtCommand +import coursemgmt.admin.cli.ArgParsers.linearizeBaseDirectoryArgParser +import coursemgmt.core.cli.CmtCommand object Delinearize: diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/command/DuplicateInsertBefore.scala b/cmta/src/main/scala/coursemgmt/admin/command/DuplicateInsertBefore.scala similarity index 87% rename from cmta/src/main/scala/com/lunatech/cmt/admin/command/DuplicateInsertBefore.scala rename to cmta/src/main/scala/coursemgmt/admin/command/DuplicateInsertBefore.scala index 1d01d465..eb84651a 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/command/DuplicateInsertBefore.scala +++ b/cmta/src/main/scala/coursemgmt/admin/command/DuplicateInsertBefore.scala @@ -1,21 +1,16 @@ -package com.lunatech.cmt.admin.command +package coursemgmt.admin.command -import com.lunatech.cmt.* +import coursemgmt.* import caseapp.{AppName, CommandName, ExtraName, HelpMessage, Recurse, RemainingArgs, ValueDescription} -import com.lunatech.cmt.Helpers.{ - ExercisesMetadata, - getExerciseMetadata, - commitToGit, - exitIfGitIndexOrWorkspaceIsntClean -} -import com.lunatech.cmt.admin.Domain.{ExerciseNumber, RenumberOffset, RenumberStart, RenumberStep} -import com.lunatech.cmt.admin.cli.SharedOptions -import com.lunatech.cmt.core.execution.Executable -import com.lunatech.cmt.core.validation.Validatable +import coursemgmt.Helpers.{ExercisesMetadata, getExerciseMetadata, commitToGit, exitIfGitIndexOrWorkspaceIsntClean} +import coursemgmt.admin.Domain.{ExerciseNumber, RenumberOffset, RenumberStart, RenumberStep} +import coursemgmt.admin.cli.SharedOptions +import coursemgmt.core.execution.Executable +import coursemgmt.core.validation.Validatable import sbt.io.IO as sbtio import sbt.io.syntax.* -import com.lunatech.cmt.admin.cli.ArgParsers.exerciseNumberArgParser -import com.lunatech.cmt.core.cli.CmtCommand +import coursemgmt.admin.cli.ArgParsers.exerciseNumberArgParser +import coursemgmt.core.cli.CmtCommand object DuplicateInsertBefore: diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/command/Linearize.scala b/cmta/src/main/scala/coursemgmt/admin/command/Linearize.scala similarity index 87% rename from cmta/src/main/scala/com/lunatech/cmt/admin/command/Linearize.scala rename to cmta/src/main/scala/coursemgmt/admin/command/Linearize.scala index be56c088..10b9c3a1 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/command/Linearize.scala +++ b/cmta/src/main/scala/coursemgmt/admin/command/Linearize.scala @@ -1,15 +1,15 @@ -package com.lunatech.cmt.admin.command +package coursemgmt.admin.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, Recurse, RemainingArgs, ValueDescription} -import com.lunatech.cmt.Helpers.* -import com.lunatech.cmt.{CMTaConfig, CmtError, printResult, toConsoleGreen} -import com.lunatech.cmt.admin.Domain.{ForceDeleteDestinationDirectory, LinearizeBaseDirectory, MainRepository} -import com.lunatech.cmt.admin.cli.ArgParsers.{forceDeleteDestinationDirectoryArgParser, linearizeBaseDirectoryArgParser} -import com.lunatech.cmt.admin.cli.SharedOptions -import com.lunatech.cmt.admin.validateDestinationFolder -import com.lunatech.cmt.core.cli.CmtCommand -import com.lunatech.cmt.core.execution.Executable -import com.lunatech.cmt.core.validation.Validatable +import coursemgmt.Helpers.* +import coursemgmt.{CMTaConfig, CmtError, printResult, toConsoleGreen} +import coursemgmt.admin.Domain.{ForceDeleteDestinationDirectory, LinearizeBaseDirectory, MainRepository} +import coursemgmt.admin.cli.ArgParsers.{forceDeleteDestinationDirectoryArgParser, linearizeBaseDirectoryArgParser} +import coursemgmt.admin.cli.SharedOptions +import coursemgmt.admin.validateDestinationFolder +import coursemgmt.core.cli.CmtCommand +import coursemgmt.core.execution.Executable +import coursemgmt.core.validation.Validatable import sbt.io.IO as sbtio import sbt.io.syntax.* diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/command/New.scala b/cmta/src/main/scala/coursemgmt/admin/command/New.scala similarity index 91% rename from cmta/src/main/scala/com/lunatech/cmt/admin/command/New.scala rename to cmta/src/main/scala/coursemgmt/admin/command/New.scala index cd50f9c9..622965d5 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/command/New.scala +++ b/cmta/src/main/scala/coursemgmt/admin/command/New.scala @@ -1,18 +1,18 @@ -package com.lunatech.cmt.admin.command +package coursemgmt.admin.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs, ValueDescription} -import com.lunatech.cmt.{CmtError, printResult} -import com.lunatech.cmt.admin.Domain.{ConfigurationFile, CourseTemplate} -import com.lunatech.cmt.client.command.Executable -import com.lunatech.cmt.core.validation.Validatable -import com.lunatech.cmt.admin.cli.ArgParsers.{configurationFileArgParser, courseTemplateArgParser} -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.client.cli.CmtcCommand -import com.lunatech.cmt.Domain.InstallationSource.* -import com.lunatech.cmt.Helpers.ignoreProcessStdOutStdErr +import coursemgmt.{CmtError, printResult} +import coursemgmt.admin.Domain.{ConfigurationFile, CourseTemplate} +import coursemgmt.client.command.Executable +import coursemgmt.core.validation.Validatable +import coursemgmt.admin.cli.ArgParsers.{configurationFileArgParser, courseTemplateArgParser} +import coursemgmt.client.Configuration +import coursemgmt.client.cli.CmtcCommand +import coursemgmt.Domain.InstallationSource.* +import coursemgmt.Helpers.ignoreProcessStdOutStdErr import sbt.io.IO as sbtio import sbt.io.syntax.* -import com.lunatech.cmt.* +import coursemgmt.* import cats.syntax.either.* diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/command/Package.scala b/cmta/src/main/scala/coursemgmt/admin/command/Package.scala similarity index 76% rename from cmta/src/main/scala/com/lunatech/cmt/admin/command/Package.scala rename to cmta/src/main/scala/coursemgmt/admin/command/Package.scala index c0b3fe1e..59c6ee91 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/command/Package.scala +++ b/cmta/src/main/scala/coursemgmt/admin/command/Package.scala @@ -1,6 +1,6 @@ -package com.lunatech.cmt.admin.command +package coursemgmt.admin.command -import com.lunatech.cmt.Helpers.extractExerciseNr +import coursemgmt.Helpers.extractExerciseNr def renumberExercise(exercise: String, exercisePrefix: String, newNumber: Int): String = val newNumberPrefix = f"${exercisePrefix}_$newNumber%03d_" val oldNumberPrefix = diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/command/RenumberExercises.scala b/cmta/src/main/scala/coursemgmt/admin/command/RenumberExercises.scala similarity index 89% rename from cmta/src/main/scala/com/lunatech/cmt/admin/command/RenumberExercises.scala rename to cmta/src/main/scala/coursemgmt/admin/command/RenumberExercises.scala index fa9c0dcc..085533f7 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/command/RenumberExercises.scala +++ b/cmta/src/main/scala/coursemgmt/admin/command/RenumberExercises.scala @@ -1,22 +1,17 @@ -package com.lunatech.cmt.admin.command +package coursemgmt.admin.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, Recurse, RemainingArgs, ValueDescription} -import com.lunatech.cmt.{CMTaConfig, CmtError, printResult} -import com.lunatech.cmt.Helpers.{ - ExercisesMetadata, - getExerciseMetadata, - commitToGit, - exitIfGitIndexOrWorkspaceIsntClean -} -import com.lunatech.cmt.admin.Domain.{RenumberOffset, RenumberStart, RenumberStep} -import com.lunatech.cmt.admin.cli.SharedOptions -import com.lunatech.cmt.core.execution.Executable -import com.lunatech.cmt.admin.cli.ArgParsers.{renumberOffsetArgParser, renumberStartArgParser, renumberStepArgParser} -import com.lunatech.cmt.core.cli.CmtCommand -import com.lunatech.cmt.core.validation.Validatable +import coursemgmt.{CMTaConfig, CmtError, printResult} +import coursemgmt.Helpers.{ExercisesMetadata, getExerciseMetadata, commitToGit, exitIfGitIndexOrWorkspaceIsntClean} +import coursemgmt.admin.Domain.{RenumberOffset, RenumberStart, RenumberStep} +import coursemgmt.admin.cli.SharedOptions +import coursemgmt.core.execution.Executable +import coursemgmt.admin.cli.ArgParsers.{renumberOffsetArgParser, renumberStartArgParser, renumberStepArgParser} +import coursemgmt.core.cli.CmtCommand +import coursemgmt.core.validation.Validatable import sbt.io.IO as sbtio import sbt.io.syntax.* -import com.lunatech.cmt.toExecuteCommandErrorMessage +import coursemgmt.toExecuteCommandErrorMessage object RenumberExercises: diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/command/Studentify.scala b/cmta/src/main/scala/coursemgmt/admin/command/Studentify.scala similarity index 89% rename from cmta/src/main/scala/com/lunatech/cmt/admin/command/Studentify.scala rename to cmta/src/main/scala/coursemgmt/admin/command/Studentify.scala index 5689413d..b076e819 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/command/Studentify.scala +++ b/cmta/src/main/scala/coursemgmt/admin/command/Studentify.scala @@ -1,27 +1,27 @@ -package com.lunatech.cmt.admin.command +package coursemgmt.admin.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, Name, Recurse, RemainingArgs, ValueDescription} -import com.lunatech.cmt.Helpers.* -import com.lunatech.cmt.admin.Domain.{ +import coursemgmt.Helpers.* +import coursemgmt.admin.Domain.{ ForceDeleteDestinationDirectory, InitializeGitRepo, MainRepository, StudentifyBaseDirectory } -import com.lunatech.cmt.core.execution.Executable -import com.lunatech.cmt.{CMTaConfig, CmtError, printResult, toConsoleGreen} +import coursemgmt.core.execution.Executable +import coursemgmt.{CMTaConfig, CmtError, printResult, toConsoleGreen} import sbt.io.IO as sbtio import sbt.io.syntax.* -import com.lunatech.cmt.admin.validateDestinationFolder -import com.lunatech.cmt.admin.cli.SharedOptions -import com.lunatech.cmt.core.validation.Validatable -import com.lunatech.cmt.admin.cli.ArgParsers.{ +import coursemgmt.admin.validateDestinationFolder +import coursemgmt.admin.cli.SharedOptions +import coursemgmt.core.validation.Validatable +import coursemgmt.admin.cli.ArgParsers.{ forceDeleteDestinationDirectoryArgParser, initializeGitRepoArgParser, studentifyBaseDirectoryArgParser } -import com.lunatech.cmt.core.GeneratorInfo -import com.lunatech.cmt.core.cli.CmtCommand +import coursemgmt.core.GeneratorInfo +import coursemgmt.core.cli.CmtCommand object Studentify: @@ -69,8 +69,7 @@ object Studentify: if (redundantPaths.nonEmpty) for (redundantPath <- redundantPaths) println( - com.lunatech.cmt - .toConsoleYellow(s"WARNING: Redundant path detected in CMT configuration: $redundantPath")) + coursemgmt.toConsoleYellow(s"WARNING: Redundant path detected in CMT configuration: $redundantPath")) checkForOverlappingPathsInConfig() @@ -132,7 +131,7 @@ object Studentify: hideExercises(cleanedMainRepo, solutionsFolder, exercises)(config) - import com.lunatech.cmt.version.BuildInfo + import coursemgmt.version.BuildInfo val generatorInfo = GeneratorInfo(BuildInfo.name, BuildInfo.version) writeStudentifiedCMTConfig(studentifiedRootFolder / config.cmtStudentifiedConfigFile, exercises)( config, diff --git a/cmta/src/main/scala/com/lunatech/cmt/admin/command/Version.scala b/cmta/src/main/scala/coursemgmt/admin/command/Version.scala similarity index 71% rename from cmta/src/main/scala/com/lunatech/cmt/admin/command/Version.scala rename to cmta/src/main/scala/coursemgmt/admin/command/Version.scala index 9e49f0ab..f070324d 100644 --- a/cmta/src/main/scala/com/lunatech/cmt/admin/command/Version.scala +++ b/cmta/src/main/scala/coursemgmt/admin/command/Version.scala @@ -1,12 +1,12 @@ -package com.lunatech.cmt.admin.command +package coursemgmt.admin.command import caseapp.{AppName, CommandName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.CmtError -import com.lunatech.cmt.core.cli.CmtCommand -import com.lunatech.cmt.core.execution.Executable -import com.lunatech.cmt.core.validation.Validatable -import com.lunatech.cmt.printResult -import com.lunatech.cmt.version.BuildInfo +import coursemgmt.CmtError +import coursemgmt.core.cli.CmtCommand +import coursemgmt.core.execution.Executable +import coursemgmt.core.validation.Validatable +import coursemgmt.printResult +import coursemgmt.version.BuildInfo object Version: @AppName("version") @CommandName("version") diff --git a/cmta/src/test/scala/com/lunatech/cmt/RenumberExercisesSpec.scala b/cmta/src/test/scala/coursemgmt/RenumberExercisesSpec.scala similarity index 97% rename from cmta/src/test/scala/com/lunatech/cmt/RenumberExercisesSpec.scala rename to cmta/src/test/scala/coursemgmt/RenumberExercisesSpec.scala index e4a98792..6f1e712f 100644 --- a/cmta/src/test/scala/com/lunatech/cmt/RenumberExercisesSpec.scala +++ b/cmta/src/test/scala/coursemgmt/RenumberExercisesSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,10 +13,10 @@ package com.lunatech.cmt * See the License for the specific language governing permissions and limitations under the License. */ -import com.lunatech.cmt.TestHelpers.getExercisePrefixAndExercises -import com.lunatech.cmt.admin.Domain.{MainRepository, RenumberOffset, RenumberStart, RenumberStep} -import com.lunatech.cmt.admin.cli.SharedOptions -import com.lunatech.cmt.admin.command.RenumberExercises +import coursemgmt.TestHelpers.getExercisePrefixAndExercises +import coursemgmt.admin.Domain.{MainRepository, RenumberOffset, RenumberStart, RenumberStep} +import coursemgmt.admin.cli.SharedOptions +import coursemgmt.admin.command.RenumberExercises import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec diff --git a/cmta/src/test/scala/com/lunatech/cmt/TestHelpers.scala b/cmta/src/test/scala/coursemgmt/TestHelpers.scala similarity index 98% rename from cmta/src/test/scala/com/lunatech/cmt/TestHelpers.scala rename to cmta/src/test/scala/coursemgmt/TestHelpers.scala index e068e3b8..94a45840 100644 --- a/cmta/src/test/scala/com/lunatech/cmt/TestHelpers.scala +++ b/cmta/src/test/scala/coursemgmt/TestHelpers.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * diff --git a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/CommandLineArgumentsSpec.scala b/cmta/src/test/scala/coursemgmt/admin/cli/CommandLineArgumentsSpec.scala similarity index 94% rename from cmta/src/test/scala/com/lunatech/cmt/admin/cli/CommandLineArgumentsSpec.scala rename to cmta/src/test/scala/coursemgmt/admin/cli/CommandLineArgumentsSpec.scala index 601cca98..cf74dc96 100644 --- a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/CommandLineArgumentsSpec.scala +++ b/cmta/src/test/scala/coursemgmt/admin/cli/CommandLineArgumentsSpec.scala @@ -1,9 +1,9 @@ -package com.lunatech.cmt.admin.cli +package coursemgmt.admin.cli import caseapp.Parser import caseapp.core.Error.{RequiredOptionNotSpecified, SeveralErrors} -import com.lunatech.cmt.CmtError -import com.lunatech.cmt.support.EitherSupport +import coursemgmt.CmtError +import coursemgmt.support.EitherSupport import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers import org.scalatest.prop.TableFor2 @@ -12,7 +12,7 @@ import org.scalatest.prop.Tables.Table import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks import sbt.io.IO import sbt.io.syntax.File -import com.lunatech.cmt.toCmtError +import coursemgmt.toCmtError abstract class CommandLineArgumentsSpec[T] extends AnyWordSpecLike diff --git a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/DelinearizeArgumentsSpec.scala b/cmta/src/test/scala/coursemgmt/admin/cli/DelinearizeArgumentsSpec.scala similarity index 90% rename from cmta/src/test/scala/com/lunatech/cmt/admin/cli/DelinearizeArgumentsSpec.scala rename to cmta/src/test/scala/coursemgmt/admin/cli/DelinearizeArgumentsSpec.scala index b58184b3..a5374f73 100644 --- a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/DelinearizeArgumentsSpec.scala +++ b/cmta/src/test/scala/coursemgmt/admin/cli/DelinearizeArgumentsSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.admin.cli +package coursemgmt.admin.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -14,12 +14,12 @@ package com.lunatech.cmt.admin.cli */ import caseapp.Parser -import com.lunatech.cmt.{ErrorMessage, FailedToValidateArgument, OptionName, RequiredOptionIsMissing} -import com.lunatech.cmt.admin.Domain.{LinearizeBaseDirectory, MainRepository} -import com.lunatech.cmt.admin.command.Delinearize -import com.lunatech.cmt.support.TestDirectories +import coursemgmt.{ErrorMessage, FailedToValidateArgument, OptionName, RequiredOptionIsMissing} +import coursemgmt.admin.Domain.{LinearizeBaseDirectory, MainRepository} +import coursemgmt.admin.command.Delinearize +import coursemgmt.support.TestDirectories import sbt.io.syntax.{File, file} -import com.lunatech.cmt.admin.cli.ArgParsers.linearizeBaseDirectoryArgParser +import coursemgmt.admin.cli.ArgParsers.linearizeBaseDirectoryArgParser final class DelinearizeArgumentsSpec extends CommandLineArgumentsSpec[Delinearize.Options] with TestDirectories { diff --git a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/DuplicateInsertBeforeArgumentsSpec.scala b/cmta/src/test/scala/coursemgmt/admin/cli/DuplicateInsertBeforeArgumentsSpec.scala similarity index 88% rename from cmta/src/test/scala/com/lunatech/cmt/admin/cli/DuplicateInsertBeforeArgumentsSpec.scala rename to cmta/src/test/scala/coursemgmt/admin/cli/DuplicateInsertBeforeArgumentsSpec.scala index 7b1d5aac..e1564519 100644 --- a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/DuplicateInsertBeforeArgumentsSpec.scala +++ b/cmta/src/test/scala/coursemgmt/admin/cli/DuplicateInsertBeforeArgumentsSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.admin.cli +package coursemgmt.admin.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -14,12 +14,12 @@ package com.lunatech.cmt.admin.cli */ import caseapp.Parser -import com.lunatech.cmt.{ErrorMessage, FailedToValidateArgument, OptionName, RequiredOptionIsMissing} -import com.lunatech.cmt.admin.Domain.{ExerciseNumber, MainRepository} -import com.lunatech.cmt.admin.command.DuplicateInsertBefore -import com.lunatech.cmt.support.TestDirectories +import coursemgmt.{ErrorMessage, FailedToValidateArgument, OptionName, RequiredOptionIsMissing} +import coursemgmt.admin.Domain.{ExerciseNumber, MainRepository} +import coursemgmt.admin.command.DuplicateInsertBefore +import coursemgmt.support.TestDirectories import sbt.io.syntax.{File, file} -import com.lunatech.cmt.admin.cli.ArgParsers.exerciseNumberArgParser +import coursemgmt.admin.cli.ArgParsers.exerciseNumberArgParser final class DuplicateInsertBeforeArgumentsSpec extends CommandLineArgumentsSpec[DuplicateInsertBefore.Options] diff --git a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/LinearizeArgumentsSpec.scala b/cmta/src/test/scala/coursemgmt/admin/cli/LinearizeArgumentsSpec.scala similarity index 88% rename from cmta/src/test/scala/com/lunatech/cmt/admin/cli/LinearizeArgumentsSpec.scala rename to cmta/src/test/scala/coursemgmt/admin/cli/LinearizeArgumentsSpec.scala index e27f1408..4be2e5c4 100644 --- a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/LinearizeArgumentsSpec.scala +++ b/cmta/src/test/scala/coursemgmt/admin/cli/LinearizeArgumentsSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.admin.cli +package coursemgmt.admin.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -14,12 +14,12 @@ package com.lunatech.cmt.admin.cli */ import caseapp.Parser -import com.lunatech.cmt.{ErrorMessage, FailedToValidateArgument, OptionName, RequiredOptionIsMissing} -import com.lunatech.cmt.admin.Domain.{ForceDeleteDestinationDirectory, LinearizeBaseDirectory, MainRepository} -import com.lunatech.cmt.admin.command.Linearize -import com.lunatech.cmt.support.TestDirectories +import coursemgmt.{ErrorMessage, FailedToValidateArgument, OptionName, RequiredOptionIsMissing} +import coursemgmt.admin.Domain.{ForceDeleteDestinationDirectory, LinearizeBaseDirectory, MainRepository} +import coursemgmt.admin.command.Linearize +import coursemgmt.support.TestDirectories import sbt.io.syntax.{File, file} -import com.lunatech.cmt.admin.cli.ArgParsers.{forceDeleteDestinationDirectoryArgParser, linearizeBaseDirectoryArgParser} +import coursemgmt.admin.cli.ArgParsers.{forceDeleteDestinationDirectoryArgParser, linearizeBaseDirectoryArgParser} final class LinearizeArgumentsSpec extends CommandLineArgumentsSpec[Linearize.Options] with TestDirectories { diff --git a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/RenumberArgumentsSpec.scala b/cmta/src/test/scala/coursemgmt/admin/cli/RenumberArgumentsSpec.scala similarity index 87% rename from cmta/src/test/scala/com/lunatech/cmt/admin/cli/RenumberArgumentsSpec.scala rename to cmta/src/test/scala/coursemgmt/admin/cli/RenumberArgumentsSpec.scala index 8af45039..4a7b07fb 100644 --- a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/RenumberArgumentsSpec.scala +++ b/cmta/src/test/scala/coursemgmt/admin/cli/RenumberArgumentsSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.admin.cli +package coursemgmt.admin.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -14,12 +14,12 @@ package com.lunatech.cmt.admin.cli */ import caseapp.Parser -import com.lunatech.cmt.{ErrorMessage, FailedToValidateArgument, OptionName, RequiredOptionIsMissing} -import com.lunatech.cmt.admin.Domain.{MainRepository, RenumberOffset, RenumberStart, RenumberStep} -import com.lunatech.cmt.admin.command.RenumberExercises -import com.lunatech.cmt.support.TestDirectories +import coursemgmt.{ErrorMessage, FailedToValidateArgument, OptionName, RequiredOptionIsMissing} +import coursemgmt.admin.Domain.{MainRepository, RenumberOffset, RenumberStart, RenumberStep} +import coursemgmt.admin.command.RenumberExercises +import coursemgmt.support.TestDirectories import sbt.io.syntax.{File, file} -import com.lunatech.cmt.admin.cli.ArgParsers.{renumberStepArgParser, renumberOffsetArgParser, renumberStartArgParser} +import coursemgmt.admin.cli.ArgParsers.{renumberStepArgParser, renumberOffsetArgParser, renumberStartArgParser} final class RenumberArgumentsSpec extends CommandLineArgumentsSpec[RenumberExercises.Options] with TestDirectories { diff --git a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/StudentifyArgumentsSpec.scala b/cmta/src/test/scala/coursemgmt/admin/cli/StudentifyArgumentsSpec.scala similarity index 95% rename from cmta/src/test/scala/com/lunatech/cmt/admin/cli/StudentifyArgumentsSpec.scala rename to cmta/src/test/scala/coursemgmt/admin/cli/StudentifyArgumentsSpec.scala index 8d11aa39..8c0970f5 100644 --- a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/StudentifyArgumentsSpec.scala +++ b/cmta/src/test/scala/coursemgmt/admin/cli/StudentifyArgumentsSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.admin.cli +package coursemgmt.admin.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -14,20 +14,20 @@ package com.lunatech.cmt.admin.cli */ import caseapp.Parser -import com.lunatech.cmt.{ErrorMessage, FailedToValidateArgument, OptionName, RequiredOptionIsMissing} -import com.lunatech.cmt.admin.command.Studentify -import com.lunatech.cmt.admin.cli.ArgParsers.{ +import coursemgmt.{ErrorMessage, FailedToValidateArgument, OptionName, RequiredOptionIsMissing} +import coursemgmt.admin.command.Studentify +import coursemgmt.admin.cli.ArgParsers.{ initializeGitRepoArgParser, forceDeleteDestinationDirectoryArgParser, studentifyBaseDirectoryArgParser } -import com.lunatech.cmt.admin.Domain.{ +import coursemgmt.admin.Domain.{ ForceDeleteDestinationDirectory, InitializeGitRepo, MainRepository, StudentifyBaseDirectory } -import com.lunatech.cmt.support.TestDirectories +import coursemgmt.support.TestDirectories import sbt.io.syntax.{File, file} final class StudentifyArgumentsSpec extends CommandLineArgumentsSpec[Studentify.Options] with TestDirectories { diff --git a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/VersionArguments.scala b/cmta/src/test/scala/coursemgmt/admin/cli/VersionArguments.scala similarity index 83% rename from cmta/src/test/scala/com/lunatech/cmt/admin/cli/VersionArguments.scala rename to cmta/src/test/scala/coursemgmt/admin/cli/VersionArguments.scala index 5826c9e0..d0e6d137 100644 --- a/cmta/src/test/scala/com/lunatech/cmt/admin/cli/VersionArguments.scala +++ b/cmta/src/test/scala/coursemgmt/admin/cli/VersionArguments.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.admin.cli +package coursemgmt.admin.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt.admin.cli * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.support.{CommandLineArguments, TestDirectories} -//import com.lunatech.cmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} +//import coursemgmt.support.{CommandLineArguments, TestDirectories} +//import coursemgmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} //import org.scalatest.prop.Tables //import sbt.io.syntax.File diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/Domain.scala b/cmtc/src/main/scala/coursemgmt/client/Domain.scala similarity index 97% rename from cmtc/src/main/scala/com/lunatech/cmt/client/Domain.scala rename to cmtc/src/main/scala/coursemgmt/client/Domain.scala index 14e94d7b..1aeddeec 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/Domain.scala +++ b/cmtc/src/main/scala/coursemgmt/client/Domain.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client +package coursemgmt.client /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/Main.scala b/cmtc/src/main/scala/coursemgmt/client/Main.scala similarity index 95% rename from cmtc/src/main/scala/com/lunatech/cmt/client/Main.scala rename to cmtc/src/main/scala/coursemgmt/client/Main.scala index 44f62b7a..01d97008 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/Main.scala +++ b/cmtc/src/main/scala/coursemgmt/client/Main.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client +package coursemgmt.client /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -14,7 +14,7 @@ package com.lunatech.cmt.client */ import caseapp.core.app.CommandsEntryPoint -import com.lunatech.cmt.client.command.{ +import coursemgmt.client.command.{ GotoExercise, GotoFirstExercise, Install, diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/cli/ArgParsers.scala b/cmtc/src/main/scala/coursemgmt/client/cli/ArgParsers.scala similarity index 83% rename from cmtc/src/main/scala/com/lunatech/cmt/client/cli/ArgParsers.scala rename to cmtc/src/main/scala/coursemgmt/client/cli/ArgParsers.scala index 1e53f39e..a93e357e 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/cli/ArgParsers.scala +++ b/cmtc/src/main/scala/coursemgmt/client/cli/ArgParsers.scala @@ -1,7 +1,7 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli import caseapp.core.argparser.{ArgParser, FlagArgParser, SimpleArgParser} -import com.lunatech.cmt.client.Domain.{ExerciseId, ForceMoveToExercise, TemplatePath, ForceDeleteDestinationDirectory} +import coursemgmt.client.Domain.{ExerciseId, ForceMoveToExercise, TemplatePath, ForceDeleteDestinationDirectory} import cats.syntax.either.* object ArgParsers { diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/GotoExercise.scala b/cmtc/src/main/scala/coursemgmt/client/command/GotoExercise.scala similarity index 80% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/GotoExercise.scala rename to cmtc/src/main/scala/coursemgmt/client/command/GotoExercise.scala index 68e7ec02..a6d4673b 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/GotoExercise.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/GotoExercise.scala @@ -1,25 +1,18 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.{ - CMTcConfig, - CmtError, - printResult, - toConsoleGreen, - toConsoleYellow, - toExecuteCommandErrorMessage -} -import com.lunatech.cmt.Helpers.{exerciseFileHasBeenModified, getFilesToCopyAndDelete, pullTestCode} -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.client.Domain.{ExerciseId, ForceMoveToExercise} -import com.lunatech.cmt.core.validation.Validatable +import coursemgmt.{CMTcConfig, CmtError, printResult, toConsoleGreen, toConsoleYellow, toExecuteCommandErrorMessage} +import coursemgmt.Helpers.{exerciseFileHasBeenModified, getFilesToCopyAndDelete, pullTestCode} +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.client.Configuration +import coursemgmt.client.Domain.{ExerciseId, ForceMoveToExercise} +import coursemgmt.core.validation.Validatable import sbt.io.syntax.* -import com.lunatech.cmt.client.cli.ArgParsers.{exerciseIdArgParser, forceMoveToExerciseArgParser} -import com.lunatech.cmt.core.cli.ArgParsers.studentifiedRepoArgParser -import com.lunatech.cmt.client.cli.CmtcCommand -import com.lunatech.cmt.core.cli.enforceTrailingArgumentCount -import com.lunatech.cmt.core.command.Package.getCurrentExerciseId +import coursemgmt.client.cli.ArgParsers.{exerciseIdArgParser, forceMoveToExerciseArgParser} +import coursemgmt.core.cli.ArgParsers.studentifiedRepoArgParser +import coursemgmt.client.cli.CmtcCommand +import coursemgmt.core.cli.enforceTrailingArgumentCount +import coursemgmt.core.command.Package.getCurrentExerciseId object GotoExercise: diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/GotoFirstExercise.scala b/cmtc/src/main/scala/coursemgmt/client/command/GotoFirstExercise.scala similarity index 73% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/GotoFirstExercise.scala rename to cmtc/src/main/scala/coursemgmt/client/command/GotoFirstExercise.scala index e9722bd5..a61ec63d 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/GotoFirstExercise.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/GotoFirstExercise.scala @@ -1,15 +1,15 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.{CMTcConfig, CmtError, printResult} -import com.lunatech.cmt.client.Domain.{ExerciseId, ForceMoveToExercise} -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.core.validation.Validatable -import com.lunatech.cmt.client.cli.ArgParsers.forceMoveToExerciseArgParser -import com.lunatech.cmt.core.cli.ArgParsers.studentifiedRepoArgParser -import com.lunatech.cmt.client.cli.CmtcCommand -import com.lunatech.cmt.core.cli.enforceNoTrailingArguments +import coursemgmt.client.Configuration +import coursemgmt.{CMTcConfig, CmtError, printResult} +import coursemgmt.client.Domain.{ExerciseId, ForceMoveToExercise} +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.core.validation.Validatable +import coursemgmt.client.cli.ArgParsers.forceMoveToExerciseArgParser +import coursemgmt.core.cli.ArgParsers.studentifiedRepoArgParser +import coursemgmt.client.cli.CmtcCommand +import coursemgmt.core.cli.enforceNoTrailingArguments object GotoFirstExercise: diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/Install.scala b/cmtc/src/main/scala/coursemgmt/client/command/Install.scala similarity index 92% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/Install.scala rename to cmtc/src/main/scala/coursemgmt/client/command/Install.scala index c0d1e194..8b0bada5 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/Install.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/Install.scala @@ -1,21 +1,21 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.* import cats.syntax.either.* -import com.lunatech.cmt.* -import com.lunatech.cmt.Domain.InstallationSource.{GithubProject, LocalDirectory, ZipFile} -import com.lunatech.cmt.Domain.{InstallationSource, StudentifiedRepo} -import com.lunatech.cmt.Helpers.{findStudentRepoRoot, ignoreProcessStdOutStdErr} -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.client.cli.CmtcCommand -import com.lunatech.cmt.core.cli.ArgParsers.installationSourceArgParser -import com.lunatech.cmt.core.cli.enforceNoTrailingArguments -import com.lunatech.cmt.core.validation.Validatable -import com.lunatech.cmt.client.Domain.ForceDeleteDestinationDirectory +import coursemgmt.* +import coursemgmt.Domain.InstallationSource.{GithubProject, LocalDirectory, ZipFile} +import coursemgmt.Domain.{InstallationSource, StudentifiedRepo} +import coursemgmt.Helpers.{findStudentRepoRoot, ignoreProcessStdOutStdErr} +import coursemgmt.client.Configuration +import coursemgmt.client.cli.CmtcCommand +import coursemgmt.core.cli.ArgParsers.installationSourceArgParser +import coursemgmt.core.cli.enforceNoTrailingArguments +import coursemgmt.core.validation.Validatable +import coursemgmt.client.Domain.ForceDeleteDestinationDirectory import sbt.io.IO as sbtio import sbt.io.syntax.* -import com.lunatech.cmt.client.cli.ArgParsers.forceDeleteDestinationDirectoryArgParser -import com.lunatech.cmt.Releasables.{*, given} +import coursemgmt.client.cli.ArgParsers.forceDeleteDestinationDirectoryArgParser +import coursemgmt.Releasables.{*, given} import sys.process.* import scala.util.{Failure, Success, Try} diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/ListExercises.scala b/cmtc/src/main/scala/coursemgmt/client/command/ListExercises.scala similarity index 72% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/ListExercises.scala rename to cmtc/src/main/scala/coursemgmt/client/command/ListExercises.scala index d16f8ab9..ab5fc4b2 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/ListExercises.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/ListExercises.scala @@ -1,14 +1,14 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.{CMTcConfig, CmtError, printResult} -import com.lunatech.cmt.client.cli.CmtcCommand -import com.lunatech.cmt.core.validation.Validatable -import com.lunatech.cmt.core.cli.enforceNoTrailingArguments -import com.lunatech.cmt.core.cli.ArgParsers.studentifiedRepoArgParser -import com.lunatech.cmt.Helpers.listExercises +import coursemgmt.client.Configuration +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.{CMTcConfig, CmtError, printResult} +import coursemgmt.client.cli.CmtcCommand +import coursemgmt.core.validation.Validatable +import coursemgmt.core.cli.enforceNoTrailingArguments +import coursemgmt.core.cli.ArgParsers.studentifiedRepoArgParser +import coursemgmt.Helpers.listExercises object ListExercises: diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/ListSavedStates.scala b/cmtc/src/main/scala/coursemgmt/client/command/ListSavedStates.scala similarity index 78% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/ListSavedStates.scala rename to cmtc/src/main/scala/coursemgmt/client/command/ListSavedStates.scala index b1fdb836..fb45f053 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/ListSavedStates.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/ListSavedStates.scala @@ -1,14 +1,14 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.client.cli.CmtcCommand -import com.lunatech.cmt.{CMTcConfig, CmtError, printResult, toConsoleGreen, toConsoleYellow} -import com.lunatech.cmt.core.validation.Validatable +import coursemgmt.client.Configuration +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.client.cli.CmtcCommand +import coursemgmt.{CMTcConfig, CmtError, printResult, toConsoleGreen, toConsoleYellow} +import coursemgmt.core.validation.Validatable import sbt.io.IO as sbtio -import com.lunatech.cmt.core.cli.enforceNoTrailingArguments -import com.lunatech.cmt.core.cli.ArgParsers.studentifiedRepoArgParser +import coursemgmt.core.cli.enforceNoTrailingArguments +import coursemgmt.core.cli.ArgParsers.studentifiedRepoArgParser object ListSavedStates: diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/NextExercise.scala b/cmtc/src/main/scala/coursemgmt/client/command/NextExercise.scala similarity index 81% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/NextExercise.scala rename to cmtc/src/main/scala/coursemgmt/client/command/NextExercise.scala index 52ac9140..d7474e79 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/NextExercise.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/NextExercise.scala @@ -1,25 +1,18 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.{ - CMTcConfig, - CmtError, - printResult, - toConsoleGreen, - toConsoleYellow, - toExecuteCommandErrorMessage -} -import com.lunatech.cmt.Helpers.{exerciseFileHasBeenModified, getFilesToCopyAndDelete, pullTestCode} -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.client.Domain.ForceMoveToExercise -import com.lunatech.cmt.core.validation.Validatable +import coursemgmt.{CMTcConfig, CmtError, printResult, toConsoleGreen, toConsoleYellow, toExecuteCommandErrorMessage} +import coursemgmt.Helpers.{exerciseFileHasBeenModified, getFilesToCopyAndDelete, pullTestCode} +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.client.Configuration +import coursemgmt.client.Domain.ForceMoveToExercise +import coursemgmt.core.validation.Validatable import sbt.io.syntax.* -import com.lunatech.cmt.client.cli.ArgParsers.forceMoveToExerciseArgParser -import com.lunatech.cmt.core.cli.ArgParsers.studentifiedRepoArgParser -import com.lunatech.cmt.client.cli.CmtcCommand -import com.lunatech.cmt.core.cli.enforceNoTrailingArguments -import com.lunatech.cmt.core.command.Package.getCurrentExerciseId +import coursemgmt.client.cli.ArgParsers.forceMoveToExerciseArgParser +import coursemgmt.core.cli.ArgParsers.studentifiedRepoArgParser +import coursemgmt.client.cli.CmtcCommand +import coursemgmt.core.cli.enforceNoTrailingArguments +import coursemgmt.core.command.Package.getCurrentExerciseId object NextExercise: diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/Package.scala b/cmtc/src/main/scala/coursemgmt/client/command/Package.scala similarity index 93% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/Package.scala rename to cmtc/src/main/scala/coursemgmt/client/command/Package.scala index f950985d..42b36e6a 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/Package.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/Package.scala @@ -1,7 +1,7 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command -import com.lunatech.cmt.{CMTcConfig, Helpers} -import com.lunatech.cmt.Helpers.writeStudentifiedCMTBookmark +import coursemgmt.{CMTcConfig, Helpers} +import coursemgmt.Helpers.writeStudentifiedCMTBookmark import sbt.io.syntax.* import sbt.io.IO as sbtio diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/PreviousExercise.scala b/cmtc/src/main/scala/coursemgmt/client/command/PreviousExercise.scala similarity index 78% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/PreviousExercise.scala rename to cmtc/src/main/scala/coursemgmt/client/command/PreviousExercise.scala index 72fcf9b6..efcdb216 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/PreviousExercise.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/PreviousExercise.scala @@ -1,25 +1,18 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.{ - CMTcConfig, - CmtError, - printResult, - toConsoleGreen, - toConsoleYellow, - toExecuteCommandErrorMessage -} -import com.lunatech.cmt.Helpers.{exerciseFileHasBeenModified, getFilesToCopyAndDelete, pullTestCode} -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.client.Domain.ForceMoveToExercise -import com.lunatech.cmt.core.validation.Validatable +import coursemgmt.{CMTcConfig, CmtError, printResult, toConsoleGreen, toConsoleYellow, toExecuteCommandErrorMessage} +import coursemgmt.Helpers.{exerciseFileHasBeenModified, getFilesToCopyAndDelete, pullTestCode} +import coursemgmt.client.Configuration +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.client.Domain.ForceMoveToExercise +import coursemgmt.core.validation.Validatable import sbt.io.syntax.* -import com.lunatech.cmt.client.cli.ArgParsers.forceMoveToExerciseArgParser -import com.lunatech.cmt.core.cli.ArgParsers.studentifiedRepoArgParser -import com.lunatech.cmt.client.cli.CmtcCommand -import com.lunatech.cmt.core.cli.enforceNoTrailingArguments -import com.lunatech.cmt.core.command.Package.getCurrentExerciseId +import coursemgmt.client.cli.ArgParsers.forceMoveToExerciseArgParser +import coursemgmt.core.cli.ArgParsers.studentifiedRepoArgParser +import coursemgmt.client.cli.CmtcCommand +import coursemgmt.core.cli.enforceNoTrailingArguments +import coursemgmt.core.command.Package.getCurrentExerciseId object PreviousExercise: diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/PullSolution.scala b/cmtc/src/main/scala/coursemgmt/client/command/PullSolution.scala similarity index 79% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/PullSolution.scala rename to cmtc/src/main/scala/coursemgmt/client/command/PullSolution.scala index fdfaae59..c183e234 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/PullSolution.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/PullSolution.scala @@ -1,17 +1,17 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.{CMTcConfig, CmtError, printResult, toConsoleGreen, toConsoleYellow} -import com.lunatech.cmt.Helpers.{adaptToNixSeparatorChar, exerciseFileHasBeenModified, withZipFile} -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.client.cli.CmtcCommand -import com.lunatech.cmt.core.validation.Validatable +import coursemgmt.{CMTcConfig, CmtError, printResult, toConsoleGreen, toConsoleYellow} +import coursemgmt.Helpers.{adaptToNixSeparatorChar, exerciseFileHasBeenModified, withZipFile} +import coursemgmt.client.Configuration +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.client.cli.CmtcCommand +import coursemgmt.core.validation.Validatable import sbt.io.IO as sbtio import sbt.io.syntax.* -import com.lunatech.cmt.core.cli.enforceNoTrailingArguments -import com.lunatech.cmt.core.cli.ArgParsers.studentifiedRepoArgParser -import com.lunatech.cmt.core.command.Package.getCurrentExerciseId +import coursemgmt.core.cli.enforceNoTrailingArguments +import coursemgmt.core.cli.ArgParsers.studentifiedRepoArgParser +import coursemgmt.core.command.Package.getCurrentExerciseId object PullSolution: diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/PullTemplate.scala b/cmtc/src/main/scala/coursemgmt/client/command/PullTemplate.scala similarity index 79% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/PullTemplate.scala rename to cmtc/src/main/scala/coursemgmt/client/command/PullTemplate.scala index 58f95a3d..34367ec4 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/PullTemplate.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/PullTemplate.scala @@ -1,27 +1,20 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.{ - CMTcConfig, - CmtError, - printResult, - toConsoleGreen, - toConsoleYellow, - toExecuteCommandErrorMessage -} -import com.lunatech.cmt.Helpers.withZipFile -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.client.Domain.TemplatePath -import com.lunatech.cmt.core.validation.Validatable +import coursemgmt.{CMTcConfig, CmtError, printResult, toConsoleGreen, toConsoleYellow, toExecuteCommandErrorMessage} +import coursemgmt.Helpers.withZipFile +import coursemgmt.client.Configuration +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.client.Domain.TemplatePath +import coursemgmt.core.validation.Validatable import sbt.io.CopyOptions import sbt.io.IO as sbtio import sbt.io.syntax.* -import com.lunatech.cmt.client.cli.ArgParsers.templatePathArgParser -import com.lunatech.cmt.core.cli.ArgParsers.studentifiedRepoArgParser -import com.lunatech.cmt.client.cli.CmtcCommand -import com.lunatech.cmt.core.cli.enforceTrailingArgumentCount -import com.lunatech.cmt.core.command.Package.getCurrentExerciseId +import coursemgmt.client.cli.ArgParsers.templatePathArgParser +import coursemgmt.core.cli.ArgParsers.studentifiedRepoArgParser +import coursemgmt.client.cli.CmtcCommand +import coursemgmt.core.cli.enforceTrailingArgumentCount +import coursemgmt.core.command.Package.getCurrentExerciseId object PullTemplate: diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/RestoreState.scala b/cmtc/src/main/scala/coursemgmt/client/command/RestoreState.scala similarity index 81% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/RestoreState.scala rename to cmtc/src/main/scala/coursemgmt/client/command/RestoreState.scala index c0504f3f..3bad45c5 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/RestoreState.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/RestoreState.scala @@ -1,18 +1,18 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.client.Domain.ExerciseId +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.client.Domain.ExerciseId import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.client.cli.ArgParsers.exerciseIdArgParser -import com.lunatech.cmt.core.cli.ArgParsers.studentifiedRepoArgParser -import com.lunatech.cmt.client.command.deleteCurrentState -import com.lunatech.cmt.core.validation.Validatable -import com.lunatech.cmt.* -import com.lunatech.cmt.client.Configuration -import com.lunatech.cmt.client.cli.CmtcCommand +import coursemgmt.client.cli.ArgParsers.exerciseIdArgParser +import coursemgmt.core.cli.ArgParsers.studentifiedRepoArgParser +import coursemgmt.client.command.deleteCurrentState +import coursemgmt.core.validation.Validatable +import coursemgmt.* +import coursemgmt.client.Configuration +import coursemgmt.client.cli.CmtcCommand import sbt.io.IO as sbtio import sbt.io.syntax.* -import com.lunatech.cmt.core.cli.enforceTrailingArgumentCount +import coursemgmt.core.cli.enforceTrailingArgumentCount object RestoreState: diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/SaveState.scala b/cmtc/src/main/scala/coursemgmt/client/command/SaveState.scala similarity index 79% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/SaveState.scala rename to cmtc/src/main/scala/coursemgmt/client/command/SaveState.scala index a72d6444..c49b76c0 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/SaveState.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/SaveState.scala @@ -1,18 +1,18 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.Helpers.zipAndDeleteOriginal -import com.lunatech.cmt.client.command.getCurrentExerciseStateExceptDontTouch -import com.lunatech.cmt.core.validation.Validatable -import com.lunatech.cmt.* -import com.lunatech.cmt.client.Configuration +import coursemgmt.Helpers.zipAndDeleteOriginal +import coursemgmt.client.command.getCurrentExerciseStateExceptDontTouch +import coursemgmt.core.validation.Validatable +import coursemgmt.* +import coursemgmt.client.Configuration import Domain.StudentifiedRepo -import com.lunatech.cmt.client.cli.CmtcCommand +import coursemgmt.client.cli.CmtcCommand import sbt.io.IO as sbtio import sbt.io.syntax.* -import com.lunatech.cmt.core.cli.enforceNoTrailingArguments -import com.lunatech.cmt.core.cli.ArgParsers.studentifiedRepoArgParser -import com.lunatech.cmt.core.command.Package.getCurrentExerciseId +import coursemgmt.core.cli.enforceNoTrailingArguments +import coursemgmt.core.cli.ArgParsers.studentifiedRepoArgParser +import coursemgmt.core.command.Package.getCurrentExerciseId object SaveState: diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/SetCurrentCourse.scala b/cmtc/src/main/scala/coursemgmt/client/command/SetCurrentCourse.scala similarity index 75% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/SetCurrentCourse.scala rename to cmtc/src/main/scala/coursemgmt/client/command/SetCurrentCourse.scala index 06eccff3..bf6ba7e9 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/SetCurrentCourse.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/SetCurrentCourse.scala @@ -1,15 +1,15 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.{AppName, CommandName, ExtraName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.Helpers.findStudentRepoRoot -import com.lunatech.cmt.core.cli.ArgParsers.studentifiedRepoArgParser -import com.lunatech.cmt.client.cli.CmtcCommand -import com.lunatech.cmt.client.{Configuration, CurrentCourse} -import com.lunatech.cmt.Helpers.listExercises -import com.lunatech.cmt.core.cli.enforceNoTrailingArguments -import com.lunatech.cmt.core.validation.Validatable -import com.lunatech.cmt.{CMTcConfig, CmtError, printResult} +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.Helpers.findStudentRepoRoot +import coursemgmt.core.cli.ArgParsers.studentifiedRepoArgParser +import coursemgmt.client.cli.CmtcCommand +import coursemgmt.client.{Configuration, CurrentCourse} +import coursemgmt.Helpers.listExercises +import coursemgmt.core.cli.enforceNoTrailingArguments +import coursemgmt.core.validation.Validatable +import coursemgmt.{CMTcConfig, CmtError, printResult} import sbt.io.syntax.* object SetCurrentCourse: diff --git a/cmtc/src/main/scala/com/lunatech/cmt/client/command/Version.scala b/cmtc/src/main/scala/coursemgmt/client/command/Version.scala similarity index 71% rename from cmtc/src/main/scala/com/lunatech/cmt/client/command/Version.scala rename to cmtc/src/main/scala/coursemgmt/client/command/Version.scala index 99e82cdf..b2d8f3e4 100644 --- a/cmtc/src/main/scala/com/lunatech/cmt/client/command/Version.scala +++ b/cmtc/src/main/scala/coursemgmt/client/command/Version.scala @@ -1,12 +1,12 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command import caseapp.{AppName, CommandName, HelpMessage, RemainingArgs} -import com.lunatech.cmt.CmtError -import com.lunatech.cmt.core.cli.CmtCommand -import com.lunatech.cmt.core.execution.Executable -import com.lunatech.cmt.core.validation.Validatable -import com.lunatech.cmt.printResult -import com.lunatech.cmt.version.BuildInfo +import coursemgmt.CmtError +import coursemgmt.core.cli.CmtCommand +import coursemgmt.core.execution.Executable +import coursemgmt.core.validation.Validatable +import coursemgmt.printResult +import coursemgmt.version.BuildInfo object Version: @AppName("version") @CommandName("version") diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/CommandLineArgumentsSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/CommandLineArgumentsSpec.scala similarity index 95% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/CommandLineArgumentsSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/CommandLineArgumentsSpec.scala index 01e9fc3d..df26c347 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/CommandLineArgumentsSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/CommandLineArgumentsSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -15,8 +15,8 @@ package com.lunatech.cmt.client.cli import caseapp.Parser import caseapp.core.Error.{RequiredOptionNotSpecified, SeveralErrors} -import com.lunatech.cmt.CmtError -import com.lunatech.cmt.support.EitherSupport +import coursemgmt.CmtError +import coursemgmt.support.EitherSupport import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers import org.scalatest.prop.TableFor2 @@ -25,7 +25,7 @@ import org.scalatest.prop.Tables.Table import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks import sbt.io.IO import sbt.io.syntax.File -import com.lunatech.cmt.toCmtError +import coursemgmt.toCmtError abstract class CommandLineArgumentsSpec[T] extends AnyWordSpecLike diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/GotoExerciseArgumentsSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/GotoExerciseArgumentsSpec.scala similarity index 81% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/GotoExerciseArgumentsSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/GotoExerciseArgumentsSpec.scala index f0e10984..04d0edaf 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/GotoExerciseArgumentsSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/GotoExerciseArgumentsSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -14,12 +14,12 @@ package com.lunatech.cmt.client.cli */ import caseapp.Parser -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.client.Domain.{ExerciseId, ForceMoveToExercise} -import com.lunatech.cmt.client.cli.ArgParsers.given -import com.lunatech.cmt.client.command.GotoExercise -import com.lunatech.cmt.core.cli.ArgParsers.given -import com.lunatech.cmt.support.TestDirectories +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.client.Domain.{ExerciseId, ForceMoveToExercise} +import coursemgmt.client.cli.ArgParsers.given +import coursemgmt.client.command.GotoExercise +import coursemgmt.core.cli.ArgParsers.given +import coursemgmt.support.TestDirectories import sbt.io.syntax.File final class GotoExerciseArgumentsSpec extends CommandLineArgumentsSpec[GotoExercise.Options] with TestDirectories { diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/GotoFirstExerciseSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/GotoFirstExerciseSpec.scala similarity index 82% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/GotoFirstExerciseSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/GotoFirstExerciseSpec.scala index dec6f3df..259accce 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/GotoFirstExerciseSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/GotoFirstExerciseSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt.client.cli * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} -//import com.lunatech.cmt.support.{CommandLineArguments, TestDirectories} +//import coursemgmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} +//import coursemgmt.support.{CommandLineArguments, TestDirectories} //import sbt.io.syntax.File object GotoFirstExerciseSpec /*extends CommandLineArguments[CliOptions] with TestDirectories { diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/InstallArgumentsSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/InstallArgumentsSpec.scala similarity index 69% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/InstallArgumentsSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/InstallArgumentsSpec.scala index 42105359..ff5d56cc 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/InstallArgumentsSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/InstallArgumentsSpec.scala @@ -1,12 +1,12 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli import caseapp.Parser -import com.lunatech.cmt.Domain.InstallationSource.{GithubProject, LocalDirectory, ZipFile} -import com.lunatech.cmt.client.command.Install -import com.lunatech.cmt.support.TestDirectories +import coursemgmt.Domain.InstallationSource.{GithubProject, LocalDirectory, ZipFile} +import coursemgmt.client.command.Install +import coursemgmt.support.TestDirectories import sbt.io.syntax.{File, file} -import com.lunatech.cmt.core.cli.ArgParsers.given -import com.lunatech.cmt.client.cli.ArgParsers.forceDeleteDestinationDirectoryArgParser +import coursemgmt.core.cli.ArgParsers.given +import coursemgmt.client.cli.ArgParsers.forceDeleteDestinationDirectoryArgParser final class InstallArgumentsSpec extends CommandLineArgumentsSpec[Install.Options] with TestDirectories { diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/ListExercisesSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/ListExercisesSpec.scala similarity index 82% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/ListExercisesSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/ListExercisesSpec.scala index 42be93b0..118214a1 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/ListExercisesSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/ListExercisesSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt.client.cli * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} -//import com.lunatech.cmt.support.{CommandLineArguments, TestDirectories} +//import coursemgmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} +//import coursemgmt.support.{CommandLineArguments, TestDirectories} //import sbt.io.syntax.File object ListExercisesSpec /*extends CommandLineArguments[CliOptions] with TestDirectories { diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/ListSavedStatesSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/ListSavedStatesSpec.scala similarity index 82% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/ListSavedStatesSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/ListSavedStatesSpec.scala index 0fd3d2cd..5fd38068 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/ListSavedStatesSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/ListSavedStatesSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt.client.cli * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} -//import com.lunatech.cmt.support.{CommandLineArguments, TestDirectories} +//import coursemgmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} +//import coursemgmt.support.{CommandLineArguments, TestDirectories} //import sbt.io.syntax.File object ListSavedStatesSpec /*extends CommandLineArguments[CliOptions] with TestDirectories { diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/NextExerciseSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/NextExerciseSpec.scala similarity index 82% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/NextExerciseSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/NextExerciseSpec.scala index 10b181e5..f3f0d258 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/NextExerciseSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/NextExerciseSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt.client.cli * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} -//import com.lunatech.cmt.support.{CommandLineArguments, TestDirectories} +//import coursemgmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} +//import coursemgmt.support.{CommandLineArguments, TestDirectories} //import sbt.io.syntax.File object NextExerciseSpec /*extends CommandLineArguments[CliOptions] with TestDirectories { diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/PreviousExercise.scala b/cmtc/src/test/scala/coursemgmt/client/cli/PreviousExercise.scala similarity index 82% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/PreviousExercise.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/PreviousExercise.scala index 88eaa83a..fbb332f4 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/PreviousExercise.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/PreviousExercise.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt.client.cli * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} -//import com.lunatech.cmt.support.{CommandLineArguments, TestDirectories} +//import coursemgmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} +//import coursemgmt.support.{CommandLineArguments, TestDirectories} //import sbt.io.syntax.File object PreviousExercise /*extends CommandLineArguments[CliOptions] with TestDirectories { diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/PullSolutionSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/PullSolutionSpec.scala similarity index 82% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/PullSolutionSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/PullSolutionSpec.scala index 4a3271fc..06eb98b2 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/PullSolutionSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/PullSolutionSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt.client.cli * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} -//import com.lunatech.cmt.support.{CommandLineArguments, TestDirectories} +//import coursemgmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} +//import coursemgmt.support.{CommandLineArguments, TestDirectories} //import sbt.io.syntax.File object PullSolutionSpec /*extends CommandLineArguments[CliOptions] with TestDirectories { diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/PullTemplateSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/PullTemplateSpec.scala similarity index 82% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/PullTemplateSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/PullTemplateSpec.scala index 223b2043..c24eabfb 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/PullTemplateSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/PullTemplateSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt.client.cli * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} -//import com.lunatech.cmt.support.{CommandLineArguments, TestDirectories} +//import coursemgmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} +//import coursemgmt.support.{CommandLineArguments, TestDirectories} //import sbt.io.syntax.File object PullTemplateSpec /*extends CommandLineArguments[CliOptions] with TestDirectories { diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/RestoreStateSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/RestoreStateSpec.scala similarity index 82% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/RestoreStateSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/RestoreStateSpec.scala index f876763e..9acd3297 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/RestoreStateSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/RestoreStateSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt.client.cli * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} -//import com.lunatech.cmt.support.{CommandLineArguments, TestDirectories} +//import coursemgmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} +//import coursemgmt.support.{CommandLineArguments, TestDirectories} //import sbt.io.syntax.File object RestoreStateSpec /*extends CommandLineArguments[CliOptions] with TestDirectories { diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/SaveStateSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/SaveStateSpec.scala similarity index 82% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/SaveStateSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/SaveStateSpec.scala index cf850e3c..1e96b211 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/SaveStateSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/SaveStateSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt.client.cli * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} -//import com.lunatech.cmt.support.{CommandLineArguments, TestDirectories} +//import coursemgmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} +//import coursemgmt.support.{CommandLineArguments, TestDirectories} //import sbt.io.syntax.File object SaveStateSpec /*extends CommandLineArguments[CliOptions] with TestDirectories { diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/SetCurrentCourseSpec.scala b/cmtc/src/test/scala/coursemgmt/client/cli/SetCurrentCourseSpec.scala similarity index 92% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/SetCurrentCourseSpec.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/SetCurrentCourseSpec.scala index 0042a122..04afef3a 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/SetCurrentCourseSpec.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/SetCurrentCourseSpec.scala @@ -1,9 +1,9 @@ -package com.lunatech.cmt.client.command +package coursemgmt.client.command -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.Helpers.dumpStringToFile -import com.lunatech.cmt.client.{Configuration, CurrentCourse} -import com.lunatech.cmt.support.EitherSupport +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.Helpers.dumpStringToFile +import coursemgmt.client.{Configuration, CurrentCourse} +import coursemgmt.support.EitherSupport import org.scalatest.BeforeAndAfterEach import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpecLike @@ -96,7 +96,7 @@ final class SetCurrentCourseSpec override def afterEach(): Unit = { savedCmtConfig.foreach { config => - com.lunatech.cmt.Helpers.dumpStringToFile(config, configFile) + coursemgmt.Helpers.dumpStringToFile(config, configFile) } sbtio.delete(tempDirectory) super.afterEach() diff --git a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/VersionArguments.scala b/cmtc/src/test/scala/coursemgmt/client/cli/VersionArguments.scala similarity index 84% rename from cmtc/src/test/scala/com/lunatech/cmt/client/cli/VersionArguments.scala rename to cmtc/src/test/scala/coursemgmt/client/cli/VersionArguments.scala index 5376d380..2403c9f3 100644 --- a/cmtc/src/test/scala/com/lunatech/cmt/client/cli/VersionArguments.scala +++ b/cmtc/src/test/scala/coursemgmt/client/cli/VersionArguments.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.client.cli +package coursemgmt.client.cli /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt.client.cli * See the License for the specific language governing permissions and limitations under the License. */ -//import com.lunatech.cmt.support.CommandLineArguments -//import com.lunatech.cmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} +//import coursemgmt.support.CommandLineArguments +//import coursemgmt.support.CommandLineArguments.{invalidArgumentsTable, validArgumentsTable} //import org.scalatest.prop.Tables //import sbt.io.syntax.File diff --git a/functional-tests/src/test/scala/com/lunatech/cmt/StudentificationFunctionalSpec.scala b/functional-tests/src/test/scala/coursemgmttools/StudentificationFunctionalSpec.scala similarity index 99% rename from functional-tests/src/test/scala/com/lunatech/cmt/StudentificationFunctionalSpec.scala rename to functional-tests/src/test/scala/coursemgmttools/StudentificationFunctionalSpec.scala index aea28f33..b6dbac35 100644 --- a/functional-tests/src/test/scala/com/lunatech/cmt/StudentificationFunctionalSpec.scala +++ b/functional-tests/src/test/scala/coursemgmttools/StudentificationFunctionalSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,8 +13,8 @@ package com.lunatech.cmt * See the License for the specific language governing permissions and limitations under the License. */ -import com.lunatech.cmt.support.* -import com.lunatech.cmt.toExecuteCommandErrorMessage +import coursemgmt.support.* +import coursemgmt.toExecuteCommandErrorMessage import org.scalatest.featurespec.AnyFeatureSpecLike import org.scalatest.matchers.should.Matchers import org.scalatest.{BeforeAndAfterAll, GivenWhenThen} diff --git a/functional-tests/src/test/scala/com/lunatech/cmt/StudentificationMovingBetweenExercisesSpec.scala b/functional-tests/src/test/scala/coursemgmttools/StudentificationMovingBetweenExercisesSpec.scala similarity index 98% rename from functional-tests/src/test/scala/com/lunatech/cmt/StudentificationMovingBetweenExercisesSpec.scala rename to functional-tests/src/test/scala/coursemgmttools/StudentificationMovingBetweenExercisesSpec.scala index 3da28cba..5b2ad8a6 100644 --- a/functional-tests/src/test/scala/com/lunatech/cmt/StudentificationMovingBetweenExercisesSpec.scala +++ b/functional-tests/src/test/scala/coursemgmttools/StudentificationMovingBetweenExercisesSpec.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt +package coursemgmt /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,7 +13,7 @@ package com.lunatech.cmt * See the License for the specific language governing permissions and limitations under the License. */ -import com.lunatech.cmt.support.{ExerciseMetadata, SourcesStruct} +import coursemgmt.support.{ExerciseMetadata, SourcesStruct} import org.scalatest.{BeforeAndAfterAll, GivenWhenThen} import org.scalatest.featurespec.AnyFeatureSpecLike import org.scalatest.matchers.should.Matchers diff --git a/functional-tests/src/test/scala/com/lunatech/cmt/support/TestSupport.scala b/functional-tests/src/test/scala/coursemgmttools/support/TestSupport.scala similarity index 92% rename from functional-tests/src/test/scala/com/lunatech/cmt/support/TestSupport.scala rename to functional-tests/src/test/scala/coursemgmttools/support/TestSupport.scala index 6f59e423..8d5179f1 100644 --- a/functional-tests/src/test/scala/com/lunatech/cmt/support/TestSupport.scala +++ b/functional-tests/src/test/scala/coursemgmttools/support/TestSupport.scala @@ -1,4 +1,4 @@ -package com.lunatech.cmt.support +package coursemgmt.support /** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com * @@ -13,15 +13,15 @@ package com.lunatech.cmt.support * See the License for the specific language governing permissions and limitations under the License. */ -import com.lunatech.cmt.Helpers.* -import com.lunatech.cmt.admin.Domain.MainRepository -import com.lunatech.cmt.admin.cli.SharedOptions -import com.lunatech.cmt.admin.command -import com.lunatech.cmt.Domain.StudentifiedRepo -import com.lunatech.cmt.client.{Configuration, CoursesDirectory, CurrentCourse} -import com.lunatech.cmt.client.Configuration.CmtHome -import com.lunatech.cmt.client.Domain.{ExerciseId, ForceMoveToExercise, TemplatePath} -import com.lunatech.cmt.client.command.{ +import coursemgmt.Helpers.* +import coursemgmt.admin.Domain.MainRepository +import coursemgmt.admin.cli.SharedOptions +import coursemgmt.admin.command +import coursemgmt.Domain.StudentifiedRepo +import coursemgmt.client.{Configuration, CoursesDirectory, CurrentCourse} +import coursemgmt.client.Configuration.CmtHome +import coursemgmt.client.Domain.{ExerciseId, ForceMoveToExercise, TemplatePath} +import coursemgmt.client.command.{ GotoExercise, GotoFirstExercise, NextExercise, @@ -31,7 +31,7 @@ import com.lunatech.cmt.client.command.{ RestoreState, SaveState } -import com.lunatech.cmt.{CMTcConfig, CmtError, Helpers} +import coursemgmt.{CMTcConfig, CmtError, Helpers} import sbt.io.IO as sbtio import sbt.io.syntax.* @@ -153,8 +153,8 @@ def createMainRepo(tmpDir: File, repoName: String, exercises: Exercises, testCon mainRepo def studentifyMainRepo(tmpDir: File, repoName: String, mainRepo: File): File = - import com.lunatech.cmt.admin.Domain.{ForceDeleteDestinationDirectory, InitializeGitRepo, StudentifyBaseDirectory} - import com.lunatech.cmt.admin.command.Studentify + import coursemgmt.admin.Domain.{ForceDeleteDestinationDirectory, InitializeGitRepo, StudentifyBaseDirectory} + import coursemgmt.admin.command.Studentify val studentifyBase = tmpDir / "stu" sbtio.createDirectory(studentifyBase) diff --git a/project/Build.scala b/project/Build.scala index 93c021c4..075770a1 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -27,7 +27,7 @@ object Build { lazy val commonSettings = Seq( scalaVersion := Version.scalaVersion, scalacOptions ++= CompileOptions.compileOptions, - buildInfoPackage := "com.lunatech.cmt.version", + buildInfoPackage := "coursemgmt.version", Test / parallelExecution := false, Test / logBuffered := false)