Contribute to Tock
The Tock project is open to contribution and any feedback is welcome!
This page details the source structure and coding conventions for the platform.
TL;DR
See CONTRIBUTING.md
.
Main technologies
Tock components can run as containers (provided implementation for Docker).
The application runs on JVM platforms. The reference language is Kotlin, but other programming languages can be leveraged through the available APIs.
On the server side, Tock relies on Vert.x and MongoDB (alt. DocumentDB). Various NLU libraries and algorithms can be used, but Tock does not depend on them directly.
Tock Studio graphical user interfaces are built with Angular in Typescript.
React and Flutter toolkits are provided for Web and Mobile integrations.
Source structure
Repositories
-
tock
: main source repository, including the framework and platform components under the Apache 2 license. -
tock-corenlp
: optional module, leveraging a dependency to Stanford CoreNLP (instead of Apache OpenNLP), under GPL license. -
tock-docker
: Docker and Docker Compose images/descriptors, for platform hands-on and fast deployment of various configurations. -
tock-bot-samples
: code samples, in particular the WebHook and WebSocket modes examples from Tock programming guides. -
tock-bot-open-data
: a bot example, based on the SNCF Open Data API, also implementing basic internationalization (i18n) mecanisms with two distinct languages.
The tock
repository
TODO : detail modules and repo structure
Le tock-docker
repository
TODO : detail modules and repo structure, how Maven and Docker builds work, etc.
Build & run
Build Tock from sources
Tock (core)
Tock is built with Maven, including the Web modules leveraging NPM et Angular:
$ mvn package
Continuous integration build jobs are available on Travis.
Docker images
Tock Docker images can be rebuilt from sources, included in repository tock-docker
.
One can use Maven to trigger the Docker build:
$ mvn package docker:build
Docker containers can then be instantiated from images, or Docker Compose stacks from the various descriptors at the root of the repository.
Run Tock in IDE
To run Tock using Docker Compose outside the IDE, rather see Deploy Tock with Docker.
Tock components (NLU, Studio, bot…) can run in an IDE, such as
IntelliJ, Eclipse or Visual Studio Code for instance.
Beside the Docker images, IntelliJ configurations are provided with Tock sources:
- The Tock Studio interfaces/server: BotAdmin
- The alternative standalone NLU interfaces/server: Admin
- The NLU service: NlpService
- The Duckling entity-recognition service: Duckling
- The NLU model-builder service: BuildWorker
- The script compilation service: KotlinCompilerServer
The OpenDataBot example also has a run configuration available:
To start the Tock Studio interfaces, please refer to the commands described in the following page:
Code
Commits & merge requests
To submit a feature or bugfix:
- Create an issue:
- Reccommended format for the title: -
[Component] Title
where component might be Studio, Core, Doc, etc. and title usually is like Do or fix something
- Reccommended format for the title: -
- Create a pull request and link it to the issue(s):
- All commits should be signed
- Please rebase and squash unnecessary commits (tips: PR can be tagged as Draft) before submitting
- Recommended format for the branch name :
ISSUEID_short_title
- Recommended format for the commit(s) message(s):
resolves #ISSUEID Component: title
for featuresfixes #ISSUEID Component: title
for fixes
- To be merged, a pull request must pass the tests and be reviewed by at least two of these developers:
Code conventions
Kotlin Code Conventions are used.
Unit tests
Every new feature or fix should embed its unit test(s).
Contact us
To contribute to the project or to known more about the implementation, feel free to contact us. Ideas and feedback is more than welcome.