Skip to content

Commit

Permalink
Noop: remove useless logging commands (#26)
Browse files Browse the repository at this point in the history
They are useless for a normal usage of the tool and flood the terminal when
copying a lot of objects.
  • Loading branch information
drscholly authored Feb 13, 2024
1 parent 148e449 commit 86ba87a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion toolbox/api/datagalaxy_api_glossary.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def list_properties(self, workspace_name: str) -> list:
def bulk_upsert_property_tree(self, workspace_name: str, properties: list) -> DataGalaxyBulkResult:
# Existing entities are updated and non-existing ones are created.
properties_ok_to_bulk = to_bulk_tree(properties)
logging.info(f'properties_ok_to_bulk: {properties_ok_to_bulk}')

if not self.workspace["isVersioningEnabled"]:
version_id = self.workspace['defaultVersionId']
Expand Down
1 change: 0 additions & 1 deletion toolbox/api/datagalaxy_api_usages.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def list_usages(self, workspace_name: str) -> list:
def bulk_upsert_usages_tree(self, workspace_name: str, usages: list) -> DataGalaxyBulkResult:
# Existing entities are updated and non-existing ones are created.
usages_ok_to_bulk = to_bulk_tree(usages)
logging.info(f'usages_ok_to_bulk: {usages_ok_to_bulk}')

# If a parent usage has a technology, it is necessary to delete the "technologyCode" property in every children
# Otherwise the API returns an error. Only the parent can hold the "technologyCode" property
Expand Down
2 changes: 0 additions & 2 deletions toolbox/commands/copy_glossary.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import logging
from typing import Optional

from toolbox.api.datagalaxy_api import get_access_token, Token, DataGalaxyBulkResult
Expand Down Expand Up @@ -43,7 +42,6 @@ def copy_glossary(url_source: str,
)
workspace_source_glossary_properties = glossary_on_source_workspace.list_properties(
workspace_source_name)
logging.info(f'glossary properties on source workspace : {workspace_source_glossary_properties}')
# on copie ces propriétés sur le workspace_target
glossary_on_target_workspace = DataGalaxyApiGlossary(
url=url_target,
Expand Down
2 changes: 0 additions & 2 deletions toolbox/commands/copy_usages.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import logging
from typing import Optional

from toolbox.api.datagalaxy_api import get_access_token, Token, DataGalaxyBulkResult
Expand Down Expand Up @@ -44,7 +43,6 @@ def copy_usages(url_source: str,
if workspaces_api_on_target_env.get_workspace(workspace_target_name):
# on récupère les usages du workspace_source
workspace_source_usages = usages_on_source_workspace.list_usages(workspace_source_name)
logging.info(f'Usages on source workspace : {workspace_source_usages}')

# on copie ces usages sur le workspace_target
return usages_on_target_workspace.bulk_upsert_usages_tree(
Expand Down

0 comments on commit 86ba87a

Please sign in to comment.