Changelog#
v2.8.0 - 2026-03-16#
This release brings important improvements to the BaseRestartWorkChain, the engine, stashing, typing coverage, and dependency updates.
It also includes several fixes for connection and resource leaks (with further improvements planned for upcoming releases).
Highlights:
Behavior changes: The following changes may affect existing workflows but do not constitute API breaking changes that would warrant a major version bump. See the Behavior changes section for details.
BaseRestartWorkChain: defaulton_unhandled_failurechanged toabortStructureData.cell_angles: returnsNoneinstead ofnanfor zero-length vectorsTrajectoryData: new.pbcproperty;set_trajectory()emits deprecation warning whenpbcnot specifiedStashing: rejects
RemoteDatafrom still-running calculationscore.ssh_async:globreturns empty list instead of raising errorSQLite storage: database lock warning downgraded to INFO level
BaseRestartWorkChain enhancements#
Two new inputs have been added to BaseRestartWorkChain to give users more control over failure handling:
on_unhandled_failure (behavior change)
Previously, BaseRestartWorkChain would automatically restart once on unhandled failures.
This behavior has changed: the default is now to abort immediately to save computational resources.
To restore the previous behavior, explicitly set on_unhandled_failure='restart_once'.
The available options are:
abort(default): Abort immediately withERROR_UNHANDLED_FAILUREpause: Pause for user inspectionrestart_once: Restart once, then abort (previous default behavior)restart_and_pause: Restart once, then pause if it fails again
from aiida.engine import submit
inputs = {
'on_unhandled_failure': 'restart_once', # Restore v2.7 behavior
# ... other inputs
}
submit(MyRestartWorkChain, **inputs)
pause_on_max_iterations
A new pause_on_max_iterations input allows the work chain to pause instead of aborting when the maximum iteration limit is reached.
This is useful when you want to inspect the calculation state before deciding whether to continue or abort:
inputs = {
'max_iterations': 3,
'pause_on_max_iterations': True,
# ... other inputs
}
When paused, use verdi process play <PK> to resume or verdi process kill <PK> to abort.
Replaced nest_asyncio with greenback#
The internal async event loop handling has been refactored to use greenback instead of nest_asyncio (#7206).
This change brings several benefits:
Drops the deprecated
nest_asynciodependency (the package is no longer maintained)Clearer tracebacks when debugging engine code
Ability to add breakpoints in engine modules during development
Important change for Jupyter notebook users: When using AiiDA in a Jupyter notebook, load_profile() must now be called in a separate cell before running engine processes:
# Cell 1: Load the profile
from aiida import load_profile
load_profile()
# Cell 2: Now you can run processes
from aiida.engine import run
from aiida.plugins import CalculationFactory
# ...
This is required because the greenback context is established after the cell containing load_profile() completes.
Unstashing support#
Building on the stashing feature introduced in v2.7.0, this release adds unstashing—the ability to retrieve previously stashed data back to the remote working directory (#6826).
The new UnstashCalculation allows you to restore stashed files before running a calculation that needs them:
from aiida.plugins import CalculationFactory
from aiida.engine import run
from aiida.orm import load_node
UnstashCalculation = CalculationFactory('core.unstash')
# Load the stashed data from a previous calculation
stash_node = load_node(<STASH_NODE_PK>)
inputs = {
'stash': stash_node,
'metadata': {
'computer': stash_node.computer,
'options': {
'resources': {'num_machines': 1},
},
},
}
result = run(UnstashCalculation, **inputs)
# The unstashed files are now available in result['remote_folder']
Additionally, RemoteStashCustomData (#6777) enables stashing via custom scripts for specialized data handling needs.
TrajectoryData: periodic boundary conditions support#
The TrajectoryData class now properly stores and retrieves periodic boundary conditions (PBC) (#7079).
Previously, when creating a trajectory from StructureData instances with specific PBC settings (e.g., periodic in x and y but not z), this information was lost and the structures retrieved from a TrajectoryData would always default to (True, True, True).
Now the periodic boundary conditions are stored in the attributes and can be retrieved using the .pbc property:
from aiida import orm
structure = orm.StructureData(
cell=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]],
pbc=(True, True, False)
)
structure.append_atom(position=(0.0, 0.0, 0.0), symbols='H')
trajectory = orm.TrajectoryData([structure])
trajectory.pbc
# (True, True, False)
Structures retrieved from the TrajectoryData also have the correct boundary conditions:
trajectory.get_step_structure(0).pbc
# (True, True, False)
Backward compatibility: For TrajectoryData created before v2.8, trajectory.pbc returns None.
Deprecation: Providing cells without explicit pbc to set_trajectory() now issues a deprecation warning and defaults to (True, True, True). This will raise a ValueError in v3.0.
Typing improvements#
This release significantly expands type annotation coverage across the codebase. The following modules now have strict typing enabled:
aiida.commonaiida.repositoryaiida.schedulersaiida.tools.graphaiida.tools.queryaiida.cmdline.utilsaiida.cmdline.paramsaiida.cmdline.commandsaiida.engine.processes
These improvements enable better IDE support, catch more bugs at development time, and make the codebase more maintainable. Plugin developers will benefit from improved autocompletion and type checking when using the AiiDA API.
Dependency updates#
numpy 2.x support (#6899): AiiDA now supports numpy 2.x, allowing use of the latest numpy features and performance improvements.
click 8.2 support (#6959): The CLI is now compatible with click 8.2, which includes various improvements to command-line parsing.
verdi process repair: orphaned database connection cleanup#
When daemon workers crash or are killed without proper cleanup, their PostgreSQL connections can remain open. These connections hold locks that can block other processes indefinitely, causing workchains and calcjobs to hang.
The verdi process repair command now detects and terminates these orphaned connections (#7207).
Since the command requires the daemon to be stopped, any remaining PostgreSQL connections (other than the current session) are likely from crashed processes.
A confirmation prompt is shown before terminating connections, as legitimate connections (e.g. from Jupyter notebooks) may also be affected.
Use --force to skip the prompt.
Deprecation of core.ssh transport#
The core.ssh transport plugin is now deprecated in favor of core.ssh_async (#7175).
The async transport, introduced in v2.7.0, offers better performance for concurrent operations and improved configuration through ~/.ssh/config.
When configuring new computers, you will see a deprecation warning if selecting core.ssh.
We recommend migrating existing computers to core.ssh_async.
This release also adds 2FA support for core.ssh_async with improved authentication script handling (#7184).
Behavior changes#
StructureData.cell_angles: returns None instead of nan (#6820)
The StructureData.cell_angles property now handles zero-length cell vectors differently:
Returns
Nonefor angles that cannot be computed due to zero-length vectors (previously returnednan)Raises
ValueErrorwhen all cell vectors have zero lengthHandles numerical edge cases by clamping cosine values to
[-1, 1], preventingnanresults for nearly-parallel vectors
If your code checks for nan values in cell_angles, update it to check for None instead:
# Before (v2.7 and earlier)
angles = structure.cell_angles
if any(math.isnan(a) for a in angles):
# handle undefined angles
# After (v2.8+)
angles = structure.cell_angles
if any(a is None for a in angles):
# handle undefined angles
Portable codes: job scripts now include ./ prefix (#7080)
Portable code executables located in the top-level directory are now invoked with a ./ prefix (e.g., ./mycode.py instead of mycode.py).
This fixes execution on systems where the current directory is not in PATH.
If you parse job scripts, be aware that the executable line will look different.
Stashing: rejects RemoteData from still-running calculations (#7147)
StashCalculation now validates that the source RemoteData node comes from a sealed (finished) calculation.
Attempting to stash from a still-running calculation will raise an error, preventing incomplete stashes.
Use the direct stashing method (metadata.options.stash) or wrap StashCalculation in a workflow to ensure proper sequencing.
core.ssh_async: glob now returns empty list instead of raising error (#6950)
The glob method of core.ssh_async transport now returns an empty list when no files match the pattern, instead of raising OSError.
This aligns the behavior with core.ssh transport.
Transport: --safe-interval default changed from 30s to 15s (#6943)
The default value for --safe-interval (connection cooldown time) has been reduced from 30 seconds to 15 seconds.
Additionally, this option now has a non-interactive default, so scripted computer setup (verdi computer configure) will no longer hang waiting for input.
SQLite storage: database lock warning downgraded to INFO level (#7121)
The warning about failed writes due to SQLite database locks (common with core.sqlite_dos storage) has been downgraded from WARNING to INFO level.
This reduces log noise for SQLite-based profiles where these transient locks are expected and harmless.
Improved ProcessBuilder representation (#7285, #7290)
The ProcessBuilder now has a proper __str__ method, so its clean YAML-like representation is available in all Python environments via print(), not just IPython and Jupyter.
The existing _repr_pretty_ method (used by IPython/Jupyter) has also been improved to prune empty namespaces (e.g. stash, metadata.options) from the output, reducing noise when inspecting builder contents.
Note that this affects the print() output for a ProcessBuilder:
from aiida.calculations.arithmetic.add import ArithmeticAddCalculation
builder = ArithmeticAddCalculation.get_builder()
print(builder)
# Process class: ArithmeticAddCalculation
# Inputs:
# {}
In case the old string representation is still desired, you can wrap the builder in a dict:
print(dict(builder))
# {'metadata': {'options': {'unstash': {}, 'stash': {}}}, 'monitors': {}}
Features#
Engine#
ProcessBuilder: use__str__instead of__repr__(#7290) [4311f04c9]ProcessBuilder: add__repr__(#7285) [c79d22a5f]ProcessBuilder: prune empty namespaces in_repr_pretty(#7285) [3be99a61a]Add timestamp and PID to worker log (#7271) [dacaa47c5]
Revert workaround of increasing maximum stack size (#7230) [4c6bba90c]
Replace
nest_asynciowithgreenbacksupport (#7206) [2c010c6dc]BaseRestartWorkChain: addpause_on_max_iterationsinput (#7139) [24e840cd0]Asyncify
request_transportcontext manager (#7209) [41acc86c6]BaseRestartWorkChain: addon_unhandled_failureinput (#7116) [a770d7a6e]
Stashing#
Add
fail_on_missingoption to control stashing behavior for missing files (#7140) [c10fef19c]Add warning when deleting
StashCalculationnodes with--clean-workdir(#7187) [381d3932b]Add validation to reject stashing via
StashCalculationfrom unsealed calculations (#7147) [cddeba201]Add support for unstashing (#6826) [6ab3ed1bd]
Extend check of stash options when they are specified as empty dict (#6942) [cbbdedb13]
RemoteStashCustomData: stashing via custom script (#6777) [b2a6e2132]
CLI#
Print worker logfile location in daemon status (#7271) [feb5e80f8]
Improve error message clarity for import violations in verdi CLI (#7211) [d1e7778b6]
Add orphaned database connection cleanup to
verdi process repair(#7207) [1deba397d]Show plugin descriptions in interactive prompt help (#7210) [ff7eec237]
Add
verdi computer gotocommand (#7124) [ca78477af]Truncate
verdi archive infooutput node list (#7097) [5b89d1c05]Show first and last node
ctimeforverdi storage info --detailed(#6829) [f9566a4d4]
Transport#
Support 2FA with improved authentication script handling in
core.ssh_asynctransport (#7184) [dc034b146]core.ssh_async: move a technical message from warning to debug (#7024) [8b1943ef3]Set non-interactive default for
--safe-interval(#6943) [d0dedc171]
ORM#
Support legacy
scheduler_state(#7202) [eeb42355b]Add
offsettoentities.Collection.find(#7125) [d123ac255]Improve typing of
QueryBuilder.all()(#6966) [ee87cec5e]
Repository#
Make
AbstractRepositoryBackend.open()abstract (#7216) [0904796e0]Implement repo methods to extract object size and objects as a zipfile (bytes) (#7126) [d53330c04]
Use
TextIOWrapperfor opening file from repository in text mode (#6847) [761764d81]
Storage#
Downgrade SQLite database lock warning to info level (#7121) [1c6c5ac0a]
Prior check if migration needed on
SqliteZipBackendinitialisation (#6963) [7255f01c7]
Fixes#
CLI#
verdi status: close broker connection after check (#7269) [b8b77cc7d]Add Discourse and GitHub links to deprecation warnings (#7123) [8aae1b689]
Drop dump-related message when relabeling a group (#7033) [239cbf91c]
Engine#
asyncio.iscoroutinefunction->inspect.iscoroutinefunction(#7256) [c4d4a003f]Fix missing return of exit code 0 in
inspect_processwhen not paused (#7247) [2545cb276]Replace deprecated
asyncio.get_event_loop()withplumpy.get_or_create_event_loop()(#7206) [f762ecf99]
ORM#
TrajectoryData: fix missing space inpbcdeprecation warning (#7287) [c39cbfe72]Fix SD
cell_anglesfor zero-length vectors (#6820) [f0a8ce764]TrajectoryData: Fixpbchandling for non-periodic structures (#7079) [08c58ffc0]Fix
ResourceWarningfrom unclosedTextIOWrapper(#7220) [3a061d06e]
Transport#
Update error message for SSH transport plugin (#7110) [b2f442276]
Fix
whoami_asynccall in sync context (#7083) [16c6ad38e]Unify behavior of
core.ssh_async::globwithcore.ssh::glob(#6950) [da3e42567]
Storage#
Apply SQLA param-limit fix to all IN clauses (#7237) [be0d6b5de]
Remove migration output capturing for
SqliteZipBackendinitialisation (#6964) [016d049ef]
Deprecations#
Transport: deprecate
chownmethod (#7178) [be364adfa]Deprecate
core.sshtransport plugin in favor ofcore.ssh_async(#7175) [f9453e738]SshTransport: drop deprecation warnings (#7130) [4a98ec50c]Remove dead code supporting old pymatgen versions (#7066) [17b484fb7]
Remove deprecated
aiida.common.jsonmodule (#7017) [dc702f074]Remove deprecated IPython support (#7013) [2d0a0ed94]
Replace
aiida.common.assert_neverwithtyping.assert_never(#6856) [494179ddb]
Documentation#
Extend
XyDatadocumentation (#6736) [f4c205d67]Fix reference to
baseinput_object_from_file(#7108) [5014979b9]Add how-to page for real-world workflows (#7048) [49af7f0a6]
Enhance documentation on process types in AiiDA (#7068) [d50cf17df]
Rename section ‘Monitoring processes’ to ‘Inspect processes’ (#7075) [00f082fb3]
Remove outdated installation troubleshooting section (#7015) [413b9bd6e]
Add unstashing documentation (#6999) [669f249e8]
Improve docstring of transport
chmodmethod (#6988) [0eb8fc35f]Full documentation for stashing (#6936) [81dd4df5d]
Remove note on unsupported
containsandget_creation_statistics(#6930) [a392f5c5c]
Dependencies#
Bump the gha-dependencies group across 1 directory with 4 updates (#7253) [e987f7e32]
Update uv.lock (#7258) [03df44acc]
Bump asyncssh from ~=2.19.0 to ~=2.21.0 (#7240) [93d98ed6e]
Bump disk-objectstore to ~=1.5.0 (#7206) [e3217c0fe]
Bump the gha-dependencies group across 1 directory with 3 updates (#7194) [16ebbc5d7]
Pin mamba version to fix arm64 docker build (#7168) [ca143ca29]
uv.lock upgrade (#7077) [7b59996cd]
Don’t re-export
common.typing, installtyping_extensionsfor all Python versions (#7096) [5c1b2f4cc]Unpin and update bpython (#7031) [f01c70e22]
Bump psutil to v7.x (#7012) [c0e3c826d]
Support click 8.2 (#6959) [44ef2a17e]
Support numpy 2.x (#6899) [1e8cd0b3c]
Devops#
Typing#
Add typing to
trajectory.py(#7234) [9a6465172]Strict typing for
aiida.schedulersmodule (#7136) [396792b21]Run type checking on
engine.processesmodule (#7114) [a547ea026]Strict typing for
aiida.commonmodule (#7085) [289cdd518]Strict typing for
aiida.repositorymodule (#7049) [3999e849d]Type check
storage.psql_dos.orm.querybuilder.mainmodule (#7065) [baefa764b]Pydantic mypy plugin (#7064) [4455a0bd1]
Add typing to
aiida.tools.graphmodule (#7036) [13cb318f1]Add strict typing to
aiida.tools.querymodule (#7041) [34dada2ca]Add typing to
aiida/common/{utils,extendeddicts}.py(#6706) [3bae2724b]Run typing on
orm/{comments,computers}.pyandorm/implementation/storage_backend.py(#6704) [f6cdb91d8]Mark
orm.entities.Entity/Commentclasses as generic in ruff config (#7019) [ebc9d4ab9]Add more stub packages for type checking 3rd party libs (#7021) [51f0ed718]
More typing for
cmdline.paramsmodule (#7009) [0d5c4d4df]Add typing to
cmdline/commandsmodule (#6987) [594cf563c]Typecheck
aiida.cmdline.utilsmodule (#6954) [76f776a49]Add typing to
aiida.cmdline.paramsmodule (#6952) [cfb7fd153]Run type checking on
multiply_add.py(#6833) [1229ddd38]Bump mypy to 1.16.1 (#6858) [210684420]
Autogenerated code#
Fix script to autogenerate module re-imports and
__all__attributes (#7091) [b3cf7b4c7]Autogenerate
aiida.brokers__init__files, makeRabbitmqBrokerpublic (#7127) [f25fc2bea]Autogenerate
__all__intoolsmodule (#7142) [b720897c8]Autogenerate
__init__.pyre-exports inaiida.transportsmodule (#7137) [4f28b78ba]
CI#
Ignore some new DeprecationWarnings in py3.14 (#7256) [4f96f8888]
Replace
urllib.request.url2pathnamewith local shim for Python 3.14 (#7240) [1607da454]Pin orm field regression tests to only run for py3.14 (#7240) [ff1871441]
Add experimental Python 3.14 support in CI (not yet officially supported; known performance regressions under investigation) (#7240) [e8f39b649]
CI: Upload coverage data as GHA artifacts (#7224) [af9d1f600]
CI: Change test-install schedule from nightly to weekly (#7179) [bc53c9e31]
Refactor bake metadata extraction from shell to JavaScript (#6582) (#7161) [fcf709bc0]
Update coveragepy and use
sys.monitoringinterface (#7042) [1f2cb47cf]CI: Test minimum package versions (#6940) [577d7c92a]
Send Slack notification if
test-install.ymlfails (#6897) [b235b3aab]
Tests#
TrajectoryData: addpbcto existing tests and increase coverage (#7234) [e3987509f]test_data: restrictdata_pluginfixture tocore.*entry points (#7234) [2a3875fa9]Add pytest-instafail;
--instafailto addopts (#7203) [605755867]Add
--tb=shortto default pytest addopts (#7203) [aa6f15e91]Make
test_graph_recurse_spot_highlight_classesmore robust (#7219) [14f63cd35]Avoid unwanted files in repo during tests (#6977) [00003e3b1]
Remove unused code of json-contains tests (#7204) [7536ec298]
Fix test isolation in manager fixture by resetting
_profile_storage(#7187) [6ee838a4f]Overwrite and sealed unit tests for
Group.dump(#7160) [8755758ec]Drop flaky
test_json_contains.pybenchmarks (#7047) [cd11f08b6]Better coverage for subprocesses (#7070) [ce11608a5]
Fix flaky test (#7055) [a843052ac]
Tests for
orm/utils/node.py+ remove dead code (#6983) [ebc49134c]Add more pytest fixture tests (#6882) [6afd3f53d]
Cleanup (almost) all warnings in the test suite (#6967) [0eb794e1d]
Cleanup verdi tests (#6951) [f99571350]
Cleanup warnings in tests (#6911) [cb5348e04]
Remove
click.Editor.edit_filemonkeypatch (#6939) [b4e1c8b83]
Misc#
Add
AI_POLICY.md(#7229) [a5e78ca96]Run
pyparsing.tools.cvt_pyparsing_pep8_names(#7264) [21f48a4f1]Do not autoformat
uv.lock(#7274) [1d2366df5]Drop api-auto-docs for now (#7056) [0d002ad9f]
Add dev dependency group (#7040) [cf690e4e9]
Add check-added-large-files pre-commit hook (#7038) [ae65e2d45]
Add
.git-blame-ignore-revsfile (#7029) [d09c92884]Remove
flynthook from pre-commit (#7022) [090390a15]Remove
cisection in.pre-commit-config.yaml(#6985) [b8df58dd2]
v2.7.3 - 2026-01-23#
Fixes#
Transport#
Improve path escaping in OpenSSH transport for special characters (#7171) [4c89d9624]
Fix a critical race condition in
TransportQueue(#7144) [b02a233af]Add semaphore control to
AsyncSshTransport::exec_command_wait_asyncto prevent SSH connection overwhelm (#7144) [985d5c809]
Engine#
Fix: Avoid mutating
_polling_jobsinside slurm scheduler (#7155) [9f03a8e4c]
Devops#
Switch from token-based to OIDC trusted publishing [c4e320816]
v2.7.2 - 2025-12-10#
This patch release comes with a number of important bug fixes to the CLI, storage, archive, and transport modules. Most notably, SQLAlchemy operational errors (affecting archive operations and the QB) and various race conditions (affecting mainly the transport plugins) have been resolved. We strongly recommend upgrading from prior 2.7.x versions.
Fixes#
CLI#
CLI: Fix
verdi code listfor codes without computer (#7081) [27b52da2f]CLI: Fix wrongly formatted
verdi code showoutput (#7073) [32742c0e0]CLI: Additional logging during
dumpoperations (#7046) [fc00f5dec]CLI: Drop non-unique
-noption for archive import (#7044) [3a7d440e9]CLI: Drop non-unique
-poption fordumpendpoints (#7043) [019172c2d]CLI: Fix output of
verdi node showin dump README files (#6971) [5e4da5b4d]
Storage#
Fix RST code snippets in QB
smarter_indocstring (#7146) [cc0bb483d]Fix QB
INclause to avoid parameter limits (#6998) [8d562b44e]Fix PSQL OperationalError on archive creation by batching (#6993) [cfbbd687f]
Fix OperationalError for
add_nodeswith PSQL backend (#6991) [9bccdc816]
Archive#
Fix
UnboundLocalErrorinZipfileBackendRepository(#7129) [166d06c25]Fix stuck progress bar on “Add nodes” of archive import (#7118) [4e54cd476]
Don’t break on
sqlite_zipprofile deletion despite original aiida archive file missing (#6929) [274ce6717]
Engine#
Adding ./ in front of a portable code binary (#7080) [9256f2fdd]
Fix race condition in
JobsList(#7061) [e79f0a44c]
Transport#
async_ssh: Use async semaphore instead of manual locking (#7018) [ad5cafdb1]
Configuration#
Fix: use platform-specific separator for AIIDA_PATH in config directory detection (#6935) [32d515a6b]
Devops#
CI: Fix install-with-conda job (#7103) [0dcd10ac4]
Fix PyPI index url (#6923) [a8230b45c]
v2.7.1 - 2025-07-16#
Fixes#
Extend check of stash options when they are specified as empty dict (#6942) [cbbdedb138c76c5d1114688da6d044641ad86d58]
Docs#
Docs: Remove note on unsupported
containsandget_creation_statistics(#6930) [a392f5c5cc2babddb2c5152989db7009bb53b87d]
v2.7.0 - 2025-06-24#
Asynchronous SSH connection (#6626)#
Previously, when data transfer with a remote computer was active, the responsible transport plugins blocked further program execution until the communication was completed.
This long-standing limitation presented a potential opportunity for performance improvements.
With the introduction of the new asynchronous SSH transport plugin (core.ssh_async), multiple communications with a remote machine can now happen concurrently.
As an added benefit, for the configuration of a Computer with the core.ssh_async transport plugin, it is not necessary anymore to manually provide all SSH connection details during the execution of verdi computer core.ssh_async configure.
Instead, one only needs to provide the hostname as it is given in the ~/.ssh/config file, and the transport plugin then uses OpenSSH of the OS to automatically configure the Computer, using the system configuration.
🚀 When core.ssh_async outperforms core.ssh#
core.ssh_async offers significant performance gains in scenarios where the worker is blocked by heavy transfer tasks, such as uploading, downloading, or copying large files.
Example: Submitting two WorkGraphs/WorkChains with the following logic:
WorkGraph 1 – Heavy I/O operations
Uploads a 10 MB file
Remotely copies a 1 GB file
Retrieves a 1 GB file
WorkGraph 2 – Lightweight task
Executes a simple shell command:
touch file
Measured time until the second WorkGraph is processed (single worker):
core.ssh_async: Only 4 seconds! 🚀🚀🚀🚀 A dramatic improvement!core.ssh: 108 seconds (the second task waits for the first to finish)
⚖️ When core.ssh_async and core.ssh perform similarly#
For mixed workloads involving numerous uploads and downloads—a common real-world use case—the performance gains depend on the specific conditions.
Large file Transfers (~1 GB):#
core.ssh_async typically outperforms due to concurrent upload and download streams.
In favorable network conditions, this can nearly double the effective bandwidth.
Example: On a network with a baseline of 11.8 MB/s, the asynchronous mode approached nearly twice that speed under light load (see graph in PR #6626).
Test case:
Two WorkGraphs: one uploads 1 GB, the other retrieves 1 GB using RemoteData.
core.ssh_async: 120 secondscore.ssh: 204 seconds
Small file transfers (many small files):#
Here, the overhead of managing asynchronous operations can outweigh the benefits.
Test case:
25 WorkGraphs, each transferring several ~1 MB files.
core.ssh_async: 105 secondscore.ssh: 65 seconds
To conclude, the choice of which transport plugin is the best bet for your use case depends on your specific application:
use core.ssh_async for workloads involving large file transfers or when you need to prevent I/O operations from blocking other tasks, but stick with core.ssh for scenarios dominated by many small file transfers where the asynchronous overhead may reduce performance.
Extended dumping support for profiles and groups (#6723)#
In version v2.6.0, AiiDA introduced the ability to dump processes from the database into a human-readable, structured folder format.
Building on this feature, support has now been extended to allow dumping of entire groups and profiles, enabling users to retrieve AiiDA data more easily.
This enhancement is part of our broader roadmap to improve AiiDA’s usability—especially for new users—who may find it challenging to construct the appropriate queries to extract data from the database manually.
The functionality is accessible via the verdi CLI:
verdi profile dump --all # This dumps the whole current profile
verdi profile dump --groups <PK> # This dumps one selected group as part of the profile dumping operation
verdi group dump <PK> # This dumps only the selected group, disregarding other profile data
Since dumping an entire profile can be a resource- and I/O-intensive operation (for large profiles), significant effort has been made to provide flexible options for fine-tuning which nodes are included in the dump.
To avoid initiating dumping operations on large profiles, if no filters (e.g., groups, codes, computers, node mtime, etc.) are set, by default, no data is being dumped.
If all data of a profile should be dumped, this must be actively requested using the --all option, or one must explicitly select the subset of data to be included in the dump via the provided filter options.
Below is a snippet from the command’s help output:
Usage: verdi profile dump [OPTIONS] [--]
Dump all data in an AiiDA profiles storage to disk.
Options:
-p, --path PATH Base path for dump operations that write to
disk.
-n, --dry-run Perform a dry run.
-o, --overwrite Overwrite file/directory when writing to
disk.
-a, --all Include all entries, disregarding all other
filter options and flags.
-X, --codes CODE... One or multiple codes identified by their
ID, UUID or label.
-Y, --computers COMPUTER... One or multiple computers identified by
their ID, UUID or label.
-G, --groups GROUP... One or multiple groups identified by their
ID, UUID or label.
-u, --user USER Email address of the user.
-p, --past-days PAST_DAYS Only include entries created in the last
PAST_DAYS number of days.
--start-date TEXT Start date for node mtime range selection
for node collection dumping.
--end-date TEXT End date for node mtime range selection for
node collection dumping.
--filter-by-last-dump-time / --no-filter-by-last-dump-time
Only select nodes whose mtime is after the
last dump time. [default: filter-by-last-
dump-time]
--only-top-level-calcs / --no-only-top-level-calcs
Dump calculations in their own dedicated
directories, not just as part of the dumped
workflow. [default: only-top-level-calcs]
--only-top-level-workflows / --no-only-top-level-workflows
If a top-level workflow calls sub-workflows,
create a designated directory only for the
top-level workflow. [default: only-top-
level-workflows]
--delete-missing / --no-delete-missing
If a previously dumped group or node is
deleted from the DB, delete the
corresponding dump directory. [default:
delete-missing]
--symlink-calcs / --no-symlink-calcs
Symlink workflow sub-calculations to their
own dedicated directories. [default: no-
symlink-calcs]
--organize-by-groups / --no-organize-by-groups
If the collection of nodes to be dumped is
organized in groups, reproduce its
hierarchy. [default: organize-by-groups]
--also-ungrouped / --no-also-ungrouped
Dump also data of nodes that are not part of
any group. [default: no-also-ungrouped]
--relabel-groups / --no-relabel-groups
Update directories and log entries for the
dumping if groups have been relabeled since
the last dump. [default: relabel-groups]
--include-inputs / --exclude-inputs
Include linked input nodes of
`CalculationNode`(s). [default: include-
inputs]
--include-outputs / --exclude-outputs
Include linked output nodes of
`CalculationNode`(s). [default: exclude-
outputs]
--include-attributes / --exclude-attributes
Include attributes in the
`aiida_node_metadata.yaml` written for every
`ProcessNode`. [default: include-
attributes]
--include-extras / --exclude-extras
Include extras in the
`aiida_node_metadata.yaml` written for every
`ProcessNode`. [default: exclude-extras]
-f, --flat Dump files in a flat directory for every
step of a workflow.
--dump-unsealed / --no-dump-unsealed
Also allow the dumping of unsealed process
nodes. [default: no-dump-unsealed]
-v, --verbosity [notset|debug|info|report|warning|error|critical]
Set the verbosity of the output.
-h, --help Show this message and exit.
Another key feature is the incremental nature of the command, which ensures that the dumping process synchronizes the output folder with the internal state of AiiDA’s DB by gradually adding or removing files on successive executions of the command. This allows for efficient updates without having to overwrite everything, and is in contrast to AiiDA archive creation, which is a one-shot process. The behavior can further be adjusted using:
--dry-run(-n): to simulate the dump without writing any files.--overwrite(-o): to fully overwrite the target directory if it already exists.
Finally, the command provides various options to customize the output folder structure, for instance, to reflect the group hierarchy of AiiDA’s internal DB state, symlink duplicate calculations (e.g., which are contained in multiple groups), create dedicated directories for sub-workflows and calculations of top-level workflows, and more.
These enhancements aim to make data export from AiiDA more robust, customizable, and user-friendly.
Stashing (#6746, #6772)#
With this feature, you can bundle your data to a (compressed) tar archive during stashing by specifying one of the stash_mode options "tar", "tar.bz2", "tar.gz", or "tar.xz".
When specifying the stashing operation during the setup of your calculation, compression can be configured as follows:
from aiida.plugins import CalculationFactory
from aiida.engine import run
from aiida.common import StashMode
from aiida.orm import load_computer
inputs = {
...,
'metadata': {
'computer': load_computer(label="localhost"),
'options': {
'resources': {'num_machines': 1},
'stash': {
'stash_mode': StashMode.COMPRESS_TARGZ.value,
'target_base': '/scratch/',
'source_list': ['heavy_data.xyz'], # ['*'] to stash everything
},
},
},
}
# If you use a builder, use
# builder.metadata = {'options': {...}, ...}
run(MyCalculation, **inputs)
In addition, it was historically only possible to enable stashing when it was instructed before running a generic CalcJob.
This means that the instruction had to be “attached” to the original CalcJob before its execcution.
However, if a user would realize they need to stash something only after running the calculation, this would not be possible.
With v2.7.0, we introduce the new StashCalculation CalcJob which is able to perform a stashing operation after a calculation has finished—provenance included!
The usage is very similar, and for consistency and user-friendliness, we keep the instructions as part of the metadata.
The only main input is the remote_folder output node (an instance of RemoteData) of the calculation source node to be stashed, for example:
from aiida.plugins import CalculationFactory
from aiida.engine import run
from aiida.common import StashMode
from aiida.orm import load_node
StashCalculation = CalculationFactory('core.stash')
calcjob_node = load_node(<CALCJOB_PK>)
inputs = {
'metadata': {
'computer': calcjob_node.computer,
'options': {
'resources': {'num_machines': 1},
'stash': {
'stash_mode': StashMode.COPY.value,
'target_base': '/scratch/',
'source_list': ['heavy_data.xyz'],
},
},
},
'source_node': calcjob_node.outputs.remote_folder,
}
result = run(StashCalculation, **inputs)
Forcefully killing processes (#6793)#
Prior to version v2.7.0, the verdi process kill command could hang if a connection to the remote computer could not be established.
A new --force option has been introduced to terminate a process without waiting for a response from the remote machine.
Note: Using --force may result in orphaned jobs on the remote system if the remote job cancellation fails.
verdi process kill --force <PROCESS_ID>
We also now cancel the old killing action if it is resend by the user.
This allows the user to adapt the parameters for the exponential backoff mechanism (EBM) applied by AiiDA in the verdi config and then resend the kill command with the new parameters.
verdi process kill --timeout 5 <PROCESS_ID>
verdi config set transport.task_maximum_attempts 1
verdi config set transport.task_retry_initial_interval 5
verdi daemon restart
verdi process kill <PROCESS_ID>
Furthermore, the timeout and wait options were not behaving correctly, so they are now fixed and both merged into the single timeout option.
By passing --timeout 0 it replicates the --no-wait functionality, meaning the command does not block until the action has finished, and by passing --timeout inf (default option, replicating --wait without a timeout), the command blocks until a response.
For more information see issue #6524.
Serialization of ORM nodes (#6723)#
AiiDA’s Python API provides an object relational mapper (ORM) that abstracts the various entities that can be stored inside the provenance graph (via the SQL database) and the relationships between them. In most use cases, users use this ORM directly in Python to construct new instances of entities and retrieve existing ones, in order to get access to their data and manipulate it. A shortcoming of the current ORM is that it is not possible to programmatically introspect the schema of each entity: that is to say, what data each entity stores. This makes it difficult for external applications to provide interfaces to create and or retrieve entity instances. It also makes it difficult to take the data outside of the Python environment since the data would have to be serialized. However, without a well-defined schema, doing this without an ad-hoc solution is practically impossible.
With the implementation of a pydantic Model for each Entity we now allow external applications to programmatically determine the schema of all AiiDA ORM entities and automatically (de)serialize entity instances to and from other data formats, e.g., JSON.
An example how this is done for an AiiDA integer node:
node = Int(5) # Can be any ORM node
serialized_node = node.serialize()
print(serialized_node)
# Out: {'pk': None, 'uuid': '485c2ec8-441d-484d-b7d9-374a3cdd98ae', 'node_type': 'data.core.int.Int.', 'process_type': None, 'repository_metadata': {}, 'ctime': datetime.datetime(2025, 5, 2, 10, 20, 41, 275443, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')), 'mtime': None, 'label': '', 'description': '', 'attributes': {'value': 5}, 'extras': {}, 'computer': None, 'user': 1, 'repository_content': {}, 'source': None, 'value': 5}
uuid: 77e9c19a-5ecb-40cf-8238-ea5c55fbb83f (unstored) value: 5
node_deserialized = Int.from_serialized(**serialized_node)
print(node_deserialized)
# Out: uuid: 77e9c19a-5ecb-40cf-8238-ea5c55fbb83f (unstored) value: 5
For an extensive overview of the implications see AEP 010.
Miscellaneous#
aiida-coreis now compatible with Python 3.13 #6600OpenSSH backend for transport
core.ssh_asyncfor multiplexing #6795Improved Windows support #6715
RemoteDataextended by member functionget_size_on_disk#6584SinglefileDataextended by constructorfrom_bytes#6653Allow zero memory specification for SLURM #6605
Add filters to
verdi group delete#6556verdi storage maintainshows a progress bar #6562New transport endpoints
compress&extract#6743Implementation of missing SQLite endpoints (en route to full feature parity between PostgreSQL and SQLite):
Full list of changes for users#
Features#
CLI: Accept mulitple node identifiers in
verdi node graph generate(#6443) [6d2edc919]CLI: Add default for
output_filein computer and code export commands (#6486) [9355a9878]CLI: Validate storage in
verdi storage version(#6551) [ad1a431f3]CLI: Add filters to verdi group delete. (#6556) [72a6b183b]
CLI: verdi storage maintain: show a progress bar (#6562) [c7c289d38]
implement has_key filter for SQLite backend [779cc29d8]
ORM: Add
from_bytesclassmethodtoorm.SinglefileData(#6653) [0f0b88a39]ORM: Add
get_size_on_diskmethod toRemoteData(#6584) [02cbe0ceb]QB: Re-introduction of
containsFilter Operator for SQLite (#6619) [aa0aa262a]Transport:
AsyncTransportplugin (#6626) [eba6954bf]Add support for running direct jobs on bash environment on Windows [ce9dcf421]
Transport: featcompress&extractmethods (#6743) [f4c55f5f7]CLI: add option--clean-workdirtoverdi node delete(#6756) [c53592850]RemoteStashCompressedDatanew data class, and it’s deployment toexecmanager.pyto support compressed file formats while stashing. [ae49af6c3][QueryBuilder] Implement
get_creation_statisticsfor SQLite backend (#6763) [83454c713]Support for Python 3.13 (#6600) [eb34b0606]
StashCalculation: a newCalcJobplugin (#6772) [bc253236d]ORM: Use pydantic to specify a schema for each ORM entity (#6255) [958bfd05c]
Add force-kill option when killing a process (#6793) [b6d0fe50d]
Align the yes/no prompt in
verdi computer deletewith other prompts [71fc14f3c2a501ff8d704d20df76a297edc8e8bc]Profile data dumping (#6723) [88df72a46073359bd4bdaa03cb5f4c5a92aa67af]
Transport: Add OpenSSH as backend option toAsyncSshTransport(#6795) [c7fdf1cfaf50b555698ef039d55b7f295a71644a]
Fixes#
CLI: Catch
NotImplementedErrorinverdi calcjob gotocomputer(#6525) [120c8ac6d]Scheduler: Allow a memory specification of zero for the SLURM plugin (#6605) [0fa958285]
QueryBuilder: Fix type bugs for PostgreSQL backend (#6658) [53be73730]Fix verdi devel check-undesired-imports when tui extra is installed (#6693) [8039ad914]
Transport: Bug fix inrenamemethod (#6735) [f56fcc31c]Cover tests that may randomly fail because DB racing in xdist test (#6713) [4d374f465]
‘Storage’:
sqlite_zipadd a filter totar.extractallmethod to be compatible with python 3.12 (#6770) [b95fd2189]Post release: update version number after v2.6.3 release (#6797) [0b2222e2b]
👌 Align behavior of
puttreemethod for nested folders [834b2942e]🐛 Fix
local_copy_listbehavior for nested target folder [9fe8d5090]Fix the pydantic model for
RemoteData(#6845) [936185b7f]Update/add models for
RemoteDataandRemoteStashCompressedData(#6844) [2fd4b8931d4abd7799f6c17aec21612a7f85d1b3]StashCalculation: throw a warning if the computer node mismatches with the one of source_node (#6862) [582bd5322d1d147049eb34f54b868517c19cf4f6]
Sending multiple
process_killactions reschedules the cancelation of scheduler job (#6870) [e768b70383ee605feeafd05862a17b8481447880]Include usage of
filter_sizefor importing logs, user, computer (#6889) [ee87c790c998e06a9ce3b7f2f7a49be433bc49c0]Rename
--force-killoption to--forcein kill action (#6908) [5167e2cbc93dfe1d54f8fa6dd56a53248feb21ae]Merge
waitandtimeoutto one CLI option forverdi process {kill|play|pause}(#6902) [ec9d53e9cbb270ef45df1d1ef74bddaa4f94c029]Fix wrong config folder setup in
aiida_instancefixture [a4edcf2a2099186b3eec6833a48ba1ded7afced7]Transport: bug fix on glob (#6917) [2d8dd7a1c4821c3a01589195c5ed0abac79099b0]
Documentation#
Docs: Add overview of common
coreplugins (#6654) [baf8d7c3e]Docs: add google-site-verification meta tag (#6792) [660fec70e]
Docs: Enhancements to Installation, Introduction, and Tutorial Sections (#6806) [ee1cc9fb8]
Docs: Fix the logic in FizzBuzz WorkChain example (#6812) [cfd2052a4]
Doc: Add
StashCalculationexplanation to RTD (#6861) [85a84fc73c16151ba5320c7a9c7dfafc8c7572ab]Doc: Update the RTD regarding
verdi process {kill|pause|play}(#6909) [d79137d2e730e479a9bcf1453cd19d7bf31f479b]
Full list of changes for developers#
Source code#
Add the
SshAutoTransporttransport plugin (#6154) [71422eb87]Dependencies: Update requirements for
kiwipyandplumpy[d86017f42]Manager: CatchTimeoutErrorwhen closing communicator [e91371573]SqliteDosStorage: Make the migrator compatible with SQLite (#6429) [6196dcd3b]Dependencies: Update requirement to
psycopg~=3.0(#6362) [cba6e7c75]Scheduler: Refactor interface to make it more generic (#6043) [954cbdd3e]Post release: add the
.post0qualifier to version attribute [16b8fe4a0]Post release: update version number and CHANGELOG after v2.6.2 release [fb3686271]
Dependencies: Update requirement
paramiko~=3.0(#6559) [c52ec6758]Refactor: Add the
_prepare_yamlmethod toAbstractCode(#6565) [98ffc331d]Dependencies: version check on
sqliteC-language (#6567) [d0c9572c8]Add
verdi devel launch-multiply-add[b7c82867b]Add
aiida_profile_cleantotest_devel.py[2ed19dcd8]Transport&Engine: factor outgetcwd()&chdir()for compatibility with upcoming async transport (#6594) [6f5c35ed1]Changes required make it possible to run with pytest-xdist (#6631) [1c5f10968]
Update changelog for release v2.6.3 (#6637) [54c4a0d06]
Typing: mypy fix for
orm.Listthepopandindexmethods (#6635) [36eab7797]Use only one global var for marking config folder tree (#6610) [9baf3ca96]
Make
load_profileand methods in aiida.init importable from aiida module (#6609) [ec52f4ef3]Adapt message arguments passing to process controller (#6668) [80c1741ca]
Disable
apparent-sizeinducommand ofget_size_on_disk(#6702) [2da3f9600]Engine: Async run (#6708) [d71ef9810]
ORM: Use
skip_ormas the default implementation forSqlaGroup.add_nodesandSqlaGroup.remove_nodes(#6720) [d2fbf214a]A new common funcion:
assert_neverto assert certain part of the code is never reached. [d7c382a24]Replace usage of aiida.common.utils.strip_prefix with built-in removeprefix (#6758) [290045b17]
Revert “Add the
SshAutoTransporttransport plugin (#6154)” (#6852) [cf2614fa2]Transport: Three bug fixed in
test_execmanagerandAsyncSshTransport(#6855) [474e0fabcb4e2331253e10c1fbcd8ba6a323f6d2]Update package metadata with suppport of py3.13 (#6863) [e257b3cb2f0e7a088d2ac4ebfb463492beea321d]
Enable
defer_buildforEntity.ModelandSealable.Model(#6867) [cf07e9f9db63a3e484b9df99b70510bee7b17ff7]Deprecate in
verdi quicksetupthe--db-engineoption (#6906) [8dd094873cefcf0fc342edc676a7689a2300d080]Fix typing errors in
src/aiida/manage/testsmodule (#6903) [5a9c9e8c0e899c7b2027cf15178eb0fdecd6ae2e]Rename
machine_or_hosttohostand simplify prompts (#6914) [bf34c953326123f011585ead16a635e761943436]
Tests#
Tests: Remove test for
make_awareusing fixed date [9fe7672f3]Devops: Change tempfile to pytest’s tmp_path [309352f8b]
Devops: Determine command directory dynamically with
which[d3e9333f5]Tests: add –db-backend pytest option (#6625) [a863d1e88]
Test refactoring: use tmp path fixture to mock remote and local for transport plugins (#6627) [197c666d3]
Set pytest timeout to 60s for every test (#6674) [17ab39519]
Timeout for single pytest to 240s (#6692) [8ae66fb66]
Clean profile in orm/test_codes.py::test_input_code [3f5e2c132]
Only emit path to daemon log path in pytest tmp folder (#6698) [7a460c0fd]
Store default profile in
aiida_profile_factory(#6893) [43176cba3e39f4d04ef3529cd50d3e368e1d78aa]Separate testing of legacy pytest fixtures from unittests [229c35affd72d9fa5835b865f2e6209d250f01ba]
Merge pull request #6904 fixing legacy pytest-fixture [48991abbbc8456552cd7389adb54b9efdef17564]
Devops#
Devops: Update pre-commit dependencies (#6504) [14bb05f4b]
Docker: Fix release tag in publish workflow (#6520) [c740b99f2]
Devops: Mark
test_leak_ssh_calcjobas nightly (#6521) [a5da4eda1]Devops: Add type hints to
aiida.orm.utils.remote(#6503) [2bdcb7f00]Docker: Make warning test insensitive to deprecation warnings (#6541) [f1be224c4]
CI: Update ignore comment as the way that presumably updated mypy expects (#6566) [655da5acc]
Update the issue template with the Discourse group (#6588) [a7d8dd04e]
Fix broken troubleshooting link in bug report issue template (#6589) [f57591655]
Devops: Add tox environment for pytest with presto mark [e2699118e]
CLI: Dump only
sealedprocess nodes (#6591) [70572380b]CLI: Check user execute in
verdi code testforInstalledCode(#6597) [8350df0cb]Devops: Bump
peter-evans/create-pull-request(#6576) [dd866ce81]Bump mypy version to ~=1.13.0 (#6630) [c93fb4f75]
CI: remove ci-style.yml (#6638) [451375b7c]
Pre-commit: exclude mypy for all tests (#6639) [846c11f8c]
Add helper script for creating patch releases from a list of commits (#6602) [ec8a055a5]
CLI: Handle
Noneprocess states in build_call_graph (#6590) [f74adb94c]Bump ruff version (#6614) [c915a9734]
DevOp: Using xdist to run pytest in parallel (#6620) [090dc1c73]
Bump codecov/codecov-action from 4 to 5 in the gha-dependencies group (#6648) [835d13b73]
Amend type call error after using AiiDAConfigDir (#6646) [dbdc36c63]
CI: Turn off verbose pytest output (#6633) [41a0fd92b]
Bump ruff to v0.8.0 (#6634) [333992be5]
CI: Utilize uv lockfile for reproducible test environments (#6640) [04cc34488]
CI: Test with RabbitMQ 4.0.x (#6649) [a1872b1e7]
CI: quick fix on failed benchmark CI using uv run pytest (#6652) [37e5431e6]
Typing-extensions as dependency for py3.9 (#6664) [c532b34a1]
Update uv.lock + CI tweaks + fix pymatgen issue (#6676) [10930266f]
Devops: Update pre-commit dependencies (#6683) [0eb77b8ae]
CI: Add matrix testing for both SQLite and PostgreSQL database backends [a3ccec96d]
Fix redundant “tests/” in test-install.yml (#6695) [5e8bbe1ae]
CI: Drop workaround to pass pymatgen related failed tests (#6694) [d17c2931a]
Devops: Add explicit
sphinx.configurationkey to RTD conf (#6700) [8440416a5]Use uv lockfile in readthedocs build (#6685) [15b5caf23]
Run mypy on src/aiida/orm/nodes/caching.py (#6703) [199a0276c]
CI: Set runners to ubuntu-24.04 (#6696) [b43261143]
CI: fix failed test_containerized.py integration test for containerized code (#6707) [738705611]
Nightly tests adjust run test_memory_leak in test move high_link to nightly (#6701) [b3569508c]
Set minimum uv version in pyproject.toml (#6714) [c88fc05ba]
Use uv-pre-commit to validate lockfile (#6699) [208d6a967]
Use Github arm runners for docker arm build tests (#6717) [f43a51010]
CI: Ignore mamba Warning Message on stderr to Prevent JSON Parsing Errors (#6748) [8c5c709be]
Fix docker arm build (#6759) [c4dfadabf]
CI:RTDtail errors and warnings (#6776) [bb5f93daa]Bump the gha-dependencies group with 2 updates (#6778) [48bd2acbc]
Revert “Bump the gha-dependencies group with 2 updates (#6778)” (#6838) [61be15d54]
Add Python 3.13 to
testsjob intest-installworkflow and for verdi and presto jobs inci-codeworkflow (#6843) [6cb2c712d]Add back pre-commit job for mypy type-checking (#6827) [6eb17a7d0]
RTD: add a developer comment in
.readthedocs.yml(#6864) [5807a390927a5892cd349bf8e3f3da5ef233eca5]Devops: Skip upload step in benchmarks if not pushed to main (#6895) [6b5578602b0f00b22ac457c070c764168ac8cbd4]
Devops: Upgrade
uv>=v0.7.6andastral-sh/setup-uv@v6(#6887) [5fbfe12f2a1805c0c69ee9c77f1a0d29106b1aad]Upgrade uv lockfile (#6886) [edb8c7e88fde03510e05fb9cc48cc58aa7112dc5]
v2.6.4 - 2025-05-22#
Fixes#
Dependencies: Pin click to
~=8.1.0(#6888) [e1d55fa]
v2.6.3 - 2024-11-06#
Fixes#
Devops#
Docker: Replace sleep with
s6-notifyoncheck(#6475) [9579378b]Fix failed docker CI using more reasoning grep regex to parse python version (#6581) [332a4a91]
DevOps: Fix json query in reading the docker names to filter out fields not starting with aiida (#6573) [e1467edc]
v2.6.2 - 2024-08-07#
Fixes#
LocalTransport: Fix typo forignore_nonexistinginput(#6471) [ecda558d0]CLI:
verdi computer testreport correct failed tests (#6536) [9c3f2bb58]CLI: Fix
verdi storage migratefor profile without broker (#6550) [389fc487d]CLI: Fix bug
verdi prestowhen tab-completing without config (#6535) [efcf75e40]Engine: Change signature of
set_process_state_change_timestamp[923fd9f6e]Engine: Ensure node is sealed when process excepts (#6549) [e3ed9a2f3]
Engine: Fix bug in upload calculation for
PortableCodewith SSH (#6519) [740ae2040]Engine: Ignore failing process state change for
core.sqlite_dos[fb4f9815f]
Dependencies#
Pin requirement to minor version
sphinx~=7.2.0(#6527) [25cb73188]
Documentation#
Add
PluggableSchemaValidatorto nitpick exceptions (#6515) [0ce3c0025]Add
robots.txtto only allow indexing oflatestandstable(#6517) [a492e3492]Add succint overview of limitations of no-services profile [d7ca5657b]
Correct signature of
get_daemon_clientexample snippet (#6554) [92d391658]Fix typo in pytest plugins codeblock (#6513) [eb23688fe]
Move limitations warning to top of quick install [493e529a7]
Remove note in installation guide regarding Python requirement [9aa2044e4]
Update
redirects.txtfor installation pages (#6509) [508a9fb2a]
Devops#
Fix pymatgen import causing mypy to fail (#6540) [813374fe1]
v2.6.1 - 2024-07-01#
Fixes#
Fixtures: Make
pgtesttruly an optional dependency [9fe8fd2e0]
v2.6.0 - 2024-07-01#
This minor release comes with a number of features that are focused on user friendliness and ease-of-use of the CLI and the API. The caching mechanism has received a number of improvements guaranteeing even greater savings of computational time. For existing calculations to be valid cache sources in the new version, their hash has to be regenerated (see Improvements and changes to caching for details).
Making RabbitMQ optional#
The RabbitMQ message broker service is now optional for running AiiDA. The requirement was added in AiiDA v1.0 when the engine was completely overhauled. Although it significantly improved the scaling and responsiveness, it also made it more difficult to start using AiiDA. As of v2.6, profiles can now be configured without RabbitMQ, at the cost that the daemon can not be used and all processes have to be run locally.
Simplifying profile setup#
With the removal of RabbitMQ as a hard requirement, combined with storage plugins that replace PostgreSQL with the serverless SQLite that were introduced in v2.5, it is now possible to setup a profile that requires no services.
A new command is introduced, verdi presto, that automatically creates a profile with sensible defaults.
This now in principle makes it possible to run just the two following commands on any operating system:
pip install aiida-core
verdi presto
and get a working AiiDA installation that is ready to go.
As a bonus, it also configures the localhost as a Computer.
See the documentation for more details.
Improved test fixtures without services#
Up till now, running tests would always require a fully functional profile, which meant that PostgreSQL and RabbitMQ had to be available.
As described in the section above, it is now possible to set up a profile without these services.
This new feature is leveraged to provide a set of pytest fixtures that provide a test profile that can be used essentially on any system that just has AiiDA installed.
To start writing tests, simply create a conftest.py and import the fixtures with:
pytest_plugins = 'aiida.tools.pytest_fixtures'
The new fixtures include the aiida_profile fixture which is session-scoped and automatically loaded.
The fixture creates a temporary test profile at the start of the test session and automatically deletes it when the session ends.
For more information and an overview of all available fixtures, please refer to the documentation on pytest fixtures.
Improvements and changes to caching#
A number of fixes and changes to the caching mechanism were introduced (see the changes subsection of the full list of changes for a more detailed overview).
For existing calculations to be valid cache sources in the new version, their hash has to be regenerated by running verdi node rehash.
Note that this can take a while for large databases.
Since its introduction, the cache would essentially be reset each time AiiDA or any of the plugin packages would be updated, since the version of these packages were included in the calculation of the node hashes. This was originally done out of precaution to err on the safe-side and limit the possibility of false-positives in cache hits. However, this strategy has turned out to be unnecessarily cautious and severely limited the effectiveness of caching.
The package version information is no longer included in the hash and therefore no longer impacts the caching.
This change does now make it possible for false positives if the implementation of a CalcJob or Parser plugin changes signficantly.
Therefore, a mechanism is introduced to give control to these plugins to effectively reset the cache of existing nodes.
Please refer to the documentation on controlling caching for more details.
Programmatic syntax for query builder filters and projections#
In the QueryBuilder, fields to filter on or project always had to be provided with strings:
QueryBuilder().append(Node, filters={'label': 'some-label'}, project=['id', 'ctime'])
and it is not always trivial to know what fields exist that can be filtered on and can be projected.
In addition, there was a discrepancy for some fields, most notably the pk property, which had to be converted to id in the query builder syntax.
These limitations have been solved as each class in AiiDA’s ORM now defines the fields property, which allows to discover these fields programmatically.
The example above would convert to:
QueryBuilder().append(Node, filters={Node.fields.label: 'some-label'}, project=[Node.fields.pk, Node.fields.ctime])
The fields property provides tab-completion allowing easy discovery of available fields for an ORM class in IDEs and interactive shells.
The fields also allow to express logical conditions programmatically and more.
For more details, please refer to the documentation on programmatic field syntax.
Data plugins can also define custom fields, adding on top of the fields inherited from their base class(es). The documentation on data plugin fields provides more information, but the API is currently in beta and guaranteed to be changed in an upcoming version. It is therefore recommended for plugin developers to hold off making use of this new API.
Automated profile storage backups#
A generic mechanism has been implemented to allow easily backing up the data of a profile.
The command verdi storage backup automatically maintains a directory structure of previous backups allowing efficient incremental backups.
Note that the exact details of the backup mechanism is dependent on the storage plugin that is used by the profile and not all storage plugins necessarily implement it.
For now the storage plugins core.psql_dos, and core.sqlite_dos implement the functionality.
For more information, please refer to the documentation.
Please refer to this section of the documentation for instructions to restore from a backup.
Full list of changes#
Features#
CalcJob: Allow to define order of copying of input files [6898ff4d8]SqliteDosStorage: Implement the backup functionality [18e447c77]SshTransport: ReturnFileNotFoundErrorif destination parent does not exist [d86bb38bf]Add improved more configurable versions of
pytestfixtures [e3a60460e]Add the
orm.Entity.fieldsinterface forQueryBuilder[4b9abe2bd]CLI:
verdi computer testmake unexpected output check optional [589a3b2c0]CLI:
verdi node graph generateroot nodes as arguments [06f8f4cfb]CLI: Add
--most-recent-nodeoption toverdi process watch[72692fa5c]CLI: Add
--sort/--no-sorttoverdi code export[80c606890]CLI: Add
verdi process dumpand theProcessDumper[6291accf0]CLI: Add RabbitMQ options to
verdi profile setup[f553f805e]CLI: Add the
-M/--most-recent-nodeoption [5aae874aa]CLI: Add the
verdi computer exportcommand [9e3ebf6ea]CLI: Add the
verdi node listcommand [cf091e80f]CLI: Add the
verdi prestocommand [6b6e1520f]CLI: Add the
verdi profile configure-rabbitmqcommand [202a3ece9]CLI: Allow
verdi computer deleteto delete associated nodes [348777571]CLI: Allow multiple root nodes in
verdi node graph generate[f16c432af]Engine: Allow
CalcJobmonitors to return outputs [b7e59a0db]Make
postgres_clusterandconfig_psql_dosfixtures configurable [35d7ca63b]Process: Add the
metadata.disable_cacheinput [4626b11f8]Storage: Add backup mechanism to the interface [bf79f23ee]
Transports: fix overwrite behaviour for
puttree/gettree[a55451703]
Performance#
CLI: Speed up tab-completion by lazily importing
Config[9524cda0b]Improve import time of
aiida.ormandaiida.storage[fb9b6cc3b]ORM: Cache the logger adapter for
ProcessNode[1d104d06b]
Changes#
Caching:
NodeCaching._get_objects_to_hashreturn type todict[c9c7c4bd8]Caching: Add
CACHE_VERSIONattribute toCalcJobandParser[39d0f312d]Caching: Include the node’s class in objects to hash [68ce11161]
Caching: Make
NodeCaching._get_object_to_hashpublic [e33000402]Caching: Remove core and plugin information from hash calculation [4c60bbef8]
Caching: Rename
get_hashtocompute_hash[b544f7cf9]CLI: Always do hard reset in
verdi daemon restart[8ac642410]CLI: Change
--profileto-p/--profile-nameforverdi profile setup[8ea203cd9]CLI: Let
-v/--verbosityonly affectaiidaandverdiloggers [487c6bf04]Engine: Set the
to_aiida_typeas default inport port serializer [2fa7a5305]QueryBuilder: Remove implementation forhas_keyin SQLite storage [24cfbe27e]
Fixes#
BandsData: Use f-strings in_prepare_gnuplot[dba117437]BaseRestartWorkChain: Fix handler overrides used only first iteration [65786a6bd]SlurmScheduler: Make detailed job info fields dynamic [4f9774a68]SqliteDosStorage: Fix exception when importing archive [af0c260bb]StructureData: Fix the pbc constraints ofget_pymatgen_structure[adcce4bcd]Archive: Automatically create nested output directories [212f6163b]
Archive: Respect
filter_sizein query for existing nodes [ef60b66aa]CLI: Ensure deprecation warnings are printed before any prompts [deb293d0e]
CLI: Fix
verdi archive create --dry-runfor empty file repository [cc96c9d04]CLI: Fix
verdi plugin listincorrectly not displaying description [e952d7717]CLI: Fix
verdi process [show|report|status|watch|call-root]no output [a56a1389d]CLI: Fix
verdi process listif no available workers [b44afcb3c]CLI: Fix
verdi quicksetupwhen profiles exist where storage is notcore.psql_dos[6cb91c181]CLI: Fix dry-run resulting in critical error in
verdi archive import[36991c6c8]CLI: Fix logging not showing in
verdi daemon worker[9bd8585bd]CLI: Fix the
ctx.obj.profileattribute not being initialized [8a286f26e]CLI: Hide misleading message for
verdi archive create --test-run[7e42d7aa7]CLI: Improve error message of
PathOrUrlandFileOrUrl[ffc6e4f70]CLI: Only configure logging in
set_log_levelcallback once [66a2dcedd]CLI: Unify help of
verdi processcommands [d91e0a58d]Config: Set existing user as default for read-only storages [e66592509]
Config: Use UUID in
Manager.load_profileto identify profile [b01038bf1]Daemon: Log the worker’s path and Python interpreter [ae2094169]
Docker: Start and stop daemon only when a profile exists [0a5b20023]
Engine: Add positional inputs for
Process.submit[d1131fe94]Engine: Catch
NotImplementedErroringet_process_state_change_timestamp[04926fe20]Engine: Fix paused work chains not showing it in process status [40b22d593]
Fix passwords containing
@not being accepted for Postgres databases [d14c14db2]ORM: Correct field type of
InstalledCodeandPortableCodemodels [0079cc1e4]ORM: Fix
ProcessNode.get_builder_restart[0dee9d8ef]ORM: Fix deprecation warning being shown for new code types [a9155713b]
Runner: Close event loop in
Runner.close()[53cc45837]
Deprecations#
CLI: Deprecate
verdi profile setdefaultand rename toverdi profile set-default[ab48a4f62]CLI: Deprecate accepting
0fordefault_mpiprocs_per_machine[acec0c190]CLI: Deprecate the
deprecated_commanddecorator [4c11c0616]CLI: Remove the deprecated
verdi databasecommand [3dbde9e31]ORM: Undo deprecation of
Code.get_description[1b13014b1]
Dependencies#
Update
tabulate>=0.8.0,<0.10.0[6db2f4060]
Refactoring#
Abstract message broker functionality [69389e038]
Config: Refactor
get_configuration_directory_from_envvar[65739f524]Config: Refactor the
create_profilefunction and method [905e93444]Engine: Refactor handling of
remote_folderandretrievedoutputs [28adacaf8]ORM: Switch to
pydanticfor code schema definition [06189d528]Replace deprecated
IOErrorwithOSError[7f9129fd1]Storage: Move profile locking to the abstract base class [ea5f51bcb]
Documentation#
Add more instructions on how to use docker image [aaf44afcc]
Add the updated cheat sheet [09f9058a7]
Add tips for common problems with conda PostgreSQL setup [cd5313825]
Customize the color scheme through custom style sheet [a6cf7fc7e]
Docs: Clarify
Transport.copyrequiresrecursive=Trueif source is a directory [310ff1db7]Fix example of the
entry_pointsfixture [081fc5547]Fixing several small issues [6a3a59b29]
Minor cheatsheet update for v2.6 release [c3cc169c4]
Reorganize the tutorial content [5bd960efa]
Rework the installation section [0ee0a0c6a]
Standardize usage of
versionaddeddirective [bf5dac848]Update twitter logo [5e4f60d83]
Use uv installer in readthedocs build [be0db3cc4]
Devops#
Add
check-jsonschemapre-commit hook for GHA workflows [14c5bb0f7]Add Dependabot config for maintaining GH actions [0812f4b9e]
Add docker image
aiida-core-devfor development [6d0984109]Add Python 3.12 tox environment [6b0d43960]
Add the
slurmservice to nightly workflow [5460a0414]Add typing to
aiida.common.hashing[ba21ba1d4]Add workflow to build Docker images on PRs from forks [23d2aa5ee]
Address internal deprecation warnings [ceed7d55d]
Allow unit test suite to be ran against SQLite [0dc8bbcb2]
Bump the gha-dependencies group with 4 updates [ccb56286c]
Dependencies: Update the requirements files [61ae1a55b]
Disable code coverage in
test-install.yml[4cecda517]Do not pin the mamba version [82bba1307]
Fix Docker build not defining
REGISTRY[e7953fd4d]Fix publishing to DockerHub using incorrect secret name [9c9ff7986]
Fix Slack notification for nightly tests [082589f45]
Fix the
test-install.ymlworkflow [22ea06362]Fix the Docker builds [3404c0192]
Increase timeout for the
test-installworkflow [e36a3f11f]Move RabbitMQ CI to nightly and update versions [b47a56698]
Refactor the GHA Docker build [e47932ee9]
Remove
verdi tuifrom CLI reference documentation [1b4a19a44]Run Docker workflow only for pushes to origin [b1a714155]
Tests: Convert hierarchy functions into fixtures [a02abc470]
Tests: extend
node_and_calc_infofixture tocore.ssh[9cf28f208]Tests: Remove test classes for transport plugins [b77e51f8c]
Tests: Unskip test in
tests/cmdline/commands/test_archive_import.py[7b7958c7a]Update codecov action [fc2a84d9b]
Update deprecated
whitelist_externalsoption in tox config [8feef5189]Update pre-commit hooks [3dda84ff3]
Update pre-commit requirement
ruff==0.3.5[acd54543d]Update requirements
mypyandpre-commit[04b3260a0]Update requirements to address deprecation warnings [566f681f7]
Use
uvto install package in CI and CD [73a734ae3]Use recursive dependencies for
pre-commitextra [6564e78dd]
v2.5.1 - 2024-01-31#
This is a patch release with a few bug fixes, but mostly devops changes related to the package structure.
Fixes#
CLI: Fix
verdi process repairnot actually repairing [784ad6488]Docker: Allow default profile parameters to be configured through env variables [06ea130df]
Dependencies#
Dependencies: Fix incompatibility with
spglib>=2.3[fa8b9275e]
Devops#
Devops: Move the source directory into
src/[53748d4de]Devops: Remove post release action for uploading pot to transifex [9feda35eb]
Pre-commit: Add
ruffas the new linter and formatter [64c5e6a82]Pre-commit: Update a number of pre-commit hooks [a4ced7a67]
Pre-commit: Add YAML and TOML formatters [c27aa33f3]
Update pre-commit CI configuration [cb95f0c4c]
Update pre-commit dependencies [8dfab0e09]
Dependencies: Pin
mypyto minor versionmypy~=1.7.1[d65fa3d2d]
Documentation#
Streamline and fix typos in
docs/topics/processes/usage.rst[45ba27732]Update process function section on file deduplication [f35d7ae98]
Correct a typo in
docs/source/topics/data_types.rst[6ee278ceb]Fix the ADES paper citation [80117f8f7]
v2.5.0 - 2023-12-20#
This minor release comes with a number of features that are focused on user friendliness of the CLI and the API. It also reduces the import time of modules, which makes the CLI faster to load and so tab-completion should be snappier. The release adds support for Python 3.12 and a great number of bugs are fixed.
Create profiles without a database server#
A new storage backend plugin has been added that uses SQLite instead of PostgreSQL.
This makes it a lot easier to setup across all platforms.
A new profile using this storage backend can be created in a single command:
verdi profile setup core.sqlite_dos -n --profile <PROFILE_NAME> --email <EMAIL>
Although easier to setup compared to the default storage backend that uses PostgreSQL, it is less performant.
This makes this storage ideally suited for use-cases that want to test or demonstrate AiiDA, or to just play around a bit.
The storage is compatible with most of AiiDA’s functionality, except for automated database migrations and some very specific QueryBuilder functionality.
Therefore, for production databases, the default core.psql_dos storage entry point remains the recommended storage.
It is now also possible to create a profile using an export archive:
verdi profile setup core.sqlite_dos -n --profile <PROFILE_NAME> --filepath <ARCHIVE>
where <ARCHIVE> should point to an export archive on disk.
You can now use this profile like any other profile to inspect the data of the export archive.
Note that this profile is read-only, so you will not be able to use it to mutate existing data or add new data to the profile.
See the documentation for more details and a more in-depth example.
Finally, the original storage plugin core.psql_dos, which uses PostgreSQL for the database is also accessible through verdi profile setup core.psql_dos.
Essentially this is the same as the verdi setup command, which is kept for now for backwards compatibility.
See the documentation on storage plugins for more details on the differences between these storage plugins and when to use which.
The verdi profile delete command can now also be used to delete a profile for any of these storage plugins.
You will be prompted whether you also want to delete all the data, or you can specify this with the --delete-data or --keep-data flags.
Changes in process launch functions#
The aiida.engine.submit method now accepts the argument wait.
When set to True, instead of returning the process node straight away, the function will wait for the process to terminate before returning.
By default it is set to False so the current behavior remains unchanged.
from aiida.engine import submit
node = submit(Process, wait=True) # This call will block until process is terminated
assert node.is_terminated
This new feature is mostly useful for interactive demos and tutorials in notebooks.
In these situations, it might be beneficial to use aiida.engine.run because the cell will be blocking until it is finished, indicating to the user that something is processing.
When using submit, the cell returns immediately, but the results are not ready yet and typically the next cell cannot yet be executed.
Instead, the demo should redirect the user to using something like verdi process list to query the status of the process.
However, using run has downsides as well, most notably that the process will be lost if the notebook gets disconnected.
For processes that are expected to run longer, this can be really problematic, and so submit will have to be used regardless.
With the new wait argument, submit provides the best of both worlds.
Although very useful, the introduction of this feature does break any processes that define wait or wait_interval as an input.
Since the inputs to a process are defined as keyword arguments, these inputs would overlap with the arguments to the submit method.
To solve this problem, inputs can now also be passed as a dictionary, e.g., where one would do before:
submit(SomeProcess, x=Int(1), y=Int(2), code=load_code('some-code'))
# or alternatively
inputs = {
'x': Int(1),
'y': Int(2),
'code': load_code('some-code'),
}
submit(SomeProcess, **inputs)
The new syntax allows the following:
inputs = {
'x': Int(1),
'y': Int(2),
'code': load_code('some-code'),
}
submit(SomeProcess, inputs)
Passing inputs as keyword arguments is still supported because sometimes that notation is still more legible than defining an intermediate dictionary. However, if both an input dictionary and keyword arguments are define, an exception is raised.
Improvements for built-in data types#
The XyData and ArrayData data plugins now allow to directly pass the content in the constructor.
This allows defining the complete node in a single line
import numpy as np
from aiida.orm import ArrayData, XyData
xy = XyData(np.array([1, 2]), np.array([3, 4]), x_name='x', x_units='E', y_names='y', y_units='F')
assert all(xy.get_x()[1] == np.array([1, 2]))
array = ArrayData({'a': np.array([1, 2]), 'b': np.array([3, 4])})
assert all(array.get_array('a') == np.array([1, 2]))
It is now also no longer required to specify the name in ArrayData.get_array as long as the node contains just a single array:
import numpy as np
from aiida.orm import ArrayData
array = ArrayData(np.array([1, 2]))
assert all(array.get_array() == np.array([1, 2]))
Repository interface improvements#
As of v2.0.0, the repository interface of the Node class was moved to the Node.base.repository namespace.
This was done to clean up the top-level namespace of the Node class which was getting very crowded, and in most use-cases, a user never needs to directly access these methods.
It is up to the data plugin to provide specific methods to retrieve data that might be stored in the repository.
For example, with the ArrayData, a user should now have to go to ArrayData.base.repository.get_object_content to retrieve an array from the repository, but the class provides ArrayData.get_array as a shortcut.
A few data plugins that ship with aiida-core didn’t respect this guideline, most notably the FolderData and SinglefileData plugins.
This has been corrected in this release: for FolderData, all the repository methods are now once again directly available on the top-level namespace.
The SinglefileData now makes it easier to get the content as bytes.
Before, one had to do:
from aiida.orm import SinglefileData
node = SinglefileData.from_string('some content')
with node.open(mode='rb') as handle:
byte_content = handle.read()
this can now be achieved with:
from aiida.orm import SinglefileData
node = SinglefileData.from_string('some content')
byte_content = node.get_content(mode='rb')
As of v2.0, due to the repository redesign, it was no longer possible to access a file directly by a filepath on disk.
The repository interface only interacts with file-like objects to stream the content.
However, a lot of Python libraries expect filepaths on disk and do not support file-like objects.
This would force an AiiDA user to write the file from the repository to a temporary file on disk, and pass that temporary filepath.
For example, consider the numpy.loadtxt function which requires a filepath, the code would look something like:
import pathlib
import shutil
import tempfile
with tempfile.TemporaryDirectory() as tmp_path:
# Copy the entire content to the temporary folder
dirpath = pathlib.Path(tmp_path)
node.base.repository.copy_tree(dirpath)
# Or copy the content of a file. Should use streaming
# to avoid reading everything into memory
filepath = (dirpath / 'some_file.txt')
with filepath.open('rb') as target:
with node.base.repository.open('rb') as source:
shutil.copyfileobj(source, target)
# Now use `filepath` to library call, e.g.
numpy.loadtxt(filepath)
This burdensome boilerplate has now been made obsolete by the as_path method:
with node.base.repository.as_path() as filepath:
numpy.loadtxt(filepath)
For the FolderData and SinglefileData plugins, the method can be accessed on the top-level namespace of course.
Full list of changes#
Features#
Add the
SqliteDosStoragestorage backend [702f88788]XyData: Allow defining array(s) on construction [f11598dc6]ArrayData: Makenameoptional inget_array[7fbe67cb6]ArrayData: Allow defining array(s) on construction [35e669fe8]FolderData: Expose repository API on top-level namespace [3e1f87373]Repository: Add the
as_pathcontext manager [b0546e8ed]Caching: Add the
strictargument configuration validation [f272e197e]Caching: Try to import an identifier if it is a class path [2c56fc234]
CLI: Add the command
verdi profile setup[351021164]CLI: Add
cachedandcached_fromprojections toverdi process list[3b445c4f1]CLI: Add
--allflag toverdi process kill[db1375949]CLI: Lazily validate entry points in parameter types [d3807d422]
CLI: Add repair hint to
verdi process play/pause/kill[8bc31bfd1]CLI: Add the
verdi process repaircommand [3e3d9b9f7]CLI: Validate strict in
verdi config set caching.disabled_for[9cff59232]DynamicEntryPointCommandGroup: Allow entry points to be excluded [9e30ec8ba]Add the
aiida.common.log.capture_loggingutility [9006eef3a]Config: Add thecreate_profilemethod [ae7abe8a6]Engine: Add the
await_processesutility function [45767f050]Engine: Add the
waitargument tosubmit[8f5e929d1]ORM: Add the
User.is_defaultproperty [a43c4cd0f]ORM: Add
NodeCaching.CACHED_FROM_KEYfor_aiida_cached_fromconstant [35fc3ae57]ORM: Add the
Entity.get_collectionclassmethod [305f1dbf4]ORM: Add the
Dict.getmethod [184fcd16e]ORM: Register
numpy.ndarraywith theto_aiida_typetoArrayData[d8dd776a6]Manager: Add the
set_default_user_email[8f8f55807]CalcJob: Add support for nested targets inremote_symlink_list[0ec650c1a]RemoteData: Add theis_cleanedproperty [2a2353d3d]SqliteTempBackend: Add support for reading from and writing to archives [83fc5cf69]StorageBackend: Add theread_onlyclass attribute [8a4303ff5]SinglefileData: Addmodekeyword toget_content[d082df7f1]BaseRestartWorkChain: Factor out attachment of outputs [d6093d101]Add support for
NodeLinksManagerto YAML serializer [6905c134e]
Performance#
CLI: Make loading of config lazy for improved responsiveness [d533b7a54]
Cache the lookup of entry points [12cc930db]
Refactor: Delay import of heavy packages to speed up import time [5dda6fd97]
Refactor: Delay import of heavy packages to speed up import time [8e6e08dc7]
Do not import
aiida.cmdlineinaiida.orm[0879a4e27]Lazily define
__type_stringinorm.Group[ebf3101d9]Lazily define
_plugin_type_stringand_query_type_string ofNode` [3a61a7003]
Changes#
CLI:
verdi profile deleteis now storage plugin agnostic [5015f5fe1]CLI: Usability improvements for interactive
verdi setup[c53ea20a4]CLI: Do not load config in defaults and callbacks during tab-completion [062058862]
Engine: Make process inputs in launchers positional [6d18ccb86]
Remove
aiida.manage.configuration.load_documentation_profile[9941266ce]ORM:
Sealable.seal()returnselfinstead ofNone[16e3bd3b5]ORM: Move deprecation warnings from module level [c4afdb9be]
Config: Switch from
jsonschematopydantic[4203f162d]DynamicEntryPointCommandGroup: Usepydanticto define config model [1d8ea2a27]Config: Remove use of
NO_DEFAULTforOption.default[275718cc8]
Fixes#
Add the
reportmethod tologging.LoggerAdapter[7d6684ce1]CalcJob: Fix MPI behavior ifwithmpioption default is True [84737506e]CalcJobNode: Fix validation fordepth=Noneinretrieve_list[03c86d5c9]CLI: Fix bug in
verdi data core.trajectory showfor various formats [fd4c1269b]CLI: Add missing entry point groups for
verdi plugin list[ae637d8c4]CLI: Remove loading backend for
verdi plugin list[34e564ad0]CLI: Fix
repositorybeing required forverdi quicksetup[d4666009e]CLI: Fix
verdi config setwhen setting list option [314917801]CLI: Keep list unique in
verdi config set --append[3844f86c6]CLI: Improve the formatting of
verdi user list[806d7e236]CLI: Set defaults for user details in profile setup [8b8887e55]
CLI: Reuse options in
verdi user configurefrom setup [1c0b702ba]InteractiveOption: Fix validation being skipped if!provided [c4b183bc6]ORM: Fix problem with detached
DbAuthInfoinstances [ec2c6a8fe]ORM: Check nodes are from same backend in
validate_link[7bd546ebe]ORM:
ProcessNode.is_valid_cacheisFalsefor unsealed nodes [a1f456d43]ORM: Explicitly pass backend when constructing new entity [96667c8c6]
ORM: Replace
.collection(backend)with.get_collection(backend)[bac2152c4]Make
warn_deprecationrespect thewarnings.showdeprecationsoption [6c28c63e9]PsqlDosBackend: Fix changes not persisted afteriterallanditerdict[2ea5087c0]PsqlDosBackend: FixNode.storeexcepting when inside a transaction [624dcd9fc]Parser.parse_from_node: Validate outputs against process spec [d16792f3d]Fix
QueryBuilder.countfor storage backends using sqlite [5dc1555bc]Process functions: Fix bug with variable arguments [ca8bbc67f]
SqliteZipBackend: Returnselfinstore[6a43b3f15]SqliteZipBackend: Ensure thefilepathis absolute and exists [5eac8b49d]Remove
with_dbenvuse inaiida.orm[35c57b9eb]
Deprecations#
Deprecated
aiida.orm.nodes.data.upfandverdi data core.upf[6625fd245]
Documentation#
Add topic section on storage [83dbe1ad9]
Add important note on using
iterallanditerdict[0aea7e41b]Add links about “entry point” and “plugin” to tutorial [517ffcb1c]
Disable the
warnings.showdeprecationsoption [4adb06c0c]Fix instructions for inspecting archive files [0a9c2788e]
Changes are reverted if exception during
iterall[17c5d8724]Various minor fixes to
run_docker.rst[d3788adea]Update
pydata-sphinx-themeand add Discourse links [13df42c14]Correct example of
verdi config unsetin troubleshooting [d6143dbc8]Improvements to sections containing recently added functionality [836419f66]
Fix typo in
run_codes.rst[9bde86ec7]Fixtures: Fix
suppress_warningsofrun_cli_command[9807cede4]Update citation suggestions [1dafdf2dd]
Dependencies#
Add support for Python 3.12 [c39b4fda4]
Update to
sqlalchemy~=2.0[a216f5052]Update to
disk-objectstore~=1.0[56f9f6ca0]Add new extra
tuithat providesverdias a TUI [a42e09c02]Add upper limit
jedi<0.19[fae2a9cfd]Update requirement
mypy~=1.7[c2fcad4ab]Add compatibility for
pymatgen>=v2023.9.2[4e0e7d8e9]Bump
yapfto0.40.0[a8ae50853]Update pre-commit requirement
flynt==1.0.1[e01ea4b97]Docker: Pinning mamba version to 1.5.2 [a6c2dbe1c]
Docker: Bump Python version to 3.10.13 [b168f2e12]
Devops#
CI: Use Python 3.10 for
pre-commitin CI and CD workflows [f41c8ac90]CI: Using concurrency for CI actions [4db54b7f8]
CI: Update tox to use Python 3.9 [227390a52]
Docker: Bump
upload-artifactaction to v4 for Docker workflow [bfdb2828a]Refactor: Replace
allwithiterallwhere beneficial [8a2fece02]Pre-commit: Disable
no-memberandno-name-in-moduleforaiida.orm[15379bbee]Tests: Move memory leak tests to main unit test suite [561f93cef]
Tests: Move ipython magic tests to main unit test suite [ce9acc312]
Tests: Remove deprecated
aiida/manage/tests/mainmodule [5b9da7d1e]Tests: Refactor transport tests from
unittesttopytest[ec64780c2]Tests: Fix failing
tests/cmdline/commands/test_setup.py[b6f7ec188]Tests: Print stack trace if CLI command excepts with
run_cli_command[08cba0f78]Tests: Make
PsqlDosStorageprofile unload test more robust [1c72eac1f]Tests: Fix flaky work chain tests using
recwarnfixture [207151784]Tests: Fix
StructureDatatest breaking for recentpymatgenversions [d1d64e800]Typing: Improve annotations of process functions [a85af4f0c]
Typing: Add type hinting for
aiida.orm.nodes.data.array.xy[2eaa5449b]Typing: Add type hinting for
aiida.orm.nodes.data.array.array[c19b1423a]Typing: Add overload signatures for
open[0986f6b59]Typing: Add overload signatures for
get_object_content[d18eedc8b]Typing: Correct type annotation of
WorkChain.on_wait[923cc314c]Typing: Improve type hinting for
aiida.orm.nodes.data.singlefile[b9d087dd4]
v2.4.2 - 2023-11-30#
Docker#
Disable the consumer timeout for RabbitMQ [5ce1e7ec3]
Add
rsyncandgraphvizto system requirements [c4799add4]
Dependencies#
Add upper limit
jedi<0.19[90e586fe3]
v2.4.1 - 2023-11-15#
This patch release comes with an improved set of Docker images and a few fixes to provide compatibility with recent versions of pymatgen.
Docker#
Improved Docker images [fec4e3bc4]
Add folders that automatically run scripts before/after daemon start in Docker image [fe4bc1d3d]
Pass environment variable to
aiida-preparescript in Docker image [ea47668ea]Update the
.devcontainerto use the new docker stack [413a0db65]
Dependencies#
Add compatibility for
pymatgen>=v2023.9.2[1f6027f06]
Devops#
Tests: Make
PsqlDosStorageprofile unload test more robust [f392459bd]Tests: Fix
StructureDatatest breaking for recentpymatgenversions [093037d48]Trigger Docker image build when pushing to
support/*branch [5cf3d1d75]Use
aiida-core-baseimage fromghcr.io[0e5b1c747]Loosen trigger conditions for Docker build CI workflow [22e8a8069]
Follow-up docker build runner macOS-ARM64 [1bd9bf03d]
Upload artifact by PR from forks for docker workflow [afc2dad8a]
Update the image name for docker image [17507b410]
v2.4.0 - 2023-06-22#
This minor release comes with a number of new features and improvements as well as a significant amount of bug fixes. Support for Python 3.8 has been officially dropped in accordance with AEP 003.
As a result of one of the bug fixes, related to the caching of CalcJob nodes, a database migration had to be added, the first since the release of v2.0.
After ugrading to v2.4.0, you will be prompted to migrate your database.
The automated migration drops the hashes of existing CalcJobNodes and provides you with the optional command to recompute them.
Execute the command if existing CalcJobNodes need to be usable as valid cache sources.
Features#
Config: Add option to change recursion limit in daemon workers [226159fd9]
CLI: Added
compressoption toverdi storage maintain[add474cbb]Expose
get_daemon_clientso it can be imported fromaiida.engine[1a0c1ee93]verdi computer test: Improve messaging of login shell check [062a58260]verdi node rehash: Addaiida.nodeas group for--entry-point[2fd07514d]verdi process status: Addcall_link_labelto stack entries [bd9372a5f]SinglefileData: Add thefrom_stringclassmethod [c25de615e]DynamicEntryPointCommandGroup: Add support for shared options [220a65c76]DynamicEntryPointCommandGroup: Pass ctx tocommandcallable [7de711be4]ProcessNode: Add theexit_codeproperty [ad8a539ee]
Fixes#
Engine: Dynamically update maximum stack size close to overflow to address
RecursionErrorunder heavy load [f797b4766]CalcJobNode: Fix the computation of the hash [685e0f87d]CalcJob: Ignore file inremote_copy_listnot existing [101a8d61b]CalcJob: Assign outputs from node in case of cache hit [777b97601]Fix log messages being logged twice to the daemon log file [bfd63c790]
Process control: Change language when not waiting for response [68cb4579d]
Do not assume
pgtestcluster started inpostgres_clusterfixture [1de2ca576]Process control: Warn instead of except when daemon is not running [ad4fbcccb]
DirectScheduler: Add?asJobState.UNDETERMINED[ffc869d8f]CLI: Correct
verdi devel rabbitmq tasks revivedocstring [13cadd05f]SinglefileData: Fix bug whenfilenameispathlib.Path[f36bf583c]Improve clarity of various deprecation warnings [c72a252ed]
CalcJob: Remove default ofwithmpiinput and make it optional [6a88cb315]Process: Haveinputsproperty always returnAttributesFrozenDict[60756fe30]PsqlDos: Add migration to remove hashes for allCalcJobNodes[7ad916836]PsqlDosMigrator: Commit changes when migrating existing schema [f84fe5b60]PsqlDos: Addentry_point_stringargument todrop_hashes[c7a36fa3d]PsqlDos: Make hash reset migrations more explicit [c447a1af3]verdi process list: Fix double percent sign in daemon usage [68be866e6]Fix the
daemon_clientfixture [9e5f5eefd]Transports: Raise
FileNotFoundErrorincopyif source doesn’t exist [d82069441]
Devops#
Add
graphvizto system requirements of RTD build runner [3df02550e]Add types for
DefaultFieldsAttributeDictsubclasses [afed5dc46]Bump Python version for RTD build [5df446cd3]
Pre-commit: Fix
mypywarning inaiida.orm.utils.serialize[c25922484]Update Docker base image
aiida-prerequisites==0.7.0[ac755afae]Use f-strings in
aiida/engine/daemon/execmanager.py[49cffff21]
Dependencies#
Drop support for Python 3.8 [3defb8bb7]
Update requirement
pylint~=2.17.4[397634444]Update requirement
flask~=2.2[a2a05a69f]
Deprecations#
QueryBuilder: Deprecatedebugargument and use logger [603ff37a0]
Documentation#
Add missing
core.prefix to allverdi datasubcommands [99319b3c1]Clarify negation operator in
QueryBuilderfilters [2c828811f]Correct “variable” to “variadic” arguments [978217693]
Fix reference target warnings related to
flask_restful[4f76e0bd7]
v2.3.1 - 2023-05-22#
Fixes#
DaemonClient: Clean stale PID file instop_daemon[#6007]
v2.3.0 - 2023-04-17#
This release comes with a number of improvements, some of the more useful and important of which are quickly highlighted. A full list of changes can be found below.
Process function improvements#
A number of improvements in the usage of process functions, i.e., calcfunction and workfunction, have been added.
Each subsection title is a link to the documentation for more details.
Variadic arguments#
Variadic arguments can be used in case the function should accept a list of inputs of unknown length.
Consider the example of a calculation function that computes the average of a number of Int nodes:
@calcfunction
def average(*args):
return sum(args) / len(args)
result = average(*(1, 2, 3))
Automatic type validation#
Type hint annotations can now be used to add automatic type validation to process functions.
@calcfunction
def add(x: Int, y: Int):
return x + y
add(1, 1.0) # Passes
add(1, '1.0') # Raises an exception
Since the Python base types (int, str, bool, etc.) are automatically serialized, these can also be used in type hints.
The following example is therefore identical to the previous:
@calcfunction
def add(x: int, y: int):
return x + y
Docstring parsing#
The calcfunction and workfunction generate a Process of the decorated function on-the-fly.
In doing so, it automatically defines the ProcessSpec that is normally done manually, such as for a CalcJob or a WorkChain.
Before, this would just define the ports that the function process accepts, but the help attribute of the port would be left empty.
This is now parsed from the docstring, if it can be correctly parsed:
@calcfunction
def add(x: int, y: int):
"""Add two integers.
:param x: Left hand operand.
:param y: Right hand operand.
"""
return x + y
assert add.spec().inputs['a'].help == 'Left hand operand.'
assert add.spec().inputs['b'].help == 'Right hand operand.'
This functionality is particularly useful when exposing process functions in work chains.
Since the process specification of the exposed function will be automatically inherited, the user can inspect the help string through the builder.
The automatic documentation produced by the Sphinx plugin will now also display the help string parsed from the docstring.
Nested labels for output nodes#
The keys in the output dictionary can now contain nested namespaces:
@calcfunction
def add(alpha, beta):
return {'nested.sum': alpha + beta}
result = add(Int(1), Int(2))
assert result['nested']['sum'] == 3
As class member methods#
Process functions can now be defined as class member methods of work chains:
class CalcFunctionWorkChain(WorkChain):
@classmethod
def define(cls, spec):
super().define(spec)
spec.input('x')
spec.input('y')
spec.output('sum')
spec.outline(
cls.run_compute_sum,
)
@staticmethod
@calcfunction
def compute_sum(x, y):
return x + y
def run_compute_sum(self):
self.out('sum', self.compute_sum(self.inputs.x, self.inputs.y))
The function should be declared as a staticmethod and it should not include the self argument in its function signature.
It can then be called from within the work chain as self.function_name(*args, **kwargs).
Scheduler plugins: including environment_variables#
The Scheduler base class implements the concrete method _get_submit_script_environment_variables which formats the lines for the submission script that set the environment variables that were defined in the metadata.options.environment_variables input.
Before it was left up to the plugins to actually call this method in the _get_submit_script_header, but this is now done by the base class in the get_submit_script.
You can now remove the call to _get_submit_script_environment_variables from your scheduler plugins, as the base class will take care of it.
A deprecation warning is emitted if the base class detects that the plugin is still calling it manually.
See the pull request for more details.
WorkChain: conditional predicates should return boolean-like#
Up till now, work chain methods that are used as the predicate in a conditional, e.g., if_ or while_ could return any type.
For example:
class SomeWorkChain(WorkChain):
@classmethod
def define(cls, spec):
super().define(spec)
spec.outline(if_(cls.some_conditional)())
def some_conditional(self):
if self.ctx.something == 'something':
return True
The some_conditional method is used as the “predicate” of the if_ conditional.
It returns True or None.
Since the None value in Python is “falsey”, it would be considered as returning False.
However, this duck-typing could accidentally lead to unexpected situations, so we decided to be more strict on the return type.
As of now, a deprecation warning is emitted if the method returns anything that is not “boolean-like”, i.e., does not implement the __bool__ method.
If you see this warning, please make sure to return a boolean, like the built-ins True or False, or a numpy.bool or aiida.orm.Bool.
See the pull request for more details.
Controlling usage of MPI#
It is now possible to define on a code object whether it should be run with or without MPI through the with_mpi attribute.
It can be set from the Python API as AbstractCode(with_mpi=with_mpi) or through the --with-mpi / --no-with-mpi option of the verdi code create CLI command.
This option adds a manner to control the use of MPI in calculation jobs, in addition to the existing ones defined by the CalcJob plugin and the metadata.options.withmpi input.
For more details on how these are controlled and how conflicts are handled, please refer to the documentation.
Add support for Docker containers#
Support is added for running calculation within Docker containers.
For example, to run Quantum ESPRESSO pw.x in a Docker container, write the following file to config.yml:
label: qe-pw-on-docker
computer: localhost
engine_command: docker run -i -v $PWD:/workdir:rw -w /workdir {image_name} sh -c
image_name: haya4kun/quantum_espresso
filepath_executable: pw.x
default_calc_job_plugin: quantumespresso.pw
use_double_quotes: false
wrap_cmdline_params: true
and run the CLI command:
verdi code create core.code.containerized --config config.yml --non-interactive
This should create a ContainerizedCode that you can now use to launch a PwCalculation.
For more details, please refer to the documentation.
Exporting code configurations#
It is now possible to export the configuration of an existing code through the verdi code export command.
The produced YAML file can be used to recreate the code through the verdi code create command.
Note that you should use the correct subcommand based on the type of the original code.
For example, if it was an InstalledCode you should use verdi code create core.code.installed.
For the legacy Code instances, you should use verdi code setup.
See the pull request for more details.
Full list of changes#
Features#
AbstractCode: Add thewith_mpiattribute [#5922]ContainerizedCode: Add support for Docker images to use asCodeforCalcJobs [#5841]InstalledCode: Allow relative path forfilepath_executable[#5879]CLI: Allow specifying output filename in
verdi node graph generate[#5897]CLI: Add
--timeoutoption to allverdi daemoncommands [#5966]CLI: Add the
verdi calcjob remotecatcommand [#4861]CLI: Add the
verdi code exportcommand [#5860]CLI: Improved customizability and scriptability of
verdi storage maintain[#5936]CLI:
verdi quicksetup: Further reduce required user interaction [#5768]CLI:
verdi computer test: Add test for login shell being slow [#5845]CLI:
verdi process list: Addexit_messageas projectable attribute [#5853]CLI:
verdi node delete: Add verbose list of pks to be deleted [#5878]CLI: Fail command if
--configfile contains unknown key [#5939]CLI:
verdi daemon status: Do not except when no profiles are defined [#5874]ORM: Add unary operations
+,-andabstoNumericType[#5946]Process functions: Support class member functions as process functions [#4963]
Process functions: Infer argument
valid_typefrom type hints [#5900]Process functions: Parse docstring to set input port help attribute [#5919]
Process functions: Add support for variadic arguments [#5691]
Process functions: Allow nested output namespaces [#5954]
Process: Store JSON-serializable metadata inputs on the node [#5801]Port: Add theis_metadatakeyword [#5801]ProcessBuilder: Include metadata inputs inget_builder_restart[#5801]StructureData: Addmodeargument toget_composition[#5926]Scheduler: Allow terminating job if submission script is invalid [#5849]SlurmScheduler: Detect broken submission scripts for invalid account [#5850]SlurmScheduler: Parse theNODE_FAILstate [#5866]WorkChain: Add dataclass serialisation to context [#5833]IcsdDbImporter: Addis_theoreticaltag to queried entries [#5868]
Fixes#
CLI: Prefix the
verdi datasubcommands withcore.[#5846]CLI: Respect config log levels if
--verbositynot explicitly passed [#5925]CLI:
verdi config list: Do not except if no profiles are defined [#5921]CLI:
verdi code show: Add missing code attributes [#5916]CLI:
verdi quicksetup: Fix error incorrect role when creating database [#5828]CLI: Fix error in
aiida.cmdline.utils.log.CliFormatter[#5957]Daemon: Fix false-positive of stopped daemon in
verdi daemon status[#5862]DaemonClient: Fix and homogenize use oftimeoutin client calls [#5960]ProcessBuilder: Fix bug in_recursive_merge[#5801]QueryBuilder: Catch new exception raised bysqlalchemy>=1.4.45[#5875]Fix the
%verdiIPython magics utility [#5961]Fix bug in
aiida.engine.utils.instantiate_process[#5952]Fix incorrect import of exception from
kiwipy.communications[#5947]
Deprecations#
Changes#
DaemonClient: Refactor to include parsing of client response [#5850]ORM: Remove
Entity.from_backend_entityfrom the public API [#5447]PbsproScheduler: Replace deprecatedppntag withncpus[#5910]ProcessBuilder: Move_prunemethod to standalone utility [#5801]verdi process list: Simplify the daemon load implementation [#5850]
Documentation#
Add FAQ on MFA-enabled computers [#5887]
Add link to all
metadata.optionsinputs inCalcJobsubmission example [#5912]Add warning that
Dataconstructor is not called on loading [#5898]Add note on how to create a code that uses Conda environment [#5905]
Add
--without-daemonflag to benchmark script [#5839]Add alternative for conda env activation in submission script [#5950]
Clarify that process functions can be exposed in work chains [#5919]
Fix the
intro/tutorial.mdnotebook [#5961]Fix the overindentation of lists [#5915]
Hide the “Edit this page” button on the API reference pages [#5956]
Note that an entry point is required for using a data plugin [#5907]
Set
use_login_shell=Falseforlocalhostin performance benchmark [#5847]Small improvements to the benchmark script [#5854]
Use mamba instead of conda [#5891]
DevOps#
Add devcontainer for easy integration with VSCode [#5913]
CI: Update
sphinx-intland install transifex CLI [#5908]Fix the
test-installworkflow [#5873]Pre-commit: Improve typing of
aiida.schedulers.scheduler[#5849]Pre-commit: Set
yapfoptionallow_split_before_dict_value = false[#5931]Process functions: Replace
getfullargspecwithsignature[#5900]Fixtures: Add argument
use_subprocesstorun_cli_command[#5846]Fixtures: Change default
use_subprocess=Falseforrun_cli_command[#5846]Tests: Use
use_subprocess=Falseandsuppress_warnings=True[#5846]Tests: Fix bugs revealed by running with
use_subprocess=True[#5846]Typing: Annotate
aiida/orm/utils/serialize.py[#5832]Typing: Annotate
aiida/tools/visualization/graph.py[#5821]Typing: Use modern syntax for
aiida.engine.processes.functions[#5900]
Dependencies#
New contributors#
Thanks a lot to the following new contributors:
v2.2.2 - 2023-02-10#
Fixes#
Critical bug fix: Fix bug causing
CalcJobs to except after restarting daemon [#5886]
v2.2.1 - 2022-12-22#
Fixes#
v2.2.0 - 2022-12-13#
This feature release comes with a significant feature and a number of improvements and fixes.
Live calculation job monitoring#
In certain use cases, it is useful to have a calculation job stopped prematurely, before it finished or the requested wallclock time runs out.
Examples are calculations that seem to be going nowhere and so continuing would only waste computational resources.
Up till now, a calculation job could only be “manually” stopped, through verdi process kill.
In this release, functionality is added that allows calculation jobs to be monitored automatically by the daemon and have them stopped when certain conditions are met.
Monitors can be attached to a calculation job through the monitors input namespace:
builder = load_code().get_builder()
builder.monitors = {
'monitor_a': Dict({'entry_point': 'some.monitor'}),
'monitor_b': Dict({'entry_point': 'some.other.monitor'}),
}
Monitors are referenced by their entry points with which they are registered in the aiida.calculations.monitors entry point group.
A monitor is essentially a function that implements the following interface:
from aiida.orm import CalcJobNode
from aiida.transports import Transport
def monitor(node: CalcJobNode, transport: Transport) -> str | CalcJobMonitorResult | None:
"""Retrieve and inspect files in working directory of job to determine whether the job should be killed.
:param node: The node representing the calculation job.
:param transport: The transport that can be used to retrieve files from remote working directory.
:returns: A string if the job should be killed, `None` otherwise.
"""
The transport allows to fetch files from the working directory of the calculation.
If the job should be killed, the monitor simply returns a string with the message why and the daemon will send the message to kill the job.
For more information and a complete description of the interface, please refer to the documentation. This functionality was accepted based on AEP 008 which provides more detail on the design choices behind this implementation.
Full list of changes#
Features#
CalcJob: Add functionality that allows live monitoring [#5659]CLI: Add
--rawoption toverdi code list[#5763]CLI: Add the
-hshort-hand flag for--helptoverdi[#5792]CLI: Add short option names for
verdi code create[#5799]StorageBackend: Add theinitialisemethod [#5760]Fixtures: Add support for
Processinputs tosubmit_and_await[#5780]Fixtures: Add
aiida_computer_localandaiida_computer_ssh[#5786]Fixtures: Modularize fixtures creating AiiDA test instance and profile [#5758]
Computer: Add theis_configuredproperty [#5786]Plugins: Add
aiida.storagetoENTRY_POINT_GROUP_FACTORY_MAPPING[#5798]
Fixes#
verdi run: Do not addpathlib.Pathinstance tosys.path[#5810]Process functions: Restore support for dynamic nested input namespaces [#5808]
Process: properly cleanup when exception in state transition [#5697]Process: Update outputs before updating node process state [#5813]PsqlDosMigrator: refactor the connection handling [#5783]PsqlDosBackend: Use transaction whenever mutating session state, fixing exception when storing a node or group duringQueryBuilder.iterall[#5804]InstalledCode: Fix bug invalidate_filepath_executablefor SSH [#5787]WorkChain: Protect public methods from being subclassed. Now if you accidentally override, for example, therunmethod of theWorkChain, an exception is raised instead of silently breaking the work chain [#5779]
Changes#
Dependencies#
Dependencies: Add support for Python 3.11 [#5778]
Documentation#
DevOps#
CI: Increase load limit for
verdito 0.5 seconds [#5773]CI: Add
workflow_dispatchtrigger tonightly.yml[#5760]ORM: Fix typing of
aiida.orm.nodes.data.codemodule [#5830]Pin version of
setuptoolsas it breaks dependencies [#5782]Tests: Use explicit
aiida_profile_cleanin process control tests [#5778]Tests: Replace all use of
aiida_profile_cleanwithaiida_profilewhere a clean profile is not necessary [#5814]Tests: Deal with
run_via_daemonreturningNonein RPN tests [#5813]Make type-checking opt-out [#5811]
v2.1.2 - 2022-11-14#
Fixes#
BaseRestartWorkChain: Fix bug in_wrap_bare_dict_inputsintroduced inv2.1.0[#5757]
v2.1.1 - 2022-11-10#
Fixes#
Engine: Remove
*argsfrom theProcess.submitmethod. [#5753] Positional arguments were silently ignored leading to a misleading error message. For example, if a user calledinputs = {} self.submit(cls, inputs)
instead of the intended
inputs = {} self.submit(cls, **inputs)
The returned error message was that one of the required inputs was not defined. Now it will correctly raise a
TypeErrorsaying that positional arguments are not supported.Process functions: Add serialization for Python base type defaults [#5744] Defining Python base types as defaults, such as:
@calcfunction def function(a, b = 5): return a + b
would raise an exception. The default is now automatically serialized, just as an input argument would be upon function call.
Process control: Reinstate process status for paused/killed processes [#5754] Regression introduced in
aiida-core==2.1.0caused the messageKilled through 'verdi process list'to no longer be set on theprocess_statusof the node.QueryBuilder: use a nested session initerallanditerdict[#5736] Modifying entities yielded byQueryBuilder.iterallandQueryBuilder.iterdictwould raise an exception, for example:for [node] in QueryBuilder().append(Node).iterall(): node.base.extras.set('some', 'extra')
v2.1.0 - 2022-11-07#
This feature release comes with a number of new features as well as quite a few fixes of bugs and stability issues. Further down you will find a complete list of changes, after a short description of some of the most important changes:
Automatic input serialization in calculation and work functions#
The inputs to calcfunctions and workfunctions are now automatically converted to AiiDA data types if they are one of the basic Python types (bool, dict, Enum, float, int, list or str).
This means that code that looked like:
from aiida.engine import calcfunction
from aiida.orm import Bool, Float, Int, Str
@calcfunction
def function(switch, threshold, count, label):
...
function(Bool(True), Float(0.25), Int(10), Str('some-label'))
can now be simplified to:
from aiida.engine import calcfunction
from aiida.orm import Bool, Float, Int, Str
@calcfunction
def function(switch, threshold, count, label):
...
function(True, 0.25, 10, 'some-label')
Improved interface for creating codes#
The Code data plugin was a single class that served two different types of codes: “remote” codes and “local” codes.
These names “remote” and “local” have historically caused a lot of confusion.
Likewise, using a single class Code for both implementations also has led to confusing interfaces.
To address this issue, the functionality has been split into two new classes InstalledCode and PortableCode, that replace the “remote” and “local” code, respectively.
The installed code represents an executable binary that is already pre-installed on some compute resource.
The portable code represents a code (executable plus any additional required files) that are stored in AiiDA’s storage and can be automatically transfered to any computer before being executed.
Creating a new instance of these new code types is easy:
from pathlib import Path
from aiida.orm import InstalledCode, PortableCode
installed_code = InstalledCode(
label='installed-code',
computer=load_computer('localhost'),
filepath_executable='/usr/bin/bash'
)
portable_code = PortableCode(
label='portable-code',
filepath_files=Path('/some/path/code'),
filepath_executable='executable.exe'
)
Codes can also be created through the new verdi command verdi code create.
To specify the type of code to create, pass the corresponding entry point name as an argument.
For example, to create a new installed code, invoke:
verdi code create core.code.installed
The options for each subcommand are automatically generated based on the code type, and so only options that are relevant to that code type will be prompted for.
The new code classes both subclass the aiida.orm.nodes.data.code.abstract.AbstractCode base class.
This means that both InstalledCodes and PortableCodes can be used as the code input for CalcJobs without problems.
The old Code class remains supported for the time being as well, however, it is deprecated and will be remove at some point.
The same goes for the verdi code setup command; please use verdi code create instead.
Existing codes will be automatically migrated to either an InstalledCode or a PortableCode.
It is strongly advised that you update any code that creates new codes to use these new plugin types.
Support for running code in containers#
Support is added to run calculation jobs inside a container. A containerized code can be setup through the CLI:
verdi code create core.code.containerized \
--label containerized \
--image-name docker://alpine:3 \
--filepath-executable /bin/sh \
--engine-command "singularity exec --bind $PWD:$PWD {image_name}"
as well as through the API:
from aiida.orm import ContainerizedCode, load_computer
code = ContainerizedCode(
computer=load_computer('some-computer')
filepath_executable='/bin/sh'
image_name='docker://alpine:3',
engine_command='singularity exec --bind $PWD:$PWD {image_name}'
).store()
In the example above we use the Singularity containerization technology. For more information on what containerization programs are supported and how to configure them, please refer to the documentation.
Control daemon and processes from the API#
Up till now, the daemon and live processes could only easily be controlled through verdi daemon and verdi process, respectively.
In this release, modules are added to provide the same functionality through the Python API.
Daemon API#
The daemon can now be started and stopped through the DaemonClient which can be obtained through the get_daemon_client utility function:
from aiida.engine.daemon.client import get_daemon_client
client = get_daemon_client()
By default, this will give the daemon client for the current default profile. It is also possible to explicitly specify a profile:
client = get_daemon_client(profile='some-profile')
The daemon can be started and stopped through the client:
client.start_daemon()
assert client.is_daemon_running
client.stop_daemon(wait=True)
Process API#
The functionality of verdi process to play, pause and kill is now made available through the aiida.engine.process.control module.
Processes can be played, paused or killed through the play_processes, pause_processes, and kill_processes, respectively.
The processes to act upon are defined through their ProcessNode which can be loaded using load_node.
from aiida.engine.process import control
processes = [load_node(<PK1>), load_node(<PK2>)]
pause_processes(processes) # Pause the processes
play_processes(processes) # Play them again
kill_processes(processes) # Kill the processes
Instead of specifying an explicit list of processes, the functions also take the all_entries keyword argument:
pause_processes(all_entries=True) # Pause all running processes
REST API can serve multiple profiles#
Before, a single REST API could only serve data of a single profile at a time. This limitation has been removed and a single REST API instance can now serve data from all profiles of an AiiDA instance. To maintain backwards compatibility, the new functionality needs to be explicitly enabled through the configuration:
verdi config set rest_api.profile_switching True
After the REST API is restarted, it will now accept the profile query parameter, for example:
http://127.0.0.1:5000/api/v4/computers?profile=some-profile-name
If the specified is already loaded, the REST API functions exactly as without profile switching enabled. If another profile is specified, the REST API will first switch profiles before executing the request.
If the profile parameter is specified in a request and the REST API does not have profile switching enabled, a 400 response is returned.
Pluginable data storage backends#
Warning: this is beta functionality.
It is now possible to implement custom storage backends to control where all data of an AiiDA profile is stored.
To provide a data storage plugin, one should implement the aiida.orm.implementation.storage_backend.StorageBackend interface.
The default implementation provided by aiida-core is the aiida.storage.psql_dos.backend.PsqlDosBackend which uses a PostgreSQL database for the provenance graph and a disk-objectstore container for repository files.
Storage backend plugins should be registered in the new entry point group aiida.storage.
The default storage backend PsqlDosBackend has the core.psql_dos entry point name.
The storage backend to be used for a profile can be specified using the --db-backend option in verdi setup and verdi quicksetup.
The entry point of the selected backend is stored in the storage.backend key of a profile configuration:
{
"profiles": {
"profile-name": {
"PROFILE_UUID": "",
"storage": {
"backend": "core.psql_dos",
"config": {}
},
"process_control": {},
"default_user_email": "aiida@localhost",
"test_profile": false
},
}
At the moment, it is not quite clear if the abstract interface StorageBackend properly abstracts everything that is needed to implement any storage backend.
For the time being then, it is advised to subclass the PsqlDosBackend and replace parts required for the use-case, such as just replacing the file repository implementation.
Full list of changes#
Features#
Process: Add hook to customize theprocess_labelattribute [#5713]Add the
ContainerizedCodedata plugin [#5667]API: Add the
aiida.engine.processes.controlmodule [#5630]PluginVersionProvider: Add support for entry point strings [#5662]verdi setup: Add the--profile-uuidoption [#5673]Process control: Add the
revive_processesmethod [#5677]Process functions: Add the
get_source_code_functionmethod [#4554]CLI: Improve the quality of
verdi code listoutput [#5750]CLI: Add the
verdi devel revivecommand [#5677]CLI:
verdi process status --max-depth[#5727]CLI:
verdi setup/quicksetupstore autofill user info early [#5729]CLI: Add the
devel launch-addcommand [#5733]CLI: Make filename in
verdi node repo catoptional forSinglefileData[#5747]CLI: Add the
verdi devel rabbitmqcommand group [#5718]API: Add function to start the daemon [#5625]
BaseRestartWorkChain: add theget_outputshook [#5618]CalcJob: extendretrieve_listsyntax withdepth=None[#5651]CalcJob: allow wildcards instash.source_listpaths [#5601]Add global config option
rest_api.profile_switching[#5054]REST API: make the profile configurable as request parameter [#5054]
ProcessFunction: Automatically serialize Python base type inputs [#5688]BaseRestartWorkChain: allow to override priority inhandler_overrides[#5546]ORM: add
entry_pointclassproperty toNodeandGroup[#5437]Add the
aiida.storageentry point group [#5501]Add the config option
storage.sandbox[#5501]Add the
InstalledCodeandPortableCodedata plugins [#5510]CLI: Add the
verdi code createcommand group [#5510]CLI: Add the
DynamicEntryPointCommandGroupcommand group [#5510]Add a client to connect to RabbitMQ Manamegement HTTP API [#5718]
LsfScheduler: add support fornum_machines[#5153]JobResource: add theaccepts_default_memory_per_machine[#5642]AbstractCode: add abstraction methods for command line parameters [#5664]ArithmeticAddCalculation: Add themetadata.options.sleepinput [#5663]DaemonClient: add theget_envmethod [#5631]Tests: Make daemon fixtures available to plugin packages [#5701]
verdi plugin list: Show which exit codes invalidate cache [#5710]verdi plugin list: Show full help for input and output ports [#5711]
Fixes#
ArrayData: replacenanandinfwithNonewhen dumping to JSON [#5613]Archive: add missing migration of transport entry points [#5604]
BaseRestartWorkChain: fixhandler_overridesignoringenabled=False[#5598]CLI: allow setting options for config without profiles [#5544]
CLI: normalize use of colors [#5547]
Config: fix bug in downgrade past version 6 [#5528]DaemonClient: closeCircusClientafter call [#5631]Engine: Do not call serializer for
Nonevalues [#5694]Engine: Do not let
DuplicateSubcriberErrorexcept aProcess[#5715]ORM: raise when trying to pickle instance of
Entity[#5549]ORM: Return
Noneinget_function_source_codeinstead of excepting [#5730]Fix
get_entry_pointnot raising even for duplicate entry points [#5531]Fix: reference to command in message for
verdi storage maintain[#5558]Fix:
is_valid_cachesetter forProcessNodes [#5583]Fix exception when importing an archive into a profile with many nodes [#5740]
Profile: make definition of daemon filepaths dynamic [#5631]Fixtures: Fix bug in reset of
empty_configfixture [#5717]PsqlDosBackend: ensure sqla sessions are garbage-collected onclose[#5728]TrajectoryData: Fix bug inget_step_data[#5734]ProfileManager: restart daemon inclear_profile[#5751]
Changes#
Mark relevant
Processexit codes asinvalidates_cache=True[#5709]TemplatereplacerCalculation: Change exit codes to be in 300 range [#5709]Add the prefix
core.to all storage entry points [#5501]CalcJob: Fully abstract interaction withAbstractCodein presubmit [#5666]CLI: make label the default group list order in
verdi group list[#5523]Config: add migration to properly prefix storage backend [#5501]
Move query utils from
aiida.cmdlinetoaiida.tools[#5630]SandboxFolder: decouple the location from the profile [#5496]TemplatereplacerDoublerParser: rename and generalize implementation [#5669]Process: AllowNonefor input ports that are not required [#5722]
Dependencies#
Deprecations#
Documentation#
Add section on basic performance benchmark with automated benchmark script [#5724]
Add
-Uflag to PostgreSQL database backup command [#5550]Clarify excepted and killed calculations are not cached [#5525]
Correct snippet for workchain context nested keys [#5551]
Plugin package setup add PEP 621 example [#5626]
Remove note on disk space for caching [#5534]
Remove explicit release tag in Docker image name [#5671]
Remove example REST API extension with POST requests [#5737]
Resubmit a
Processfrom aProcessNode[#5579]
Devops#
Add a notification for nightly workflow on fail [#5605]
CI: Remove
--use-featureflag inpip installof CI [#5703]Fixtures: Add
started_daemon_clientandstopped_daemon_client[#5631]Fixtures: Add the
entry_pointsfixture to dynamically add and remove entry points [#5745]Refactor:
ProcessextractCalcJobspecific input handling fromProcess[#5539]Refactor: remove unnecessary use of
tempfile.mkdtemp[#5639]Refactor: Remove internal use of various deprecated resources [#5716]
Refactor: Turn
aiida.manage.external.rmqinto a package [#5718]Tests: remove legacy
tests/utils/configuration.py[#5500]Tests: fix the RPN work chains for the nightly build [#5529]
Tests: Manually stop daemon after
verdi devel revivetest [#5689]Tests: Add verbose info if
submit_and_waittimes out [#5689]Tests: Do not set default memory for
localhostfixture [#5689]Tests: Suppress RabbitMQ and developer version warnings [#5689]
Tests: Add the
EntryPointManagerexposed asentry_pointsfixture [#5656]Tests: Only reset database connection at end of suite [#5641]
Tests: Suppress logging and warnings from temporary profile fixture [#5702]
v2.0.4 - 2022-09-22#
Fixes#
Engine: Fix bug that allowed non-storable inputs to be passed to process [#5532]
Engine: Fix bug when caching from process with nested outputs [#5538]
Archive: Fix bug in archive creation after packing of file repository [#5570]
QueryBuilder: apply escape\inlikeandilikefor asqlitebackend, such as export archives [#5553]QueryBuilder: Fix bug in distinct queries always projecting the first entity, even if not projected explicitly [#5654]CalcJob: fix bug inlocal_copy_listprovenance exclusion [#5648]Repository.copy_tree: omit subdirectories frompathwhen copying [#5648]Docs: Add intersphinx aliases for
__all__imports. Now the shortcut imports can also be used in third-party packages (e.g.aiida.orm.nodes.node.Nodeas well asaiida.orm.Node) [#5657]
v2.0.3 - 2022-08-09#
Update of the Dockerfile base image (aiidateam/aiida-prerequisites) to version 0.6.0.
v2.0.2 - 2022-07-13#
Fixes#
v2.0.1 - 2022-04-28#
Dependencies#
Fix incompatibility with
click>=8.1and requireclick==8.1as a minimum by @sphuber in [#5504]
v2.0.0 - 2022-04-27#
This release finalises the v2.0.0b1 changes.
Node namespace restructuring ♻️#
Note
The restructuring is fully back-compatible, and existing methods/attributes will continue to work, until aiida-core v3.0.
Deprecations warnings are also currently turned off by default.
To identify these deprecations in your code base (for example when running unit tests), activate the AIIDA_WARN_v3 environmental variable:
export AIIDA_WARN_v3=1
The Node class (and thus its subclasses) has many methods and attributes in its public namespace.
This has been noted as being a problem for those using auto-completion,
since it makes it difficult to select suitable methods and attributes.
These methods/attributes have now been partitioned into “sub-namespaces” for specific purposes:
Node.base.attributesInterface to the attributes of a node instance.
Node.base.cachingInterface to control caching of a node instance.
Node.base.commentsInterface for comments of a node instance.
Node.base.extrasInterface to the extras of a node instance.
Node.base.linksInterface for links of a node instance.
Node.base.repositoryInterface to the file repository of a node instance.
Full list of re-naming
Current name |
New name |
|---|---|
|
Deprecated, use |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Deprecated, use |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Deprecated, use |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPython integration improvements 👌#
The aiida IPython magic commands are now available to load via:
%load_ext aiida
As well as the previous %aiida magic command, to load a profile,
one can also use the %verdi magic command.
This command runs the verdi CLI using the currently loaded profile of the IPython/Jupyter session.
%verdi status
See the Basic Tutorial for example usage.
New SqliteTempBackend ✨#
The SqliteTempBackend utilises an in-memory SQLite database to store data, allowing it to be transiently created/destroyed within a single Python session, without the need for Postgresql.
As such, it is useful for demonstrations and testing purposes, whereby no persistent storage is required.
To load a temporary profile, you can use the following code:
from aiida import load_profile
from aiida.storage.sqlite_temp import SqliteTempBackend
profile = load_profile(
SqliteTempBackend.create_profile(
'myprofile',
options={
'runner.poll.interval': 1
},
debug=False
),
)
See the Basic Tutorial for example usage.
Key Pull Requests#
Below is a list of some key pull requests that have been merged into version 2.0.0:
Node namespace re-structuring:
🔧 MAINTAIN: Add
warn_deprecationfunction,Node.base, and moveNodeRepositoryMixin -> NodeRepositoryby @chrisjsewell in #5472♻️ REFACTOR:
EntityAttributesMixin->NodeAttributesby @chrisjsewell in #5442♻️ REFACTOR: Move methods to
Node.commentsby @chrisjsewell in #5446♻️ REFACTOR:
EntityExtrasMixin->EntityExtrasby @chrisjsewell in #5445♻️ REFACTOR: Move link related methods to
Node.base.linksby @sphuber in #5480♻️ REFACTOR: Move caching related methods to
Node.base.cachingby @sphuber in #5483
Storage:
ORM:
👌 IMPROVE:
StructureData: allow to be initialised without a specified cell by @ltalirz in #5341
Processing:
👌 IMPROVE: Allow
engine.runto work without RabbitMQ by @chrisjsewell in #5448👌 IMPROVE:
JobTemplate: changeCodeInfotoJobTemplateCodeInfoincodes_infoby @unkcpz in #5350This is required for a containerized code implementation
👌 IMPROVE: Add option to use double quotes for
CodeandComputerCLI arguments by @unkcpz in #5478
Transport and Scheduler:
IPython:
✨ NEW: Add
%verdiIPython magic by @chrisjsewell in #5448
Dependencies:
♻️ REFACTOR: drop the
python-dateutillibrary by @sphuber
v2.0.0b1 - 2022-03-15#
The version 2 release of aiida-core largely focusses on major improvements to the design of data storage within AiiDA, as well as updates to core dependencies and removal of deprecated APIs.
Assuming users have already addressed deprecation warnings from aiida-core v1.6.x, there should be limited impact on existing code.
For plugin developers, the AiiDA 2.0 plugin migration guide provides a step-by-step guide on how to update their plugins.
For existing profiles and archives, a migration will be required, before they are compatible with the new version.
Tip
Before updating your aiida-core installation, it is advisable to make sure you create a full backup of your profiles,
using the current version of aiida-core you have installed.
For backup instructions, using aiida-core v1.6.7, see this documentation.
Python support updated to 3.8 - 3.10 ⬆️#
Following the NEP 029 timeline, support for Python 3.7 is dropped as of December 26 2021, and support for Python 3.10 is added.
Plugin entry point updates 🧩#
AiiDA’s use of entry points, to allow plugins to extend the functionality of AiiDA, is described in the plugins topic section.
The use of reentry scan, for loading plugin entry points, is no longer necessary.
Use of the reentry dependency has been replaced by the built-in importlib.metadata library. This library requires no additional loading step.
All entry points provided by aiida-core now start with a core. prefix, to make their origin more explicit and respect the naming guidelines of entry points in the AiiDA ecosystem.
The old names are still supported so as to not suddenly break existing code based on them, but they have now been deprecated.
For example:
from aiida.plugins import DataFactory
Int = DataFactory('int') # Old name
Int = DataFactory('core.int') # New name
Note that entry point names are also used on the command line. For example:
$ verdi computer setup -L localhost -T local -S direct
# now changed to
$ verdi computer setup -L localhost -T local -S core.direct
Improvements to the AiiDA storage architecture ♻️#
Full details on the AiiDA storage architecture are available in the storage architecture section.
The storage refactor incorporates four major changes:
The
djangoandsqlalchemystorage backends have been merged into a singlepsql_dosbackend (PostgreSQL + Disk-Objectstore).See the
psql_dosstorage format for details.This has allowed for the
djangodependency to be dropped.
The file system node repository has been replaced with an object store implementation.
The object store automatically deduplicates files, and allows for the compression of many objects into a single file, thus significantly reducing the number of files on the file system and memory utilisation (by orders of magnitude).
Note, to make full use of object compression, one should periodically run
verdi storage maintain.See the repository design section for details.
Command-line interaction with a profile’s storage has been moved from
verdi databasetoverdi storage.The AiiDA archive format has been redesigned as the
sqlite_zipstorage backend.See the
sqlite_zipstorage format for details.The new format allows for streaming of data during exports and imports, significantly reducing both the time and memory utilisation of these actions.
The archive can now be loaded directly as a (read-only) profile, without the need to import it first, see this Jupyter Notebook tutorial.
The storage redesign also allows for profile switching, within the same Python process, and profile access within a context manager. For example:
from aiida import load_profile, profile_context, orm
with profile_context('my_profile_1'):
# The profile will be loaded within the context
node_from_profile_1 = orm.load_node(1)
# then the profile will be unloaded automatically
# load a global profile
load_profile('my_profile_2')
node_from_profile_2 = orm.load_node(1)
# switch to a different global profile
load_profile('my_profile_3', allow_switch=True)
node_from_profile_3 = orm.load_node(1)
See How to interact with AiiDA for more details.
On first using aiida-core v2.0, your AiiDA configuration will be automatically migrated to the new version (this can be reverted by verdi config downgrade).
To update existing profiles and archives to the new storage formats, simply use verdi storage migrate and verdi archive migrate, respectively.
Important
The migration of large storage repositories is a potentially time-consuming process. It may take several hours to complete, depending on the size of the repository. It is also advisable to make a full manual backup of any AiiDA setup with important data: see the installation management section for more information.
See also this testing of profile migrations, for some indicative timings.
Improvements to the AiiDA ORM 👌#
Node repository#
Inline with the storage improvements, Node methods associated with the repository have some backwards incompatible changes:
Node repository method changes
Altered:
FileType: moved fromaiida.orm.utils.repositorytoaiida.repository.commonFile: moved fromaiida.orm.utils.repositorytoaiida.repository.commonFile: changed from namedtuple to classFile: can no longer be iterated overFile:typeattribute was renamed tofile_typeNode.put_object_from_tree:pathargument was renamed tofilepathNode.put_object_from_file:pathargument was renamed tofilepathNode.put_object_from_tree:keyargument was renamed topathNode.put_object_from_file:keyargument was renamed topathNode.put_object_from_filelike:keyargument was renamed topathNode.get_object:keyargument was renamed topathNode.get_object_content:keyargument was renamed topathNode.open:keyargument was renamed topathNode.list_objects:keyargument was renamed topathNode.list_object_names:keyargument was renamed topathSinglefileData.open:keyargument was renamed topathNode.open: can no longer be called without context managerNode.open: only moderandrbare supported, useput_object_from_methods insteadNode.get_object_content: only moderandrbare supportedNode.put_object_from_tree: argumentcontents_onlywas removedNode.put_object_from_tree: argumentforcewas removedNode.put_object_from_file: argumentforcewas removedNode.put_object_from_filelike: argumentforcewas removedNode.delete_object: argumentforcewas removed
Added:
Node.walkNode.copy_treeNode.is_valid_cachesetterNode.objects.iter_repo_keys
Additionally, Node.open should always be used as a context manager, for example:
with node.open('filename.txt') as handle:
content = handle.read()
QueryBuilder#
When using the QueryBuilder to query the database, the following changes have been made:
The
Computer’snamefield is now replaced withlabel(as previously deprecated in v1.6)The
QueryBuilder.queryhelpattribute is deprecated, for theas_dict(andfrom_dict) methodsThe
QueryBuilder.firstmethod now allows theflatargument, which will return a single item, instead of a list of one item, if only a single projection is defined.
For example:
from aiida.orm import QueryBuilder, Computer
query = QueryBuilder().append(Computer, filters={'label': 'localhost'}, project=['label']).as_dict()
QueryBuilder.from_dict(query).first(flat=True) # -> 'localhost'
For further information, see How to find and query for data.
Dict usage#
The Dict class has been updated to support more native dict behaviour:
Initialisation can now use
Dict({'a': 1}), instead ofDict(dict={'a': 1}). This is also the case forList([1, 2]).Equality (
==/!=) comparisons now compare the dictionaries, rather than the UUIDsThe contains (
in) operator now returnsTrueif the dictionary contains the keyThe
itemsmethod iterates a list of(key, value)pairs
For example:
from aiida.orm import Dict
d1 = Dict({'a': 1})
d2 = Dict({'a': 1})
assert d1.uuid != d2.uuid
assert d1 == d2
assert not d1 != d2
assert 'a' in d1
assert list(d1.items()) == [('a', 1)]
New data types#
Two new built-in data types have been added:
EnumDataA data plugin that wraps a Python
enum.Enuminstance.JsonableDataA data plugin that allows one to easily wrap existing objects that are JSON-able (via an
as_dictmethod).
See the data types section for more information.
Improvements to the AiiDA process engine 👌#
CalcJob API#
A number of minor improvements have been made to the CalcJob API:
Both numpy arrays and
Enuminstances can now be serialized on process checkpoints.The
Calcjob.spec.metadata.options.rerunnableoption allows to specify whether the calculation can be rerun or requeued (dependent on the scheduler). Note, this should only be applied for idempotent codes.The
Calcjob.spec.metadata.options.environment_variables_double_quotesoption allows for double-quoting of environment variable declarations. In particular, this allows for use of the$character in the environment variable name, e.g.export MY_FILE="$HOME/path/my_file".CalcJob.local_copy_listnow allows for specifying entire directories to be copied to the local computer, in addition to individual files. Note that the directory itself won’t be copied, just its contents.WorkChain.to_contextnow allows.delimited namespacing, which generate nested dictionaries. See Nested context keys for more information.
Importing existing computations#
The new CalcJobImporter class has been added, to define importers for computations completed outside of AiiDA.
These can help onboard new users to your AiiDA plugin.
For more information, see Writing importers for existing computations.
Scheduler plugins#
Plugin’s implementation of Scheduler._get_submit_script_header should now utilise Scheduler._get_submit_script_environment_variables, to format environment variable declarations, rather than handling it themselves. See the exemplar changes in #5283.
The Scheduler.get_valid_transports() method has also been removed, use get_entry_point_names('aiida.schedulers') instead (see get_entry_point_names()).
See Scheduler plugins for more information.
Transport plugins#
The SshTransport now supports the SSH ProxyJump option, for tunnelling through other SSH hosts.
See How to setup SSH connections for more information.
Transport plugins now support also transferring bytes (rather than only Unicode strings) in the stdout/stderr of “remote” commands (see #3787). The required changes for transport plugins:
rename the
exec_command_waitfunction in your plugin implementation withexec_command_wait_bytesensure the method signature follows
exec_command_wait_bytes(), and thatstdinaccepts abytesobject.return bytes for stdout and stderr (most probably internally you are already getting bytes - just do not decode them to strings)
For an exemplar implementation, see exec_command_wait_bytes(),
or see Transport plugins for more information.
The Transport.get_valid_transports() method has also been removed, use get_entry_point_names('aiida.transports') instead (see get_entry_point_names()).
Improvements to the AiiDA command-line 👌#
The AiiDA command-line interface (CLI) can now be accessed as both verdi and /path/to/bin/python -m aiida.
The underlying dependency for this CLI, click, has been updated to version 8, which contains built-in tab-completion support, to replace the old click-completion.
The completion works the same, except that the string that should be put in the activation script to enable it is now shell-dependent.
See Activating tab-completion for more information.
Logging for the CLI has been updated, to standardise its use across all CLI commands. This means that all commands include the option:
-v, --verbosity [notset|debug|info|report|warning|error|critical]
Set the verbosity of the output.
By default the verbosity is set to REPORT (see verdi config list), which relates to using Logger.report, as defined in report().
The following specific changes and improvements have been made to the CLI commands:
verdi storage(replacesverdi database)This command group replaces the
verdi databasecommand group, which is now deprecated, in order to represent its interaction with the full profile storage (not just database).verdi storage infoprovides information about the entities contained for a profile.verdi storage maintainhas also been added, to allow for maintenance of the storage, for example, to optimise the storage size.verdi archive versionandverdi archive info(replaceverdi archive inspect)This change synchronises the commands with the new
verdi storage versionandverdi storage infocommands.verdi group move-nodesThis command moves nodes from a source group to a target group (removing them from one and adding them to the other).
verdi code setupThere is a small change to the order of prompts, in interactive mode.
The uniqueness of labels is now validated, for both remote and local codes.
verdi code testRun tests for a given code to check whether it is usable, including whether remote executable files are available.
See AiiDA Command Line for more information.
Development improvements#
The build tool for aiida-core has been changed from setuptools to flit.
This allows for the project metadata to be fully specified in the pyproject.toml file, using the PEP 621 format.
Note, editable installs (using the -e flag for pip install) of aiida-core now require pip>=21.
Type annotations have been added to most of the code base. Plugin developers can use mypy to check their code against the new type annotations.
All module level imports are now defined explicitly in __all__.
See Overview of public API for more information.
The aiida.common.json module is now deprecated.
Use the json standard library instead.
Changes to the plugin test fixtures 🧪#
The deprecated AiidaTestCase class has been removed, in favour of the AiiDA pytest fixtures, which can be loaded in your conftest.py using:
pytest_plugins = ['aiida.manage.tests.pytest_fixtures']
The fixtures clear_database, clear_database_after_test, clear_database_before_test are now deprecated, in favour of the aiida_profile_clean fixture, which ensures (before the test) the default profile is reset with clean storage, and that all previous resources are closed
If you only require the profile to be reset before a class of tests, then you can use aiida_profile_clean_class.
Key Pull Requests#
Below is a list of some key pull requests that have been merged into version 2.0.0b1:
Storage and migrations:
♻️ REFACTOR: Implement the new file repository by @sphuber in #4345
♻️ REFACTOR: New archive format by @chrisjsewell in #5145
♻️ REFACTOR: Remove
QueryManagerby @chrisjsewell in #5101♻️ REFACTOR: Fully abstract QueryBuilder by @chrisjsewell in #5093
✨ NEW: Add
Backendbulk methods by @chrisjsewell in #5171⬆️ UPDATE: SQLAlchemy v1.4 (v2 API) by @chrisjsewell in #5103 and #5122
👌 IMPROVE: Configuration migrations by @chrisjsewell in #5319
♻️ REFACTOR: Remove Django storage backend by @chrisjsewell in #5330
♻️ REFACTOR: Move archive backend to
aiida/storageby @chrisjsewell in 5375👌 IMPROVE: Use
sqlalchemy.funcfor JSONB QB filters by @ltalirz in #5393✨ NEW: Add Mechanism to lock profile access by @ramirezfranciscof in #5270
✨ NEW: Add
verdi storageCLI by @ramirezfranciscof in #4965 and #5156
ORM API:
♻️ REFACTOR: Add the
core.prefix to all entry points by @sphuber in #5073👌 IMPROVE: Replace
InputValidationErrorwithValueErrorandTypeErrorby @sphuber in #4888👌 IMPROVE: Add
Node.walkmethod to iterate over repository content by @sphuber in #4935👌 IMPROVE: Add
Node.copy_treemethod by @sphuber in #5114👌 IMPROVE: Add
Node.is_valid_cachesetter property by @sphuber in #5114👌 IMPROVE: Add
Node.objects.iter_repo_keysby @chrisjsewell in #5114👌 IMPROVE: Allow storing
DecimalinNode.attributesby @dev-zero in #4964🐛 FIX: Initialising a
Nodewith aUserby @chrisjsewell in #5114🐛 FIX: Deprecate double underscores in
LinkManagercontains by @sphuber in #5067♻️ REFACTOR: Rename
namefield ofComputertolabelby @sphuber in #4882♻️ REFACTOR:
QueryBuilder.queryhelp->QueryBuilder.as_dictby @chrisjsewell in #5081👌 IMPROVE: Add
AuthInfojoins toQueryBuilderby @chrisjsewell in #5195👌 IMPROVE:
QueryBuilder.firstaddflatkeyword by @sphuber in #5410👌 IMPROVE: Add
Computer.default_memory_per_machineattribute by @yakutovicha in #5260👌 IMPROVE: Add
Code.validate_remote_exec_pathmethod to check executable by @sphuber in #5184👌 IMPROVE: Allow
sourceto be passed as a keyword toData.__init__by @sphuber in #5163👌 IMPROVE:
Dict.__init__andList.__init__by @mbercx in #5165‼️ BREAKING: Compare
Dictnodes by content by @mbercx in #5251👌 IMPROVE: Implement the
Dict.__contains__method by @sphuber in #5251👌 IMPROVE: Implement
Dict.items()method by @mbercx in #5251🐛 FIX:
BandsData.show_mplallow NaN values by @PhilippRue in #5024🐛 FIX: Replace
KeyErrorwithAttributeErrorinTrajectoryDatamethods by @Crivella in #5015✨ NEW:
EnumDatadata plugin by @sphuber in #5225✨ NEW:
JsonableDatadata plugin by @sphuber in #5017👌 IMPROVE: Register
Listclass withto_aiida_typedispatch by @sphuber in #5142👌 IMPROVE: Register
EnumDataclass withto_aiida_typedispatch by @sphuber in #5314
Processing:
✨ NEW:
CalcJob.get_importer()to import existing calculations, run outside of AiiDA by @sphuber in #5086✨ NEW:
ProcessBuilder._repr_pretty_ipython representation by @mbercx in #4970👌 IMPROVE: Allow
Enumtypes to be serialized onProcessNode.checkpointby @sphuber in #5218👌 IMPROVE: Allow numpy arrays to be serialized on
ProcessNode.checkpointby @greschd in #4730👌 IMPROVE: Add
Calcjob.spec.metadata.options.rerunnableto requeue/rerun calculations by @greschd in #4707👌 IMPROVE: Add
Calcjob.spec.metadata.options.environment_variables_double_quotesto escape environment variables by @unkcpz in #5349👌 IMPROVE: Allow directories in
CalcJob.local_copy_listby @sphuber in #5115👌 IMPROVE: Add support for
.namespacing in the keys forWorkChain.to_contextby @dev-zero in #4871👌 IMPROVE: Handle namespaced outputs in
BaseRestartWorkChainby @unkcpz in #4961🐛 FIX: Nested namespaces in
ProcessBuilderNamespaceby @sphuber in #4983🐛 FIX: Ensure
ProcessBuilderinstances do not interfere by @sphuber in #4984🐛 FIX: Raise when
Process.exposed_outputsgets non-existingnamespaceby @sphuber in #5265🐛 FIX: Catch
AttributeErrorfor unloadable identifier inProcessNode.is_valid_cacheby @sphuber in #5222🐛 FIX: Handle
CalcInfo.codes_run_modewhenCalcInfo.codes_infocontains multiple codes by @unkcpz in #4990🐛 FIX: Check for recycled circus PID by @dev-zero in #5086
Scheduler/Transport:
👌 IMPROVE: Specify abstract methods on
Transportby @chrisjsewell in #5242✨ NEW: Add support for SSH proxy_jump by @dev-zero in #4951
🐛 FIX: Daemon hang when passing
Noneasjob_idby @ramirezfranciscof in #4967🐛 FIX: Avoid deadlocks when retrieving stdout/stderr via SSH by @giovannipizzi in #3787
🐛 FIX: Use sanitised variable name in SGE scheduler job title by @mjclarke94 in #4994
🐛 FIX:
listdirmethod with pattern for SSH by @giovannipizzi in #5252👌 IMPROVE:
DirectScheduler: usenum_cores_per_mpiprocif defined in resources by @sphuber in #5126👌 IMPROVE: Add abstract generation of submit script env variables to
Schedulerby @sphuber in #5283
CLI:
✨ NEW: Allow for CLI usage via
python -m aiidaby @chrisjsewell in #5356⬆️ UPDATE:
click==8.0and removeclick-completionby @sphuber in #5111♻️ REFACTOR: Replace
verdi databasecommands withverdi storageby @ramirezfranciscof in #5228✨ NEW: Add verbosity control by @sphuber in #5085
♻️ REFACTOR: Logging verbosity implementation by @sphuber in #5119
✨ NEW: Add
verdi group move-nodescommand by @mbercx in #4428👌 IMPROVE:
verdi code setup: validate the uniqueness of label for local codes by @sphuber in #5215👌 IMPROVE:
GroupParamType: store group if created by @sphuber in #5411👌 IMPROVE: Show #procs/machine in
verdi computer showby @dev-zero in #4945👌 IMPROVE: Notify users of runner usage in
verdi process listby @ltalirz in #4663👌 IMPROVE: Set
localhostas default for database hostname inverdi setupby @sphuber in #4908👌 IMPROVE: Make
verdi groupmessages consistent by @CasperWA in #4999🐛 FIX:
verdi calcjob cleanworkdircommand by @zhubonan in #5209🔧 MAINTAIN: Add
verdi devel run-sqlby @chrisjsewell in #5094
REST API:
Developers:
🔧 MAINTAIN: Move to flit for PEP 621 compliant package build by @chrisjsewell in #5312
🔧 MAINTAIN: Make
__all__imports explicit by @chrisjsewell in #5061🔧 MAINTAIN: Add
pre-commit.ciby @chrisjsewell in #5062🔧 MAINTAIN: Add isort pre-commit hook by @chrisjsewell in #5151
⬆️ UPDATE: Drop support for Python 3.7 by @sphuber in #5307
⬆️ UPDATE: Support Python 3.10 by @csadorf in #5188
♻️ REFACTOR: Remove
reentryrequirement by @chrisjsewell in #5058♻️ REFACTOR: Remove
simplejsonby @sphuber in #5391♻️ REFACTOR: Remove
ete3dependency by @ltalirz in #4956👌 IMPROVE: Replace deprecated imp with importlib by @DirectriX01 in #4848
⬆️ UPDATE:
sphinx~=4.1(+ sphinx extensions) by @chrisjsewell in #5420🧪 CI: Move time consuming tests to separate nightly workflow by @sphuber in #5354
🧪 TESTS: Entirely remove
AiidaTestCaseby @chrisjsewell in #5372
Contributors 🎉#
Thanks to all contributors: Contributor Graphs
Including first-time contributors:
v1.6.7 - 2022-03-07#
The markupsafe dependency specification was moved to install_requires
v1.6.6 - 2022-03-07#
Bug fixes 🐛#
Dependencies#
Devops 🔧#
v1.6.5 - 2021-08-13#
This patch release contains a number of helpful bug fixes and improvements.
Improvements 👌#
Add support for the
ProxyJumpSSH config option for seting up an arbitrary number of proxy jumps without additional processes by creating TCP channels over existing SSH connections. This provides improved control over the lifetime of the different connections. See SSH configuration for further details. [#4951]Allow numpy arrays to be serialized to a process checkpoint. [#4730)])
Add the
_mergemethod toProcessBuilder, to update the builder with a nested dictionary. [#4983)])verdi setup: Set the defaut database hostname aslocalhost. [#4908]Allow
Node.__init__to be constructed with a specificUsernode. [#4977]Minimize database logs of failed schema version retrievals. [#5056]
Remove duplicate call of normal
callbackforInteractiveOption. [#5064]Update requirement
pyyaml~=5.4, which contains critical security fixes. [#5060]
Bug Fixes 🐛#
Fix regression issue with
__contains__operator inLinkManager, when using double underscores, e.g. for'some__nested__namespace' in calc.inputs. #5067Stop deprecation warning being shown when tab-completing incoming and outgoing node links. [#5011]
Stop possible command hints being shown when attempting to tab complete
verdicommands that do not exist. [#5012]Do not use
get_detailed_job_infowhen retrieving a calculation job, if no job id is set. [#4967]Race condition when two processes try to create the same
Folder/SandboxFolder, [#4912]Return the whole nested namespace when using
BaseRestartWorkChain.result. [#4961]Use
numpy.nanminandnumpy.nanmaxfor computing y-limits ofBandsDatamatplotlib methods. [#5024]Use sanitized job title with
SgeSchedulerscheduler. [#4994]
v1.6.4 - 2021-06-23#
This is a patch release to pin psycopg2-binary to version 2.8.x, to avoid an issue with database creation in version 2.9 (#4989).
v1.6.3 - 2021-04-28#
full changelog | GitHub contributors page for this release
This is a patch release to fix a bug that was introduced in v1.6.2 that would cause a number of verdi commands to fail due to a bug in the with_dbenv decorator utility.
Bug fixes#
Fix
aiida.cmdline.utils.decorators.load_backend_if_not_loaded[#4878]
v1.6.2 - 2021-04-28#
full changelog | GitHub contributors page for this release
Bug fixes#
CLI: Use the proper proxy command for
verdi calcjob gotocomputerif configured as such [#4761]Respect nested output namespaces in
Process.exposed_outputs[#4863]NodeLinkManagernow properly regenerates original nested namespaces from the flat link labels stored in the database. This means one can now donode.outputs.some.nested.outputinstead of having to donode.outputs.some__nested__output. The same goes fornode.inputs[#4625]Fix
aiida.cmdline.utils.decorators.with_dbenvalways loading the database. Now it will only load the database if not already loaded, as intended [#4865]
Features#
Add the
accountoption to theLsfSchedulerscheduler plugin [#4832]
Documentation#
Update ssh proxycommand section with instructions on how to handle cases where the SSH key needs to be specified for the proxy server [#4839]
Add the “How to extend workflows” section, explaining the use of the
expose_inputsandexpose_outputsfeatures, as well as nested namespaces [#4562]Add help in intro for when quicksetup fails due to problems autodetecting the PostgreSQL settings [#4838]
v1.6.1 - 2021-03-31#
full changelog | GitHub contributors page for this release
This patch release is primarily intended to fix a regression in the aiida_profile test fixture, used by plugin developers, causing config validation errors (#4831).
Other additions:
✨ NEW: Added
structure.data.importentry-point, allowing for plugins to define file-format specific sub-commands ofverdi data structure import(#4427).✨ NEW: Added
--labeland--groupoptions toverdi data structure import, which apply a label/group to all structures being imported (#4429).⬆️ UPDATE:
psgudependency increased tov0.2.x. This fixes a bug inverdi quicksetup, when used on the Windows Subsystem for Linux (WSL) platform (#4834).🐛 FIX:
metadata.options.max_memory_kbis now ignored when using the direct scheduler (#4825). This was previously imposing a a virtual memory limit withulimit -v, which is very different to the physical memory limit that other scheduler plugins impose. No straightforward way exists to directly limit the physical memory usage for this scheduler.🐛 FIX: Added
__str__method to theOrbitalclass, fixing a recursion error (#4829).
v1.6.0 - 2021-03-15#
full changelog | GitHub contributors page for this release
As well as introducing a number of improvements and new features listed below, this release marks the “under-the-hood” migration from the tornado package to the Python built-in module asyncio, for handling asynchronous processing within the AiiDA engine.
This removes a number of blocking dependency version clashes with other tools, in particular with the newest Jupyter shell and notebook environments.
The migration does not present any backward incompatible changes to AiiDA’s public API.
A substantial effort has been made to test and debug the new implementation, and ensure it performs at least equivalent to the previous code (or improves it!), but please let us know if you uncover any additional issues.
This release also drops support for Python 3.6 (testing is carried out against 3.7, 3.8 and 3.9).
NOTE: v1.6 is tentatively intended to be the final minor v1.x release before v2.x, that will include a new file repository implementation and remove all deprecated code.
New calculation features ✨#
The additional_retrieve_list metadata option has been added to CalcJob (#4437).
This new option allows one to specify additional files to be retrieved on a per-instance basis, in addition to the files that are already defined by the plugin to be retrieved.
A new namespace stash has bee added to the metadata.options input namespace of the CalcJob process (#4424).
This option namespace allows a user to specify certain files that are created by the calculation job to be stashed somewhere on the remote.
This can be useful if those files need to be stored for a longer time than the scratch space (where the job was run) is available for, but need to be kept on the remote machine and not retrieved.
Examples are files that are necessary to restart a calculation but are too big to be retrieved and stored permanently in the local file repository.
See Stashing files on the remote for more details.
The new TransferCalcjob plugin (#4194) allows the user to copy files between a remote machine and the local machine running AiiDA.
More specifically, it can do any of the following:
Take any number of files from any number of
RemoteDatafolders in a remote machine and copy them in the local repository of a single newly createdFolderDatanode.Take any number of files from any number of
FolderDatanodes in the local machine and copy them in a single newly createdRemoteDatafolder in a given remote machine.
See the Transferring data how-to for more details.
Profile configuration improvements 👌#
The way the global/profile configuration is accessed has undergone a number of distinct changes (#4712):
When loaded, the
config.json(found in the.aiidafolder) is now validated against a JSON Schema that can be found inaiida/manage/configuration/schema.The schema includes a number of new global/profile options, including:
transport.task_retry_initial_interval,transport.task_maximum_attempts,rmq.task_timeoutandlogging.aiopika_loglevel(#4583).The
cache_config.ymlhas now also been deprecated and merged into theconfig.json, as part of the profile options. This merge will be handled automatically, upon first load of theconfig.jsonusing the new AiiDA version.
In-line with these changes, the verdi config command has been refactored into separate commands, including verdi config list, verdi config set, verdi config unset and verdi config caching.
See the Configuring profile options and Configuring caching how-tos for more details.
Command-line additions and improvements 👌#
In addition to verdi config, numerous other new commands and options have been added to verdi:
Deprecated
verdi exportandverdi importcommands (replaced by newverdi archive) (#4710)Added
verdi group delete --delete-nodes, to also delete the nodes in a group during its removal (#4578).Improved
verdi group remove-nodescommand to warn when requested nodes are not in the specified group (#4728).Added
exceptionto the projection mapping ofverdi process list, for example to use in debugging as:verdi process list -S excepted -P ctime pk exception(#4786).Added
verdi database summary(#4737): This prints a summary of the count of each entity and (optionally) the list of unique identifiers for some entities.Improved
verdi process playperformance, by only querying for active processes with the--allflag (#4671)Added the
verdi database versioncommand (#4613): This shows the schema generation and version of the database of the given profile, useful mostly for developers when debugging.Improved
verdi node deleteperformance (#4575): The logic has been re-written to greatly reduce the time to delete large amounts of nodes.Fixed
verdi quicksetup --non-interactive, to ensure it does not include any user prompts (#4573)Fixed
verdi --versionwhen used in editable mode (#4576)
API additions and improvements 👌#
The base Node class now evaluates equality based on the node’s UUID (#4753).
For example, loading the same node twice will always resolve as equivalent: load_node(1) == load_node(1).
Note that existing, class specific, equality relationships will still override the base class behaviour, for example: Int(99) == Int(99), even if the nodes have different UUIDs.
This behaviour for subclasses is still under discussion at: aiidateam/aiida-core#1917
When hashing nodes for use with the caching features, -0. is now converted to 0., to reduce issues with differing hashes before/after node storage (#4648).
Known failure modes for hashing are now also raised with the HashingError exception (#4778).
Both aiida.tools.delete_nodes (#4578) and aiida.orm.to_aiida_type (#4672) have been exposed for use in the public API.
A pathlib.Path instance can now be used for the file argument of SinglefileData (#3614)
Type annotations have been added to all inputs/outputs of functions and methods in aiida.engine (#4669) and aiida/orm/nodes/processes (#4772).
As outlined in PEP 484, this improves static code analysis and, for example, allows for better auto-completion and type checking in many code editors.
New REST API Query endpoint ✨#
The /querybuilder endpoint is the first POST method available for AiiDA’s RESTful API (#4337)
The POST endpoint returns what the QueryBuilder would return, when providing it with a proper queryhelp dictionary (see the documentation here).
Furthermore, it returns the entities/results in the “standard” REST API format - with the exception of link_type and link_label keys for links (these particular keys are still present as type and label, respectively).
For security, POST methods can be toggled on/off with the verdi restapi --posting/--no-posting options (it is on by default).
Although note that this option is not yet strictly public, since its naming may be changed in the future!
See AiiDA REST API documentation for more details.
Additional Changes#
Fixed the direct scheduler which, in combination with
SshTransport, was hanging on submit command (#4735). In the ssh transport, to emulate ‘chdir’, the current directory is now kept in memory, and every command prepended withcd FOLDER_NAME && ACTUALCOMMAND.In
aiida.tools.ipython.ipython_magics,load_ipython_extensionhas been deprecated in favour ofregister_ipython_extension(#4548).Refactored
.ci/folder to make tests more portable and easier to understand (#4565) Theci/folder had become cluttered, containing configuration and scripts for both the GitHub Actions and Jenkins CI. This change moved the GH actions specific scripts to.github/system_tests, and refactored the Jenkins setup/tests to use molecule in the.molecule/folder.For aiida-core development, the pytest
requires_rmqmarker andconfig_with_profilefixture have been added (#4739 and #4764)
v1.5.2 - 2020-12-07#
Note: release v1.5.1 was skipped due to a problem with the uploaded files to PyPI.
Bug fixes#
Developers#
v1.5.0 - 2020-11-13#
In this minor version release, support for Python 3.9 is added [#4301], while support for Python 3.5 is dropped [#4386]. This version is compatible with all current Python versions that are not end-of-life:
3.6
3.7
3.8
3.9
Features#
Process functions (
calcfunctionandworkfunction) can now be submitted to the daemon just likeCalcJobs andWorkChains [#4539]REST API: list endpoints at base URL [#4412]
REST API: new
full_types_countendpoint that counts the number of nodes for each type of node [#4277]ProcessBuilder: allow unsetting of inputs through attribute deletion [#4419]verdi migrate: make--in-placework across different file systems [#4393]
Improvements#
Added remaining original documentation that didn’t make it into the first step of the recent major overhaul of v1.3.0
verdi process show: order by ctime and print process label [#4407]LinkManager: fix inaccuracy in exception message for non-existent link [#4388]Add
resetmethod toProgressReporterAbstract[#4522]Improve the deprecation warning for
Node.openoutside context manager [#4434]
Bug fixes#
SlurmScheduler: fix bug in validation of job resources [#4555]Fix
ZeroDivisionErrorin worker slots check [#4513]CalcJob: only attempt to clean up the retrieve temporary folder after parsing if it is present [#4379]Add missing entry point groups to the mapping [#4395]
REST API: the
process_typecan now identify pathological empty-stringed or null entries in the database [#4277]
Developers#
verdi group delete: deprecate and ignore the--clearoption [#4357]Replace old format string interpolation with f-strings [#4400]
CI: move
pylintconfiguration topyproject.toml[#4411]CI: use
-einstall for tox + add docker-compose for isolated RabbitMQ [#4375]CI: add coverage patch threshold to prevent false positives [#4413]
CI: Allow for mypy type checking of third-party imports [#4553]
Dependencies#
Update requirement
pytest~=6.0and usepyproject.toml[#4410]
Archive (import/export) refactor#
The refactoring goal was to pave the way for the implementation of a new archive format in v2.0.0 ( aiidateamAEP005)
Three abstract+concrete interface classes are defined; writer, reader, migrator, which are independent of theinternal structure of the archive. These classes are used within the export/import code.
The code in
aiida/tools/importexporthas been largely re-written, in particular addingaiida/toolsimportexport/archive, which contains this code for interfacing with an archive, and does not require connectionto an AiiDA profile.The export logic has been re-written; to minimise required queries (faster), and to allow for “streaming” datainto the writer (minimise RAM requirement with new format). It is intended that a similiar PR will be made for the import code.
A general progress bar implementation is now available in
aiida/common/progress_reporter.py. All correspondingCLI commands now also have--verbosityoption.Merged PRs:
Updated archive version from
0.9->0.10(#4561Deprecations:
export_zip,export_tar,export_tree,extract_zip,extract_tarandextract_treefunctions.silentkey-word in theexportfunctionRemoved:
ZipFolderclass
v1.4.4#
This patch is a backport for 2 of the fixes in v1.5.2.
Bug fixes#
Dict: accessing an inexistent key now raises aKeyError(instead of anAttributeError) [#4616]
Developers#
CI: manually install
numpyto prevent incompatible releases [#4615]
v1.4.3#
Bug fixes#
v1.4.2#
Critical bug fixes#
CalcJob: make surelocal_copy_listfiles do not end up in the node’s repository folder [#4415]
v1.4.1#
Improvements#
verdi setup: forward broker defaults to interactive mode [#4405]
Bug fixes#
v1.4.0#
Improvements#
Features#
Make the RabbitMQ connection parameters configurable [#4341]
Add infrastructure to parse scheduler output for
CalcJobs[#3906]Add support for “peer” authentication with PostgreSQL [#4255]
Add the
--pausedflag toverdi process list[#4213]Make the loglevel of the daemonizer configurable [#4276]
Transport: add option to not use a login shell for all commands [#4271]Implement
skip_ormoption for SqlAlchemyGroup.remove_nodes[#4214]Dict: allow setting attributes through setitem andAttributeManager[#4351]CalcJob: allow nested target paths forlocal_copy_list[#4373]verdi export migrate: add--in-placeflag to migrate archive in place [#4220]
Bug fixes#
verdi: make--prepend-textand--append-textoptions properly interactive [#4318]verdi computer test: fix failing result in harmlessstderrresponses [#4316]QueryBuilder: Accept empty string forentity_typeinappendmethod [#4299]verdi status: do not except when no profile is configured [#4253]ArithmeticAddParser: attach output before checking for negative value [#4267]CalcJob: fix bug inretrieve_listaffecting entries without wildcards [#4275]TemplateReplacerCalculation: makefilesnamespace dynamic [#4348]
Developers#
Dependencies#
Deprecations#
Changes#
v1.3.1#
Bug fixes:#
v1.3.0#
Improvements#
Performance#
Features#
Add a progress bar for export and import related functionality [#3599]
Enable loading config.yml files from URL in
verdicommands with--configoption [#3977]QueryBuilder: add theflatargument to the.all()method [#3945]verdi status: add--no-rmqflag to skip the RabbitMQ check [#4181]Add support for process functions in
verdi plugin list[#4117]Allow profile selection in ipython magic
%aiida[#4071]Support more complex formula formats in
aiida.orm.data.cif.parse_formula[#3954]
Bug fixes#
BaseRestartWorkChain: do not assumemetadataexists in inputs inrun_process[#4210]BaseRestartWorkChain: fix bug ininspect_process[#4166]BaseRestartWorkChain: fix the “unhandled failure mechanism” for dealing with failures of subprocesses [#4155]Fix exception handling in commands calling
list_repository_contents[#3968]Fix bug in
Code.get_full_text_info[#4083]Fix bug in
verdi daemon restart --reset[#3969]Fix tab-completion for
LinkManagerandAttributeManager[#3985]CalcJobResultManager: fix bug that broke tab completion [#4187]SshTransport.gettree: allow non-existing nested target directories [#4175]CalcJob: move job resource validation to theSchedulerclass fixing a problem for the SGE and LSF scheduler plugins [#4192]WorkChain: guarantee to maintain order of appended awaitables [#4156]Add support for binary files to the various
verdicat commands [#4077]Ensure
verdi group show --limitrespects limit even in raw mode [#4092]QueryBuilder: fix type string filter generation forGroupsubclasses [#4144]Raise when calling
Node.objects.deletefor node with incoming links [#4168]Properly handle multiple requests to threaded REST API [#3974]
NodeTranslator: do not assumeget_export_formatsexists [#4188]Only color directories in
verdi node repo ls --color[#4195]
Developers#
Add arithmetic workflows and restructure calculation plugins [#4124]
Add minimal
mypyrun to the pre-commit hooks. [#4176]Fix timeout in
tests.cmdline.commands.test_process:test_pause_play_kill[#4052]Revise update-dependency flow to resolve issue #3930 [#3957]
Add GitHub action for transifex upload [#3958]
Deprecations#
The
get_valid_schedulersclass method of theSchedulerclass has been deprecated in favor ofaiida.plugins.entry_point.get_entry_point_names[#4192]
v1.2.1#
In the fixing of three bugs, three minor features have been added along the way.
Features#
Add config option
daemon.worker_process_slotsto configure the maximum number of concurrent tasks each daemon worker can handle [#3949]Add config option
daemon.default_workersto set the default number of workers to be started byverdi daemon start[#3949]CalcJob: make submit script filename configurable through themetadata.options[#3948]
Bug fixes#
CalcJob: fix bug in idempotency check of upload transport task [#3948]REST API: reintroduce CORS headers, the lack of which was breaking the Materials Cloud provenance explorer [#3951]
Remove the equality operator of
ExitCodewhich caused the serialization of workchains to fail if put in the workchain context [#3940]
Deprecations#
The
hookupargument ofaiida.restapi.run_apiand the--hookupoption ofverdi restapiare deprecated [#3951]
v1.2.0#
Features#
ExitCode: make the exit message parameterizable through templates [#3824]GroupPath: a utility to work with virtualGrouphierarchies [#3613]Make
Groupsub classable through entry points [#3882][#3903][#3926]Add auto-complete support for
CodeParamTypeandGroupParamType[#3926]Add export archive migration for
Grouptype strings [#3912]Add the
-v/--versionoption toverdi export migrate[#3910]Add the
-l/--limitoption toverdi group show[#3857]Add the
--order-by/--order-directionoptions toverdi group list[#3858]Add
prepend_textandappend_texttoaiida_local_code_factorypytest fixture [#3831]REST API: make it easier to call
run_apiin wsgi scripts [#3875]Plot bands with only one kpoint [#3798]
Bug fixes#
Improved validation for CLI parameters [#3894]
Ensure unicity when creating instances of
Autogroup[#3650]Prevent nodes without registered entry points from being stored [#3886]
Fix the
RotatingFileHandlerconfiguration of the daemon logger[#3891]Ensure log messages are not duplicated in daemon log file [#3890]
Convert argument to
strinaiida.common.escaping.escape_for_bash[#3873]Remove the return statement of
RemoteData.getfile()[#3742]Support for
BandsDatanodes withoutStructureDataancestors [#3817]
Deprecations#
Deprecate
--group-typeoption in favor of--type-stringforverdi group list[#3926]
Documentation#
Developers#
Deduplicate code for tests of archive migration code [#3924]
CI: use GitHub Actions services for PostgreSQL and RabbitMQ [#3901]
Move
aiida.manage.external.pgsuto external packagepgsu[#3892]Cleanup the top-level directory of the repository [#3738]
Remove unused
orm.implementation.utilsmodule [#3877]Revise dependency management workflow [#3771]
Re-add support for Coverage reports through codecov.io [#3618]
v1.1.1#
Changes#
Emit a warning when input port specifies a node instance as default [#3466]
BaseRestartWorkChain: require process handlers to be instance methods [#3782]BaseRestartWorkChain: add method to enable/disable process handlers [#3786]Docker container: remove conda activation from configure-aiida.sh script [#3791]
Add fixtures to clear the database before or after tests [#3783]
verdi status: add the configuration directory path to the output [#3587]QueryBuilder: add support fordatetime.dateobjects in filters [#3796]
Bug fixes#
Fix bugs in
Node._store_from_cacheandNode.repository.erasethat could result in calculations not being reused [#3777]Caching: fix configuration spec and validation [#3785]
Write migrated config to disk in
Config.from_file[#3797]Validate label string at code setup stage [#3793]
Reuse
prepend_textandappend_textinverdi computer/code duplicate[#3788]Fix broken imports of
urllibin various locations includingverdi import[#3767]Match headers with actual output for
verdi data structure list[#3756]Disable caching for the
Datanode subclass (this should not affect usual caching behavior) [#3807]
v1.1.0#
Nota Bene: although this is a minor version release, the support for python 2 is dropped (#3566) following the reasoning outlined in the corresponding AEP001.
Critical bug fixes for python 2 will be supported until July 1 2020 on the v1.0.* release series.
With the addition of python 3.8 (#3719), this version is now compatible with all current python versions that are not end-of-life:
3.5
3.6
3.7
3.8
Features#
Add the AiiDA Graph Explorer (AGE) a generic tool for traversing provenance graph [#3686]
Add the
BaseRestartWorkChainwhich makes it easier to write a simple work chain wrapper around another process with automated error handling [#3748]Add
provenance_exclude_listattribute toCalcInfodata structure, allowing to prevent calculation input files from being permanently stored in the repository [#3720]Add the
verdi node repo dumpcommand [#3623]Add more methods to control cache invalidation of completed process node [#3637]
Allow documentation to be build without installing and configuring AiiDA [#3669]
Add option to expand namespaces in sphinx directive [#3631]
Performance#
Changes#
CalcJob: movepresubmitcall fromCalcJob.runtoWaiting.execute[#3666]CalcJob: do not pause when exception thrown in thepresubmit[#3699]Move
CalcJobspec validator to corresponding namespaces [#3702]Move getting completed job accounting to
retrievetransport task [#3639]Move
last_job_infofrom JSON-serialized string to dictionary [#3651]Improve SqlAlchemy session handling for
QueryBuilder[#3708]Use built-in
openinstead ofio.open, which is possible now that python 2 is no longer supported [#3615]Add non-zero exit code for
verdi daemon status[#3729]
Bug fixes#
Deal with unreachable daemon worker in
get_daemon_status[#3683]Django backend: limit batch size for
bulk_createoperations [#3713]Make sure that datetime conversions ignore
None[#3628]Allow empty
key_filenameinverdi computer configure sshand reuse cooldown time when reconfiguring [#3636]Update
pyyamlto v5.1.2 to prevent arbitrary code execution [#3675]QueryBuilder: fix validation bug and improve message forinoperator [#3682]Consider ‘AIIDA_TEST_PROFILE’ in ‘get_test_backend_name’ [#3685]
Ensure correct types for
QueryBuilder().dict()with multiple projections [#3695]Make local modules importable when running
verdi run[#3700]Fix bug in
upload_calculationforCalcJobswith local codes [#3707]Add imports from
urllibto dbimporters [#3704]
Developers#
Moved continuous integration from Travis to Github actions [#3571]
Replace custom unit test framework for
pytestand move all tests toteststop level directory [#3653][#3674][#3715]Cleaned up direct dependencies and relaxed requirements where possible [#3597]
Set job poll interval to zero in localhost pytest fixture [#3605]
Make command line deprecation warnings visible with test profile [#3665]
Add docker image with minimal running AiiDA instance [#3722]
v1.0.1#
Improvements#
Improve the backup mechanism of the configuration file: unique backup written at each update [#3581]
Forward
verdi code deletetoverdi node delete[#3546]Homogenize and improve output of
verdi computer test[#3544]Scheduler SLURM: support
UNLIMITEDandNOT_SETas values for requested walltimes [#3586]Set default for the
safe_intervaloption ofverdi computer configure[#3590]Create backup of configuration file before migrating [#3568]
Add
python_requirestosetup.jsonnecessary for future dropping of python 2 [#3574]Remove unused QB methods/functions [#3526]
Move
pgtestargument ofTemporaryProfileManagerto constructor [#3486]Add
filenameargument toSinglefileDataconstructor [#3517]Mention machine in SSH connection exception message [#3536]
Docs: Expand on QB
order_byinformation [#3548]Replace deprecated pymatgen
site.species_and_occuwithsite.species[#3480]QueryBuilder: add deepcopy implementation andqueryhelpproperty [#3524]
Bug fixes#
Fix
verdi calcjob gotocomputerwhenkey_filenameis missing [#3593]Fix bug in database migrations where schema generation determination excepts for old databases [#3582]
Fix false positive for
verdi database integrity detect-invalid-links[#3591]Config migration: handle edge case where
daemonkey is missing fromdaemon_profiles[#3585]Raise when unable to detect name of local timezone [#3576]
Fix bug for
CalcJobdry runs withstore_provenance=False[#3513]Migrations for legacy and now illegal default link label
_return, export version upped to0.8[#3561]Fix REST API
attributes_filterandextras_filter[#3556]Fix bug in plugin
Factoryclasses for python 3.7 [#3552]Make
PolishWorkChainscheckpointable [#3532]REST API: fix generator of full node namespace [#3516]
v1.0.0#
Overview of changes#
The following is a summary of the major changes and improvements from v0.12.* to v1.0.0.
Faster workflow engine: the new message-based engine powered by RabbitMQ supports tens of thousands of processes per hour and greatly speeds up workflow testing. You can now run one daemon per AiiDA profile.
Faster database queries: the switch to JSONB for node attributes and extras greatly improves query speed and reduces storage size by orders of magnitude.
Robust calculations: AiiDA now deals with network connection issues (automatic retries with backoff mechanism, connection pooling, …) out of the box. Workflows and calculations are all Processes and can be “paused” and “played” anytime.
Better verdi commands: the move to the
clickframework brings homogenous command line options across all commands (loading nodes, …). You can easily add new commands through plugins.Easier workflow development: Input and output namespaces, reusing specs of sub-processes and less boilerplate code simplify writing WorkChains and CalcJobs, while also enabling powerful auto-documentation features.
Mature provenance model: Clear separation between data provenance (Calculations, Data) and logical provenance (Workflows). Old databases can be migrated to the new model automatically.
python3 compatible: AiiDA 1.0 is compatible with both python 2.7 and python 3.6 (and later). Python 2 support will be dropped in the coming months.
Detailed list of changes#
Below a (non-exhaustive) list of changes by category. Changes between 1.0 alpha/beta releases are not included - for those see the changelog of the corresponding releases.
Engine and daemon#
Implement the concept of an “exit status” for all calculations, allowing a programmatic definition of success or failure for all processes [#1189]
All calculations now go through the
Processlayer, homogenizing the state of work and job calculations [#1125]Allow
Noneas default for arguments of process functions [#2582]Implement the new
calcfunctiondecorator. [#2203]Each profile now has its own daemon that can be run completely independently in parallel [#1217]
Polling based daemon has been replaced with a much faster event-based daemon [#1067]
Replaced
CelerywithCircusas the daemonizer of the daemon [#1213]The daemon can now be stopped without loading the database, making it possible to stop it even if the database version does not match the code [#1231]
Implement exponential backoff retry mechanism for transport tasks [#1837]
Pause
CalcJobwhen transport task falls through exponential backoff [#1903]Separate
CalcJobsubmit task in folder upload and scheduler submit [#1946]Each daemon worker now respects an optional minimum scheduler polling interval [#1929]
Make the
execmanager.retrieve_calculationidempotent’ish [#3142]Make the
execmanager.upload_calculationidempotent’ish [#3146]Make the
execmanager.submit_calculationidempotent’ish [#3188]Implement a
PluginVersionProviderfor processes to automatically add versions ofaiida-coreand plugin to process nodes [#3131]
Processes#
Implement the
ProcessBuilderwhich simplifies the definition ofProcessinputs and the launching of aProcess[#1116]Namespaces added to the port containers of the
ProcessSpecclass [#1099]Convention of leading underscores for non-storable inputs is replaced with a proper
non_dbattribute of thePortclass [#1105]Implement a Sphinx extension for the
WorkChainclass to automatically generate documentation from the workchain definition [#1155]WorkChains can now expose the inputs and outputs of anotherWorkChain, which is great for writing modular workflows [#1170]Add built-in support and API for exit codes in
WorkChains [#1640], [#1704], [#1681]Implement method for
CalcJobNodeto create a restart builder [#1962]Add
CalculationToolsbase and entry pointaiida.tools.calculations[#2331]Generalize Sphinx workchain extension to processes [#3314]
Collapsible namespace in sphinxext [#3441]
The
retrieve_singlefile_listhas been deprecated and is replaced byretrieve_temporary_list[#3041]Automatically set
CalcInfo.uuidinCalcJob.run[#2874]Allow the usage of lambda functions for
InputPortdefault values [#3465]
ORM#
Implementat
AuthInfoclass which allows custom configuration per configured computer [#1184]Add efficient
countmethod foraiida.orm.groups.Group[#2567]Speed up creation of Nodes in the AiiDA ORM [#2214]
Enable use of tuple in
QueryBuilder.appendfor all ORM classes [#1608], [#1607]Refactor the ORM to have explicit front-end and back-end layers [#2190][#2210][#2225][#2227][#2481]
Add support for indexing and slicing in
orm.Group.nodesiterator [#2371]Add support for process classes to QueryBuilder.append [#2421]
Change type of uuids returned by the QueryBuilder to unicode [#2259]
The
AttributeDictis now constructed recursively for nested dictionaries [#3005]Ensure immutability of
CalcJobNodehash before and after storing [#3130]Fix bug in the
RemoteData._cleanmethod [#1847]Fix bug in
QueryBuilder.first()for multiple projections [#2824]Fix bug in
delete_nodeswhen passing pks of non-existing nodes [#2440]Remove unserializable data from metadata in
Logrecords [#2469]
Data#
Fix bug in
parse_formulafor formulas with leading or trailing whitespace [#2186]Refactor
Orbitalcode and fix some bugs [#2737]Fix bug in the
storemethod ofCifDatawhich would raise an exception when called more than once [#1136]Allow passing directory path in
FolderDataconstructor [#3359]Add element
Xto the elements list in order to support unknown species [#1613]Various bug and consistency fixes for
CifDataandStructureData[#2374]Changes to
Dataclass attributes andTrajectoryDatadata storage [#2310][#2422]Rename
ParameterDatatoDict[#2530]Remove the
FrozenDictdata sub class [#2532]Remove the
Errordata sub class [#2529]Make
Codea real sub class ofData[#2193]Implement the
has_atomic_sitesandhas_unknown_speciesproperties for theCifDataclass [#1257]Change default library used in
_get_aiida_structure(convertingCifDatatoStructureData) fromasetopymatgen[#1257]Add converter for
UpfDatafrom UPF to JSON format [#3308]Fix potential inefficiency in
aiida.tools.data.cifconverters [#3098]Fix bug in
KpointsData.reciprocal_cell()[#2779]Improve robustness of parsing versions and element names from UPF files [#2296]
Verdi command line interface#
Migrate
verdito the click infrastructure [#1795]Add a default user to AiiDA configuration, eliminating the need to retype user information for every new profile [#2734]
Implement tab-completion for profile in the
-poption ofverdi[#2345]Homogenize the interface of
verdi quicksetupandverdi setup[#1797]Add the option
--versiontoverdito display current version [#1811]verdi computer configurecan now read inputs from a yaml file through the--configoption [#2951]
External database importers#
Database#
Add an index to columns of
DbLinkfor SqlAlchemy [#2561]Creating unique constraint and indexes at the
db_dbgroup_dbnodestable for SqlAlchemy [#1680]Performance improvement for adding nodes to group [#1677]
Make UUID columns unique in SqlAlchemy [#2323]
Allow PostgreSQL connections via unix sockets [#1721]
Drop the unused
nodeversionandpubliccolumns from the node table [#2937]Drop various unused columns from the user table [#2944]
Drop the unused
transport_paramscolumn from the computer table [#2946]Drop the
DbCalcStatetable [#2198][Django]: migrate the node attribute and extra schema to use JSONB, greatly improving storage and querying efficiency [#3090]
[SqlAlchemy]: Improve speed of node attribute and extra deserialization [#3090]
Export and Import#
Implement the exporting and importing of node extras [#2416]
Implement the exporting and importing of comments [#2413]
Implement the exporting and importing of logs [#2393]
Add
export_parametersto themetadata.jsonin archive files [#3386]Simplify the data format of export archives, greatly reducing file size [#3090]
verdi importautomatically migrates archive files of old formats [#2820]
Miscellaneous#
Refactor unit test managers and add basic fixtures for
pytest[#3319]REST API v4: updates to conform with
aiida-core==1.0.0[#3429]Improve decorators using the
wraptlibrary such that function signatures are properly maintained [#2991]Allow empty
enabledanddisabledkeys in caching configuration [#3330]AiiDA now enforces UTF-8 encoding for text output in its files and databases. [#2107]
Backwards-incompatible changes (only a sub-set)#
Remove
aiida.testsand obsoleteaiida.storage.tests.test_parsersentry point group [#2778]Implement new link types [#2220]
Rename the type strings of
Groupsand change the attributesnameandtypetolabelandtype_string[#2329]Make various protected
Nodemethods public [#2544]Rename
DbNode.typetoDbNode.node_type[#2552]Rename the ORM classes for
Nodesub classesJobCalculation,WorkCalculation,InlineCalculationandFunctionCalculation[#2184][#2189][#2192][#2195][#2201]Do not allow the
copyordeepcopyofNode, except forDatanodes [#1705]Remove
aiida.controlandaiida.utilstop-level modules; reorganizeaiida.common,aiida.manageandaiida.tools[#2357]Make the node repository API backend agnostic [#2506]
Redesign the Parser class [#2397]
[Django]: Remove support for datetime objects from node attributes and extras [#3090]
Enforce specific precision in
clean_valuefor floats when computing a node’s hash [#3108]Move physical constants from
aiida.common.constantsto externalqe-toolspackage [#3278]Add type checks to all plugin factories [#3456]
Disallow pickle when storing numpy array in
ArrayData[#3434]Remove implementation of legacy workflows [#2379]
Implement
CalcJobprocess class that replaces the deprecatedJobCalculation[#2389]Change the structure of the
CalcInfo.local_copy_list[#2581]QueryBuilder: Change ‘ancestor_of’/’descendant_of’ to ‘with_descendants’/’with_ancestors’ [#2278]
v0.12.4#
Improvements#
Minor bug fixes#
Corrected the graph export set expansion rules [#2632]
Miscellaneous#
v0.12.3#
Improvements#
Fast addition of nodes to groups with
skip_orm=True[#2471]Add
environment.ymlfor installing dependencies using conda; release ofaiida-coreon conda-forge channel [#2081]REST API: io tree response now includes link type and node label [#2033] [#2511]
Backport postgres improvements for quicksetup [#2433]
Backport
aiida.get_strict_version(for plugin development) [#2099]
Minor bug fixes#
Fix security vulnerability by upgrading
paramikoto2.4.2[#2043]Disable caching for inline calculations (broken since move to
workfunction-based implementation) [#1872]Let
verdi helpreturn exit status 0 [#2434]Decode dict keys only if strings (backport) [#2436]
Remove broken verdi-plug entry point [#2356]
verdi node delete(without arguments) no longer tries to delete all nodes [#2545]Fix plotting of
BandsDataobjects [#2492]
Miscellaneous#
v0.12.2#
Improvements#
Minor bug fixes#
Make exported graphs consistent with the current node and link hierarchy definition [#1764]
Fix link import problem under SQLA [#1769]
Fix bug in mixins.py when copying node [#1743]
Fix pgtest failures (release-branch) on travis [#1736]
Fix plugin: return testrunner result to fail on travis, when tests don’t pass [#1676]
Miscellaneous#
v0.12.1#
Improvements#
Always use a bash login shell to execute all remote SSH commands, overriding any system default shell [#1502]
Reduced the size of the distributed package by almost half by removing test fixtures and generating the data on the fly [#1645]
Removed the explicit dependency upper limit for
scipy[#1492]Resolved various dependency requirement conflicts [#1488]
Minor bug fixes#
v0.12.0#
Improvements#
Hashing, caching and fast-forwarding [#652]
Calculation no longer stores full source file [#1082]
Delete nodes via
verdi node delete[#1083]Import structures using ASE [#1085]
StructureData-pymatgen-StructureDataroundtrip works for arbitrary kind names [#1285] [#1306] [#1357]Output format of archive file can now be defined for
verdi export migrate[#1383]Automatic reporting of code coverage by unit tests has been added [#1422]
Critical bug fixes#
Minor bug fixes#
Miscellaneous#
Bump
qe-toolsversion [#1090]Document link types [#1174]
Switch to trusty + postgres 9.5 on Travis [#1180]
Use raw SQL in sqlalchemy migration of
Code[#1291]Document querying of list attributes [#1326]
Document running
aiidaas a daemon service [#1445]Document that Torque and LoadLever schedulers are now fully supported [#1447]
Cookbook: how to check the number of queued/running jobs in the scheduler [#1349]
v0.11.4#
Improvements#
PyCifRW upgraded to 4.2.1 [#1073]
Critical bug fixes#
v0.11.3#
Improvements#
Critical bug fixes#
FINISHED_KEYandFAILED_KEYvariables were not known toAbstractCalculation[#1314]
Minor bug fixes#
Deprecations#
QueryTool(was deprecated in favor ofQueryBuildersince v0.8.0) [#1330]
Miscellaneous#
Add
gourceconfig for generating a video of development history [#1337]
v0.11.2:#
Critical bug fixes#
Link types were not respected in
Node.get_inputsfor SqlAlchemy [#1271]
v0.11.1:#
Improvements#
Critical bug fixes#
Minor bug fixes#
v0.11.0:#
Improvements#
Core entities#
Computer: the shebang line is now customizable [#940]KpointsData: deprecate buggy legacy implementation of k-point generation in favor of Seekpath [#1015]Dict:to_aiida_typeused on dictionaries now automatically converted toDict[#947]JobCalculation: parsers can now specify files that are retrieved locally for parsing, but only temporarily, as they are deleted after parsing is completed [#886] [#894]
Plugins#
Verdi#
Miscellaneous#
Supervisor removal: dependency on unix-only supervisor package removed [#790]
REST API: add server info endpoint, structure endpoint can return different file formats [#878]
REST API: update endpoints for structure visualization, calculation (includes retrieved input & output list), add endpoints for
UpfDataand more [#977] [#991]Tests using daemon run faster [#870]
Documentation: updated outdated workflow examples [#948]
Documentation: updated import/export [#994],
Documentation: plugin quickstart [#996],
Documentation: parser example [#1003]
Minor bug fixes#
Deprecations#
async from aiida.work.run has been deprecated because it can lead to race conditions and thereby unexpected behavior [#1040]
v0.10.1:#
Improvements#
Improved exception handling for loading db tests [#968]
verdi work killon workchains: skip calculation if it cannot be killed, rather than stopping [#980]Remove unnecessary INFO messages of Alembic for SQLAlchemy backend [#1012]
Add filter to suppress unnecessary log messages during testing [#1014]
Critical bug fixes#
Minor bug fixes#
v0.10.0:#
Major changes#
The
DbPathtable has been removed and replaced with a dynamic transitive closure, because, among others, nested workchains could lead to theDbPathtable exploding in sizeCode plugins have been removed from
aiida-coreand have been migrated to their own respective plugin repositories and can be found here:Each can be installed from
pipusing e.g.pip install aiida-quantumespresso. Existing installations will require a migration (see update instructions in the documentation). For a complete overview of available plugins you can visit the registry.
Improvements#
A new entry
retrieve_temporary_listinCalcInfoallows to retrieve files temporarily for parsing, while not having to store them permanently in the repository [#903]New verdi command:
verdi work killto kill running workchains [#821]New verdi command:
verdi data remote [ls,cat,show]to inspect the contents ofRemoteDataobjects [#743]New verdi command:
verdi export migrateallows the migration of existing export archives to new formats [#781]New verdi command:
verdi profile delete[#606]Implemented a new option
-mfor theverdi work reportcommand to limit the number of nested levels to be printed [#888]Added a
runningfield to the output ofverdi work listto give the current state of the workchains [#888]Implemented faster query to obtain database statistics [#738]
Added testing for automatic SqlAlchemy database migrations through alembic [#834]
Exceptions that are triggered in steps of a
WorkChainare now properly logged to theNodemaking them visible throughverdi work report[#908]
Critical bug fixes#
Export will now write the link types to the archive and import will properly recreate the link [#760]
Fix bug in workchain persistence that would lead to crashed workchains under certain conditions being resubmitted [#728]
Fix bug in the pickling of
WorkChaininstances containing an_iflogical block in the outline [#904]
Minor bug fixes#
The logger for subclasses of
AbstractNodeis now properly namespaced toaiida.such that it works in plugins outside of theaiida-coresource tree [#897]Fixed a problem with the states of the direct scheduler that was causing the daemon process to hang during submission [#879]
Various bug fixes related to the old workflows in combination with the SqlAlchemy backend [#889] [#898]
Fixed bug in
TCODexporter[#761]verdi profile deletenow respects the configureddbportsetting [#713]Restore correct help text for
verdi --help[#704]Fixed query in the ICSD importer element that caused certain structures to be erroneously skipped [#690]
Miscellaneous#
Added a “quickstart” to plugin development in the documentation, structured around the new plugintemplate [#818]
Improved and restructured the developer documentation [#818]
v0.9.1:#
Critical bug fixes#
Workchain steps will no longer be executed multiple times due to process pickles not being locked
Minor bug fixes#
Fix arithmetic operations for basic numeric types
Fixed
verdi calculation cleanworkdirafter changes inQueryBuildersyntaxFixed
verdi calculation logshowexception when called forWorkCalculationnodesFixed
verdi importfor SQLAlchemy profilesFixed bug in
reentryand update dependency requirement tov1.0.2Made octal literal string compatible with python 3
Fixed broken import in the ASE plugin
Improvements#
verdi calculation shownow properly distinguishes betweenWorkCalculationandJobCalculationnodesImproved error handling in
verdi setup --non-interactiveDisable unnecessary console logging for tests
v0.9.0#
Data export functionality#
A number of new functionalities have been added to export band structures to a number of formats, including: gnuplot, matplotlib (both to export a python file, and directly PNG or PDF; both with support of LaTeX typesetting and not); JSON; improved agr (xmgrace) output. Also support for two-color bands for collinear magnetic systems. Added also possibility to specify export-format-specific parameters.
Added method get_export_formats() to know available export formats for a given data subclass
Added label prettifiers to properly typeset high-symmetry k-point labels for different formats (simple/old format, seekpath, …) into a number of plotting codes (xmgrace, gnuplot, latex, …)
Improvement of command-line export functionality (more options, possibility to write directly to file, possibility to pass custom options to exporter, by removing its DbPath dependency)
Workchains#
Crucial bug fix: workchains can now be run through the daemon, i.e. by using
aiida.work.submitEnhancement: added an
abortandabort_nowaitmethod toWorkChainwhich allows to abort the workchain at the earliest possible momentEnhancement: added the
reportmethod toWorkChain, which allows a workchain developer to log messages to the databaseEnhancement: added command
verdi work reportwhich for a givenpkreturns the messages logged for aWorkChainthrough thereportmethodEnhancement: workchain inputs ports with a valid default specified no longer require to explicitly set
required=Falsebut is overriden automatically
New plugin system#
New plugin system implemented, allowing to load aiida entrypoints, and working in parallel with old system (still experimental, though - command line entry points are not fully implemented yet)
Support for the plugin registry
Code refactoring#
Refactoring of
Nodeto move as much as possible of the caching code into the abstract classRefactoring of
Datanodes to have the export code in the topmost class, and to make it more general also for formats exporting more than one fileRefactoring of a number of
Datasubclasses to support the new export APIRefactoring of
BandsDatato have export code not specific to xmgrace or a given format, and to make it more general
Documentation#
General improvements to documentation
Added documentation to upgrade AiiDA from v0.8.0 to v0.9.0
Added documentation of new plugin system and tutorial
Added more in-depth documentation on how to export data nodes to various formats
Added explanation on how to export band structures and available formats
Added documentation on how to run tests in developer’s guide
Documented Latex requirements
Updated WorkChain documentation for
WaitingEquationOfStateexampleUpdated AiiDA installation documentation for installing virtual environment
Updated documentation to use Jupyter
Enhancements#
Speedups the travis builds process by caching pip files between runs
Node can be loaded by passing the start of its UUID
Handled invalid verdi command line arguments; added help texts for same
upgraded
Paramikoto 2.1.2 and avoided to create empty file when remote connection is failedverdi calculation killcommand is now available forSGE pluginUpdated
Plumfrom 0.7.8 to 0.7.9 to create a workchain inputs that had default value and evaluated to falseNow QueryBuilder will be imported by default for all verdi commands
Bug Fixes#
Bug fixes in QE input parser
Code.get() method accepts the pk in integer or string format whereas Code.get_from_string() method accepts pk only in string format
verdi code showcommand now shows the description of the codeBug fix to check if computer is properly configured before submitting the calculation
Miscellaneous#
Replacing dependency from old unmantained
pyspglibto newspglibAccept BaseTypes as attributes/extras, and convert them automatically to their value. In this way, for instance, it is now possible to pass a
Int,Float,Str, … as value of a dictionary, and store all into aDict.Switch from
pkg_resourcesto reentry to allow for much faster loading of modules when possible, and therefore allowing for good speed for bash completionRemoved obsolete code for Sqlite
Removed
mayavi2package from dependencies
v0.8.1#
Exporters#
Upgraded the TCODExporter to produce CIF files, conforming to the newest (as of 2017-04-26) version of cif_tcod.dic.
General#
Added dependency on six to properly re-raise exceptions
v0.8.0#
Installation and setup#
Simplified installation procedure by adopting standard python package installation method through setuptools and pip
Verdi install replaced by verdi setup
New verdi command
quicksetupto simplify the setup procedureSignificantly updated and improved the installation documentation
General#
Significantly increased test coverage and implemented for both backends
Activated continuous integration through Travis CI
Application-wide logging is now abstracted and implemented for all backends
Added a REST API layer with hook through verdi cli:
verdi restapiImproved
QueryBuilderComposition model instead of inheritance removing the requirement of determining the implementation on import
Added keyword
with_dbpaththat makesQueryBuilderswitch between using theDbPathand not using it.Updated and improved documentation
The QueryTool as well as the
class Node.query()method are now deprecated in favor of theQueryBuilderMigration of verdi cli to use the
QueryBuilderin order to support both database backendsAdded option
--projecttoverdi calculation listto specify which attributes to print
Documentation#
Documentation is restructured to improve navigability
Added pseudopotential tutorial
Database#
Dropped support for MySQL and SQLite to fully support efficient features in Postgres like JSONB fields
Database efficiency improvements with orders of magnitude speedup for large databases [added indices for daemon queries and node UUID queries]
Replace deprecated
commit_on_successwith atomic for Django transactionsChange of how SQLAlchemy internally uses the session and the engine to work also with forks (e.g. in celery)
Workflows#
Finalized the naming for the new workflow system from
workflows2toworkFragmentedWorkFunctionis replaced byWorkChainInlineCalculationis replaced byWorkfunctionProcessCalculationis replaced byWorkCalculation
Old style Workflows can still be called and run from a new style
WorkChainMajor improvements to the
WorkChainandWorkfunctionimplementationImprovements to
WorkChainImplemented a
returnstatement forWorkChainspecificationLogging to the database implemented through
WorkChain.report()for debugging
Improved kill command for old-style workflows to avoid steps to remaing in running state
Plugins#
Added finer granularity for parsing PW timers in output
New Quantum ESPRESSO and scheduler plugins contributed from EPFL
ASE/GPAW plugins: Andrea Cepellotti (EPFL and Berkeley)
Quantum ESPRESSO DOS, Projwfc: Daniel Marchand (EPFL and McGill)
Quantum ESPRESSO phonon, matdyn, q2r, force constants plugins: Giovanni Pizzi, Nicolas Mounet (EPFL); Andrea Cepellotti (EPFL and Berkeley)
Quantum ESPRESSO cp.x plugin: Giovanni Pizzi (EPFL)
Quantum ESPRESSO neb.x plugin: Marco Gibertini (EPFL)
LSF scheduler: Nicolas Mounet (EPFL)
Implemented functionality to export and visualize molecular dynamics trajectories (using e.g. matplotlib, mayavi)
Improved the TCODExporter (some fixes to adapt to changes of external libraries, added some additional TCOD CIF tags, various bugfixes)
Various fixes and improvements#
Fix for the direct scheduler on Mac OS X
Fix for the import of computers with name collisions
Generated backup scripts are now made profile specific and saved as
start_backup_<profile>.pyFix for the vary_rounds warning
v0.7.1#
Functionalities#
Implemented support for Kerberos authentication in the ssh transport plugin.
Added
_get_submit_script_footerto scheduler base class.Improvements of the SLURM scheduler plugin.
Fully functional parsers for Quantumespresso CP and PW.
Better parsing of atomic species from PW output.
Array classes for projection & xy, and changes in kpoints class.
Added codespecific tools for Quantumespresso.
verdi code listnow shows local codes too.verdi exportcan now export non user-defined groups (from their pk).
Fixes#
Fixed bugs in (old) workflow manager and daemon.
Improvements of the efficiency of the (old) workflow manager.
Fixed JobCalculation text prepend with multiple codes.
v0.7.0#
This release introduces a lot and significant changes & enhancements.
We worked on our new backend and now AiiDA can be installed using SQLAlchemy too. Many of the verdi commands and functionalities have been tested and are working with this backend. The full JSON support provided by SQLAlchemy and the latest versions of PostgreSQL enable significant speed increase in attribute related queries. SQLAlchemy backend choice is a beta option since some last functionalities and commands need to be implemented or improved for this backend. Scripts are provided for the transition of databases from Django backend to SQLAlchemy backend.
In this release we have included a new querying tool called QueryBuilder. It is a powerfull tool
allowing users to write complex graph queries to explore the AiiDA graph database. It provides
various features like selection of entity properties, filtering of results, combination of entities
on specific properties as well as various ways to obtain the final result. It also provides the
users an abstract way to query their data without enforcing them to write backend dependent queries.
Last but not least we have included a new workflow engine (in beta version) which is available
through the verdi workflow2 command. The new workflows are easier to write (it is as close as
writing python as possible), there is seamless mixing of short running tasks with long running
(remote) tasks and they encourage users to write reusable workflows. Moreover, debugging of
workflows has been made easier and it is possible both in-IDE and through logging.
List of changes:#
Installation procedure works with SQLAlchemy backend too (SQLAlchemy option is still in beta).
Most of the verdi commands work with SQLAlchemy backend.
Transition script from Django schema of version 0.7.0 to SQLAlchemy schema of version 0.7.0.
AiiDA daemon redesigned and working with both backends (Django & SQLAlchemy).
Introducing new workflow engine that allows better debugging and easier to write workflows. It is available under the
verdi workflows2command. Examples are also added.Old workflows are still supported and available under the “verdi workflow” command.
Introducing new querying tool (called
QueryBuilder). It allows to easily write complex graph queries that will be executed on the AiiDA graph database. Extensive documentation also added.Unifying behaviour of verdi commands in both backends.
Upped to version 0.4.2 of plum (needed for workflows2)
Implemented the validator and input helper for Quantum ESPRESSO pw.x.
Improved the documentation for the pw (and cp) input plugins (for all the flags in the Settings node).
Fixed a wrong behavior in the QE pw/cp plugins when checking for the parser options and checking if there were further unknown flags in the Settings node. However, this does not solve yet completely the problem (see issue #219).
Implemented validator and input helper for Quantum ESPRESSO pw.x.
Added elements with Z=104-112, 114 and 116, in
aiida.common.constants.Added method
set_kpoints_mesh_from_densityinKpointsDataclass.Improved incremental backup documentation.
Added backup related tests.
Added an option to
test_pw.pyto run also in serial.SSH transport, to connect to remote computers via SSH/SFTP.
Support for the SGE and SLURM schedulers.
Support for Quantum ESPRESSO Car-Parrinello calculations.
Support for data nodes to store electronic bands, phonon dispersion and generally arrays defined over the Brillouin zone.
v0.6.0#
We performed a lot of changes to introduce in one of our following releases a second object-relational mapper (we will refer to it as back-end) for the management of the used DBMSs and more specifically of PostgreSQL. SQLAlchemy and the latest version of PostgreSQL allows AiiDA to store JSON documents directly to the database and also to query them. Moreover the JSON query optimization is left to the database including also the use of the JSON specific indexes. There was major code restructuring to accommodate the new back-end resulting to abstracting many classes of the orm package of AiiDA.
Even if most of the needed restructuring & code addition has been finished, a bit of more work is needed. Therefore even in this version, Django is the only available back-end for the end user.
However, the users have to update their AiiDA configuration files by executing the migration file
that can be found at YOUR_AIIDA_DIR/aiida/common/additions/migration.py as the Linux user that
installed AiiDA in your system.
(e.g. python YOUR_AIIDA_DIR/aiida/common/additions/migration.py)
List of changes:#
Back-end selection (Added backend selection). SQLAlchemy selection is disabled for the moment.
Migration scripts for the configuration files of AiiDA (SQLAlchemy support).
Enriched link description in the database (to enrich the provenance model).
Corrections for numpy array and cell. List will be used with cell.
Fixed backend import. Verdi commands load as late as possible the needed backend.
Abstraction of the basic AiiDA orm classes (like node, computer, data etc). This is needed to support different backends (e.g. Django and SQLAlchemy).
Fixes on the structure import from QE-input files.
SQLAlchemy and Django benchmarks.
UltraJSON support.
requirements.txt now also include SQLAlchemy and its dependencies.
Recursive way of loading JSON for SQLAlchemy.
Improved way of accessing calculations and workflows attached to a workflow step.
Added methods to programmatically create new codes and computers.
v0.5.0#
General#
Final paper published, ref: G. Pizzi, A. Cepellotti, R. Sabatini, N. Marzari, and B. Kozinsky, AiiDA: automated interactive infrastructure and database for computational science, Comp. Mat. Sci 111, 218-230 (2016)
Core, concrete, requirements kept in
requirements.txtand optionals moved tooptional_requirements.txtSchema change to v1.0.2: got rid of
calc_states.UNDETERMINED
Import/export, backup and code interaction#
[non-back-compatible] Now supporting multiple codes execution in the same submission script. Plugin interface changed, requires adaptation of the code plugins.
Added import support for XYZ files
Added support for van der Waals table in QE input
Restart QE calculations avoiding using scratch using copy of parent calc
Adding database importer for NNIN/C Pseudopotential Virtual Vault
Implemented conversion of pymatgen Molecule lists to AiiDA’s TrajectoryData
Adding a converter from pymatgen Molecule to AiiDA StructureData
Queries now much faster when exporting
Added an option to export a zip file
Added backup scripts for efficient incremental backup of large AiiDA repositories
API#
Added the possibility to add any kind of Django query in Group.query
Added TCOD (Theoretical Crystallography Open Database) importer and exporter
Added option to sort by a field in the query tool
Implemented selection of data nodes and calculations by group
Added NWChem plugin
Change default behaviour of symbolic link copy in the transport plugins: “put”/”get” methods -> symbolic links are followed before copy; “copy” methods -> symbolic links are not followed (copied “as is”).
Schedulers#
Explicit Torque support (some slightly different flags)
Improved PBSPro scheduler
Added new
num_cores_per_machineandnum_cores_per_mpiproc fieldsfor pbs and torque schedulers (giving full support for MPI+OpenMP hybrid codes)Direct scheduler added, allowing calculations to be run without batch system (i.e. directly call executable)
verdi#
Support for profiles added: it allows user to switch between database configurations using the
verdi profilecommandAdded
verdi data structure import --file file.xyzfor importing XYZAdded a
verdi data upf exportfamilycommand (to export an upf pseudopotential family into a folder)Added new functionalities to the
verdi groupcommand (show list of nodes, add and remove nodes from the command line)Allowing verdi export command to take group PKs
Added ASE as a possible format for visualizing structures from command line
Added possibility to export trajectory data in xsf format
Added possibility to show trajectory data with xcrysden
Added filters on group name in
verdi group listAdded possibility to load custom modules in the verdi shell (additional property verdishell.modules created; can be set with
verdi devel setproperty verdishell.modules)Added
verdi data array showcommand, usingjson_dateserialization to display the contents ofArrayDataAdded
verdi data trajectory depositcommand line commandAdded command options
--computerand--codetoverdi data * depositAdded a command line option
--all-usersforverdi data * listto list objects, owned by all users