-
Notifications
You must be signed in to change notification settings - Fork 2
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
Started using poetry and pyproject.toml for packaging and setup. #38
base: master
Are you sure you want to change the base?
Conversation
total_ayas=s_info['total_ayas'] | ||
) | ||
|
||
gdb = get_gdb() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're creating database connection inside the loop so it will be created for each iteration of the loop which is bad for performance. Database connection could have been created before the loop and closed after the loop. Within the loop you could have just done gdb.add(s)
|
||
if content: | ||
aya_doc = Aya.new(surah_number=surah, aya_number=aya) | ||
AyaText.new(aya_doc, content.strip(), language, text_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are we saving these records?
|
||
[tool.poetry.scripts] | ||
quranref = 'quranref.cli:main' | ||
quranref_populate = 'quranref.scripts.populate:main' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have you uncommented this line? I think you still don't understand how to use typer :-( quranref
is going to be the main command and other commands are going to be subcommands. Like quranref populate
No description provided.