https://github.com/aiidateam/aiida_core

sort by:
Revision Author Date Message Commit Date
39cabfa Add .dockerignore 13 November 2020, 22:32:27 UTC
4256360 Merge remote-tracking branch 'origin/master' into develop 13 November 2020, 15:57:45 UTC
f945dca Merge pull request #4516 from ramirezfranciscof/release/1.5.0 Release `v1.5.0` 13 November 2020, 15:02:44 UTC
539c0d7 Release `v1.5.0` 13 November 2020, 14:35:16 UTC
62ed643 REST API: Add full_types_count as new entry point This feature returns a namespace tree of the available node types in the database (data node_types + process process_types) with the addition of a count at each leaf / branch. It also has the option of doing so for a single user, if the pk is provided as an option. 13 November 2020, 14:34:26 UTC
9683716 REST API: Modify assumptions for `process_type` The `process_type` attribute has changed over the years; currently it must have some descriptor for processes and be None for data types. Apparently this has not only been the case, and thus old databases may have both data and process nodes with either empty strings ('') and/or None entries in their `process_type` attributes. Additionally, there were some problems with how the unregistered entry points were considered that made it impossible to query for them. In order to consider all of this when filtering and doing statistics, it has been decided to: 1) Group all instances of a given node_type that have either '' or None as their process_type in the same `full_type` (`node_type|` ) and hence always query for both when the `process_type` is missing. 2) Remove the `aiida.descriptor:` and the `no-entry-point` from the `process_type` part of unregistered processes. This was interfeering when the `full_type` was given to return the filtering options to query for these processes. Tests were adapted to test this new compatibility aspects. 13 November 2020, 14:34:26 UTC
810dc56 Update archive version: 0.9 -> 0.10 (#4561) Fixes a bug whereby archives created with the latest code fail to import in the last v1.4.2 release (if they contain group extras). This update imposes that these new archives are no longer compatible with v1.4.2 13 November 2020, 10:20:09 UTC
def9a03 Improve archive import memory usage (#4559) This commit is a small iterative improvement to the archive import logic, added to reduce memory overhead, by reducing the number of variables in memory at any one time 12 November 2020, 20:27:03 UTC
520bdbf Improve mypy type checking (#4553) This commit moves the mypy execution to run in the full aiida-core python environment. Currently, the mypy in the pre-commit is used as a "non-local" import and adds the blanket `--ignore-missing-imports` flag. This greatly reduces the effectiveness of the type checking, because it does not check any types from classes/functions imported from third-party packages. Similarly, adding `check_untyped_defs = True` improves the checking coverage (see https://mypy.readthedocs.io/en/stable/common_issues.html#no-errors-reported-for-obviously-wrong-code). 12 November 2020, 12:58:05 UTC
bd197f3 Archive export refactor (2) (#4534) This PR builds on #4448, with the goal of improving both the export writer API (allowing for "streamed" data writing) and performance of the export process (CPU and memory usage). The writer is now used as a context manager, rather than passing all data to it after extraction of the data from the AiiDA database. This means it is called throughout the export process, and will allow for less data to be kept in RAM when moving to a new archive format. The number of database queries has also been reduced, resulting in a faster process. Lastly, code for read/writes to the archive has been moved to the https://github.com/aiidateam/archive-path package. This standardises the interface for both zip and tar, and especially for export to tar, provides much improved performance, since the data is now written directly to the archive (rather than writing to a folder then only compressing at the end). Co-authored-by: Leopold Talirz <leopold.talirz@gmail.com> 12 November 2020, 10:45:40 UTC
008580e `verdi group delete`: deprecate and ignore the `--clear` option (#4357) Note that the option is still there but no longer makes a difference. It now merely prints a deprecation warning, but is otherwise ignored. The reason is that otherwise, users would be forced to continue to use it despite it raising a deprecation warning. The only danger is for users that have come to depend on the slightly weird behavior that in order to delete non-empty groups, one would have to pass them `--clear` option otherwise the command would fail. After this change, this would now delete the group without complaining, which may break this use case. This use case was estimate to be unlikely and so it was accepted to simply ignore the option. 11 November 2020, 17:05:13 UTC
c42a86b `SlurmScheduler`: fix bug in validation of job resources (#4555) The `SlurmJobResource` resource class used by the `SlurmScheduler` plugin contained a bug in the `validate_resources` methods that would cause a float value to be set for the `num_cores_per_mpiproc` field in certain cases. This would cause the submit script to fail because SLURM only accepts integers for the corresponding `--ncpus-per-task` flag. The reason is that the code was incorrectly using `isinstance(_, int)` to check that the divison of `num_cores_per_machine` over `num_mpiprocs_per_machine` is an integer. In addition to the negation missing in the conditional, this is not the correct way of checking whether a division is an integer. Instead it should check that the value is identical after it is cast to `int`. 11 November 2020, 15:35:16 UTC
ac4c881 Make process functions submittable (#4539) The limitation that process functions were not submittable, meaning they could not be sent to a daemon worker but could only be run by the current interpreter, was a historical one. Before the introduction of the system of processes in v1.0, a `calcfunction` was nothing more than the execution of a normal function. However, now, a process function creates a `Process` instance in the background, just as any other process. This means it can also be serialized and deserialized by a daemon worker. Here we remove the limitation of process functions not being submittable simply by removing the check. Note that there is no need to change the implementation other than adding two attributes on the decorated function that specify the corresponding process class and the method that allows to recreate the instance from the serialized instance. Co-authored-by: Sebastiaan Huber <mail@sphuber.net> 08 November 2020, 10:33:48 UTC
e5c2d0e Docs: fix white space in example yaml file from run_codes.rst (#4549) 07 November 2020, 17:05:33 UTC
5c12056 Docs: Revise "Get started" flow (#4496) This is a comprehensive revision of the "Get started" and "Advanced installation" page to address the issues identified in #4254 . In summary, the "Get started" page has been completely revised to provide a more linear flow for all supported setup flows and the "Detailed installation" has been largely pruned and renamed to "Advanced configuration" with most content directly incorporated into the linear setup flows. These are the changes in detail: - The "routes overview" panels have been revised to be simpler and more descriptive in their differences. - While the "routes overview" panels are still principally distinguished by "level of virtualization", the primary distinction between the first two supported installation methods ("system-wide installation" and "pure conda installation") is the path for installing prerequisite services, **not** whether the AiiDA Python package is installed into a virtual environment (via conda/venv). The primary difference here is that the first method requires administrative privileges, the latter does not. The revised descriptions should make this much clearer. - Each route panel is clickable and leads directly to a full guide for the specific route on a different page. - All routes are presented with a linear path, choices (e.g. operating system, Conda/pip) are represented via tabs. - Optional steps and potential issues are presented as drop-downs in order to incorporate them into the linear flow without being too distracting to those users where they don't apply. - No specific route is clearly recommend over another because it really depends on the user environment and use case. However the *system-wide installation* is likely most applicable to novice users who - given the presented options – are unsure about which route is best for them. This is based on the assumption that the alternative routes would likely not be applicable to those users who are unfamiliar with the mentioned technology in the first place. For example, a user should probably not take the docker route if they are unfamiliar with docker, however users who are familiar with docker, will likely be able to evaluate whether that is the right choice for them. The system-wide installation is therefore now explicitly recommended to those users *who are unsure* about which route is best for them. - The "Detailed Installation" page is renamed to "Advanced configuration". This is motivated by the fact that all supported setup routes are now fully covered on the "Getting started" page. Caveats and potential issues are by and large directly incorporated into those linear paths. The information found on the "Advanced configuration" page now covers edge cases for advanced users who want to further customize their setup or who have rare environmental conditions. The fact that the content of that chapter will likely not be applicable to most users is made explicit at the top of the page. - Slight duplication between different routes is deliberately tolerated to be able to represent a linear flow to users. - The instructions for the Windows Subsystem for Linux have been updated and now support both version 1 and 2. Co-authored-by: Dominik Gresch <a-dogres@microsoft.com> 06 November 2020, 16:23:27 UTC
64ae3c8 Merge remote-tracking branch 'origin/master' into develop 06 November 2020, 13:58:26 UTC
dfd1602 Merge pull request #4545 from aiidateam/release/1.4.3 Release `v1.4.3` 06 November 2020, 13:41:35 UTC
2d2ac39 Release `v1.4.3` 06 November 2020, 11:12:01 UTC
78cf6e1 Fix `UnboundLocalError` in `aiida.cmdline.utils.edit_multiline_template` (#4436) If `click.edit` returns a falsy value, the following conditional would be skipped and the `value` variable would be undefined causing an `UnboundLocalError` to be raised. This bug was reported by @blokhin but the exact conditions under which it occurred are not clear. Cherry-pick: 861a39f268954833385e699b3acbd092ccd04e5e 06 November 2020, 10:05:33 UTC
0a7039e RabbitMQ: remove validation of `broker_parameters` from profile (#4542) This validation was added as an attempt to help users with detecting invalid parameters in the `broker_parameters` dictionary of a profile, but `aiida-core` internally has no real limitations here. It is the libraries underneath that decide what is acceptable and this can differ from library to library plus it is not always clear. For example, currently we use `topika` and `pika` which behave different from `aiormq` which will be replacing them soon once `tornado` is replaced with `asyncio`. It is best to not limit the options on `aiida-core`'s side and just let it fail downstream as to not artificially limit the parameters that might be perfectly acceptable by the libraries downstream. 05 November 2020, 11:02:52 UTC
2c0f9a9 CI: Add official support for Python 3.9 (#4301) Updating of Conda in the `install-with-conda` job of the `test-install` workflow is disabled because it fails for as of yet unknown reasons. 05 November 2020, 10:05:04 UTC
06063e7 Docs: Move data types to Topics section (#4469) There was still content from the previous documentation on data types that was missing from the revamped docs. Here we move this content into the "Topics - Data types" section. Also, restructured the content to first discuss the 'core' types, which we intend to keep in aiida-core in the long term, then the 'materials science' types, which may be moved to a plugin at some point. Moved the export content to the end of the file. Additionally, written a short text for each data type, which can start from the "Aim" bullet point for each type. Moved the other bullet points into a table, perhaps one for the "Core" and "Materials design" types each. Showed some simple use cases (e.g. how to load a dictionary into a Dict node) for each of the data types. 04 November 2020, 19:09:50 UTC
eea2773 Docs: Add instructions on creating scheduler plugins (#4476) 03 November 2020, 14:51:06 UTC
d675574 Simplify Hill notation for `get_formula()` and add test (#4536) Simplify hill notation sorting (@csadorf) Add a test for `get_formula()` to test 'hill' and 'hill_compact' (@CasperWA) Co-authored-by: Carl Simon Adorf <csadorf@umich.edu> 03 November 2020, 13:35:22 UTC
8326050 Refactor archive migrations (#4532) This commit follows refactors to the archive writing and reading process, to provide an implementation agnostic interface for the migration of archives (i.e. independent of the internal structure of the archive). This will allow for subsequent changes to the archive format. To facilitate this: - `MIGRATE_FUNCTIONS` now includes both the to/from versions of the migration, - this allows for a change, from a recursive migration approach to pre-computing the migration pathway, then applying the migrations iteratively - this also allows for a progress bar of the migration steps - the signature of migration step functions has been changed, such that they now only receive the uncompressed archive folder, and not also specifically the `data.json` and `metadata.json` dictionaries. - instead, the folder is wrapped in a new `CacheFolder` class, which caches file writes in memory, such that reading of the files from the file system only happen once, and they are written after all the migrations have finished. - the `--verbose` flag has been added to `verdi export migrate`, to allow for control of the stdout message verbosity. - the extracting/compressing of tar/zip has been generalised into `archive/common.py`; `safe_extract_tar`, `safe_extract_zip`, `compress_folder_tar`, `compress_folder_zip`. These include callbacks, to be used by the progress reporter to create progress bars. - all migration unit tests have been converted to pytest Co-authored-by: Leopold Talirz <leopold.talirz@gmail.com> 03 November 2020, 09:31:07 UTC
9ff07c1 Add `reset` method to`ProgressReporterAbstract` (#4522) This PR adds the `update` method to the progress reporter. This in-turn, allows for the implementation of a callback mechanism in `ArchiveReaderAbstract.iter_node_repos`. The callback implementation is taken from the [disk-objectstore](https://github.com/aiidateam/disk-objectstore) package, and so facilitates a later migration to its use. The PR also moves the (common) repository import code out of the backend specific modules, reducing code duplication. 28 October 2020, 19:17:44 UTC
55f8706 Fix: Add missing entry point groups to the mapping (#4395) Some new entrypoints had been introduced, but they weren't in the mapping, so they couldn't be accessed for instance with `verdi plugin list`. 28 October 2020, 11:46:55 UTC
71566ae Docs: Add additional redirects (#4477) Add redirect in order to redirect known links and most viewed pages 28 October 2020, 08:31:43 UTC
4859572 Add group extras to archive (#4521) Group extras were introduced recently but not yet exported to AiiDA archives. This commit adds group extras to the AiiDA archive. Instead of special-casing deserialization of attributes and extras based on the field name, a `convert_type: "jsonb"` is introduced, which is used to indicate JSON-binary fields. 27 October 2020, 23:49:55 UTC
2f8e845 Refactor Import Archive (#4510) This commit builds on [c6d38c1](https://github.com/aiidateam/aiida-core/commit/c6d38c1657b65f540bea653f253920bb602c7ebc), to refactor the archive in order to decouple it from its export/import to the AiiDA database. The `aiida/tools/importexport/archive` module has been created, which contains the readers and writers used to create and interact with an archive. Effectively archive formats are now defined by their associated reader and writer classes, which must inherit and implement the `ArchiveReaderAbstract` and `ArchiveWriterAbstract` interfaces respectively. `aiida/tools/importexport/dbimport` has been refactored, to interface with this new `ArchiveReaderAbstract` class, and also utilise the new `progress_reporter` context manager. Both the django and sqlalchemy backends have been "synchronized", such that conform to exactly the same code structure, which in-turn has allowed for the sharing of common code. The commit is intended to be back-compatible, in that no public API elements have been removed. However, it does: - remove the `Archive` class, replaced by the `ReaderJsonZip`/`ReaderJsonTar` classes. - remove `aiida/tools/importexport/common/progress_bar.py`, now replaced by `aiida/common/progress_reporter.py` - move `aiida/tools/importexport/dbexport/zip.py` → `aiida/tools/importexport/common/zip_folder.py` The `aiida import --verbosity DEBUG` option has been added, which sets the log level of the process, and whether the progress bars are removed. The `verdi export inspect` code has also been refactored, to utilize the `ArchiveReaderAbstract`. The `verdi export inspect --data` option has been deprecated, since access to the `data.json` file is only an implementation detail of the current archive format. 27 October 2020, 21:18:15 UTC
02c8a0c FIX: Only remove temporary folder if it is present (#4379) This was causing an error, when running the tests/engine/test_calc_job.py on OSX, since here it is not guaranteed the temporary folder will be created. 27 October 2020, 18:53:31 UTC
9460e4e Revert PR #4416 (#4519) "`CalcJob`: support nested directories in target of `remote_copy/symlink_list` (#4416)" This reverts commit 16bc30548f7f1c686d200935174533535e850fd5. 27 October 2020, 15:02:28 UTC
57c8afa Improve the deprecation warning for `Node.open` outside context manager (#4434) The new warning now includes the offending line of code. 27 October 2020, 08:22:55 UTC
7c49471 `verdi migrate`: make `--in-place` work across different file systems (#4393) The `verdi migrate` command assumed implicitly that the archive that is to be migrated, resides on the same file system as the one that is used by the `tempfile` module. If this is not the case, the `os.rename` call used to atomically move the migrated archive to the original will fail with the exception: OSError: [Errno 18] Invalid cross-device link Changing `os.rename` to `shutil.move` fixes this problem. The downside, however, is that the move is no longer atomic, but that is probably why `os.rename` is restricted to same filysystem operations. 26 October 2020, 19:08:41 UTC
861a39f Fix `UnboundLocalError` in `aiida.cmdline.utils.edit_multiline_template` (#4436) If `click.edit` returns a falsy value, the following conditional would be skipped and the `value` variable would be undefined causing an `UnboundLocalError` to be raised. This bug was reported by @blokhin but the exact conditions under which it occurred are not clear. 26 October 2020, 15:40:42 UTC
ee13ad6 Docs: Add `verdi process status` command to tutorial (#4508) 26 October 2020, 11:23:40 UTC
e142124 Fix `ZeroDivisionError` in worker slots check (#4513) This was being raised if 0 slots were available 25 October 2020, 23:22:14 UTC
33c9f41 Refactor archive progress bar (#4504) This commit introduces a new generic progress reporter interface (in `aiida/common/progress_reporter.py`), that can be used for adding progress reporting to any process. It is intended to deprecate the existing `aiida/tools/importexport/common/progress_bar.py` module. The reporter is designed to work similar to logging, such that its "handler" is set external to the actual function, e.g. by the CLI. Its default implementation is to do nothing (a null reporter), and there is convenience function to set a [tqdm](https://tqdm.github.io/) progress bar implementation (`set_progress_bar_tqdm`). The reporter is intended to always be used as context manager, e.g. to allow the progress bar to be removed once the process is complete. The reporter has been implemented in the archive export module, and it is intended that it will also be implemented in the archive import module. At this point the existing `aiida/tools/importexport/common/progress_bar.py` module can be removed. 25 October 2020, 11:03:05 UTC
1be12e1 Pre-commit: reintroduce `pylint` rules (#4501) In 65ad067b18cffeb639994efe9a372ec1475e1615 the following `pylint` rules were accidentally disabled: * missing-class-docstring * missing-function-docstring * too-many-ancestors * too-many-locals This commit reintroduces all but the "too-many-ancestors" rule, which is most likely never going to be addressed. Having to change the depth of the MRO is not trivial and usually not that effective. 23 October 2020, 13:32:51 UTC
c6d38c1 Refactor the archive exporter (#4448) This commit refactors the export process (in a back-compatible manner), such that the extraction of data from the database is fully decoupled from the writing of that data to an archive. It allows for pluggable export writers, and is intended as a preliminary step toward the creation of a new archive format. The original `export_tree` function is renamed to `_collect_archive_data` and its contents split into a number of separate, self-contained, functions. The process control has then been inverted, such that the export data is parsed to the archive writer, rather than the export writer calling `export_tree` to generate that data. An abstract writer class is provided, then each concrete writer is identified and called for via a string (this could in fact be made into an entry point). Data is parsed to the writers contained in a [dataclasses](https://pypi.org/project/dataclasses/) container. This requires a backport for python 3.6, but is included in python core from python 3.7 onwards. The `extract_tree`, `extract_zip` and `extract_tar` functions are reimplemented, for backwards compatibility, but are marked as deprecated and to be remove in v2.0.0. Additional issues addressed: - fixes a bug, whereby, in python 3.8, `logging.disable(level=` has changed to `logging.disable(lvl=`. - fixes a bug, whereby the traversal rules summary was returning incorrect rule summaries. - adds mypy compliant typing (and adds the file to the pre-commit mypy list) Co-authored-by: Leopold Talirz <leopold.talirz@gmail.com> 23 October 2020, 00:12:16 UTC
228716f Docs: add "Internals - REST API" (#4492) This section explains the internals of the AiiDA REST API mechanics and how to extend it. The `developer_guide/core/extend_restapi.rst` is removed and its content has been moved to this new section and slightly improved. Given the plans to overhaul the REST API, these modifications were kept to a minimum so the section may have some not perfectly complete parts or a sub-optimal design. Co-authored-by: Giovanni Pizzi <gio.piz@gmail.com> Co-authored-by: ramirezfranciscof <ramirezfranciscof@users.noreply.github.com> 22 October 2020, 08:50:58 UTC
c8d583c Docs: merge REST API query instructions (#4493) Merge the instructions for querying the REST API into the new "How to share data" section; moving the details on pagination into the REST API reference. Also converted lists of filters and more to tables, sorting them alphabetically. Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com> 21 October 2020, 19:13:42 UTC
6b1958c Docs: Fix page not found redirect (#4498) 21 October 2020, 15:58:08 UTC
2eda24e Docs: serve a custom 404 page (#4478) Redirect to a helpful page when a document is not found. 21 October 2020, 14:34:13 UTC
3070610 Docs: add the "How to explore the provenance graph" section (#4491) This section adds completely new documentation on the graph exploring methods `get_incoming` and `get_outgoing` that were not yet documented. It also documents the `creator`, `caller` and `creator` properties that also weren't documented yet. The `working_with_aiida/resultmanager.rst` is removed and its content, that documents the `inputs` and `outputs` properties of process nodes as well as the `res` property of the `CalcJobNode` class, is added to the new section in heavily rewritten form. 21 October 2020, 13:59:01 UTC
09ac916 Docs: update REST API wsgi scripts (#4488) The wsgi scripts for deploying the AiiDA REST in production were outdated and are updated. The how-to on deploying your own REST API server is significantly streamlined and now includes the wsgi files as well as the examplary apache virtualhost configuration. Co-authored-by: Giovanni Pizzi <gio.piz@gmail.com> 20 October 2020, 20:08:45 UTC
191dc90 Docs: move list of public API to the "Reference" section (#4489) The `working_with_aiida/python_api.rst` is moved to the reference section. A new index page is created for the "AiiDA API" which allows to have a first page with the list of public facing API methods followed by the autogenerated complete API documentation. 20 October 2020, 14:06:58 UTC
941b8cc Docs: Remove `modifying_the_schema.rst` (#4490) It has been moved to the Github wiki. See: https://github.com/aiidateam/aiida-core/wiki/Modifying-the-database-schema 20 October 2020, 13:32:00 UTC
58eb4d3 Docs: add "How to interact with AiiDA" section (#4475) This section gives a high-level overview of the various methods with which can interact with AiiDA. For details it refers to relevant sections with more information. 20 October 2020, 13:19:17 UTC
cb268d1 replace all occurences of "export file" We have agreed on the terms "AiiDA archive (file)" and "AiiDA archive format". Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com> 20 October 2020, 12:46:44 UTC
e63fdeb Docs: add "How to share data" The "how to share data" section includes instructions both for dealing with AiiDA archives (e.g. for publishing AiiDA graphs alongside your publication) and for using the AiiDA REST API. Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com> 20 October 2020, 12:46:44 UTC
ce65988 Docs: move how-to write data plugin to topics (#4482) This information is felt to be too detailed for the how-to section and it breaks the flow too much. 20 October 2020, 12:21:48 UTC
5e0de12 Docs: add info on archive format to internals section (#4467) 20 October 2020, 11:02:10 UTC
cda6950 Docs: move the cookbook to its own how-to page (#4487) The scripts were updated to work with the AiiDA v1.0 interface. The example for `AuthInfo` was also simplified as the `Computer` class now provides the `get_authinfo` method. 20 October 2020, 10:46:12 UTC
6202fac Docs: move the "Daemon as a service" section (#4481) Instead of copying the template file inline, links are provided to the same template on the MARVEL NCCR repository that is used for the Quantum Mobile. 20 October 2020, 10:34:00 UTC
db659dd REST API: list endpoints at base URL (#4412) The base URL of the REST API was returning a 404 invalid URL response without providing any guidance to new users as to how to use the API. We change this to return the list of endpoints formerly available only under /server/endpoints. Documentation of where to find the list of endpoints -- which seems to have been entirely deleted -- is added. Co-authored-by: Giovanni Pizzi <gio.piz@gmail.com> 20 October 2020, 09:14:33 UTC
eed1917 Docs: ⬆️ Update sphinx + extensions versions (#4470) This commit primarily upgrades the sphinx dependency from sphinx v2 to v3, allowing for other upgrades of sphinx version pinning. It also moved the `aiida/sphinxext` testing to the official sphinx testing infrastructure, and fixes an issue with the automodule writer. However, the automodule functionality cannot yet be re-instated, due to issues with referencing of these objects. 20 October 2020, 08:37:39 UTC
2174924 Docs: add the "Transport plugins" topic section (#4465) Content is mostly moved from older existing documentation. 19 October 2020, 19:31:54 UTC
9ceb7b3 Docs: add "How to install plugins" section (#4468) There was no centralized location yet that explains how a plugin package is installed, yet this is one of the most critical first steps for new AiiDA users. A new how-to section is created "How to install plugins" that details this information. Since a file `plugins.rst` already existed, which contains information on how to develop a plugin package, it is renamed to `plugins_develop.rst`. 19 October 2020, 17:07:35 UTC
4791046 Docs: Add redirects from old documenation (#4457) Uses the `sphinxext-rediraffe` Sphinx extension to automatically create redirects when documentation pages are moved and therefore their URLs change. New redirect rules should be added to `docs/source/redirects.txt` 19 October 2020, 15:09:01 UTC
0fb6f72 Docs: Add docs live build to tox configuration (#4460) Add docs live build using sphinx-autobuild. This dramatically speeds up the process of checking the rendered documentation while editing. Co-authored-by: Leopold Talirz <leopold.talirz@gmail.com> 19 October 2020, 10:44:28 UTC
e840ab6 Docs: link to packaging plugins howto (#4439) The how to on supporting external codes in AiiDA did not link to the packaging guide. While the how to is great for learning how AiiDA works, developers who want to get started as quickly as possible are better off using the AiiDA plugin cutter. 19 October 2020, 07:46:59 UTC
16bc305 `CalcJob`: support nested directories in target of `remote_copy/symlink_list` (#4416) The `upload_calculation` transport task would fail if either the `remote_copy_list` or `remote_symlink_list` contained a target filepath that had a nested directory that did not exist yet in the remote working directory. Instead of inspecting the file system or creating the folders remotely each time a nested target path is encountered, which would incur a potentially expensive operation over the transport each time, the directory hierarchy is first created in the local sandbox folder before it is copied recursively to the remote in a single shot. 16 October 2020, 21:32:42 UTC
bd6903d `ProcessBuilder`: allow unsetting of inputs through attribute deletion (#4419) The builder object was already able to delete set inputs through the `__delitem__` method, but `__delattr__` was not implemented causing `del builder.input_name` to raise. This is not consistent with how these inputs can be set or accessed as both `__getattr__` and `__setattr__` are implemented. Implementing `__delattr__` brings the implementation up to par for all attribute methods. 07 October 2020, 08:17:47 UTC
1e1bdf2 Merge remote-tracking branch 'origin/master' into develop 04 October 2020, 18:05:09 UTC
a6c6cc4 Merge pull request #4421 from aiidateam/release/1.4.2 Release `v1.4.2` 04 October 2020, 18:01:11 UTC
e7b8943 Release `v1.4.2` 04 October 2020, 17:10:42 UTC
29331b5 CI: use `-e` install for tox + add docker-compose for isolated RabbitMQ (#4375) * Using `pip install -e .` for tox runs improves startup time for tests by preventing unnecessary copy of files. * The docker-compose yml file allows to set up an isolated RabbitMQ instance for local CI testing. 01 October 2020, 09:54:31 UTC
91df33e `CalcJob`: make sure `local_copy_list` files do not end up in node repo (#4415) The concept of the `local_copy_list` is to provide a possibility to `CalcJob` plugins to write files to the remote working directory but that are not also copied to the calculation job's repository folder. However, due to commit 9dfad2efbe9603957a54d0123a3cec2ee48b54bd this guarantee is broken. The relevant commit refactored the handling of the `local_copy_list` in the `upload_calculation` method to allow the target filepaths in the list to contain nested paths with subdirectories that might not yet necessarily exist. The approach was to first write all files to the sandbox folder, where it is easier to deal with non-existing directories. To make sure that these files weren't then also copied to the node's repository folder, the copied files were also added to the `provenance_exclude_list`. However, the logic in that part of the code did not normalize filepaths, which caused files to be copied that shouldm't have. The reason is that the `provenance_exclude_list` could contain `./path/file_a.txt`, which would be compared to the relative path `path/file_a.txt` which references the same file, but the strings are not equal. The solution is to ensure that all paths are fully normalized before they are compared. This will turn the relative path `./path/file_a.txt` into `path/file_a.txt`. 30 September 2020, 21:43:33 UTC
02248cf Replace old format string interpolation with f-strings (#4400) Since Python 3.5 is no longer supported, format string interpolations can now be replaced by f-strings, introduced in Python 3.6, which are more readable, require less characters and are more efficient. Note that `pylint` issues a warning when using f-strings for log messages, just as it does for format interpolated strings. The reasoning is that this is slightly inefficient as the strings are always interpolated even if the log is discarded, but also by not passing the formatting parameters as arguments, the available metadata is reduced. I feel these inefficiencies are premature optimizations as they are really minimal and don't weigh up against the improved readability and maintainability of using f-strings. That is why the `pylint` config is update to ignore the warning `logging-fstring-interpolation` which replaces `logging-format-interpolation` that was ignored before. The majority of the conversions were done automatically with the linting tool `flynt` which is also added as a pre-commit hook. It is added before the `yapf` step because since `flynt` will touch formatting, `yapf` will then get a chance to check it. 30 September 2020, 13:14:45 UTC
4544bc4 CI: add coverage patch threshold to prevent false positives (#4413) The project diff percentage is the change in coverage w.r.t. all lines in the project, whereas the patch diff percentage is the change in coverage w.r.t. only lines touched by the PR. The patch threshold is currently defaulting to 0%, hence it is very easy to fail. By raising it to 0.1% it should now only fail when there is a significant reduction in coverage. Number may need to be further tweaked. 30 September 2020, 08:24:15 UTC
af91a8b Dependencies: update requirement `pytest~=6.0` and use `pyproject.toml` (#4410) Starting from v6.0, `pytest` supports using the `pyproject.toml` instead of a `pytest.ini` to define its configuration. Given that this is quickly becoming the Python packaging standard and allows us to reduce the number of configuration files in the top level of the repository, we increase the version requirement of `pytest`. Note that we also require `pytest-rerunfailures>=9.1.1` because lower versions are broken in combination with `pytest==6.1`. See the following: https://github.com/pytest-dev/pytest-rerunfailures/issues/128 for details. 29 September 2020, 15:34:16 UTC
9144924 `verdi process show`: order called by ctime and use process label (#4407) The command was showing the called subprocesses in a random order and used the node type, which is often uninformative. For example, all workchains are always shown as `WorkChainNode`. By using the process label instead, which is more specific, and ordering the called nodes by creation time, the list gives a more natural overview of the order in which the subprocesses were called. 29 September 2020, 12:29:57 UTC
65ad067 CI: move `pylint` configuration to `pyproject.toml` (#4411) This is supported by `pylint` as of v2.5. 28 September 2020, 21:17:27 UTC
e2b5385 Merge branch 'master' of github.com:aiidateam/aiida-core into develop Merge after release of `v1.4.0`. 28 September 2020, 09:12:09 UTC
9c4a8b4 Merge pull request #4402 from sphuber/release/1.4.1 Release `v1.4.1` 28 September 2020, 08:46:08 UTC
fa64dba Release `v1.4.1` 28 September 2020, 06:39:33 UTC
f07bf63 `verdi setup`: improve validation and help string of broker virtual host (#4408) The help string of the `--broker-virtual-host` option of `verdi setup` incorrectly said that forward slashes have to be escaped but this is not true. The code will escape any characters necessary when constructing the URL to connect to RabbitMQ. On top of that, slashes would fail the validation outright, even though these are common in virtual hosts. For example the virtual host always starts with a leading forward slash, but our validation would reject it. Also the leading slash will be added by the code and so does not have to be used in the setup phase. The help string and the documentation now reflect this. The exacti naming rules for virtual hosts, imposed by RabbitMQ or other implemenatations of the AMQP protocol, are not fully clear. But instead of putting an explicit validation on AiiDA's side and running the risk that we incorrectly reject valid virtual host names, we simply accept all strings. In any case, any non-default virtual host will have to be created through RabbitMQ's control interface, which will perform the validation itself. 28 September 2020, 06:36:22 UTC
cc5af0e `verdi setup`: forward broker defaults to interactive mode (#4405) The options for the message broker configuration do define defaults, however, the interactive clones for `verdi setup`, which are defined in `aiida.cmdline.params.options.commands.setup` override the default with the `contextual_default` which sets an empty default, unless it is taken from an existing profile. The result is that for new profiles, the broker options do not specify a default, even though for most usecases the defaults will be required. After the changes of this commit, the prompt of `verdi setup` will provide a default for all broker parameters so most users will simply have to press enter each time. 28 September 2020, 06:36:22 UTC
1310aba `verdi setup`: improve validation and help string of broker virtual host (#4408) The help string of the `--broker-virtual-host` option of `verdi setup` incorrectly said that forward slashes have to be escaped but this is not true. The code will escape any characters necessary when constructing the URL to connect to RabbitMQ. On top of that, slashes would fail the validation outright, even though these are common in virtual hosts. For example the virtual host always starts with a leading forward slash, but our validation would reject it. Also the leading slash will be added by the code and so does not have to be used in the setup phase. The help string and the documentation now reflect this. The exacti naming rules for virtual hosts, imposed by RabbitMQ or other implemenatations of the AMQP protocol, are not fully clear. But instead of putting an explicit validation on AiiDA's side and running the risk that we incorrectly reject valid virtual host names, we simply accept all strings. In any case, any non-default virtual host will have to be created through RabbitMQ's control interface, which will perform the validation itself. 28 September 2020, 06:30:05 UTC
ff30ebd `verdi setup`: forward broker defaults to interactive mode (#4405) The options for the message broker configuration do define defaults, however, the interactive clones for `verdi setup`, which are defined in `aiida.cmdline.params.options.commands.setup` override the default with the `contextual_default` which sets an empty default, unless it is taken from an existing profile. The result is that for new profiles, the broker options do not specify a default, even though for most usecases the defaults will be required. After the changes of this commit, the prompt of `verdi setup` will provide a default for all broker parameters so most users will simply have to press enter each time. 26 September 2020, 18:24:20 UTC
1c85bc8 Dependencies: increase minimum version requirement `plumpy~=0.15.1` (#4398) The patch release of `plumpy` comes with a simple fix that will prevent the printing of many warnings when running processes. So although not critical, it does improve user experience. 25 September 2020, 14:27:04 UTC
4074110 Implement `next` and `iter` for the `Node.open` deprecation wrapper (#4399) The return value of `Node.open` was wrapped in `WarnWhenNotEntered` in `aiida-core==1.4.0` in order to warn users that use the method without a context manager, which will start to raise in v2.0. Unfortunately, the raising came a little early as the wrapper does not implement the `__iter__` and `__next__` methods, which can be called by clients. An example is `numpy.getfromtxt` which will notice the return value of `Node.open` is filelike and so will wrap it in `iter`. Without the current fix, this raises a `TypeError`. The proper fix would be to forward all magic methods to the wrapped filelike object, but it is not clear how to do this. 25 September 2020, 14:23:42 UTC
dac8156 Dependencies: increase minimum version requirement `plumpy~=0.15.1` (#4398) The patch release of `plumpy` comes with a simple fix that will prevent the printing of many warnings when running processes. So although not critical, it does improve user experience. 25 September 2020, 14:20:33 UTC
5e1c6fd Implement `next` and `iter` for the `Node.open` deprecation wrapper (#4399) The return value of `Node.open` was wrapped in `WarnWhenNotEntered` in `aiida-core==1.4.0` in order to warn users that use the method without a context manager, which will start to raise in v2.0. Unfortunately, the raising came a little early as the wrapper does not implement the `__iter__` and `__next__` methods, which can be called by clients. An example is `numpy.getfromtxt` which will notice the return value of `Node.open` is filelike and so will wrap it in `iter`. Without the current fix, this raises a `TypeError`. The proper fix would be to forward all magic methods to the wrapped filelike object, but it is not clear how to do this. 25 September 2020, 13:56:53 UTC
0184518 `LinkManager`: fix inaccuracy in exception message for non-existent link (#4388) The link manager was always referring to an 'input link' while it should instead refer on an 'input link label' or 'output link label' depending on the value of the link direction, determined by the `self._incoming` attribute. 24 September 2020, 13:12:32 UTC
559abba Drop support for Python 3.5 (#4386) Python 3.5 is EOL as of September 13 2020. CI testing will now only be done against Python 3.6 and 3.8. 24 September 2020, 12:51:59 UTC
59ebaf4 Merge pull request #4385 from aiidateam/release/1.4.0 Release `v1.4.0` 24 September 2020, 09:08:58 UTC
ea5b7f5 Release `v1.4.0` 24 September 2020, 08:06:06 UTC
0b155a5 Remove duplicated migration for SqlAlchemy (#4390) The `0edcdd5a30f0_add_extras_to_group.py` migration is a duplicate of `0edcdd5a30f0_dbgroup_extras.py` and was accidentally committed in commit `26f14ae0c352bfe7b7f3bd0282291831b71320ed`. The migration is exactly the same, including the revision numbers, except the human readable part was changed. 23 September 2020, 21:04:18 UTC
f2f6e2f `SshTransport` : refactor interface to simplify subclassing (#4363) The `SshTransport` transport plugin is refactored slightly to make it easier for sublcasses to adapt its behavior. Specifically: * Add simple wrappers around SFTP calls (stat, lstat and symlink) such that they can be overriden in subclasses, for example if SFTP is not available and pure SSH needs to be used. * New method to initialize file transport separately. Also adds error checking for SFTP initialization, with an explicit message if it fails to launch, and a possible solution. * Add `_MAX_EXEC_COMMAND_LOG_SIZE` class attribute that can be used to limit the length of the debug message containing the command that is executed in `_exec_command_internal`, which can grow very large. 23 September 2020, 11:30:27 UTC
26f14ae `Group`: add support for setting extras on groups (#4328) The `DbGroup` database models get a new JSONB column `extras` which will function just like the extras of nodes. They will allow setting mutable extras as long as they are JSON-serializable. The default is set to an empty dictionary that prevents the ORM from having to deal with null values. In addition, this keeps in line with the current design of other database models. Since the default is one defined on the ORM and not the database schema, we also explicitly mark the column as non-nullable. Otherwise it would be possible to still store rows in the database with null values. To add the functionality of setting, getting and deleting the extras to the backend end frontend `Group` ORM classes, the corresponding mixin classes are added. The functionality for the `BackendGroup` was already accidentally added in a previous commit `65389f4958b9b111756450ea77e2` so only the frontend is touched here. 23 September 2020, 10:59:46 UTC
ac0d559 Prepare the code for the new repository implementation (#4344) In `v2.0.0`, the new repository implementation will be shipped, that despite our best efforts, requires some slight backwards-incompatible changes to the interface. The envisioned changes are translated as deprecation warnings: * `FileType`: `aiida.orm.utils.repository` ->`aiida.repository.common` * `File`: `aiida.orm.utils.repository` ->`aiida.repository.common` * `File`: changed from namedtuple to class * `File`: iteration is deprecated * `File`: `type` attribute -> `file_type` * `Node.put_object_from_tree`: `path` -> `filepath` * `Node.put_object_from_file`: `path` -> `filepath` * `Node.put_object_from_tree`: `key` -> `path` * `Node.put_object_from_file`: `key` -> `path` * `Node.put_object_from_filelike`: `key` -> `path` * `Node.get_object`: `key` -> `path` * `Node.get_object_content`: `key` -> `path` * `Node.open`: `key` -> `path` * `Node.list_objects`: `key` -> `path` * `Node.list_object_names`: `key` -> `path` * `SinglefileData.open`: `key` -> `path` * Deprecated use of `Node.open` without context manager * Deprecated any other mode than `r` and `rb` in the methods: o `Node.open` o `Node.get_object_content` * Deprecated `contents_only` in `put_object_from_tree` * Deprecated `force` argument in o `Node.put_object_from_tree` o `Node.put_object_from_file` o `Node.put_object_from_filelike` o `Node.delete_object` The special case is the `Repository` class of the internal module `aiida.orm.utils.repository`. Even though it is not part of the public API, plugins may have been using it. To allow deprecation warnings to be printed when the module or class is used, we move the content to a mirror module `aiida.orm.utils._repository`, that is then used internally, and the original module has the deprecation warning. This way clients will see the warning if they use it, but use in `aiida-core` will not trigger them. Since there won't be a replacement for this class in the new implementation, it can also not be replaced or forwarded. 23 September 2020, 09:33:51 UTC
aa3b009 `BaseRestartWorkChain`: do not run `process_handler` when `exit_codes=[]`. (#4380) When a `process_handler` explicitly gets passed an empty `exit_codes` list, it would previously always run. This is now changed to not run the handler instead. The reason for this change is that it is more consistent with the semantics of passing a list of exit codes, where it only triggers if the child process has any of the listed exit codes. 23 September 2020, 06:59:19 UTC
93bde42 `CalcJob`: improve logging in `parse_scheduler_output` (#4370) The level of the log that is fired if no detailed job info is available is changed from `WARNING` to `INFO`. Since not all schedulers implement the feature of retrieving this detailed job info, such as the often used `DirectScheduler`, using a warning is not very apt. If the information is missing, nothing is necessarily wrong, so `INFO` is better suited. On the contrary, if the `Scheduler.parse_output` excepts, that is grave and so its level is changed from a warning to an error. Finally, a new condition is added where the scheduler does implement the method to retrieve the detailed job info, but the command fails. In this case, the return value will be non-zero. This value is now checked explicitly and if the case, a info log is fired and the detailed job info is set to `None`, which will cause the parsing to be skipped. This case can for example arise when using the `SlurmScheduler` plugin, which does implement the detailed job info feature, however, not all SLURM installations have the job accounting feature enabled, which is required by the plugin. 22 September 2020, 15:46:41 UTC
8dec326 ORM: move attributes/extras methods of frontend node to mixins Move all methods related to attributes and extras from the frontend `Node` class to separate mixin classes called `EntityAttributesMixin` and `EntityExtrasMixin`. This makes it easier to add these methods to other frontend entity classes and makes the code more maintainable. 22 September 2020, 09:12:38 UTC
65389f4 ORM: move attributes/extras methods of backend node to mixins Move the attributes and extras methods to two mixin classes called `BackendEntityAttributesMixin` and `BackendEntityExtrasMixin`, stored in the new aiida.orm.implementation.entities.py module. The mixin classes rely on the `is_stored` and `_flush_if_stored` methods, so these are added as abstract methods. They are "mixed in" at the BackendNode` level where the abstract methods of the attributes and extras are removed. Move the `_flush_if_stored` method to the `BackendEntity` class, which is added leftmost to the `BackendNode` parent classes. This method can be used by all backend entities. Move `BackendEntity` and `BackendCollection` classes to `aiida.orm.implementation.entities.py` module. Move `validate_attribute_extra_key` and `clean_value` methods to new module `aiida.orm.implementation.utils.py`. Move the calls to `validates_attribute_extra_key` method from the front end `Node` class to the backend mixin classes `AttributesBackendEntity` and `ExtrasBackendEntity`. This way the key/value validation/cleaning is both done at the backend level, which is more consistent. Moreover, this means other frontend classes won't have to add this call to `validates_attribute_extra_key` to their methods, when they want to use the attributes/extras methods. Add exception chaining for all the modules that are adjusted. 22 September 2020, 09:12:38 UTC
8005040 ORM: homogenize attributes/extras methods of backend node Make sure the code for the attributes and extras methods are identical, as a first step towards refactoring the code to use a mixin class for these methods. These changes should have no influence on how the methods function. Add exception chaining for exceptions raised directly during the handling of another exception. There is only a minor difference in the output, but it should make it clear that this exception was raised purposefully. 22 September 2020, 09:12:38 UTC
12be9ad Depedencies: remove upper limit and allow `numpy~=1.17` (#4378) The limit was introduced in `f5d6cba2baf0e7ca69b742f7e76d8a8bbcca85ae` because of a broken pre-release. Now that a stable release is out, the requirement is relax to allow newer versions as well. Note that we keep the minimum requirement of `numpy==1.17` following AEP 003. One change had to be applied in the code to make it compatible with newer versions of `numpy`. In the legacy kpoints implementation, the entries in `num_points` are of type `numpy.float64` for recent versions of `numpy`, but need to be integers so they can be used for indexing in `numpy.linspace()` calls. 19 September 2020, 09:16:21 UTC
c6bca06 Update citations in `README.md` and documentation landing page (#4371) The second AiiDA paper was published in Scientific Data on September 8, 2020. The suggested citations are updated, where the original AiiDA paper is kept to be cited when people use AiiDA with version before v1.0 or if they reference the original ADES model. 17 September 2020, 20:54:58 UTC
back to top