-
Notifications
You must be signed in to change notification settings - Fork 8
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
PR for hw4 #3
base: main
Are you sure you want to change the base?
PR for hw4 #3
Conversation
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.
В целом ок.
9 баллов.
Хотелось бы видеть plpython и обработку ошибок при выполнении запросов.
query = f"""[out:json][date:'{str(year)}-01-01T00:00:00Z'][maxsize:2000000000]; | ||
area["name:en"="{town}"]->.searchArea; | ||
(node["natural"="tree"](area.searchArea);); out count;""" | ||
result = requests.post(url, data=query, timeout=60) |
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.
Тут стоит обрабатывать ошибки.
@@ -0,0 +1,20 @@ | |||
CREATE EXTENSION IF NOT EXISTS plpython3u; |
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.
Зачем plpython3u, если используешь plpgsql ?
class Trees(Base): # pylint: disable=R0903 | ||
"""Template from database.""" | ||
|
||
__tablename__ = "Trees" |
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.
Лучше писать имена таблиц в нижнем регистре.
No description provided.