Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4f65e9a
wip
BotellaA Nov 14, 2025
07ef565
wip
BotellaA Nov 18, 2025
31554d5
Apply prepare changes
BotellaA Nov 18, 2025
ad1479d
wip
BotellaA Nov 19, 2025
831f7f7
wip
BotellaA Nov 20, 2025
cbf667c
Merge branch 'next' into geode-objects-redesign
BotellaA Nov 20, 2025
53a5187
more geode objects
BotellaA Nov 21, 2025
837a3e1
feat(GeodeObject): new design using OpenGeode types
BotellaA Nov 24, 2025
4669f56
fix
BotellaA Nov 24, 2025
b75a456
fix
BotellaA Nov 24, 2025
496f7ff
refactor json_data, tests okay
JulienChampagnol Nov 27, 2025
87c93f1
Apply prepare changes
JulienChampagnol Nov 27, 2025
5919746
wip cells atributes
JulienChampagnol Nov 27, 2025
f420217
Merge branch 'geode-objects-redesign' of https://github.com/Geode-sol…
JulienChampagnol Nov 27, 2025
efaf19b
Apply prepare changes
JulienChampagnol Nov 27, 2025
ef2e68c
cell attributes & tests
JulienChampagnol Nov 28, 2025
53c5e2b
Merge branch 'geode-objects-redesign' of https://github.com/Geode-sol…
JulienChampagnol Nov 28, 2025
77d1680
Apply prepare changes
JulienChampagnol Nov 28, 2025
aee4758
debug default=FLASK_DEBUG
JulienChampagnol Nov 28, 2025
25c320b
Merge branch 'geode-objects-redesign' of https://github.com/Geode-sol…
JulienChampagnol Nov 28, 2025
a3d23fa
viewable_filename & native_filename harmonize
JulienChampagnol Nov 28, 2025
e85cea6
filename -> file
JulienChampagnol Nov 28, 2025
a192744
typing
JulienChampagnol Nov 28, 2025
77d713c
fix tests
JulienChampagnol Dec 1, 2025
c0b3880
Apply prepare changes
JulienChampagnol Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"--config-file=mypy.ini"
],
"mypy-type-checker.interpreter": [
"${workspaceFolder}/venv/bin/python"
"${workspaceFolder}/../../.venv/bin/python"
]
}
60 changes: 31 additions & 29 deletions opengeodeweb_back_schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
],
"type": "object",
"properties": {
"input_geode_object": {
"geode_object_type": {
"type": "string",
"minLength": 1
},
Expand All @@ -223,7 +223,7 @@
}
},
"required": [
"input_geode_object",
"geode_object_type",
"filename"
],
"additionalProperties": false
Expand Down Expand Up @@ -283,7 +283,7 @@
],
"type": "object",
"properties": {
"input_geode_object": {
"geode_object_type": {
"type": "string",
"minLength": 1
},
Expand All @@ -293,7 +293,7 @@
}
},
"required": [
"input_geode_object",
"geode_object_type",
"filename"
],
"additionalProperties": false
Expand Down Expand Up @@ -321,14 +321,14 @@
"type": "string",
"minLength": 1
},
"input_geode_object": {
"geode_object_type": {
"type": "string",
"minLength": 1
}
},
"required": [
"filename",
"input_geode_object"
"geode_object_type"
],
"additionalProperties": false
},
Expand All @@ -351,13 +351,13 @@
],
"type": "object",
"properties": {
"input_geode_object": {
"geode_object_type": {
"type": "string",
"minLength": 1
}
},
"required": [
"input_geode_object"
"geode_object_type"
],
"additionalProperties": false
},
Expand All @@ -369,7 +369,7 @@
],
"type": "object",
"properties": {
"input_geode_object": {
"geode_object_type": {
"type": "string",
"minLength": 1
},
Expand All @@ -379,7 +379,7 @@
}
},
"required": [
"input_geode_object",
"geode_object_type",
"filename"
],
"additionalProperties": false
Expand All @@ -406,6 +406,24 @@
],
"additionalProperties": false
},
"cell_attribute_names": {
"$id": "opengeodeweb_back/cell_attribute_names",
"route": "/cell_attribute_names",
"methods": [
"POST"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"id"
],
"additionalProperties": false
},
"allowed_objects": {
"$id": "opengeodeweb_back/allowed_objects",
"route": "/allowed_objects",
Expand All @@ -417,17 +435,10 @@
"filename": {
"type": "string",
"minLength": 1
},
"supported_feature": {
"type": [
"string",
"null"
]
}
},
"required": [
"filename",
"supported_feature"
"filename"
],
"additionalProperties": false
},
Expand All @@ -438,17 +449,8 @@
"POST"
],
"type": "object",
"properties": {
"supported_feature": {
"type": [
"string",
"null"
]
}
},
"required": [
"supported_feature"
],
"properties": {},
"required": [],
"additionalProperties": false
}
}
Expand Down
4 changes: 2 additions & 2 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
opengeode-core==15.30.2
opengeode-core==15.30.4
opengeode-io==7.4.6
opengeode-inspector==6.8.6
opengeode-geosciences==9.5.4
opengeode-geosciences==9.5.5
opengeode-geosciencesio==5.8.6
geode-common==33.11.3
geode-viewables==3.3.2
Expand Down
5 changes: 2 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ markupsafe>=3
# flask
# jinja2
# werkzeug
opengeode-core==15.30.2
opengeode-core==15.30.4
# via
# -r requirements.in
# geode-common
Expand All @@ -40,7 +40,7 @@ opengeode-core==15.30.2
# opengeode-geosciencesio
# opengeode-inspector
# opengeode-io
opengeode-geosciences==9.5.4
opengeode-geosciences==9.5.5
# via
# -r requirements.in
# geode-viewables
Expand All @@ -60,4 +60,3 @@ werkzeug==3.1.2
# flask
# flask-cors

opengeodeweb-microservice==1.*,>=1.0.9
13 changes: 9 additions & 4 deletions src/opengeodeweb_back/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import argparse
import os
import time
from typing import Any
import flask
import flask_cors # type: ignore
Expand Down Expand Up @@ -36,8 +35,13 @@


@app.before_request
def before_request() -> None:
def before_request() -> flask.Response | None:
if flask.request.method == "OPTIONS":
response = flask.make_response()
response.headers["Access-Control-Allow-Methods"] = "GET,POST,PUT,DELETE,OPTIONS"
return response
utils_functions.before_request(flask.current_app)
return None


@app.teardown_request
Expand Down Expand Up @@ -74,6 +78,7 @@ def errorhandler(e: HTTPException) -> tuple[dict[str, Any], int] | Response:

@app.errorhandler(Exception)
def handle_generic_exception(e: Exception) -> Response:
print("handle_generic_exception:", str(e), flush=True)
return flask.make_response({"error": str(e)}, 500)


Expand Down Expand Up @@ -110,7 +115,7 @@ def run_server() -> None:
parser.add_argument(
"-d",
"--debug",
default=FLASK_DEBUG,
default=True,
help="Whether to run in debug mode",
action="store_true",
)
Expand Down Expand Up @@ -144,7 +149,7 @@ def run_server() -> None:
app.config.update(DATA_FOLDER_PATH=args.data_folder_path)
app.config.update(UPLOAD_FOLDER=args.upload_folder_path)
app.config.update(MINUTES_BEFORE_TIMEOUT=args.timeout)
flask_cors.CORS(app, origins=args.allowed_origins)
flask_cors.CORS(app, origins=args.allowed_origins, methods=["GET", "POST", "PUT"])
print(
f"Host: {args.host}, Port: {args.port}, Debug: {args.debug}, "
f"Data folder path: {args.data_folder_path}, Timeout: {args.timeout}, "
Expand Down
Loading
Loading