Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 23, 2025
1 parent 9b0f22a commit 0262c6e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
2 changes: 0 additions & 2 deletions src/aiida/cmdline/commands/cmd_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@

import click

from aiida.cmdline.commands.cmd_data.cmd_export import data_export
from aiida.cmdline.commands.cmd_data.cmd_export import data_export
from aiida.cmdline.commands.cmd_verdi import verdi
from aiida.cmdline.groups.dynamic import DynamicEntryPointCommandGroup
from aiida.cmdline.params import arguments, options, types
from aiida.cmdline.params.options.commands import code as options_code
from aiida.cmdline.utils import echo, echo_tabulate
from aiida.cmdline.utils.common import validate_output_filename
from aiida.cmdline.utils.common import validate_output_filename
from aiida.cmdline.utils.decorators import with_dbenv
from aiida.common import exceptions

Expand Down
1 change: 0 additions & 1 deletion src/aiida/cmdline/commands/cmd_computer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from aiida.cmdline.params.options.commands import computer as options_computer
from aiida.cmdline.utils import echo, echo_tabulate
from aiida.cmdline.utils.common import validate_output_filename
from aiida.cmdline.utils.common import validate_output_filename
from aiida.cmdline.utils.decorators import with_dbenv
from aiida.common.exceptions import EntryPointError, ValidationError
from aiida.plugins.entry_point import get_entry_point_names
Expand Down
1 change: 0 additions & 1 deletion src/aiida/cmdline/commands/cmd_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ def storage_dump(
):
"""Dump all data in an AiiDA profile's storage to disk."""


from aiida import orm
from aiida.tools.dumping.parser import DumpConfigParser
from aiida.tools.dumping.rich import (
Expand Down
27 changes: 11 additions & 16 deletions src/aiida/tools/dumping/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

from __future__ import annotations

import os
import contextlib
import logging
import os
from pathlib import Path
from types import SimpleNamespace
from typing import List
Expand All @@ -37,17 +37,15 @@
CalcFunctionNode,
CalcJobNode,
CalculationNode,
LinkManager,
ProcessNode,
WorkChainNode,
WorkflowNode,
WorkFunctionNode,
)
from aiida.orm.utils import LinkTriple
from aiida.tools.archive.exceptions import ExportValidationError
from aiida.tools.dumping.utils import prepare_dump_path
from aiida.tools.dumping.data import DataDumper
from aiida.tools.dumping.utils import validate_make_dump_path
from aiida.tools.dumping.utils import prepare_dump_path

LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -354,22 +352,19 @@ def _dump_calculation(
output_path=output_path / io_dump_mapping.inputs, link_triples=input_links
)


if self.data_dumper.also_rich:
rich_data_output_path = output_path / io_dump_mapping.inputs
# if not self.data_dumper.data_hidden:
# rich_data_output_path = output_path / io_dump_mapping.inputs
# else:
# # TODO: Currently, when dumping only one selected workflow, if rich dumping is activated, but
# # TODO: `data-hidden` is set, no data nodes were actually being dumped
# # TODO: With the current implementation below, they are dumped, but not in the same structure as for the
# # TODO: `dump_rich_core` function. Quick fix for now
# pass
# if not self.data_dumper.data_hidden:
# rich_data_output_path = output_path / io_dump_mapping.inputs
# else:
# # TODO: Currently, when dumping only one selected workflow, if rich dumping is activated, but
# # TODO: `data-hidden` is set, no data nodes were actually being dumped
# # TODO: With the current implementation below, they are dumped, but not in the same structure as for the
# # TODO: `dump_rich_core` function. Quick fix for now
# pass

# Only dump the rich data output files in the process directories if data_hidden is False
self._dump_calculation_io_files_rich(
output_path=rich_data_output_path, link_triples=input_links
)
self._dump_calculation_io_files_rich(output_path=rich_data_output_path, link_triples=input_links)
# Dump the node_outputs apart from `retrieved`
if self.include_outputs:
output_links = list(calculation_node.base.links.get_outgoing(link_type=LinkType.CREATE))
Expand Down

0 comments on commit 0262c6e

Please sign in to comment.