-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/blueprint create #192
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
base: next
Are you sure you want to change the base?
Conversation
from opengeodeweb_microservice.database.connection import get_session | ||
from opengeodeweb_back.utils_functions import save_all_viewables_and_return_info | ||
|
||
routes = flask.Blueprint("create", __name__, url_prefix="/opengeodeweb_back/create") |
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.
@JulienChampagnol faut-il inclure opengeodeweb_back ici ou dans le le dossier parent ?
schemas = os.path.join(os.path.dirname(__file__), "schemas") | ||
|
||
# --- Type definitions for request validation --- | ||
class Point(TypedDict): |
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.
@MaxNumerique que penses-tu de ca ? par rapport a ce que tu as fait avec les RPC ?
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.
C'est bien parce que beaucoup plus clair en effet, mais je crois que l'utilisation de cast() donne juste l'nformation à mypy que c'est bien typé ici, mais ne fais pas de vérification réellement.
Mais comme on valide avec les schémas juste avant c'est bon aussi dans l'idée.
L'utilisation des variables pour déclarer les types comme je l'ai fait dans utils_functions de ma PR a aussi des inconvénients parce que trop rigide comparé à ce qu'à fait Tao, mais ça vérifie bien le type également
builder.set_edge_vertex(opengeode.EdgeVertex(edge_id, 0), vertex_indices[i]) | ||
builder.set_edge_vertex( | ||
opengeode.EdgeVertex(edge_id, 1), vertex_indices[next_i] | ||
try: |
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.
je ne sais pas si on besoin de ce try/catch, il y a une gestion d'erreur globale non ?
No description provided.