Browse Source

rename plugins_sys base to config

Nick Sweeting 1 year ago
parent
commit
2d19317e3f

+ 1 - 1
archivebox/plugantic/base_plugin.py

@@ -84,7 +84,7 @@ class BasePlugin(BaseModel):
         # preserve references to original default objects,
         # preserve references to original default objects,
         # pydantic deepcopies them by default which breaks mutability
         # pydantic deepcopies them by default which breaks mutability
         # see https://github.com/pydantic/pydantic/issues/7608
         # see https://github.com/pydantic/pydantic/issues/7608
-        # if we dont do this, then plugins_sys.base.CORE_CONFIG != settings.CONFIGS.CoreConfig for example
+        # if we dont do this, then plugins_extractor.SINGLEFILE_CONFIG != settings.CONFIGS.SingleFileConfig for example
         # and calling .__init__() on one of them will not update the other
         # and calling .__init__() on one of them will not update the other
         self.hooks = self.model_fields['hooks'].default
         self.hooks = self.model_fields['hooks'].default
         
         

+ 1 - 1
archivebox/plugins_extractor/singlefile/apps.py

@@ -19,7 +19,7 @@ from plugantic.base_queue import BaseQueue
 from plugantic.base_hook import BaseHook
 from plugantic.base_hook import BaseHook
 
 
 # Depends on Other Plugins:
 # Depends on Other Plugins:
-from plugins_sys.base.apps import ARCHIVING_CONFIG
+from plugins_sys.config.apps import ARCHIVING_CONFIG
 from plugins_pkg.npm.apps import SYS_NPM_BINPROVIDER, LIB_NPM_BINPROVIDER
 from plugins_pkg.npm.apps import SYS_NPM_BINPROVIDER, LIB_NPM_BINPROVIDER
 
 
 ###################### Config ##########################
 ###################### Config ##########################

+ 0 - 0
archivebox/plugins_sys/base/__init__.py → archivebox/plugins_sys/config/__init__.py


+ 4 - 4
archivebox/plugins_sys/base/apps.py → archivebox/plugins_sys/config/apps.py

@@ -123,9 +123,9 @@ class SearchBackendConfig(BaseConfigSet):
 SEARCH_BACKEND_CONFIG = SearchBackendConfig()
 SEARCH_BACKEND_CONFIG = SearchBackendConfig()
 
 
 
 
-class CorePlugin(BasePlugin):
-    app_label: str = 'core'
-    verbose_name: str = 'Core'
+class ConfigPlugin(BasePlugin):
+    app_label: str = 'config'
+    verbose_name: str = 'Configuration'
 
 
     hooks: List[InstanceOf[BaseHook]] = [
     hooks: List[InstanceOf[BaseHook]] = [
         SHELL_CONFIG,
         SHELL_CONFIG,
@@ -137,6 +137,6 @@ class CorePlugin(BasePlugin):
     ]
     ]
 
 
 
 
-PLUGIN = CorePlugin()
+PLUGIN = ConfigPlugin()
 PLUGIN.register(settings)
 PLUGIN.register(settings)
 DJANGO_APP = PLUGIN.AppConfig
 DJANGO_APP = PLUGIN.AppConfig