| layout | default |
|---|---|
| title | Feathr Scala Project Developer Guide |
| parent | Developer Guides |
IntelliJ is the recommended IDE to use when developing Feathr. Please visit IntelliJ's installation guide to install it in your local machine. To import Feathr as a new project:
- Git clone Feathr into your local machine. i.e. via https
git clone https://github.com/feathr-ai/feathr.gitor sshgit clone git@github.com:feathr-ai/feathr.git - In IntelliJ, select
File>New>Project from Existing Sources...and selectfeathrfrom the directory you cloned. - Under
Import project from external modelselectsbt. ClickNext. - Under
Project JDKspecify a valid Java1.8JDK and select SBT shell forproject reloadandbuilds. - Click
Finish. - You should see something like
[success] Total time: 5 s, completed Jun 1, 2022 9:43:26 PMin sbt shell.
After waiting for IntelliJ to index, verify your setup by running a test suite in IntelliJ.
- Search for and open a random test, i.e. here we will go with
AnchoredFeaturesIntegTestas shown in the IntelliJ screenshot below. - Next to the class declaration, right click on the two green arrows and select
Run 'AnchoredFeaturesIntegTest'. It could be any test case. - Verify if all test cases have passed.
Please checkout Databricks' Scala Style Guide or the official Scala Style Guide.
Feathr is compiled using SBT.
To compile, run
sbt assembly
To compile with certain java version, run
sbt assembly -java-home "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home"
The jar files are compiled and placed in feathr/target/scala-2.12/feathr-assembly-X.X.X.jar .
To execute tests, run
sbt test
To execute a single test suite, run
sbt 'testOnly com.linkedin.feathr.offline.AnchoredFeaturesIntegTest'
Refer to SBT docs for more commands.
