-
Notifications
You must be signed in to change notification settings - Fork 52
Feature/parasha #260
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
Open
elor555
wants to merge
88
commits into
PythonFreeCourse:develop
Choose a base branch
from
elor555:feature/parasha
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/parasha #260
Changes from 56 commits
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
25ad676
add parasha feature
elor555 eed8d7c
update
elor555 eaadce0
update
elor555 ecff42d
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 1b1faf2
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 5646a56
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 407d692
ines starting
elor555 3ea2768
dd space
elor555 c3aa08a
fix farts of flake8
elor555 819f2b2
edit
elor555 e5bfc87
edit
elor555 75805fc
edit5
elor555 91fff6f
edit6
elor555 161cb98
edit api
elor555 91b9fe3
edit by yam
elor555 cde7aa6
edit by yam2
elor555 0ab998e
edit flake8
elor555 e53c37d
edit flake8
elor555 2f7b60a
edit flake8
elor555 433539f
edit flake8
elor555 58988ba
edit pytest
elor555 871a6d0
edit
elor555 5cb60fe
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 eca6849
edit flake8
elor555 032e204
edit flake8
elor555 6ae3d97
edit after pull
elor555 05bf66f
edit after flake8
elor555 9999ac1
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 497a365
edit after pytest
elor555 18ed51d
edit after pytest
elor555 8d7a6c1
edit after pytest
elor555 b072699
edit after pytest
elor555 60386ce
edit after pytest
elor555 2044f70
edit after pytest
elor555 992841a
edit after pytest
elor555 f588ded
edit after pytest
elor555 76472c1
edit after pytest
elor555 1a2ba69
edit after pytest
elor555 c4c7227
edit after pytest
elor555 3042a61
check
elor555 8fbee77
edit after comments
elor555 2c16624
edit after flake8
elor555 e08ee63
edit after pytest
elor555 900d4c5
edit after pytest
elor555 d734bc1
edit after pytest
elor555 bee1cbc
edit after pytest
elor555 f5b8368
edit after pytest
elor555 48b3c62
edit after flake8
elor555 1b5d932
edit after flake8
elor555 495539b
edit after pull
elor555 bd77d76
edit after pull
elor555 e1d6e74
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 9754ba2
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 b132c7a
edit after pull
elor555 c4093e1
edit after pull
elor555 ba8d840
edit after pull
elor555 35722bc
edit after pull
elor555 c6c01fb
edit after pull
elor555 535844e
edit after pull
elor555 9d0277e
edit
elor555 d116f25
edit
elor555 1d50cb1
edit
elor555 4c16f61
edit
elor555 15d0e04
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 17340f8
edit
elor555 4ee3beb
edit
elor555 66dc75e
edit
elor555 21b8033
edit
elor555 66b4457
edit
elor555 fdc0219
edit
elor555 0fd6e7e
edit
elor555 f011437
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 60ce6ce
edit
elor555 d9b1745
edit
elor555 ee9faf7
edit
elor555 59c61e6
edit
elor555 a3099f4
edit
elor555 108e152
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 4729f27
Details Message
elor555 5d27e04
Details Message
elor555 9f14957
Merge remote-tracking branch 'upstream/develop' into feature/parasha
elor555 122574f
fix: style improvements
elor555 1421c19
fix: style improvements
elor555 52df059
fix: improvments
elor555 8714224
Details Message
elor555 09aceb1
fix: improvments
elor555 baf06ac
Merge remote-tracking branch 'upstream/develop' into feature/parasha
elor555 6d430ed
fix: styling
elor555 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from datetime import datetime | ||
from typing import Dict, Optional, List | ||
|
||
from app.database.models import Parasha | ||
elor555 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
from sqlalchemy.orm import Session | ||
elor555 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
def create_parasha_object(parashot_fields: Dict[str, Optional[str]])\ | ||
-> Parasha: | ||
elor555 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"""This function create a parasha object from given fields dictionary. | ||
It is used for adding the data from the json into the db""" | ||
return Parasha( | ||
name=parashot_fields['name'], | ||
hebrew_name=parashot_fields['hebrew'], | ||
link=parashot_fields['link'], | ||
date=datetime.strptime(parashot_fields['date'], '%Y-%m-%d').date() | ||
) | ||
|
||
|
||
def get_all_parahot_list(session: Session) \ | ||
-> List[Dict[str, Optional[str]]]: | ||
"""This function return all parashot object in list""" | ||
return session.query(Parasha).all() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.