Skip to content

Commit

Permalink
update scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
intracer committed Dec 17, 2023
1 parent 749864e commit ee884e8
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 45 deletions.
2 changes: 2 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version = 3.7.17
runner.dialect = scala213
107 changes: 62 additions & 45 deletions scalawiki-wlx/src/main/scala/org/scalawiki/wlx/stat/StatParams.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,46 @@ package org.scalawiki.wlx.stat

import java.time.ZonedDateTime

case class StatConfig(campaign: String,
years: Seq[Int] = Nil,
regions: Seq[String] = Nil,
exceptRegions: Seq[String] = Nil,
cities: Seq[String] = Nil,
exceptCities: Seq[String] = Nil,
rateConfig: RateConfig = RateConfig(),
gallery: Boolean = false,
fillLists: Boolean = false,
wrongIds: Boolean = false,
missingIds: Boolean = false,
multipleIds: Boolean = false,
lowRes: Boolean = false,
specialNominations: Boolean = false,
regionalStat: Boolean = false,
regionalDetails: Boolean = false,
authorsStat: Boolean = false,
regionalGallery: Boolean = false,
missingGallery: Boolean = false,
placeDetection: Boolean = false,
newMonuments: Boolean = false,
rateInputDistribution: Boolean = false,
mostPopularMonuments: Boolean = false,
minMpx: Option[Float] = None,
previousYearsGallery: Boolean = false,
numberOfMonumentsByNumberOfPictures: Boolean = false)
case class StatConfig(
campaign: String,
years: Seq[Int] = Nil,
regions: Seq[String] = Nil,
exceptRegions: Seq[String] = Nil,
cities: Seq[String] = Nil,
exceptCities: Seq[String] = Nil,
rateConfig: RateConfig = RateConfig(),
gallery: Boolean = false,
fillLists: Boolean = false,
wrongIds: Boolean = false,
missingIds: Boolean = false,
multipleIds: Boolean = false,
lowRes: Boolean = false,
specialNominations: Boolean = false,
regionalStat: Boolean = false,
regionalDetails: Boolean = false,
authorsStat: Boolean = false,
regionalGallery: Boolean = false,
missingGallery: Boolean = false,
placeDetection: Boolean = false,
newMonuments: Boolean = false,
rateInputDistribution: Boolean = false,
mostPopularMonuments: Boolean = false,
minMpx: Option[Float] = None,
previousYearsGallery: Boolean = false,
numberOfMonumentsByNumberOfPictures: Boolean = false
)

import org.rogach.scallop._

class StatParams(arguments: Seq[String]) extends ScallopConf(arguments) {
val years = opt[List[Int]]("year", 'y', "contest year.")
val startYear = opt[Int]("start-year", 's', "contest year.")
val campaign = opt[String]("campaign",
'c',
"upload campaign, like wlm-ua.",
required = true)
val campaign = opt[String](
"campaign",
'c',
"upload campaign, like wlm-ua.",
required = true
)
val regions = opt[List[String]]("region", 'r', "region code")
val exceptRegions =
opt[List[String]](name = "except-regions", descr = "except region codes")
Expand All @@ -46,12 +50,18 @@ class StatParams(arguments: Seq[String]) extends ScallopConf(arguments) {
opt[List[String]](name = "except-cities", descr = "except cities")
val newObjectRating =
opt[Double](name = "new-object-rating", descr = "new object rating")
val newAuthorObjectRating = opt[Double](name = "new-author-object-rating",
descr = "new author object rating")
val numberOfAuthorsBonus = opt[Boolean](name = "number-of-authors-bonus",
descr = "number of authors bonus")
val numberOfImagesBonus = opt[Boolean](name = "number-of-images-bonus",
descr = "number of images bonus")
val newAuthorObjectRating = opt[Double](
name = "new-author-object-rating",
descr = "new author object rating"
)
val numberOfAuthorsBonus = opt[Boolean](
name = "number-of-authors-bonus",
descr = "number of authors bonus"
)
val numberOfImagesBonus = opt[Boolean](
name = "number-of-images-bonus",
descr = "number of images bonus"
)
val baseRate = opt[Double](name = "base-rate", descr = "base rate")
val gallery = opt[Boolean](name = "gallery", descr = "gallery")
val fillLists = opt[Boolean](name = "fill-lists", descr = "fill lists")
Expand All @@ -62,13 +72,16 @@ class StatParams(arguments: Seq[String]) extends ScallopConf(arguments) {
opt[Boolean](name = "multiple-ids", descr = "report multiple ids")
val lowRes =
opt[Boolean](name = "low-res", descr = "report low resolution photos")
val specialNominations = opt[Boolean](name = "special-nominations",
descr = "report special nominations")
val specialNominations = opt[Boolean](
name = "special-nominations",
descr = "report special nominations"
)
val regionalStat =
opt[Boolean](name = "regional-stat", descr = "report regional statistics")
val regionalDetails = opt[Boolean](name = "regional-details",
descr =
"report regional detailed statistics")
val regionalDetails = opt[Boolean](
name = "regional-details",
descr = "report regional detailed statistics"
)
val authorsStat =
opt[Boolean](name = "authors-stat", descr = "report authors statistics")
val regionalGallery =
Expand All @@ -79,10 +92,14 @@ class StatParams(arguments: Seq[String]) extends ScallopConf(arguments) {
opt[Boolean](name = "place-detection", descr = "report place detection")
val newMonuments =
opt[Boolean](name = "new-monuments", descr = "new monuments")
val rateInputDistribution = opt[Boolean](name = "rate-input-distribution",
descr = "rate input distribution")
val mostPopularMonuments = opt[Boolean](name = "most-popular-monuments",
descr = "most popular monuments")
val rateInputDistribution = opt[Boolean](
name = "rate-input-distribution",
descr = "rate input distribution"
)
val mostPopularMonuments = opt[Boolean](
name = "most-popular-monuments",
descr = "most popular monuments"
)
val minMpx = opt[Float](name = "min-mpx", descr = "minimum megapixels")
val previousYearsGallery =
opt[Boolean](name = "prev-years-gallery", descr = "previous years gallery")
Expand Down

0 comments on commit ee884e8

Please sign in to comment.