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

Started using poetry and pyproject.toml for packaging and setup. #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kashifpk
Copy link
Owner

No description provided.

total_ayas=s_info['total_ayas']
)

gdb = get_gdb()
Copy link
Owner Author

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)
Copy link
Owner Author

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'
Copy link
Owner Author

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

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.

None yet

2 participants