Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt organisation & package name after move to Scala Center #302

Merged
merged 4 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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", "eric.loots@lunatech.com", 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("coursemgmttools.admin.Main"))
adpi2 marked this conversation as resolved.
Show resolved Hide resolved
.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("coursemgmttools.client.Main"))
.settings(buildInfoKeys := buildKeysWithName("Course Management Tools (Client)"))

lazy val `functional-tests` = project
Expand Down

This file was deleted.

adpi2 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmttools

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmttools

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmttools

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmttools

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 coursemgmttools

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 coursemgmttools

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 coursemgmttools

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt
package coursemgmttools

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
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 coursemgmttools.ProcessDSL.ProcessCmd
import coursemgmttools.core.GeneratorInfo
import coursemgmttools.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 coursemgmttools

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
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 coursemgmttools.toExecuteCommandErrorMessage
import sbt.io.syntax.*
import com.lunatech.cmt.Helpers.ignoreProcessStdOutStdErr
import coursemgmttools.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 coursemgmttools

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 coursemgmttools

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
Expand All @@ -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.{FileValidations, IntValidations, StringValidations}
//import coursemgmttools.{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 coursemgmttools.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 coursemgmttools.Helpers.{adaptToNixSeparatorChar, adaptToOSSeparatorChar}
import coursemgmttools.client.Configuration.*
import coursemgmttools.Domain.StudentifiedRepo
import coursemgmttools.{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 = "coursemgmttools.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 coursemgmttools.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 coursemgmttools.client.Configuration
import coursemgmttools.core.cli.CmtCommand
import coursemgmttools.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 coursemgmttools.client.command

import coursemgmttools.CmtError
import coursemgmttools.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 coursemgmttools.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 coursemgmttools.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 coursemgmttools.Domain.{InstallationSource, StudentifiedRepo}
import coursemgmttools.Domain.InstallationSource.{GithubProject, LocalDirectory, ZipFile}
import coursemgmttools.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 coursemgmttools.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 coursemgmttools.{
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 coursemgmttools.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 coursemgmttools.core.execution

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
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 coursemgmttools.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 coursemgmttools.core.validation

import caseapp.core.Error
import cats.data.{NonEmptyList, ValidatedNel}
import cats.syntax.either.*
import com.lunatech.cmt.Helpers
import coursemgmttools.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 coursemgmttools.core.validation

import com.lunatech.cmt.CmtError
import coursemgmttools.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 coursemgmttools.client

import com.lunatech.cmt.Domain.StudentifiedRepo
import com.lunatech.cmt.client.Configuration.CmtHome
import com.lunatech.cmt.support.EitherSupport
import coursemgmttools.Domain.StudentifiedRepo
import coursemgmttools.client.Configuration.CmtHome
import coursemgmttools.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 / "coursemgmttools.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 coursemgmttools.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 coursemgmttools.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 coursemgmttools.support

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
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 coursemgmttools.{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 coursemgmttools.support

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lunatech.cmt.support
package coursemgmttools.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 coursemgmttools.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 coursemgmttools.support

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
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 coursemgmttools.Helpers
import sbt.io.syntax.{File, file}
import com.lunatech.cmt.Helpers.adaptToOSSeparatorChar
import coursemgmttools.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 coursemgmttools.admin

/** Copyright 2022 - Eric Loots - eric.loots@gmail.com / Trevor Burton-McCreadie - trevor@thinkmorestupidless.com
*
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 coursemgmttools.CmtError
import sbt.io.syntax.File
import com.lunatech.cmt.*
import coursemgmttools.*
import cats.syntax.either.*

import com.lunatech.cmt.Domain.InstallationSource
import coursemgmttools.Domain.InstallationSource

object Domain:

Expand Down
Loading
Loading