welearn-database 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {welearn_database-0.2.1 → welearn_database-0.2.2}/PKG-INFO +1 -1
  2. {welearn_database-0.2.1 → welearn_database-0.2.2}/pyproject.toml +1 -1
  3. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/data/models/document_related.py +4 -4
  4. {welearn_database-0.2.1 → welearn_database-0.2.2}/LICENSE +0 -0
  5. {welearn_database-0.2.1 → welearn_database-0.2.2}/README.md +0 -0
  6. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/__init__.py +0 -0
  7. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/README +0 -0
  8. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/env.py +0 -0
  9. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/script.py.mako +0 -0
  10. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/versions/16ff997426d3_remove_error_retrieval_unique_constraint.py +0 -0
  11. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/versions/4c7161819e5a_grafana_views.py +0 -0
  12. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/versions/4fcbfb7f3145_added_api_key_management_table.py +0 -0
  13. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/versions/5d82613c9aca_context_document.py +0 -0
  14. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/versions/821173cf9c5d_initial_migration.py +0 -0
  15. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/versions/89920abb7ff8_add_category.py +0 -0
  16. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/versions/a50a1db3ca2a_add_used_since_column_for_embeddings.py +0 -0
  17. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/versions/b031206324b7_agent_related.py +0 -0
  18. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/alembic/versions/e354666f951d_inferred_user.py +0 -0
  19. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/data/__init__.py +0 -0
  20. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/data/enumeration.py +0 -0
  21. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/data/models/__init__.py +0 -0
  22. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/data/models/agent_related.py +0 -0
  23. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/data/models/corpus_related.py +0 -0
  24. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/data/models/grafana.py +0 -0
  25. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/data/models/user_related.py +0 -0
  26. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/database_utils.py +0 -0
  27. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/exceptions.py +0 -0
  28. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/modules/__init__.py +0 -0
  29. {welearn_database-0.2.1 → welearn_database-0.2.2}/welearn_database/modules/text_cleaning.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: welearn-database
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: All stuff related to relationnal database from the WeLearn project
5
5
  License: cc-by-sa-nc
6
6
  Author: Théo
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "welearn-database"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "All stuff related to relationnal database from the WeLearn project"
5
5
  authors = [
6
6
  {name = "Théo",email = "theo.nardin@cri-paris.org"}
@@ -46,8 +46,8 @@ class WeLearnDocument(Base):
46
46
  url: Mapped[str] = mapped_column(nullable=False)
47
47
  title: Mapped[str | None]
48
48
  lang: Mapped[str | None]
49
- _description: Mapped[str]
50
- _full_content: Mapped[str]
49
+ _description: Mapped[str | None]
50
+ _full_content: Mapped[str | None]
51
51
  details: Mapped[dict[str, Any] | None]
52
52
  _trace: Mapped[int | None] = mapped_column(types.BIGINT)
53
53
  corpus_id: Mapped[UUID] = mapped_column(
@@ -98,7 +98,7 @@ class WeLearnDocument(Base):
98
98
  :raises ValueError: If the full content is too short.
99
99
  """
100
100
  if not value:
101
- raise ValueError("Full content cannot be empty or None")
101
+ return value
102
102
  if len(value) < 25:
103
103
  raise ValueError(f"Content is too short : {len(value)}")
104
104
  return value
@@ -118,7 +118,7 @@ class WeLearnDocument(Base):
118
118
  @description.setter
119
119
  def description(self, description):
120
120
  if not description:
121
- raise ValueError("Description cannot be empty or None")
121
+ self._description = description
122
122
  self._description = clean_text(description)
123
123
 
124
124
  @hybrid_property