Organize the formula folder

In this section, you will find how to organize Ritchie’s formula folder.

What is the formula folder?

This folder contains the files with the formula’s behavior.

Each programming language has its own specificities, but the formula’s structure is almost always the same, no matter what language is used, and will contain:

FileDescription
config.jsonFile to configure the formula inputs.
main fileFile to extract local variables.
pkg/formula fileFile to implement the formula operation.
DockerfileFile to build docker images.
README fileFile to explain what the formula does.
Makefile fileFile to compile the formula’s code (will be deprecated 03/2021).
build.sh fileFile to compile the formula’s code in shell.
metadata.json fileFile to tag the formula’s information.
set_unmask.sh fileFile used by the Makefile file.
help.json filesFile to configure formula helper messages on the CLI.

Formula folder examples

To change the formula’s behavior for this language, you’ll have at least to update the following files:

  • config.json: Update the inputs configurations.
  • main.go: Extract the inputs and call the formula’s methods (coded on formula/*).
  • formula/*: Code the formula’s behavior.
  • help.json: Change command description message.

To change the formula’s behavior for this language, you’ll have at least to update the following files:

  • config.json: Update the inputs configurations.
  • main.java: Extract the inputs and call the formula’s methods (coded on formula/*).
  • formula/*: Code the formula’s behavior.
  • help.json: Change command description message.

To change the formula’s behavior for this language, you’ll have at least to update the following files:

  • config.json: Update the inputs configurations.
  • index.js: Extract the inputs and call the formula’s methods (coded on formula/*).
  • formula/*: Code the formula’s behavior.
  • help.json: Change command description message.

To change the formula’s behavior for this language, you’ll have at least to update the following files:

  • config.json: Update the inputs configurations.
  • main.py: Extract the inputs and call the formula’s methods (coded on formula/*).
  • formula/*: Code the formula’s behavior.
  • help.json: Change command description message.

To change the formula’s behavior for this language, you’ll have at least to update the following files:

  • config.json: Update the inputs configurations.
  • main.sh: Extract the inputs and call the formula’s methods (coded on formula/*).
  • formula/*: Code the formula’s behavior.
  • help.json: Change command description message.

Last modified October 29, 2021: Doc review (#161) (ef9c57d8)