quick-pp 0.2.75__tar.gz → 0.2.76__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 (79) hide show
  1. {quick_pp-0.2.75 → quick_pp-0.2.76}/PKG-INFO +1 -1
  2. {quick_pp-0.2.75 → quick_pp-0.2.76}/pyproject.toml +1 -1
  3. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/__init__.py +1 -1
  4. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/core_calibration.py +13 -5
  5. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/database/db_connector.py +4 -2
  6. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/database/models.py +76 -28
  7. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/database/objects.py +310 -61
  8. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/machine_learning/feature_engineering.py +80 -0
  9. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/plotter/well_log.py +41 -12
  10. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/rock_type.py +179 -0
  11. {quick_pp-0.2.75 → quick_pp-0.2.76}/.gitignore +0 -0
  12. {quick_pp-0.2.75 → quick_pp-0.2.76}/LICENSE +0 -0
  13. {quick_pp-0.2.75 → quick_pp-0.2.76}/README.md +0 -0
  14. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/__init__.py +0 -0
  15. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/exceptions.py +0 -0
  16. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/fastapi_mlflow/__init__.py +0 -0
  17. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/fastapi_mlflow/_mlflow_types.py +0 -0
  18. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/fastapi_mlflow/applications.py +0 -0
  19. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/fastapi_mlflow/exceptions.py +0 -0
  20. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/fastapi_mlflow/predictors.py +0 -0
  21. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/main.py +0 -0
  22. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/mlflow_model_deployment.py +0 -0
  23. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/router.py +0 -0
  24. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/lithology_hc_correction.py +0 -0
  25. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/lithology_ssc.py +0 -0
  26. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/lithology_vsh_gr.py +0 -0
  27. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/permeability_choo.py +0 -0
  28. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/permeability_others.py +0 -0
  29. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/porosity.py +0 -0
  30. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/ressum.py +0 -0
  31. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/saturation_archie.py +0 -0
  32. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/saturation_b.py +0 -0
  33. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/saturation_qv.py +0 -0
  34. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/saturation_rw.py +0 -0
  35. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/saturation_temp_grad.py +0 -0
  36. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/schemas/saturation_waxman_smits.py +0 -0
  37. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/services/chat.py +0 -0
  38. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/services/las_handler.py +0 -0
  39. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/services/lithology.py +0 -0
  40. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/services/permeability.py +0 -0
  41. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/services/porosity.py +0 -0
  42. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/services/reservoir_summary.py +0 -0
  43. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/services/saturation.py +0 -0
  44. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/static/favicon.ico +0 -0
  45. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/static/logo.png +0 -0
  46. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/template/chat.html +0 -0
  47. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/api/template/home.html +0 -0
  48. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/cli.py +0 -0
  49. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/config.py +0 -0
  50. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/database/__init__.py +0 -0
  51. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/database/setup_postgresql_db.sql +0 -0
  52. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/database/setup_sqlite_db.sql +0 -0
  53. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/fluid_type.py +0 -0
  54. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/las_handler.py +0 -0
  55. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/lithology/__init__.py +0 -0
  56. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/lithology/carbonate.py +0 -0
  57. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/lithology/multi_mineral.py +0 -0
  58. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/lithology/sand_shale.py +0 -0
  59. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/lithology/sand_silt_clay.py +0 -0
  60. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/lithology/thin_beds.py +0 -0
  61. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/machine_learning/__init__.py +0 -0
  62. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/machine_learning/config.py +0 -0
  63. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/machine_learning/mock_data/mock_data.parquet +0 -0
  64. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/machine_learning/predict_pipeline.py +0 -0
  65. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/machine_learning/train_pipeline.py +0 -0
  66. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/machine_learning/utils.py +0 -0
  67. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/permeability.py +0 -0
  68. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/plotter/__init__.py +0 -0
  69. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/plotter/plotter.py +0 -0
  70. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/plotter/well_log_config.py +0 -0
  71. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/porosity.py +0 -0
  72. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/qaqc.py +0 -0
  73. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/ressum.py +0 -0
  74. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/rock_physics/__init__.py +0 -0
  75. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/rock_physics/geomechanics.py +0 -0
  76. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/rock_physics/geophysics.py +0 -0
  77. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/rock_physics/rpm.py +0 -0
  78. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/saturation.py +0 -0
  79. {quick_pp-0.2.75 → quick_pp-0.2.76}/quick_pp/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quick-pp
3
- Version: 0.2.75
3
+ Version: 0.2.76
4
4
  Summary: Python package to assist in providing quick-look preliminary petrophysical estimation.
5
5
  Project-URL: Homepage, https://github.com/imranfadhil/quick_pp
6
6
  Author-email: Imran Fadhil <imranfadhil@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "quick-pp"
7
- version = "0.2.75"
7
+ version = "0.2.76"
8
8
  description = "Python package to assist in providing quick-look preliminary petrophysical estimation."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -20,4 +20,4 @@ logging.getLogger("mlflow").setLevel(logging.WARNING)
20
20
 
21
21
  __author__ = """Imran Fadhil"""
22
22
  __email__ = "imranfadhil@gmail.com"
23
- __version__ = "0.2.75" # Need to be updated manually when releasing a new version/ change in pyproject.toml
23
+ __version__ = "0.2.76" # Need to be updated manually when releasing a new version/ change in pyproject.toml
@@ -652,15 +652,23 @@ def restructure_scal_data(df_wide):
652
652
  columns = df_wide.columns
653
653
  new_columns = {}
654
654
  for col in columns:
655
- if col.startswith("Pc_") or col.startswith("Sw_"):
656
- parts = col.split("_")
657
- if len(parts) == 2 and parts[1].isdigit():
658
- new_columns[col] = f"{parts[0]}.{parts[1]}"
655
+ if col.startswith("Pc") or col.startswith("Sw"):
656
+ new_col = col.split("_")[0]
657
+ new_col = f"{new_col[:2]}.{new_col[-1]}"
658
+ new_columns[col] = new_col
659
659
 
660
660
  df_temp = df_wide.rename(columns=new_columns)
661
661
 
662
662
  # 2. Apply the wide_to_long function
663
- cols = ["Well", "Sample ID", "Depth_m", "K_mD", "PHI_frac"]
663
+ cols = [
664
+ "Well",
665
+ "Sample ID",
666
+ "Depth_m",
667
+ "K_mD",
668
+ "PHI_frac",
669
+ "Formation Tops",
670
+ "Model",
671
+ ]
664
672
  df_long = pd.wide_to_long(
665
673
  df_temp,
666
674
  # The 'stubnames' are the prefixes we want to turn into columns
@@ -72,7 +72,7 @@ class DBConnector:
72
72
  if DBConnector._engine is None:
73
73
  raise RuntimeError("DBConnector not initialized. Call __init__ first.")
74
74
 
75
- with open(script_path, 'r') as f:
75
+ with open(script_path, "r") as f:
76
76
  sql_script = f.read()
77
77
 
78
78
  with DBConnector._engine.connect() as connection:
@@ -84,7 +84,9 @@ class DBConnector:
84
84
  Setup quick_pp database.
85
85
  """
86
86
  script_dir = os.path.dirname(__file__)
87
- db_type = "sqlite" if "sqlite" in DBConnector._engine.url.drivername else "postgresql"
87
+ db_type = (
88
+ "sqlite" if "sqlite" in DBConnector._engine.url.drivername else "postgresql"
89
+ )
88
90
  if db_type == "sqlite":
89
91
  sql_script = "setup_sqlite_db.sql"
90
92
  elif db_type == "postgresql":
@@ -23,11 +23,19 @@ class User(Base):
23
23
  username: Mapped[str] = mapped_column(String(50), unique=True, nullable=False)
24
24
  email: Mapped[str] = mapped_column(String(255), unique=True, nullable=False)
25
25
  hashed_password: Mapped[str] = mapped_column(String(255), nullable=False)
26
- created_at: Mapped[datetime] = mapped_column(Text, default=datetime.now, nullable=False)
26
+ created_at: Mapped[datetime] = mapped_column(
27
+ Text, default=datetime.now, nullable=False
28
+ )
27
29
 
28
- projects: Mapped[List["Project"]] = relationship("Project", back_populates="creator")
29
- project_memberships: Mapped[List["ProjectMember"]] = relationship("ProjectMember", back_populates="user")
30
- audit_logs: Mapped[List["AuditLog"]] = relationship("AuditLog", back_populates="user")
30
+ projects: Mapped[List["Project"]] = relationship(
31
+ "Project", back_populates="creator"
32
+ )
33
+ project_memberships: Mapped[List["ProjectMember"]] = relationship(
34
+ "ProjectMember", back_populates="user"
35
+ )
36
+ audit_logs: Mapped[List["AuditLog"]] = relationship(
37
+ "AuditLog", back_populates="user"
38
+ )
31
39
 
32
40
  def __repr__(self):
33
41
  return f"<User(user_id={self.user_id}, username='{self.username}')>"
@@ -36,16 +44,28 @@ class User(Base):
36
44
  class Project(Base):
37
45
  __tablename__ = "projects"
38
46
 
39
- project_id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
47
+ project_id: Mapped[int] = mapped_column(
48
+ Integer, primary_key=True, autoincrement=True
49
+ )
40
50
  name: Mapped[str] = mapped_column(String(255), nullable=False)
41
51
  description: Mapped[Optional[str]] = mapped_column(Text)
42
- created_by: Mapped[Optional[int]] = mapped_column(ForeignKey("users.user_id", ondelete="SET NULL"))
43
- created_at: Mapped[datetime] = mapped_column(Text, default=datetime.now, nullable=False)
44
- updated_at: Mapped[datetime] = mapped_column(Text, default=datetime.now, onupdate=datetime.now, nullable=False)
52
+ created_by: Mapped[Optional[int]] = mapped_column(
53
+ ForeignKey("users.user_id", ondelete="SET NULL")
54
+ )
55
+ created_at: Mapped[datetime] = mapped_column(
56
+ Text, default=datetime.now, nullable=False
57
+ )
58
+ updated_at: Mapped[datetime] = mapped_column(
59
+ Text, default=datetime.now, onupdate=datetime.now, nullable=False
60
+ )
45
61
 
46
62
  creator: Mapped[Optional["User"]] = relationship("User", back_populates="projects")
47
- members: Mapped[List["ProjectMember"]] = relationship("ProjectMember", back_populates="project")
48
- wells: Mapped[List["Well"]] = relationship("Well", back_populates="project", cascade="all, delete-orphan")
63
+ members: Mapped[List["ProjectMember"]] = relationship(
64
+ "ProjectMember", back_populates="project"
65
+ )
66
+ wells: Mapped[List["Well"]] = relationship(
67
+ "Well", back_populates="project", cascade="all, delete-orphan"
68
+ )
49
69
 
50
70
  def __repr__(self):
51
71
  return f"<Project(project_id={self.project_id}, name='{self.name}')>"
@@ -54,12 +74,16 @@ class Project(Base):
54
74
  class ProjectMember(Base):
55
75
  __tablename__ = "project_members"
56
76
 
57
- project_id: Mapped[int] = mapped_column(ForeignKey("projects.project_id", ondelete="CASCADE"), primary_key=True)
58
- user_id: Mapped[int] = mapped_column(ForeignKey("users.user_id", ondelete="CASCADE"), primary_key=True)
77
+ project_id: Mapped[int] = mapped_column(
78
+ ForeignKey("projects.project_id", ondelete="CASCADE"), primary_key=True
79
+ )
80
+ user_id: Mapped[int] = mapped_column(
81
+ ForeignKey("users.user_id", ondelete="CASCADE"), primary_key=True
82
+ )
59
83
  role: Mapped[str] = mapped_column(String(50), nullable=False, default="viewer")
60
84
 
61
85
  __table_args__ = (
62
- CheckConstraint(role.in_(['admin', 'editor', 'viewer']), name='role_check'),
86
+ CheckConstraint(role.in_(["admin", "editor", "viewer"]), name="role_check"),
63
87
  )
64
88
 
65
89
  project: Mapped["Project"] = relationship("Project", back_populates="members")
@@ -73,7 +97,9 @@ class Well(Base):
73
97
  __tablename__ = "wells"
74
98
 
75
99
  well_id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
76
- project_id: Mapped[int] = mapped_column(ForeignKey("projects.project_id", ondelete="CASCADE"), nullable=False)
100
+ project_id: Mapped[int] = mapped_column(
101
+ ForeignKey("projects.project_id", ondelete="CASCADE"), nullable=False
102
+ )
77
103
  name: Mapped[str] = mapped_column(String(255), nullable=False)
78
104
  uwi: Mapped[str] = mapped_column(String(100), unique=True, nullable=False)
79
105
  depth_uom: Mapped[Optional[str]] = mapped_column(String(50))
@@ -81,11 +107,17 @@ class Well(Base):
81
107
  header_data: Mapped[Optional[Dict[str, Any]]] = mapped_column("header_data", JSON)
82
108
  config_data: Mapped[Optional[Dict[str, Any]]] = mapped_column("config_data", JSON)
83
109
 
84
- created_at: Mapped[datetime] = mapped_column(Text, default=datetime.now, nullable=False)
85
- updated_at: Mapped[datetime] = mapped_column(Text, default=datetime.now, onupdate=datetime.now)
110
+ created_at: Mapped[datetime] = mapped_column(
111
+ Text, default=datetime.now, nullable=False
112
+ )
113
+ updated_at: Mapped[datetime] = mapped_column(
114
+ Text, default=datetime.now, onupdate=datetime.now
115
+ )
86
116
 
87
117
  project: Mapped["Project"] = relationship("Project", back_populates="wells")
88
- curves: Mapped[List["Curve"]] = relationship("Curve", back_populates="well", cascade="all, delete-orphan")
118
+ curves: Mapped[List["Curve"]] = relationship(
119
+ "Curve", back_populates="well", cascade="all, delete-orphan"
120
+ )
89
121
 
90
122
  def __repr__(self):
91
123
  return f"<Well(well_id={self.well_id}, name='{self.name}', uwi='{self.uwi}')>"
@@ -95,19 +127,25 @@ class Curve(Base):
95
127
  __tablename__ = "curves"
96
128
 
97
129
  curve_id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
98
- well_id: Mapped[int] = mapped_column(ForeignKey("wells.well_id", ondelete="CASCADE"), nullable=False)
130
+ well_id: Mapped[int] = mapped_column(
131
+ ForeignKey("wells.well_id", ondelete="CASCADE"), nullable=False
132
+ )
99
133
  mnemonic: Mapped[str] = mapped_column(String(100), nullable=False)
100
134
  unit: Mapped[Optional[str]] = mapped_column(String(50))
101
135
  description: Mapped[Optional[str]] = mapped_column(Text)
102
- data_type: Mapped[str] = mapped_column(String(50), nullable=False, default='numeric')
136
+ data_type: Mapped[str] = mapped_column(
137
+ String(50), nullable=False, default="numeric"
138
+ )
103
139
 
104
140
  __table_args__ = (
105
141
  UniqueConstraint("well_id", "mnemonic", name="uq_well_id_mnemonic"),
106
- CheckConstraint(data_type.in_(['numeric', 'text']), name='data_type_check'),
142
+ CheckConstraint(data_type.in_(["numeric", "text"]), name="data_type_check"),
107
143
  )
108
144
 
109
145
  well: Mapped["Well"] = relationship("Well", back_populates="curves")
110
- data: Mapped[List["CurveData"]] = relationship("CurveData", back_populates="curve", cascade="all, delete-orphan")
146
+ data: Mapped[List["CurveData"]] = relationship(
147
+ "CurveData", back_populates="curve", cascade="all, delete-orphan"
148
+ )
111
149
 
112
150
  def __repr__(self):
113
151
  return f"<Curve(curve_id={self.curve_id}, well_id={self.well_id}, mnemonic='{self.mnemonic}')>"
@@ -116,8 +154,12 @@ class Curve(Base):
116
154
  class CurveData(Base):
117
155
  __tablename__ = "curve_data"
118
156
 
119
- curve_data_id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
120
- curve_id: Mapped[int] = mapped_column(ForeignKey("curves.curve_id", ondelete="CASCADE"), nullable=False)
157
+ curve_data_id: Mapped[int] = mapped_column(
158
+ Integer, primary_key=True, autoincrement=True
159
+ )
160
+ curve_id: Mapped[int] = mapped_column(
161
+ ForeignKey("curves.curve_id", ondelete="CASCADE"), nullable=False
162
+ )
121
163
  depth: Mapped[float] = mapped_column(REAL, nullable=False)
122
164
  value_numeric: Mapped[Optional[float]] = mapped_column(REAL)
123
165
  value_text: Mapped[Optional[str]] = mapped_column(Text)
@@ -128,26 +170,32 @@ class CurveData(Base):
128
170
  "(value_numeric IS NOT NULL AND value_text IS NULL) OR "
129
171
  "(value_numeric IS NULL AND value_text IS NOT NULL) OR "
130
172
  "(value_numeric IS NULL AND value_text IS NULL)",
131
- name="check_one_value_is_null"
132
- )
173
+ name="check_one_value_is_null",
174
+ ),
133
175
  )
134
176
 
135
177
  curve: Mapped["Curve"] = relationship("Curve", back_populates="data")
136
178
 
137
179
  def __repr__(self):
138
- return f"<CurveData(curve_id={self.curve_id}, depth={self.depth}, " \
180
+ return (
181
+ f"<CurveData(curve_id={self.curve_id}, depth={self.depth}, "
139
182
  f"num={self.value_numeric}, txt='{self.value_text}')>"
183
+ )
140
184
 
141
185
 
142
186
  class AuditLog(Base):
143
187
  __tablename__ = "audit_log"
144
188
 
145
189
  log_id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
146
- user_id: Mapped[Optional[int]] = mapped_column(ForeignKey("users.user_id", ondelete="SET NULL"))
190
+ user_id: Mapped[Optional[int]] = mapped_column(
191
+ ForeignKey("users.user_id", ondelete="SET NULL")
192
+ )
147
193
  action: Mapped[str] = mapped_column(String(10), nullable=False)
148
194
  table_name: Mapped[str] = mapped_column(String(100), nullable=False)
149
195
  record_id: Mapped[Optional[str]] = mapped_column(Text)
150
- timestamp: Mapped[datetime] = mapped_column(Text, default=datetime.now, nullable=False)
196
+ timestamp: Mapped[datetime] = mapped_column(
197
+ Text, default=datetime.now, nullable=False
198
+ )
151
199
  changes: Mapped[Optional[Dict[str, Any]]] = mapped_column("changes", JSON)
152
200
 
153
201
  user: Mapped[Optional["User"]] = relationship("User", back_populates="audit_logs")