Add new fields in ArtifactModel: scaladocUrl and versionScheme should be optional
Fill those fileds in the PomConvert.apply method
Add corresponding types and fields in the Artifact case class: for scaladocUrl we can use the already existing Url case class, for versionScheme we can use a String, and for developers we can introduce a new case class Developer.
Create a migration file in this folder to add new columns in the artifacts table
Update the ArtifactsTable object to declare those field and read/write them. For the developers field we need a serializer. I recommend to define it using circe in the Codecs class.
Add some of information in the artifacts of the Values class to test that we can read and write them to the database without trouble. Those tests already exist in SqlDatabaseTests.
Add a scheduled job to find the missing information from the existing artifacts.
Expectations
We should extract the information from poms that we receive from Sonatype.
Reading and writing those field into the database should be tested.
Motivation
The artifact page contains useful information about the pom file of an artifact.
Currently we have some useful information:
See for instance https://index.scala-lang.org/typelevel/cats/artifacts/cats-core/2.9.0
But we can get more from the pom file:
As a good example of pom file you can see: https://repo1.maven.org/maven2/org/endpoints4s/algebra_2.13/1.7.0/algebra_2.13-1.7.0.pom
Identified Obstacles
Manage missing information with optional values.
Implementation Guideline
ArtifactModel
:scaladocUrl
andversionScheme
should be optionalPomConvert.apply
methodArtifact
case class: forscaladocUrl
we can use the already existingUrl
case class, forversionScheme
we can use aString
, and fordevelopers
we can introduce a new case classDeveloper
.artifacts
tableArtifactsTable
object to declare those field and read/write them. For thedevelopers
field we need a serializer. I recommend to define it using circe in theCodecs
class.Values
class to test that we can read and write them to the database without trouble. Those tests already exist inSqlDatabaseTests
.Expectations