Skip to content

Commit

Permalink
Adapt organisation & package name after move to Scala Center (#302)
Browse files Browse the repository at this point in the history
* Prepare move of repo to the Scala Center
  • Loading branch information
eloots authored Oct 12, 2023
1 parent 6246d45 commit 5119d87
Show file tree
Hide file tree
Showing 88 changed files with 416 additions and 456 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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", "[email protected]", url("https://github.com/eloots"))),
licenses := Seq("Apache-2.0" -> url("http://www.apache.org/license/LICENSE-2.0"))))

Expand All @@ -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
Expand All @@ -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
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmt

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmt

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmt

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmt

import sbt.io.syntax.{File, file}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmt

sealed trait CmtError {
def prettyPrint: String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmt

import java.util.Map.Entry
import scala.jdk.CollectionConverters.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmt

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmt

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand All @@ -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.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmt

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand All @@ -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}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmt

import sbt.io.IO as sbtio
import sbt.io.syntax.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmt

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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.*
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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] {

Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.lunatech.cmt.core
package coursemgmt.core

final case class GeneratorInfo(generatorName: String, generatorVersion: String)
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt.core.execution
package coursemgmt.core.execution

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand All @@ -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]
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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())

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt.core.cli
package coursemgmt.core.cli

//import caseapp.core.{Indexed, RemainingArgs}
import org.scalatest.wordspec.AnyWordSpecLike
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt.support
package coursemgmt.support

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt.support
package coursemgmt.support

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt.support
package coursemgmt.support

import org.scalatest.wordspec.AnyWordSpec
import org.scalatest.matchers.should.Matchers
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt.support
package coursemgmt.support

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand All @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt.admin
package coursemgmt.admin

/** Copyright 2022 - Eric Loots - [email protected] / Trevor Burton-McCreadie - [email protected]
*
Expand All @@ -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:

Expand Down
Loading

0 comments on commit 5119d87

Please sign in to comment.