Welcome! If you are interested in contributing to Smile, reporting issues, or just getting in touch with the folks who work on Smile, this guide is for you.
One of the easiest ways to contribute is to participate in discussions and discuss issues. You can also contribute by opening an issue and submitting a pull request with code changes.
To build Smile from source, please first install Java 21, Scala 2.13 and SBT 1.0+. Then clone the repo and build the package:
git clone https://github.com/haifengl/smile.git
cd smile
# compile all packages
sbt package
# run unit tests
sbt test
To build with Scala 3, run
sbt ++3.3.3 scala/package
To build Kotlin package, run
cd kotlin
./gradlew build
To use Clojure package, run
cd clojure
./lein repl
For Kotlin and Clojure to pick up your changes in Java, you should first publish Smile packages locally.
sbt publishM2
To test the latest code, run the following
git pull
bin/smile.sh
which will build the system and enter the Smile shell in Scala. If you prefer Java, you may run
sbt shell/stage
cd shell/target/universal/stage
bin/jshell.sh
For bugs, issues, or other discussion, please log a new issue in the GitHub repo.
GitHub supports markdown, so when filing bugs make sure you check the formatting before clicking submit.
For general "how-to" and guidance questions about using Smile to build
and run applications, please use Stack Overflow
tagged with smile-ai
.
We welcome all forms of contributions from the community. Please read the following guidelines to maximize the chances of your PR being merged.
-
Before starting work on a feature, please open an issue on GitHub describing the proposed feature. We want to make sure any feature work goes smoothly. We're happy to work with you to determine if it fits the current project direction and make sure no one else is already working on it.
-
For any work related to setting up build, test, and CI for Smile on GitHub, or for small patches or bug fixes, please open an issue for tracking purposes, but we generally don't need a discussion prior to opening a PR.
Please be sure to follow the usual process for submitting PRs:
- Fork the repo
- Create a pull request
- Make sure your PR title is descriptive
- Include a link back to an open issue in the PR description
We reserve the right to close PRs that are not making progress. Closed PRs can be reopened again later and work can resume.
By contributing your code to Smile you grant us a non-exclusive, irrevocable, worldwide, royalty-free, sublicenseable, transferable license under all of Your relevant intellectual property rights (including copyright, patent, and any other rights), to use, copy, prepare derivative works of, distribute and publicly perform and display the Contributions on any licensing terms, including without limitation: (a) open source licenses like the GNU General Public License; and (b) binary, proprietary, or commercial licenses. Except for the licenses granted herein, You reserve all right, title, and interest in and to the Contribution.
You confirm that you are able to grant us these rights. You represent that You are legally entitled to grant the above license. If Your employer has rights to intellectual property that You create, You represent that You have received permission to make the Contributions on behalf of that employer, or that Your employer has waived such rights for the Contributions.
You represent that the Contributions are Your original works of authorship, and to Your knowledge, no other person claims, or has the right to claim, any right in any invention or patent related to the Contributions. You also represent that You are not legally obligated, whether by entering into an agreement or otherwise, in any way that conflicts with the terms of this license.
We acknowledge that, except as explicitly described in this Agreement, any Contribution which you provide is on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
To ensure an inclusive community, contributors and users in the Smile community should follow the code of conduct.