diff --git a/commitlint.config.js b/commitlint.config.js index 3a29484..a397334 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,4 +1,4 @@ -export default { +const Configuration = { extends: ["@commitlint/config-angular"], rules: { "scope-empty": [2, "never"], @@ -12,5 +12,8 @@ export default { "subject-full-stop": [0], "type-case": [0], "type-empty": [0], + "type-enum": [2, "always", ["feat", "fix", "perf"]], }, } + +export default Configuration diff --git a/src/opengeodeweb_microservice/database/data.py b/src/opengeodeweb_microservice/database/data.py index 02a02f3..8605bb5 100644 --- a/src/opengeodeweb_microservice/database/data.py +++ b/src/opengeodeweb_microservice/database/data.py @@ -14,10 +14,10 @@ class Data(Base): geode_object: Mapped[str] = mapped_column(String, nullable=False) viewer_object: Mapped[str] = mapped_column(String, nullable=False) - native_file_name: Mapped[str | None] = mapped_column(String, nullable=True) - viewable_file_name: Mapped[str | None] = mapped_column(String, nullable=True) + native_file: Mapped[str | None] = mapped_column(String, nullable=True) + viewable_file: Mapped[str | None] = mapped_column(String, nullable=True) - light_viewable: Mapped[str | None] = mapped_column(String, nullable=True) + light_viewable_file: Mapped[str | None] = mapped_column(String, nullable=True) input_file: Mapped[str | None] = mapped_column(String, nullable=True) additional_files: Mapped[list[str] | None] = mapped_column(JSON, nullable=True) diff --git a/tests/test_database.py b/tests/test_database.py index 0329b9b..e7a1898 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -25,7 +25,9 @@ def test_data_crud_operations(clean_database): def test_data_with_additional_files(clean_database): files = ["file1.txt", "file2.txt"] data = Data.create( - geode_object="test_files", viewer_object="test_viewer", additional_files=files + geode_object="test_files", + viewer_object="test_viewer", + additional_files=files, ) assert data.id is not None assert isinstance(data.id, str)