PythonFreeCourse / calendar

Apache License 2.0
34 stars 52 forks source link

Feature/salary calculator #156

Closed ShiZinDle closed 3 years ago

ShiZinDle commented 3 years ago

New feature - Salary Calculator: allows users to select any category they previously created and create salary calculation settings for it. the feature also adds edit pages for the settings and view pages for the calculations. The calculation will be done for the chosen month and will be based on all events that are labeled with the corresponding category. Multiple salary settings are allowed, but only 1 for each user and category combination.

Further changes implemented: -moved contents of file "app.database.database" to "app.database" for easier access. -moved function "app.database,database.get_db" to "app.dependencies.get_db". -merged file "tests.utils" into "app.internal.utils" to prevent code duplication. -fixed imports and type hints where necessary.

PureDreamer commented 3 years ago

In order to pass the tests you need the files to be ok with flake8, you can choose flake8 as a linter, and it will show you where are your mistakes.

ShiZinDle commented 3 years ago

All linting errors, code conflicts and failing tests have been fixed and resolved.

codecov-io commented 3 years ago

Codecov Report

Merging #156 (4d2c7f9) into develop (4df85bc) will increase coverage by 0.07%. The diff coverage is 99.77%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #156      +/-   ##
===========================================
+ Coverage    99.29%   99.36%   +0.07%     
===========================================
  Files           41       44       +3     
  Lines         1691     2059     +368     
===========================================
+ Hits          1679     2046     +367     
- Misses          12       13       +1     
Impacted Files Coverage Δ
app/routers/event_images.py 100.00% <ø> (ø)
app/database/models.py 96.55% <97.61%> (-0.06%) :arrow_down:
app/database/__init__.py 100.00% <100.00%> (ø)
app/dependencies.py 100.00% <100.00%> (ø)
app/internal/event.py 100.00% <100.00%> (ø)
app/internal/import_file.py 100.00% <100.00%> (ø)
app/internal/json_data_loader.py 100.00% <100.00%> (ø)
app/internal/on_this_day_events.py 90.62% <100.00%> (ø)
app/internal/search.py 100.00% <100.00%> (ø)
app/internal/translation.py 100.00% <100.00%> (ø)
... and 26 more

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 7df0615...4d2c7f9. Read the comment docs.

yammesicka commented 3 years ago

While trying to solve conflicts, I've seen there is a minor problem with test_events.py. Can you please take a look? :)

ShiZinDle commented 3 years ago

While trying to solve conflicts, I've seen there is a minor problem with test_events.py. Can you please take a look? :)

There was a missing import, now fixed.