Skip to content

Commit

Permalink
refactor: remove all destiny related modules
Browse files Browse the repository at this point in the history
  • Loading branch information
makkus committed Jan 23, 2024
1 parent bbe5040 commit 422224b
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 677 deletions.
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ filesystem_job_archive = "kiara.registries.jobs.job_store.filesystem_store:FileS
filesystem_job_store = "kiara.registries.jobs.job_store.filesystem_store:FileSystemJobStore"
filesystem_alias_archive = "kiara.registries.aliases.archives:FileSystemAliasArchive"
filesystem_alias_store = "kiara.registries.aliases.archives:FileSystemAliasStore"
filesystem_destiny_archive = "kiara.registries.destinies.filesystem_store:FileSystemDestinyArchive"
filesystem_destiny_store = "kiara.registries.destinies.filesystem_store:FileSystemDestinyStore"
filesystem_workflow_archive = "kiara.registries.workflows.archives:FileSystemWorkflowArchive"
filesystem_workflow_store = "kiara.registries.workflows.archives:FileSystemWorkflowStore"
sqlite_data_archive = "kiara.registries.data.data_store.sqlite_store:SqliteDataArchive"
Expand Down
5 changes: 5 additions & 0 deletions src/kiara/context/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,12 @@ def __init__(

for archive_alias, archive in self._config.archives.items():

# this is just to make old context that still had that not error out
if "_destiny_" in archive.archive_type:
continue

archive_cls = self._archive_types.get(archive.archive_type, None)

if archive_cls is None:
raise Exception(
f"Can't create context: no archive type '{archive.archive_type}' available. Available types: {', '.join(self._archive_types.keys())}"
Expand Down
21 changes: 10 additions & 11 deletions src/kiara/context/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
KIARA_CONFIG_FILE_NAME,
KIARA_MAIN_CONFIG_FILE,
KIARA_MAIN_CONTEXTS_PATH,
METADATA_DESTINY_STORE_MARKER,
kiara_app_dirs,
)
from kiara.exceptions import KiaraException
Expand Down Expand Up @@ -528,16 +527,16 @@ def _validate_context(self, context_config: KiaraContextConfig) -> bool:
context_config.archives[DEFAULT_WORKFLOW_STORE_MARKER] = workflow_store
changed = True

if METADATA_DESTINY_STORE_MARKER not in context_config.archives.keys():

destiny_store_type = "filesystem_destiny_store"

destiny_store = create_default_store_config(
store_type=destiny_store_type,
stores_base_path=os.path.join(filesystem_base_path, "destinies"),
)
context_config.archives[METADATA_DESTINY_STORE_MARKER] = destiny_store
changed = True
# if METADATA_DESTINY_STORE_MARKER not in context_config.archives.keys():
#
# destiny_store_type = "filesystem_destiny_store"
#
# destiny_store = create_default_store_config(
# store_type=destiny_store_type,
# stores_base_path=os.path.join(filesystem_base_path, "destinies"),
# )
# context_config.archives[METADATA_DESTINY_STORE_MARKER] = destiny_store
# changed = True

return changed

Expand Down
2 changes: 1 addition & 1 deletion src/kiara/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
DEFAULT_WORKFLOW_STORE_MARKER = "default_workflow_store"
"""Name for the default context workflow store."""

METADATA_DESTINY_STORE_MARKER = "metadata"
METADATA_PROPERTY_MARKER = "metadata"
"""Name for the default context destiny store."""

PIPELINE_PARENT_MARKER = "__pipeline__"
Expand Down
50 changes: 0 additions & 50 deletions src/kiara/registries/destinies/__init__.py

This file was deleted.

187 changes: 0 additions & 187 deletions src/kiara/registries/destinies/filesystem_store.py

This file was deleted.

Loading

0 comments on commit 422224b

Please sign in to comment.