-
Notifications
You must be signed in to change notification settings - Fork 80
Guidelines
Mayank Dhiman edited this page Jul 23, 2019
·
5 revisions
We have tried our best to create a well-documented code-base, you will find plenty of docstrings and comments which will guide your way if you try to get deeper in the code. However, it is difficult to be clear regarding all the logic used in the project just by looking at these docstrings. Thus here you will find text valuable for new developers.
- ** The input string is entered by the user**: Inputted is accepted in the string format by VisMa.
-
Tokenization: The input string is first cleaned by the
tokenizer.py
module. This means all the extra spaces are removed. Now the input string is split into various terms which are tokenized. The terms refer to objects of classes like Constant, Variable, Expression, Exponential, Trigonometric etc. Like a term sin(x) will be converted into a token of type Trigonometric, and a term "+" would be converted into a token of type Binary (or intoPlus()
which is a subclass ofBinary
) - Doing the required operation: After the expression is tokenized, the tokens are processed according to the operation asked by the user. While doing the operation project takes track of the steps (in the form of comments and animations) which is displayed later after the operation is done. "Comments and Animations" can be thought of as steps involved in solving an equation, where comments are English statements explaining a step and Animation is each mathematical step.
That's how the project works in general.
We need and encourage new developers to contribute to the project. If interested in making any contributions to visma make sure to go through these steps:
- Clone/fork the dev branch of the repo.
- Before building from source make sure to install all dependencies.
- Make the necessary changes.
- Before making a PR or commit, run all modules test.
- If all tests pass, make a PR or merge to the
dev
branch.
While making contributions to VisMa please be sure to follow these below mentioned points:
- Follow camelCase for naming variables, functions etc. For example:
- variables: symTokens, axisRange etc
- functions: tokenizer, getLevelVariables etc
- classes: Function, SquareMatrix etc
- Use 4 spaces for tabs.
- For syntax test refer this.