Skip to content

Latest commit

 

History

History
328 lines (236 loc) · 19.4 KB

CHANGELOG.md

File metadata and controls

328 lines (236 loc) · 19.4 KB

Change log

v0.8.0 - 2024-09-18

Breaking changes

  • launch_shell_job: Move computer to top-level of metadata [2ab8219]
  • ShellJob: Change the signature of custom parser functions [8a561b6]

Refactor

  • Refactor: abstract prepare_shell_job_inputs from launch_shell_job [cc72abd]

Fixes

  • prepare_code: Quote command when passing to which in order to resolve [104d03b]
  • ShellCalculation: Resolve escaped curly braces in arguments [521a7ec]

v0.7.3 - 2024-07-16

Fixes

  • ShellJob: Fix bug when metadata.options.output_filename is specified [437f2b3]

v0.7.2 - 2024-07-01

Fixes

  • ShellJob: Fix RemoteData inputs shadowing job's own input files [9d32bf8]

Dependencies

  • Update requirement aiida-core~=2.6 [b41d007]

Devops

  • Package: Change Development Status from Alpha to Beta [fcfce35]
  • Make use of the improved pytest fixtures in aiida-core [27a6393]

v0.7.1 - 2024-05-13

Fixes

  • ShellParser: Prefix output filenames starting with a number [352c309]

Docs

  • Docs: Add hint on retrieving outputs from daemon submitted jobs [31ebfbc]

v0.7.0 - 2024-03-22

Features

  • PickledData: Allow passing kwargs to pickler [f94f030]
  • ShellJob: Automatically serialize string for arguments [4518221]
  • launch_shell_job: Add option to keep skip resolving of command [d4ad9e7]

Fixes

  • Fix InvalidOperation raised by aiida-core when pickling [0458966]
  • prepare_computer: Check whether default_mpiprocs_per_machine is set [97f0b55]
  • ShellJob: Detect and prevent filename clashes [415b27e]

Changes

  • Set default localhost scratch to $TMP/aiida_shell_scratch [beeab21]

Dependencies

  • Add support for Python 3.12 [0ddb9c3]
  • Drop support for Python 3.8 [ab97ef7]
  • Update minimum requirement aiida-core~=2.5 (#69) [d61dd00]

Docs

  • Add a favicon [c439b5f]
  • Add how-to on use of prepend_text metadata option (#67) [d20edd1]
  • Add section on how to run with MPI [adf491d]
  • Add section with examples [2d9ae56]
  • Fix typos option instead of options [825aad1]
  • Link to AiiDA's docs for creating custom codes [0cfbe4c]

Devops

  • Add pre-commit hooks to format TOML and YAML files [1cfb428]

v0.6.0 - 2023-11-02

Features

  • ShellJob: Add support for RemoteData nodes [4a60253]

    The nodes input of the launch_shell_job and ShellJob now allow RemoteData nodes. Their content will be copied to the working directory of the job, just as with SinglefileData nodes. See the how-to example in the documentation for details.

  • ShellJob: Allow entry point strings for the parser input [2f4fb3d]

  • Add the EntryPointData data plugin [161cfef]

Fixes

  • ShellJob: Do not copy contents of nodes to repository [5d46235]

Changes

  • launch_shell_job: Move arguments to be the second argument [8957f59]
  • Add top-level imports explicitly to __all__ [7fc9ba5]
  • Move module engine.launchers.shell_job to launch [a0dac1e]

Docs

Devops

  • Migrate to ruff and cleanup pre-commit config [a591f2a]
  • Update setup-python dependency in CI/CD to v4 [3788672]
  • Update dependency requirement mypy==1.6.1 [5ddb83e]

v0.5.3 - 2023-06-13

Features

  • ShellJob: Add support for FolderData in nodes input [9587c33]

v0.5.2 - 2023-05-12

Features

  • ShellJob: Add the optional redirect_stderr input [92f726b]

    A common practice when running shell commands is to redirect the content, written to the stderr file descriptor, to stdout. This is normally accomplished as follows:

      date > stdout 2>&1
    

    This behaviour can now be reproduced by setting the metadata.options.redirect_stderr input to True:

      from aiida_shell import launch_shell_job
      results, node = launch_shell_job(
          'date',
          metadata={'options': {'redirect_stderr': True}}
      )
    

Fixes

  • ShellJob: Add invalidates_cache=True to exit codes < 400 [4d405e1]

Devops

  • Add the py.typed file following PEP 561 [680a0e9]
  • Update Python version on RTD to 3.11 [2cfd4a2]

v0.5.1 - 2023-05-04

Fixes

  • ShellJob: Remove tot_num_mpiprocs from resources default [5e61c89]
  • launch_shell_job: Only which command if code doesn't already exist [c1c31ab]

v0.5.0 - 2023-05-03

Features

  • launch_shell_job: Accept string for the arguments argument [a8af91a]

    It is now possible to pass the command line arguments for the command as a string, instead of a list of individual arguments:

    from aiida_shell import launch_shell_job
    results, node = launch_shell_job(
        'date',
        arguments='--iso-8601 --universal',
    )
  • launch_shell_job: Accept AbstractCode for command argument [dacfbd3]

    It is now possible to pass a specific preconfigured code to run, instead of the command's name:

    from aiida.orm import load_node
    from aiida_shell import launch_shell_job
    results, node = launch_shell_job(
        load_node('date@localhost'),
        arguments='--iso-8601 --universal',
    )

Fixes

  • launch_shell_job: Fix bug in submit=True when used within work chain [dbeac91]

Devops

  • Fix mypy configuration in .pre-commit.config.yaml [e16ace0]
  • Change PR numbers to commit hash in CHANGELOG.md [71d8f2b]
  • Update version number in CITATION.cff [b3f672c]
  • Fix the daemon_client fixture (#33) [30a7c06]

Documentation

v0.4.0 - 2023-03-30

Features

  • ShellParser: Add support to parse output directory as FolderData [269fd391]

    It is now possible to add a directory to the outputs and it will be attached as a FolderData output node:

    from aiida.orm import SinglefileData
    from aiida_shell import launch_shell_job
    results, node = launch_shell_job(
        'tar',
        arguments=['-zxvf', '{archive}'],
        nodes={
            'archive': SinglefileData('/some/path/archive.tar.gz'),
        },
        outputs=['sub_folder']
    )
  • ShellJob: Add filename_stdin input to redirect file through stdin [87bc8360]

    Certain shell commands require input to be passed through the stdin file descriptor. To reproduce this behaviour, the file that should be redirected through stdin can be defined using the metadata.option.filename_stdin input:

    from aiida.orm import SinglefileData
    from aiida_shell import launch_shell_job
    results, node = launch_shell_job(
        'cat',
        nodes={
            'input': SinglefileData.from_string('string a')
        },
        metadata={'options': {'filename_stdin': 'input'}}
    )
    print(results['stdout'].get_content())
  • ShellJob: Add support for custom parsing [32db3847]

    This makes it possible to define a custom parser on-the-fly to parse output data and attach it any existing Data class. For example, the content of the file can be stored as a Str instead of a SinglefileData:

    from aiida_shell import launch_shell_job
    
    def parser(self, dirpath):
        from aiida.orm import Str
        return {'string': Str((dirpath / 'stdout').read_text().strip())}
    
    results, node = launch_shell_job(
        'echo',
        arguments=['some output'],
        parser=parser
    )
    print(results['string'].value)
  • ShellJob: Add the additional_retrieve option [05def137]

  • Add the PickledData data plugin [3a40eefc]

Fixes

  • ShellJob: Use SinglefileData.filename before falling back on key [fe34d973]
  • ShellJob: Automatically create parent directories in filenames [9b380200]
  • ShellJob: Raise when < or > are specified in arguments [5f42f0aa]

Dependencies

  • Update pre-commit requirement isort==5.12.0 [69ac1ffe]

v0.3.0 - 2022-11-07

Features

  • launch_shell_job: Add the submit argument to run over the daemon [6f2435bc]

    This adds support to submit shell job's to the daemon which allows to run many independen shell job's in parallel greatly increasing throughput:

    launch_shell_job(
        'echo',
        arguments=['hello world'],
        submit=True
    )
  • ShellJob: Add the ERROR_STDERR_NOT_EMPTY exit code [8f4dd2cb]

    If the command returns a zero exit code, but the stderr is not empty, this exit code is set on the ShellJob marking it as failed.

  • ShellJob: Customize the _build_process_label method [506fe91f]

    This ensures that the process_label attribute that is set for the CalcJobNode that represents the job execution in the provenance graph is more descriptive. Before it used to just be ShellJob making all shell job's indistinguishable from one another. After this change, the label is formatted as ShellJob<command@computer. For example, running echo on the localhost gets the process label ShellJob<echo@localhost>.

  • Add the ShellCode data plugin [a185219a]

    This custom data plugin is used for codes that are automatically setup by the launch_shell_job function. By using a separate code plugin, it will be easy to query and filter for these codes.

Fixes

  • ShellParser: Fix output files with non-alphanumeric characters [6f699897]

    This fixes an exception that would be raised if an output file would be attached with non-alphanumeric characters, e.g., dashes. These characters are not valid for link labels for which the filenames are used. The invalid characters are now automatically replaced by underscores.

Changes

  • launch_shell_job: Change log level from WARNING to INFO [a41f0ba1]

    The launch_shell_job function emits warnings if no explicit computer is specified and if a computer or code is created automatically. However, since this is the most common use-case and warnings are always shown by default, these warnings would crop up a lot. Therefore, the log level is changed to INFO such they are no longer shown by default, but if the logging level is upped by the user, the log messages will be shown.

Dependencies

v0.2.0 - 2022-06-05

Breaking changes

  • ShellJob: files input files renamed to nodes [f6dbfa03]
  • launch_shell_job: keyword files renamed to nodes[f6dbfa03]

Features

  • ShellJob: add support for additional Data types to the nodes input. This allows for example to pass Float, Int and Str instances. [f6dbfa03]
  • ShellJob: add validation for outputs input [7f17e10e]

Dependencies

  • Update requirement to aiida-core~=2.0 [1387f65d]

Devops

  • Add GitHub Actions workflow for continuous deployment [667ede87]
  • Update the README.md with badges [25e789fa]
  • Make package description in pyproject.toml dynamic [b1040187]
  • Update the pre-commit dependencies [1a217eef]
  • Fix the tool.flit.sdist list in pyproject.toml [fc1d995b]
  • Minor improvements to the README.md [89913e4d]
  • Tests: filter warning for AiiDA creating the config directory [57a76f55]