PythonFreeCourse / calendar

Apache License 2.0
34 stars 52 forks source link

Feature/emotion to event #225

Closed Nir-P closed 3 years ago

Nir-P commented 3 years ago

This feature adds emotion to an event based on its title and content

The main function "get_emotion" returns the emotion HTML code based on the event title and content. The title and content were given weights as we set in the global variables. Additionally, we set the significance level that above it the emotion will appear.

Changes in models: The event table now has a new column: emotion this column returns a string (HTML code) and may be null.

The following emotion are:

😃 Happy - &#128515 🙁 Sad - &#128577 😠 Angry - &#128544 😱 Fear - &#128561 😮 Surprise - &#128558

codecov-io commented 3 years ago

Codecov Report

Merging #225 (67f14e6) into develop (4df85bc) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #225      +/-   ##
===========================================
+ Coverage    99.29%   99.32%   +0.03%     
===========================================
  Files           41       42       +1     
  Lines         1691     1779      +88     
===========================================
+ Hits          1679     1767      +88     
  Misses          12       12              
Impacted Files Coverage Δ
app/database/models.py 96.69% <100.00%> (+0.08%) :arrow_up:
app/internal/emotion.py 100.00% <100.00%> (ø)
app/internal/event.py 100.00% <100.00%> (ø)
app/routers/event.py 97.31% <100.00%> (+0.51%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 75ed3ee...67f14e6. Read the comment docs.