Skip to content

Commit

Permalink
Merge branch 'main' into async-transport
Browse files Browse the repository at this point in the history
  • Loading branch information
khsrali committed Dec 11, 2024
2 parents 520e58e + baf8d7c commit 22eb929
Show file tree
Hide file tree
Showing 4 changed files with 175 additions and 12 deletions.
36 changes: 27 additions & 9 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,39 +114,56 @@

To the topics

.. grid-item-card:: :fa:`cogs;mr-1` API Reference
.. grid-item-card:: :fa:`sitemap;mr-1` Internal Architecture
:text-align: center
:shadow: md

Comprehensive documentation of CLI, Python API and REST API.
Detailed information on AiiDA's design and architecture.

+++++++++++++++++++++++++++++++++++++++++++++

.. button-ref:: reference/index
.. button-ref:: internals/index
:ref-type: doc
:click-parent:
:expand:
:color: primary
:outline:

To the reference guide
To the architecture guide

.. grid-item-card:: :fa:`sitemap;mr-1` Internal Architecture
.. grid-item-card:: :fa:`puzzle-piece;mr-1` Core plugins
:text-align: center
:shadow: md

Detailed information on AiiDA's design and architecture.
Commonly used AiiDA plugins to extend core functionality

+++++++++++++++++++++++++++++++++++++++++++++

.. button-ref:: internals/index
.. button-ref:: reference/core_plugins
:ref-type: doc
:click-parent:
:expand:
:color: primary
:outline:

To the architecture guide
To the plugin overview

.. grid-item-card:: :fa:`cogs;mr-1` API Reference
:text-align: center
:shadow: md

Comprehensive documentation of CLI, Python API and REST API.

+++++++++++++++++++++++++++++++++++++++++++++

.. button-ref:: reference/index
:ref-type: doc
:click-parent:
:expand:
:color: primary
:outline:

To the reference guide

------------------------------

Expand All @@ -172,8 +189,9 @@
tutorials/index
howto/index
topics/index
reference/index
internals/index
reference/core_plugins
reference/index

===========
How to cite
Expand Down
135 changes: 135 additions & 0 deletions docs/source/reference/core_plugins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
.. _reference:core_plugins:

============
Core plugins
============

This page lists common AiiDA plugins which are not specific to any research domain, but extend the core functionality:

.. grid:: 1 2 2 4
:gutter: 3

.. grid-item-card:: AiiDA WorkGraph
:text-align: center
:shadow: md

Efficiently design and manage flexible workflows with AiiDA.

+++++++++++++++++++++++++++++++++++++++++++++

.. button-link:: https://github.com/aiidateam/aiida-workgraph
:color: primary
:outline:

Go to GitHub

.. grid-item-card:: AiiDA shell
:text-align: center
:shadow: md

Plugin that makes running shell commands easy.

+++++++++++++++++++++++++++++++++++++++++++++

.. button-link:: https://github.com/sphuber/aiida-shell
:color: primary
:outline:

Go to GitHub

.. grid-item-card:: AiiDA submission controller
:text-align: center
:shadow: md

Classes to help managing large numbers of submissions.

+++++++++++++++++++++++++++++++++++++++++++++

.. button-link:: https://github.com/aiidateam/aiida-submission-controller/
:color: primary
:outline:

Go to GitHub

.. grid-item-card:: AiiDA hyperqueue
:text-align: center
:shadow: md

Plugin for the HyperQueue metascheduler enabling sub-node jobs.

+++++++++++++++++++++++++++++++++++++++++++++

.. button-link:: https://github.com/aiidateam/aiida-hyperqueue
:color: primary
:outline:

Go to GitHub

.. grid-item-card:: AiiDA project
:text-align: center
:shadow: md

AiiDA project manager with custom Python environments and isolated project directories.

+++++++++++++++++++++++++++++++++++++++++++++

.. button-link:: https://github.com/aiidateam/aiida-project
:color: primary
:outline:

Go to GitHub

.. grid-item-card:: AiiDA code registry
:text-align: center
:shadow: md

Registry of simulation codes and computers for easy setup in AiiDA.

+++++++++++++++++++++++++++++++++++++++++++++

.. button-link:: https://github.com/aiidateam/aiida-code-registry
:color: primary
:outline:

Go to GitHub

.. grid-item-card:: AiiDA plugin cutter
:text-align: center
:shadow: md

Cookie cutter recipe for AiiDA plugins.

+++++++++++++++++++++++++++++++++++++++++++++

.. button-link:: https://github.com/aiidateam/aiida-plugin-cutter
:color: primary
:outline:

Go to GitHub

.. grid-item-card:: AiiDA PythonJob
:text-align: center
:shadow: md

Run non-AiiDA Python functions on a remote computer (pre-alpha).

+++++++++++++++++++++++++++++++++++++++++++++

.. button-link:: https://github.com/aiidateam/aiida-pythonjob
:color: primary
:outline:

Go to GitHub


Honorable mentions
===================

- `aiida-firecrest <https://github.com/aiidateam/aiida-firecrest>`_: Transport/Scheduler plugins for interfacing with
FirecREST (RESTful services gateway and interface for managing HPC resources).
- `aiida-resource-registry <https://github.com/aiidateam/aiida-resource-registry>`_: Registry of simulation codes and computers for easy setup in AiiDAlab.
- `aiida-restapi <https://github.com/aiidateam/aiida-restapi>`_: RESTful AiiDA Web API for data queries and workflow management.
- `aiida-diff <https://github.com/aiidateam/aiida-diff>`_: AiiDA demo plugin that computes the difference between two
files.

The full list of available plugins can be found on the `AiiDA plugin registry <https://aiidateam.github.io/aiida-registry/>`_.
1 change: 1 addition & 0 deletions docs/source/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ Reference
api/index
rest_api
cheatsheet
core_plugins
_changelog.md
15 changes: 12 additions & 3 deletions src/aiida/storage/psql_dos/orm/querybuilder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ def cast_according_to_type(path_in_json, value):
elif isinstance(value, dict) or value is None:
type_filter = jsonb_typeof(path_in_json) == 'object'
casted_entity = path_in_json.astext.cast(JSONB) # BOOLEANS?
elif isinstance(value, dict):
elif isinstance(value, list):
type_filter = jsonb_typeof(path_in_json) == 'array'
casted_entity = path_in_json.astext.cast(JSONB) # BOOLEANS?
elif isinstance(value, str):
Expand Down Expand Up @@ -661,10 +661,19 @@ def cast_according_to_type(path_in_json, value):
elif operator == 'of_type':
# http://www.postgresql.org/docs/9.5/static/functions-json.html
# Possible types are object, array, string, number, boolean, and null.
valid_types = ('object', 'array', 'string', 'number', 'boolean', 'null')
value_types = ('object', 'array', 'string', 'number', 'boolean')
null_types = ('null',)
valid_types = value_types + null_types
if value not in valid_types:
raise ValueError(f'value {value} for of_type is not among valid types\n{valid_types}')
expr = jsonb_typeof(database_entity) == value
if value in value_types:
expr = jsonb_typeof(database_entity) == value
elif value in null_types:
# https://www.postgresql.org/docs/current/functions-json.html
# json_typeof('null'::json) → null
# json_typeof(NULL::json) IS NULL → t
tp = jsonb_typeof(database_entity)
expr = or_(tp == 'null', tp.is_(None))
elif operator == 'like':
type_filter, casted_entity = cast_according_to_type(database_entity, value)
expr = case((type_filter, casted_entity.like(value)), else_=False)
Expand Down

0 comments on commit 22eb929

Please sign in to comment.