Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/timer #244

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open

Conversation

fandomario
Copy link

Gonzom and others added 12 commits January 30, 2021 21:04
* feat: add i18n support

This feature includes the core functions added to /internal, English and Hebrew json files, removal of text strings from the html files, updates to the routes and model updates. Also included are tests. Please note, that this feature is waiting on user registration for final hooks.

By: Gonny <1@1>
* update ORM and added export for an event

* update ORM and added export for an event

* Added in app shareable events

* docs: add type annotation and fix folder structure

* docs: add type annotation and fix folder structure

* docs: fix documentation

* feat: get weather forecast for date and location

* feat: get weather forecast for date and location

* add: tests

* set up commit

* add: timezone support

* add: session management

* fix bug

* split conftest file

* split conftest file

* move "utils" folder into "internal" folder

* working day view with jinja2 template

* with tests for pytest

* feat: get weather forecast - fixes according to requested changes.

* change file structure

* feat: get weather forecast - fixes according to requested changes.

* first functioning day-view html, css and router

* feat: Basic responsive calender day view page

Added dayview template with css and router.
An tempreroy event class with,
 processing function for the day view to work.

* feat: Basic responsive calender day view page

Added dayview template with css and router.
An tempreroy event class with,
 processing function for the day view to work.
fixed after taking notes.

* fix lint now for sure

* more lint

* feat: get weather forecast - fix requirements.txt

* feat: enable invited users to view events

* feat: flake8 changes

* fix: requirements bug

* fix: requirements bug

* feat: flake8 changes

* add: tests

* feat: flake8 changes

* add: tests

* feat: flake8 changes

* edit: file structure

* edit: file structure

* feat: get weather forecast - fix changes & add cache support

* feat: get weather forecast - fix changes & add cache support

* feat: get weather forecast - fix changes & add cache support

* feat: add route tests

* feat: get weather forecast - fix changes & add cache support

* feat: get weather forecast - fix changes & add cache support

* fix: test bug

* remove: config.py

* after all notes and started use the orm

* fix: type annotation

* feat: get weather forecast - add API mocking

* feat: get weather forecast - add API mocking

* feat: get weather forecast - add API mocking

* feat: get weather forecast - add API mocking

* fixed: changed "size" var in html and and more acuurate typing

* deleted some testing lines

* add requirements missing

* add: minor changes

* feat: flake8 changes

* @hadaskedar2020

* feat: get weather forecast - add API mocking

* feat: weather forecast - add API mocking & improve coverage

* feat: weather forecast - add API mocking & improve coverage

* feat: weather forecast - add API mocking & improve coverage

* feat: weather forecast - add API mocking & improve coverage

* feat: weather forecast - add API mocking & improve coverage

* fixed: statements of event select more accurate

* new test and lint fix

* added more contants abd more notes taken

* feat: weather forecast - move feat to internal

* Delete Scripts directory

* update constants

* more notes

* forgot white space

* feat: gets a link to the suitable image of a given event content. (PythonFreeCourse#70)

* feat: gets a link to the suitable image of a given event content.

* Add basic update event (PythonFreeCourse#100)

* Add basic update event

* Added search feature (PythonFreeCourse#98)

* Added search feature

* Add telegram client (PythonFreeCourse#111)

Add telegram client

* feat: Add a feature for sharing information with a WhatsApp account (PythonFreeCourse#83)

* feat: Add a feature to share to a WhatsApp account

* Feature/logging system (PythonFreeCourse#112)

* feat: first logging commit

Co-authored-by: Liad Noam <[email protected]>

* feat: add a daily inspirational quote (PythonFreeCourse#128)

* feat: add a daily inspirational quote

* Feature/delete event (PythonFreeCourse#139)

* basic delete event

* Add an event delete function

* Fix flake8

* Deleting an unnecessary model

* Extract lines from try

* fix: modify psycopg2 dependency (PythonFreeCourse#164)

* Bugfix/logging system (PythonFreeCourse#158)

* Changed logging config to be received by separate parameters for simplicity, removed option to receive configuration as a dict, added .vscode to gitignore

* removed logging_config file which is no longer needed

* Fixing merge conflicts - missing whitespace on config.py.example

Co-authored-by: Liad Noam <[email protected]>

* Added checking for zoom link and saving the event (PythonFreeCourse#122)

* Added checking for zoom link and saving the event

* Feature/import to calendar (PythonFreeCourse#119)

* feat: import file to calendar

* docs: adding community standard documents (PythonFreeCourse#173)

* Feat: Event View Backend (PythonFreeCourse#159)

* Moved the route to top of file

* Feature/send email (PythonFreeCourse#88)

* Added files for sending invitations by email

This includes
- templates
- routes and internal code
- configuration
- tests

Co-authored-by: leddest <[email protected]>
Co-authored-by: Ellen <[email protected]>

* Feature/translation - add an functionality to translate event data etc. (PythonFreeCourse#167)

* translation feature stuff

* Update event - Improving the code (PythonFreeCourse#138)

* Add basic update event

* Support categories for events (PythonFreeCourse#137)

* Support categories for events

* Style/grid (PythonFreeCourse#106)

* Hello Wrold

* Creating Html Template

* Calendar dates calculation intigrating with html, HTML\CSS improvments.

* Tests for calender_grid.py, changing function according to currections, fixing bugs

* linting bug fixing

* before merge with develop

* Creating a Day object and days subclasses, changing all function and tests according to the new objects, Changing front to get information from Day objects, Re-arranging  calendar.html grid stracture to be render by weeks, adding js functionality for day view section, adding css effects on daily event display

* fix lintings

* fix lintings

* tests next week scroll

* js updates

* Calendar Scrolling with javascript

* Fix lintings

* Fix lintings

* Calendar infinit scrolling ducplicates weeks bug fixed

* seetings global parameters for calendar.py

* Js - changing to fetch, removing jquery, fixing hint tpying, adding Week object, changing tests

* Front end bug fixing

* Fix linting

* Fix lintings

* Fix lintings

* fixing syntax

* Get user local date and time when enter calendar.

* Fix lintings

* Fix lintings

* Fix lintings

* Bugs fixing

* Bugs fixing

* Bugs fixing

* Bugs fixing

* JS alerts removal

* Fix Lintings

* Js syntext fixing

* Bugs fixing

* Bugs fixing

* Js fixing varibales and adding div element to request.

* Develop Update

* Js - eliminate global parameters

* Linting fixing

* Fix Lintings

* Fix flake8

* syntac fixing

* Feature/translations workflow (PythonFreeCourse#150)

* feat: add translations workflow

* fix(translations-workflow): fix doc

* fix(translations-workflow): fixed code and added automatic commit

Co-authored-by: Gonny <1@1>

* Revert "Feature/translations workflow (PythonFreeCourse#150)" (PythonFreeCourse#208)

This reverts commit 2e6a2c2.

* feat: Add zodiac signs to the day & month view + refactor json data loader (PythonFreeCourse#155)

* feat: Add zodiac signs to the day/month view +

* Change calendar link from '#' to '/' to get the home page (PythonFreeCourse#194)

when clicking on the logo

* Style/grid (PythonFreeCourse#200)

* Js scrolling duplication days fixed

Co-authored-by: Idan Pelled <[email protected]>
Co-authored-by: Hadas Kedar <[email protected]>
Co-authored-by: Sagi Zaid Or <[email protected]>
Co-authored-by: sagizaidor <[email protected]>
Co-authored-by: hadaskedar2020 <[email protected]>
Co-authored-by: nir9696 <[email protected]>
Co-authored-by: efratush <[email protected]>
Co-authored-by: advaa123 <[email protected]>
Co-authored-by: leddest <[email protected]>
Co-authored-by: nelliei <[email protected]>
Co-authored-by: Liad-n <[email protected]>
Co-authored-by: Liad Noam <[email protected]>
Co-authored-by: zohary89 <[email protected]>
Co-authored-by: Ron Huberfeld <[email protected]>
Co-authored-by: Ap1234567 <[email protected]>
Co-authored-by: Nir-P <[email protected]>
Co-authored-by: Ode <[email protected]>
Co-authored-by: Anna Shtirberg <[email protected]>
Co-authored-by: Ellen <[email protected]>
Co-authored-by: ivarshav <[email protected]>
Co-authored-by: Aviad <[email protected]>
Co-authored-by: Gonzom <[email protected]>
Co-authored-by: Gonny <1@1>
Co-authored-by: YairEn <[email protected]>
Copy link
Member

@yammesicka yammesicka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good start :) Let's start improving the JS

app/templates/profile.html Outdated Show resolved Hide resolved
app/static/timer.js Outdated Show resolved Hide resolved
app/static/timer.js Outdated Show resolved Hide resolved
app/static/timer.js Outdated Show resolved Hide resolved
app/static/timer.js Outdated Show resolved Hide resolved
app/static/timer.js Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Feb 17, 2021

Codecov Report

Merging #244 (085957b) into develop (919f2b1) will decrease coverage by 0.06%.
The diff coverage is 91.66%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #244      +/-   ##
===========================================
- Coverage    98.03%   97.96%   -0.07%     
===========================================
  Files           70       70              
  Lines         3000     3003       +3     
===========================================
+ Hits          2941     2942       +1     
- Misses          59       61       +2     
Impacted Files Coverage Δ
app/main.py 92.50% <ø> (ø)
app/routers/timer.py 77.77% <77.77%> (ø)
app/internal/timer.py 100.00% <100.00%> (ø)
app/database/models.py 96.70% <0.00%> (-0.08%) ⬇️
app/routers/salary/config.py 100.00% <0.00%> (ø)
app/internal/json_data_loader.py 100.00% <0.00%> (ø)
app/routers/joke.py
app/internal/jokes.py
... and 1 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 919f2b1...af7c971. Read the comment docs.

Copy link
Member

@yammesicka yammesicka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great progress :) Added few insights

app/internal/timer.py Outdated Show resolved Hide resolved
app/internal/timer.py Outdated Show resolved Hide resolved
app/internal/timer.py Outdated Show resolved Hide resolved
app/internal/timer.py Outdated Show resolved Hide resolved
app/internal/timer.py Outdated Show resolved Hide resolved
app/internal/timer.py Outdated Show resolved Hide resolved
app/routers/timer.py Show resolved Hide resolved
app/templates/profile.html Outdated Show resolved Hide resolved
app/static/timer.js Outdated Show resolved Hide resolved
app/static/timer.js Outdated Show resolved Hide resolved
tests/test_timer.py Outdated Show resolved Hide resolved
Copy link
Member

@yammesicka yammesicka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

app/static/timer.js Outdated Show resolved Hide resolved
app/internal/timer.py Outdated Show resolved Hide resolved

@router.get("/timer")
def timer(request: Request, session=Depends(get_db)):
user = session.query(User).filter_by(id=1).first()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This route queries the event of the user. It can make the system go really slow.

  1. Prefer to use Depends(current_user) from Kobi's login system to get the user details without querying the database.
  2. [Optional]: To make this commit merge-ready, add last_added_event to the localStorage. If it exists, take it from the localStorage and Voilà! You don't have to access the database (you don't even have to send requests to the server). If it doesn't, query and add it to the localStorage. Note that you need to update the localStorage if the user add a new event.

Copy link
Author

@fandomario fandomario Feb 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Done :)
  2. The countdown timer is counting till the current user's next event and not necessarily to the last added event.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand it. The note means to veck if the new event becomes the last event. If it does, it should replace the next event in the localStorage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants