Skip to content

A webpage to create postscripts for your messages based on the frequency of the letters!

License

Notifications You must be signed in to change notification settings

Team-e-motion/CMPE-GMV-2020

Repository files navigation

CMPE 2020, GMV 🚀

This repository contains the code for the implementation of a webpage which solves the problem proposed by GMV to the Universidad Complutense de Madrid (UCM) for the Company Problem Modelling Contest (Concurso de Modelización de Problemas de Empresa, CMPE) 2020.

Given a message, the problem that GMV proposed was to add a string, in Spanish, indicating the number of letters that appear in the message using words to express the numbers. For example, if we had the following message:

Buenas tardes

Then we can add a string indicating the number of letters e in the message:

Buenas tardes; en este mensaje aparece quince veces la letra e.

Note that quince is the Spanish word for 15, which also contains an e. If you count the number of e's in the message above with the string attached you will see that it does contain just 15 e's. The main issue you have to face to create the string is to calculate what number should be written, taken into account that some numbers might contain the letter you are referring to. This problem generalizes to generating a string which express the number of all letters in the Latin alphabet.

You can check an example of the webpage deployed in the github pages of this repository.

🔧 Installation

To install all the dependencies you can use npm, a package manager for the JavaScript programming language (if you do not have it yet, click here to get it!), simply run the following command:

npm install 

📋 Git Hooks

This project uses ESLint to identify and report patterns in the code and ensure consistency and coherence through the files, it also helps to avoid common bugs while programming. We also use Prettier to maintain a consistent style in all files of the project. In the project, there are some commands for eslint and prettier defined to check and solve format errors or bug issues, but to automate the process we use Git Hooks. We have configured Husky to ensure that every commit undergoes a check process before it is processed.

⚙️ Running Tests

We are using Jest to test React components as well as VanillaJS utility functions and algorithms. To run the tests you can use the following command:

npm run test 

📦 Deploying

To deploy the project in localhost you can run the following command after installing all the dependencies:

npm run start 

If you want to deploy the webpage to your github pages you will have to modify the package.json file and change the "homepage" value to match your own github pages url.

✒️ Authors

📄 License

This project is licensed under the terms of the MIT license, check the LICENSE file for more information.