launch_shell_job
: Movecomputer
to top-level ofmetadata
[2ab8219]ShellJob
: Change the signature of custom parser functions [8a561b6]
- Refactor: abstract
prepare_shell_job_inputs
fromlaunch_shell_job
[cc72abd]
prepare_code
: Quote command when passing towhich
in order to resolve [104d03b]ShellCalculation
: Resolve escaped curly braces in arguments [521a7ec]
ShellJob
: Fix bug whenmetadata.options.output_filename
is specified [437f2b3]
ShellJob
: FixRemoteData
inputs shadowing job's own input files [9d32bf8]
- Update requirement
aiida-core~=2.6
[b41d007]
- Package: Change
Development Status
fromAlpha
toBeta
[fcfce35] - Make use of the improved
pytest
fixtures inaiida-core
[27a6393]
ShellParser
: Prefix output filenames starting with a number [352c309]
- Docs: Add hint on retrieving outputs from daemon submitted jobs [31ebfbc]
PickledData
: Allow passing kwargs to pickler [f94f030]ShellJob
: Automatically serialize string forarguments
[4518221]launch_shell_job
: Add option to keep skip resolving ofcommand
[d4ad9e7]
- Fix
InvalidOperation
raised byaiida-core
when pickling [0458966] prepare_computer
: Check whetherdefault_mpiprocs_per_machine
is set [97f0b55]ShellJob
: Detect and prevent filename clashes [415b27e]
- Set default localhost scratch to
$TMP/aiida_shell_scratch
[beeab21]
- Add support for Python 3.12 [0ddb9c3]
- Drop support for Python 3.8 [ab97ef7]
- Update minimum requirement
aiida-core~=2.5
(#69) [d61dd00]
- 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 ofoptions
[825aad1] - Link to AiiDA's docs for creating custom codes [0cfbe4c]
- Add pre-commit hooks to format TOML and YAML files [1cfb428]
-
ShellJob
: Add support forRemoteData
nodes [4a60253]The
nodes
input of thelaunch_shell_job
andShellJob
now allowRemoteData
nodes. Their content will be copied to the working directory of the job, just as withSinglefileData
nodes. See the how-to example in the documentation for details. -
ShellJob
: Allow entry point strings for theparser
input [2f4fb3d] -
Add the
EntryPointData
data plugin [161cfef]
ShellJob
: Do not copy contents ofnodes
to repository [5d46235]
launch_shell_job
: Movearguments
to be the second argument [8957f59]- Add top-level imports explicitly to
__all__
[7fc9ba5] - Move module
engine.launchers.shell_job
tolaunch
[a0dac1e]
- Update the styling to custom theme [0588076]
- Add example showcase of
pdb-tools
[ae6b919] - Add the changelog to the documentation [6bc435b]
- Improve the logo [42fd0de]
- Fix outdated markdown style header [a2a9294]
- 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]
ShellJob
: Add support forFolderData
innodes
input [9587c33]
-
ShellJob
: Add the optionalredirect_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 toTrue
:from aiida_shell import launch_shell_job results, node = launch_shell_job( 'date', metadata={'options': {'redirect_stderr': True}} )
ShellJob
: Addinvalidates_cache=True
to exit codes <400
[4d405e1]
ShellJob
: Removetot_num_mpiprocs
fromresources
default [5e61c89]launch_shell_job
: Onlywhich
command if code doesn't already exist [c1c31ab]
-
launch_shell_job
: Accept string for thearguments
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
: AcceptAbstractCode
forcommand
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', )
launch_shell_job
: Fix bug insubmit=True
when used within work chain [dbeac91]
- 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]
- Add skeleton of documentation [8595c17]
- Add links to docs in
README.md
andpyproject.toml
[d987c55] - Add logo [03855fa]
- Move examples from
README.md
to how-to guides [e15fb53]
-
ShellParser
: Add support to parse output directory asFolderData
[269fd391]It is now possible to add a directory to the
outputs
and it will be attached as aFolderData
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
: Addfilename_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 aStr
instead of aSinglefileData
: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 theadditional_retrieve
option [05def137] -
Add the
PickledData
data plugin [3a40eefc]
ShellJob
: UseSinglefileData.filename
before falling back on key [fe34d973]ShellJob
: Automatically create parent directories infilenames
[9b380200]ShellJob
: Raise when<
or>
are specified inarguments
[5f42f0aa]
- Update pre-commit requirement
isort==5.12.0
[69ac1ffe]
-
launch_shell_job
: Add thesubmit
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 theERROR_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 theShellJob
marking it as failed. -
ShellJob
: Customize the_build_process_label
method [506fe91f]This ensures that the
process_label
attribute that is set for theCalcJobNode
that represents the job execution in the provenance graph is more descriptive. Before it used to just beShellJob
making all shell job's indistinguishable from one another. After this change, the label is formatted asShellJob<command@computer
. For example, runningecho
on thelocalhost
gets the process labelShellJob<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.
-
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.
-
launch_shell_job
: Change log level fromWARNING
toINFO
[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 toINFO
such they are no longer shown by default, but if the logging level is upped by the user, the log messages will be shown.
- Add support for Python 3.11 [bde79f3c]
- Update requirement
aiida-core~=2.1
[f9391d61]
ShellJob
:files
inputfiles
renamed tonodes
[f6dbfa03]launch_shell_job
: keywordfiles
renamed tonodes
[f6dbfa03]
ShellJob
: add support for additionalData
types to thenodes
input. This allows for example to passFloat
,Int
andStr
instances. [f6dbfa03]ShellJob
: add validation foroutputs
input [7f17e10e]
- Update requirement to
aiida-core~=2.0
[1387f65d]
- 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]