Class: DSPy::Registry::SignatureRegistry::RegistryConfig
- Inherits:
-
Object
- Object
- DSPy::Registry::SignatureRegistry::RegistryConfig
- Extended by:
- T::Sig
- Defined in:
- lib/dspy/registry/signature_registry.rb
Overview
Configuration for the registry
Instance Attribute Summary collapse
-
#auto_version ⇒ Object
Returns the value of attribute auto_version.
-
#backup_on_deploy ⇒ Object
Returns the value of attribute backup_on_deploy.
-
#config_file ⇒ Object
Returns the value of attribute config_file.
-
#max_versions_per_signature ⇒ Object
Returns the value of attribute max_versions_per_signature.
-
#registry_path ⇒ Object
Returns the value of attribute registry_path.
-
#version_format ⇒ Object
Returns the value of attribute version_format.
Instance Method Summary collapse
- #from_h(data) ⇒ Object
-
#initialize ⇒ RegistryConfig
constructor
A new instance of RegistryConfig.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ RegistryConfig
Returns a new instance of RegistryConfig.
174 175 176 177 178 179 180 181 |
# File 'lib/dspy/registry/signature_registry.rb', line 174 def initialize @registry_path = "./dspy_registry" @config_file = "registry.yml" @auto_version = true @max_versions_per_signature = 10 @backup_on_deploy = true @version_format = "v%Y%m%d_%H%M%S" # timestamp-based versions end |
Instance Attribute Details
#auto_version ⇒ Object
Returns the value of attribute auto_version.
162 163 164 |
# File 'lib/dspy/registry/signature_registry.rb', line 162 def auto_version @auto_version end |
#backup_on_deploy ⇒ Object
Returns the value of attribute backup_on_deploy.
168 169 170 |
# File 'lib/dspy/registry/signature_registry.rb', line 168 def backup_on_deploy @backup_on_deploy end |
#config_file ⇒ Object
Returns the value of attribute config_file.
159 160 161 |
# File 'lib/dspy/registry/signature_registry.rb', line 159 def config_file @config_file end |
#max_versions_per_signature ⇒ Object
Returns the value of attribute max_versions_per_signature.
165 166 167 |
# File 'lib/dspy/registry/signature_registry.rb', line 165 def max_versions_per_signature @max_versions_per_signature end |
#registry_path ⇒ Object
Returns the value of attribute registry_path.
156 157 158 |
# File 'lib/dspy/registry/signature_registry.rb', line 156 def registry_path @registry_path end |
#version_format ⇒ Object
Returns the value of attribute version_format.
171 172 173 |
# File 'lib/dspy/registry/signature_registry.rb', line 171 def version_format @version_format end |
Instance Method Details
#from_h(data) ⇒ Object
196 197 198 199 200 201 202 203 |
# File 'lib/dspy/registry/signature_registry.rb', line 196 def from_h(data) @registry_path = data[:registry_path] if data[:registry_path] @config_file = data[:config_file] if data[:config_file] @auto_version = data[:auto_version] if data.key?(:auto_version) @max_versions_per_signature = data[:max_versions_per_signature] if data[:max_versions_per_signature] @backup_on_deploy = data[:backup_on_deploy] if data.key?(:backup_on_deploy) @version_format = data[:version_format] if data[:version_format] end |
#to_h ⇒ Object
184 185 186 187 188 189 190 191 192 193 |
# File 'lib/dspy/registry/signature_registry.rb', line 184 def to_h { registry_path: @registry_path, config_file: @config_file, auto_version: @auto_version, max_versions_per_signature: @max_versions_per_signature, backup_on_deploy: @backup_on_deploy, version_format: @version_format } end |