Giter VIP home page Giter VIP logo

aiida-registry's Introduction

AiiDA plugin registry

This repository contains the source of the official registry of AiiDA plugins.

If you are starting to develop a new plugin (e.g. using the AiiDA plugin cutter) or if you already have one, please register it here. We strongly encourage to register at early stages of development, since this both "reserves" the name of your plugin and informs the developer community of your ongoing work.

By default, the list of plugins is now sorted by the latest release, so plugins that are under active development automatically bubble up to the top. The release date is determined by the date of the latest PyPI release. Plugins not released to PyPI will have no release date.

How to register a plugin

  1. Fork this repository
  2. Add your plugin to the end of the plugins.yaml file, e.g.
    ...
    aiida-new:
      entry_point_prefix: new
      plugin_info: https://raw.github.com/aiidateam/aiida-new/master/setup.json
      code_home: https://github.com/aiidateam/aiida-new
      documentation_url: http://aiida-new.readthedocs.io/
    
  3. Create a Pull Request to this repository

Valid keys for each plugin

top-level key (required)

The name under which your plugin will be distributed. By convention, names of AiiDA plugins are lowercase and prefixed by aiida-.

Examples:

  • aiida-quantumespresso
  • aiida-gaussian-datatypes

entry_point_prefix (required)

The prefix of all entry points provided by the plugin. By convention, a plugin aiida-xxx should use entry_point_prefix: xxx.

Example: aiida-quantumespresso uses the entry point prefix quantumespresso and provides numerous entry points, all of which start with quantumespresso..

code_home (required)

The link to the homepage of the plugin, for example its github repository.

pip_url (required for development status beta and higher)

A URL or PyPI package name for installing the most recent version of the package through pip.

Examples:

  • pip_url: aiida-quantumespresso for a package that is registered on PyPI
  • pip_url: git+https://github.com/aiidateam/aiida-wannier90 for a package not registered on PyPI

plugin_info (required for development status stable)

URL pointing to a JSON file containing the keyword arguments passed to the setuptools.setup function when installing your package.

For an example, see the setup.json file of the aiida-diff demo plugin.

documentation_url (optional)

The link to the online documentation for your plugin, for example on readthedocs.org .

version_file (optional)

Use this to point to a Python module that contains a __version__ variable with the version of your plugin. Useful for flit and setuptools configuration files that use the programmatic version = attr: aiida_plugin.__version__ format.

development_status (deprecated)

The development status of a plugin used to be recorded explicitly on the plugin registry. Over time, we've moved closer and closer to adopting the development status trove classifer, so we now suggest to just use those in your setup.json/setup.cfg/... file of your plugin.

If no development status is specified, the status will default to 'planning'.

How to fix registry warnings and errors

You can reproduce the warnings/errors locally through the instructions.

Warning/Error codes

W001

  • Message: Cannot fetch all data from PyPI and missing plugin_info key!
  • Cause: The plugin is not registered on PyPI and the plugin_info key is missing.
  • Solution: Register your plugin on PyPI or add the plugin_info key pointing to the correct plugin_info file.

W002

  • Message: AiiDA version not found
  • Cause: aiida-core is not found in the plugin requirements.
  • Solution: Add aiida-core to the plugin requirements with the version specifier.

W003

  • Message: Missing classifier 'Framework :: AiiDA'
  • Cause: The plugin does not have the classifier Framework :: AiiDA in the plugin metadata (e.g. setup.json, pyproject.toml, setup.cfg).
  • Solution: Add the classifier Framework :: AiiDA to the plugin metadata.

W004

  • Message: Multiple development statuses found in classifiers
  • Cause: The plugin has multiple development statuses in the plugin metadata.
  • Solution: Remove the extra development status from the plugin metadata.

W005

  • Message: Development status in classifiers not match development status in metadata
  • Cause: The development status in the plugin metadata does not match the "developments_status" (deprecated, and defined in plugins.yaml).
  • Solution: Use development status trove classifer only.

W006

W007

  • Message: Invalid development status.
  • Cause: The development status is not one of the following: planning, pre-alpha, alpha, beta, stable, mature, inactive.
  • Solution: Use one of the following development status: planning, pre-alpha, alpha, beta, stable, mature, inactive. But note that development_status is deprecated and you should use development status trove classifer instead.

W008

  • Message: Unable to reach documentation URL.
  • Cause: The documentation URL is not reachable.
  • Solution: Check the documentation URL is correctly defined in plugins.yaml.

W009

  • Message: Prefix of entry points does not follow naming convention.
  • Cause: The prefix of entry points does not match the convention of package name, where if you have package aiida-xxx, the prefix of entry points should be xxx.
  • Solution: Change the prefix of entry points to match the convention.

W010

  • Message: Entry point does not start with proper prefix.
  • Cause: The entry point does not start with the prefix defined in plugins.yaml.
  • Solution: Change the entry point to start with the prefix defined in plugins.yaml.

W011

  • Message: Unable to parse TOML.
  • Cause: The pyproject.toml cannot be parsed.
  • Solution: Check the pyproject.toml is correctly formatted.

W012

  • Message: Unknown build system in pyproject.toml.
  • Cause: The build system in pyproject.toml is not one of the following, check PEP621: setuptools, flit, poetry.
  • Solution: Use one of the following build system: setuptools, flit, poetry.

W013

  • Message: Unknown build system.
  • Cause: The build tool is not valid. We support setuptools (setup.cfg, setup.json), flit (pyproject.toml), poetry (pyproject.toml).
  • Solution: Use one of the following build system: setuptools, flit, poetry.

W014

  • Message: Unable to parse setup JSON.
  • Cause: The setup.json cannot be parsed.
  • Solution: Check the setup.json is correctly formatted.

W015

  • Message: Version & description metadata are not (yet) parsed from the flit build system in pyproject.toml.
  • Cause: The version & description metadata are not (yet) parsed from the flit build system in pyproject.toml.
  • Solution: Add the version & description metadata to the pyproject.toml.

W016

  • Message: Unable to parse setup.cfg.
  • Cause: The setup.cfg cannot be parsed.
  • Solution: Check the setup.cfg is correctly formatted.

W017

  • Message: Invalid version encontered in Poery pyproject.toml for aiida-core.
  • Cause: The version of aiida-core in pyproject.toml is not valid.
  • Solution: Check the version of aiida-core in pyproject.toml is valid and correct.

W018

  • Message: Unable to parse module of the package to futher parse the version from.
  • Cause: The module of the package cannot be parsed.
  • Solution: Check the module of the package is correctly formatted.

W019

  • Message: No bdist_wheel available for PyPI release.
  • Cause: The bdist_wheel is not available for PyPI release.
  • Solution: Check the bdist_wheel is available for PyPI release.

W020

  • Message: Unable to read wheel file from PyPI release.
  • Cause: The wheel file cannot be read from PyPI release.
  • Solution: Check the wheel file is correctly formatted.

E001

  • Message: Failed to install the plugin
  • Cause: The plugin cannot be installed with pip install --pre.
  • Solution: Fix the installation of the plugin.

E002

  • Message: Failed to import the plugin
  • Cause: The plugin cannot be imported.
  • Solution: Fix the import of the plugin.

E003

  • Message: Failed to fetch entry point metadata for package
  • Cause: The entry point metadata cannot be fetched.
  • Solution: Check to see if the entry point metadata is correct.

E004

  • Message: Unable to retrieve plugin metadata
  • Cause: The plugin metadata cannot be retrieved.
  • Solution: Check the URL of your plugin info URL in plugins.yaml is correct.

aiida-registry's People

Contributors

abelcarreras avatar addman2 avatar adegomme avatar ahmedbasem20 avatar ansobolev avatar atztogo avatar blokhin avatar bosonie avatar broeder-j avatar chrisjsewell avatar conradjohnston avatar dev-zero avatar dropd avatar elsapassaro avatar ezpzbz avatar garsua avatar giovannipizzi avatar greschd avatar ionuorah avatar janssenhenning avatar jimboid avatar jkalayan avatar khsrali avatar ltalirz avatar philipprue avatar pre-commit-ci[bot] avatar sphuber avatar unkcpz avatar yakutovicha avatar zhubonan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

aiida-registry's Issues

display fetch warnings in registry

We currently have workflow task that posts comments on PRs about registry issues with plugins (see below).

Historically this has not been particularly effective (I don't have evidence of PR authors really looking at it), especially since there was no way to filter out the info on the specific plugin that was being edited/added.

Instead of displaying the entirety of the output in a comment, now that we have preview builds of the web sites on PRs it would be much more useful to store this information in the JSON file we build up and integrate it into the web site and display it there, e.g. in a subsection "Registry warnings" of the detail page of a plugin.

Potential issues in retrieved plugin metadata (ignore those for plugins not managed by you)

WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-QECpWorkChain]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-aenet]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-aenet]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-alloy]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-alloy]
WARNING! Entry point 'elastic' does not start with prefix 'alloy.' [aiida-alloy]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-autocas]
WARNING! No bdist_wheel available for PyPI release [aiida-bands-inspect]
WARNING! AiiDA version not found [aiida-bands-inspect]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-bigdft]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-castep]
WARNING! No bdist_wheel available for PyPI release [aiida-catmat]
WARNING! AiiDA version not found [aiida-catmat]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-catmat]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-catmat]
WARNING! Entry point 'vasp_base_parser' does not start with prefix 'catmat.' [aiida-catmat]
WARNING! Entry point 'vasp.base' does not start with prefix 'catmat.' [aiida-catmat]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-ce]
WARNING! No bdist_wheel available for PyPI release [aiida-champ]
WARNING! AiiDA version not found [aiida-champ]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-champ]
WARNING! Entry point 'CHAMP' does not start with prefix 'champ.' [aiida-champ]
WARNING! Entry point 'CHAMP' does not start with prefix 'champ.' [aiida-champ]
WARNING! Entry point 'CHAMP' does not start with prefix 'champ.' [aiida-champ]
WARNING! Entry point 'CHAMP' does not start with prefix 'champ.' [aiida-champ]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-core]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-crystal-dft]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-crystal17]
WARNING! Entry point 'potcar' does not start with prefix 'cusp.' [aiida-cusp]
WARNING! > WARNING! Unable to retrieve plugin info from: https://raw.githubusercontent.com/lsmo-epfl/aiida-ddec/master/setup.json [aiida-ddec]
WARNING! AiiDA version not found [aiida-ddec]
WARNING! Development status in classifiers (alpha) does not match development_status in metadata (stable) [aiida-diff]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-diff]
WARNING! Cannot fetch all data from PyPI and missing plugin_info key! [aiida-dynamic-workflows]
WARNING! AiiDA version not found [aiida-dynamic-workflows]
WARNING! > WARNING! Unable to retrieve plugin info from: https://raw.github.com/environ-developers/aiida-environ/master/setup.json [aiida-environ]
WARNING! AiiDA version not found [aiida-environ]
WARNING! Cannot fetch all data from PyPI and missing plugin_info key! [aiida-eon]
WARNING! AiiDA version not found [aiida-eon]
WARNING! Cannot fetch all data from PyPI and missing plugin_info key! [aiida-eonclient]
WARNING! AiiDA version not found [aiida-eonclient]
WARNING! > WARNING! Unable to retrieve plugin info from: https://raw.github.com/sphuber/aiida-fenics/master/setup.json [aiida-fenics]
WARNING! AiiDA version not found [aiida-fenics]
WARNING! AiiDA version not found [aiida-fireworks-scheduler]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-fireworks-scheduler]
WARNING! Entry point 'fireworks' does not start with prefix 'fireworks_scheduler.' [aiida-fireworks-scheduler]
WARNING! Entry point 'fireworks-scheduler' does not start with prefix 'fireworks_scheduler.' [aiida-fireworks-scheduler]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-fleur]
WARNING! Prefix 'gaussian' does not follow naming convention. [aiida-gaussian-datatypes]
WARNING! Unable to read wheel file from PyPI release: No entry_points.txt found in wheel [aiida-graphql]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-graphql]
WARNING! Entry point 'genericMD' does not start with prefix 'gromacs.' [aiida-gromacs]
WARNING! Entry point 'genericMD' does not start with prefix 'gromacs.' [aiida-gromacs]
WARNING! Unable to read wheel file from PyPI release: No entry_points.txt found in wheel [aiida-grouppathx]
WARNING! Development status in classifiers (alpha) does not match development_status in metadata (beta) [aiida-grouppathx]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-grouppathx]
WARNING! Entry point 'gpx' does not start with prefix 'grouppathx.' [aiida-grouppathx]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-gudhi]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-gudhi]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-gulp]
WARNING! No bdist_wheel available for PyPI release [aiida-kkr]
WARNING! > WARNING! Unable to retrieve plugin info from: https://raw.github.com/JuDFTteam/aiida-kkr/develop/setup.json [aiida-kkr]
WARNING! AiiDA version not found [aiida-kkr]
WARNING! Development status in classifiers (beta) does not match development_status in metadata (stable) [aiida-kkr]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-kkr]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-lammps]
WARNING! Entry point 'dynaphopy' does not start with prefix 'lammps.' [aiida-lammps]
WARNING! Entry point 'dynaphopy' does not start with prefix 'lammps.' [aiida-lammps]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-lsmo]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-lsmo]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-metavo-scheduler]
WARNING! Entry point 'sshmetavo' does not start with prefix 'metavo_scheduler.' [aiida-metavo-scheduler]
WARNING! Entry point 'pbsprometavo' does not start with prefix 'metavo_scheduler.' [aiida-metavo-scheduler]
WARNING! Entry point 'sshmetavo' does not start with prefix 'metavo_scheduler.' [aiida-metavo-scheduler]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-mpds]
WARNING! Entry point 'crystal.mpds' does not start with prefix 'mpds.' [aiida-mpds]
WARNING! Entry point 'crystal.cif' does not start with prefix 'mpds.' [aiida-mpds]
WARNING! Entry point 'crystal.aiida' does not start with prefix 'mpds.' [aiida-mpds]
WARNING! > WARNING! Unable to retrieve plugin info from: https://raw.githubusercontent.com/nanotech-empa/aiida-nanotech-empa/master/setup.json [aiida-nanotech-empa]
WARNING! AiiDA version not found [aiida-nanotech-empa]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-nanotech-empa]
WARNING! > WARNING! Unable to retrieve plugin info from: https://raw.githubusercontent.com/atztogo/aiida-nims-scheduler/master/setup.json [aiida-nims-scheduler]
WARNING! AiiDA version not found [aiida-nims-scheduler]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-nims-scheduler]
WARNING! Prefix 'quantumespresso.ocv' does not follow naming convention. [aiida-open_circuit_voltage]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-orca]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-phtools]
WARNING! No bdist_wheel available for PyPI release [aiida-porousmaterials]
WARNING! AiiDA version not found [aiida-porousmaterials]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-porousmaterials]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-psi4]
WARNING! Cannot fetch all data from PyPI and missing plugin_info key! [aiida-python]
WARNING! AiiDA version not found [aiida-python]
WARNING! Prefix 'aiidapython' does not follow naming convention. [aiida-python]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-qeq]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-qeq]
WARNING! No bdist_wheel available for PyPI release [aiida-qp2]
WARNING! AiiDA version not found [aiida-qp2]
WARNING! Entry point 'noncollinearhydrogen' does not start with prefix 'quantumespresso.' [aiida-quantumespresso]
WARNING! Entry point 'spinorbithydrogen' does not start with prefix 'quantumespresso.' [aiida-quantumespresso]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-quantumespresso-hp]
WARNING! Prefix 'quantumespresso.hp' does not follow naming convention. [aiida-quantumespresso-hp]
WARNING! Prefix 'core' does not follow naming convention. [aiida-shell]
WARNING! No bdist_wheel available for PyPI release [aiida-siesta]
WARNING! > WARNING! Unable to retrieve plugin info from: https://raw.github.com/siesta-project/aiida_siesta_plugin/master/setup.json [aiida-siesta]
WARNING! No bdist_wheel available for PyPI release [aiida-spirit]
WARNING! AiiDA version not found [aiida-spirit]
WARNING! Cannot fetch all data from PyPI and missing plugin_info key! [aiida-ssh2win]
WARNING! AiiDA version not found [aiida-ssh2win]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-sshonly]
WARNING! Entry point 'ssh_only' does not start with prefix 'sshonly.' [aiida-sshonly]
WARNING! No bdist_wheel available for PyPI release [aiida-statefile-schedulers]
WARNING! AiiDA version not found [aiida-statefile-schedulers]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-statefile-schedulers]
WARNING! No bdist_wheel available for PyPI release [aiida-strain]
WARNING! AiiDA version not found [aiida-strain]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-supercell]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-supercell]
WARNING! No bdist_wheel available for PyPI release [aiida-symmetry-representation]
WARNING! AiiDA version not found [aiida-symmetry-representation]
WARNING! No bdist_wheel available for PyPI release [aiida-tbextraction]
WARNING! AiiDA version not found [aiida-tbextraction]
WARNING! No bdist_wheel available for PyPI release [aiida-tbmodels]
WARNING! AiiDA version not found [aiida-tbmodels]
WARNING! Missing classifier 'Framework :: AiiDA' [aiida-tcod]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-tcod]
WARNING! Entry point 'UppASD_core_calculations' does not start with prefix 'uppasd.' [aiida-uppasd]
WARNING! Entry point 'UppASD_core_parsers' does not start with prefix 'uppasd.' [aiida-uppasd]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-wannier90-workflows]
WARNING! Cannot fetch all data from PyPI and missing plugin_info key! [aiida-wien2k]
WARNING! AiiDA version not found [aiida-wien2k]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-yambo]
WARNING! AiiDA version not found [aiida-yascheduler]
WARNING! > WARNING! Unable to retrieve plugin info from: https://raw.githubusercontent.com/antimomarrazzo/aiida-z2pack/master/setup.json [aiida-z2pack]
WARNING! AiiDA version not found [aiida-z2pack]
WARNING! development_status key is deprecated. Use PyPI Trove classifiers in the plugin repository instead. [aiida-zeopp]

Uniqueness of entry points for plugins

What are the rules and requirements regarding the uniqueness of entry points for registered plugins. Let me describe a use case to illustrate the point. Currently we have the QE plugin:

"quantumespresso": {
    "name": "aiida-quantumespresso",
    "entry_point": "quantumespresso",
},

One of the calculations coming with this plugin is of course quantumespresso.pw:PwCalculation.
Now I am currently writing a plugin that effectively extends the functionality of the basic Quantum ESPREESO plugin called aiida-quantumespresso-uscf, which just like a quantumespresso.ph:PhCalculation continues from a PwCalculation. Semantically then, it makes sense to place this extension calculation at the entry point quantumespresso.uscf:UscfCalculation.
The question is now if this is allowed or would to namespace issues.

I would think at least in principle, that at least as none of the entry points of the extension plugin clash with those of the base plugin, there should not be a problem. To verify uniquess, we might only have to adapt the format of the registry's json to include a map of all the entry points, just as is defined in the plugin's setup.json. That is maybe we should have a plugins.json that looks something like:

"quantumespresso": {
    "name": "aiida-quantumespresso",
    "entry_points": {
        "aiida.calculations": [
            "quantumespresso.ph = aiida_quantumespresso.calculations.ph:PhCalculation",
            "quantumespresso.pw = aiida_quantumespresso.calculations.pw:PwCalculation"
        ]
    }
},
"quantumespresso-uscf": {
    "name": "aiida-quantumespresso-uscf",
    "entry_points": {
        "aiida.calculations": [
            "quantumespresso.uscf = aiida_quantumespresso_uscf.calculations.uscf:UscfCalculation"
        ]
    }
}

Support Poetry- and Flit-style pyproject.toml instead of the setup.json

People might want to use something else than setuptools to manage their projects.
There are currently two popular alternatives using solely pyproject.toml: Poetry and Flit.
Unfortunately pyproject.toml does not have a standard dependency, entrypoint or trove classifier spec, which makes it build-system dependent.

Example for Poetry (tested except for the plugin part):

[tool.poetry]
name = "aiida-graphql"
version = "0.0.1"
description = "Strawberry-based GraphQL API Server for AiiDA"
authors = ["Tiziano Müller <[email protected]>"]
repository = "https://github.com/dev-zero/aiida-graphql"
license = "MIT"
classifiers = [
    "Development Status :: 3 - Alpha",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Intended Audience :: Science/Research",
]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.7"
aiida = "^1.0.0b6"
strawberry-graphql = "^0.16.5"

[tool.poetry.plugins."aiida.cmdline.data"]
"graphql-data" = "aiida_graphql.cli:some_data_cli_command"

Example for Flit (untested):

[tool.flit.metadata]
module = "aiida-graphql"
author = "Tiziano Müller"
author-email = "[email protected]"
home-page = "https://github.com/dev-zero/aiida-graphql"
license = "MIT"
classifiers = [
    "Development Status :: 3 - Alpha",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Intended Audience :: Science/Research",
]
description-file = "README.md"
requires =[
    "aiida >=1.0.0b6 <1.1.0",
    "strawberry-graphql >=0.16.5 <0.17"
]
requires-python = ">=3.7 <4"

[tool.flit.entrypoints."aiida.cmdline.data"]
"graphql-data" = "aiida_graphql.cli:some_data_cli_command"

What has to be implemented:

  • parse toml (using either tomlkit or pytoml) based on file-type (if url contains pyproject.toml use the toml parser, otherwise continue with loading it as json)
  • parse requirements to pull out AiiDA version, for Flit it seems that the current version parser could be partially reused, for Poetry it might be beneficial to use a semantic version parser instead
  • pulling out the entrypoints is the same for both, just with a different TOML list name

modularize plugin registry code

With PR #88 we arrive at a point where keeping things in a single "script" starts to become problematic.

issue #90 also calls for modularization since it means that the "installation test" will need access to the metadata from the setup.json files.

I propose the following changes:

  • separate the pulling of the setup.json data and rendering of html pages into two steps (& files). The first step can then be taken in travis e.g. during the install phase & dump the results in a temporary .json file
  • have the pages build & the installation tests reuse that data
  • rename make_ghpages/ to aiida_registry

Mentioning @giovannipizzi in case of comments

deprecate `development_status`?

#190 starts parsing the actual trove classifier for the development status of the plugin - and, as expected, there are several cases where it does not agree with the development status registered at the registry level.

In order to move towards standardization & reduce duplication of information, I propose the following changes:

  • the development_status key at the registry level is deprecated
  • for all plugins where there is already is a corresponding & matching development status trove classifier in the plugin source code, it is removed from the registry
  • for plugins where there is a discrepancy, or where there is no trove classifier, the plugin authors are notified
  • when registering a new plugin without pointing to a setup.json file (or similar), the development status will default to planning.

Sounds good @chrisjsewell ?

consider making "entry_point_prefix" key optional

almost all plugins in the list follow the convention of aiida-new having entry point prefix new.
in those cases, the entry_point_prefix key could be omitted.

with the automatic comment on new PRs, people will still be reminded when their entry points don't start with the right prefix.
anyhow; it's a minor thing

Move from plugins.json to plugins.yaml

There have been numerous cases of PRs adding new plugins failing because of JSON formatting issues (forgotten comma, forgotten braces, ...).

JSON isn't really meant to be edited by humans, so I propose to move from a plugins.json to a plugins.yaml file.
The programatically produced plugins_metadata.json can of course still remain in json format.

Before I make any changes in this direction: @yakutovicha are you currently using the plugins.json directly in the AiiDA lab or only the plugins_metadata.json?
I.e. can I move forward with this without breaking anything on your side?

gh-pages: show install command

The detail page for each plugin should show a pip install ... commandline that can be copy pasted to install the plugin (using the pip_url key)

add support for remaining trove classifiers

so far I've added support just for the ones we were already using
to add svgs + descriptions for the remaining ones here

status_dict = {
'planning': [
"Not yet ready to use. Developers welcome!",
"status-planning-d9644d.svg"
],
'beta': [
"Adds new functionality, not yet ready for production. Testing welcome!",
"status-beta-d6af23.svg"
],
'stable': [
"Ready for production calculations. Bug reports welcome!",
"status-stable-4cc61e.svg"
]
}

for svgs use shields.io, e.g. https://img.shields.io/badge/status-planning-d9644d.svg

add linter

add a linter that checks a few basic things

  • trove classifiers
  • correct naming of entry points
  • ...

One way to do it is to take inspiration from
https://github.com/aiidateam/aiida-core/blob/5e02e164b589f9baec2521980ae006a061c76301/.github/workflows/ci.yml#L83-L95

  • Have the aiida-registry html script write the output like here

https://github.com/aiidateam/aiida-core/blob/5e02e164b589f9baec2521980ae006a061c76301/utils/dependency_management.py#L412-L414

  • Then use the gh action to create a comment from it that is inserted into the PR

refactor make_pages.py

make_pages.py no longer actually prepares the html version (this code has already been removed).
Its job is now to call fetch_metadata and write the results to a json file.

the html cli command should be removed

Unexpected search results

After #261, I find a problem when I search for "aiida", the result page shows:
image

It not clear to me where those non-highlighted entry points come from, there is no "aiida" is these entry point names.

a logo for the registry

for the materialscloud/work section (and in general, it would be nice to have a dedicated logo for the AiiDA registry).

@giovannipizzi suggested something with puzzle pieces (using the AiiDA colors); I think that's great idea

introduce more relevant sort order?

This is a suggestion for Nicola to consider presenting the list of plugins in a more relevant order than alphabetic sorting.

E.g. something like most recent release / number of downloads / ...

Do we still need travis?

Now there are both travis and GitHub actions. Maybe we can migrate also the final things from travis to GitHub actions?

Use new aiida-core docker image when it is released

We have aiidateam/aiida-core-with-services docker stack that shipped with new aiida-core release that has the latest version of aiiida-core. When it is released, adopt it in the installation test command.

Add scheduled CI workflow to detect and fix the plugin entry issue

ok updated, when converting to GHA, we don't need that uglyKEYcheck anymore. so i don't bring it here.

import yaml
import requests
from uglyKEYcheck import search_in_url

maindomain = "https://aiidateam.github.io/aiida-registry/"

def load_yaml_file(file_path):
    with open(file_path, 'r') as file:
        return yaml.safe_load(file)

def save_yaml_file(file_path, data):
    with open(file_path, 'w') as file:
        yaml.safe_dump(data, file, sort_keys=False)

def check_if_toml(url):
    new_url = '/'.join(url.split('/')[:-1]) + '/pyproject.toml'
    response = requests.head(new_url, timeout=10)
    if response.status_code == 404:
        return None
    else:
        return new_url

def check_urls(data):
    updates = False
    for plugin, info in data.items():
        url = info.get("plugin_info")
        if url:
            try:
                response = requests.get(url, allow_redirects=True)
                if response.status_code == 404:
                    new_url = check_if_toml(url)
                    if new_url:
                        print(f"{plugin}: returned a 404 status. But *pyproject.toml* detected!")
                        if search_in_url(maindomain+plugin, 'W002'):
                            data[plugin]["plugin_info"] = new_url
                            updates = True
                            print(plugin, ' updated')
                    else:
                        print(f"{plugin}: returned a 404 status. No *pyproject.toml* detected.")
                else:
                    pass
            except requests.RequestException as e:
                print(f"Error checking {plugin}: {url}. Error: {e}")
    return updates

yaml_file_path = 'plugins.yaml'

data = load_yaml_file(yaml_file_path)
if check_urls(data):
    save_yaml_file('plugins-out.yaml', data)
    print("YAML file updated.")

Originally posted by @khsrali in #309 (comment)

Add python version compatibility info?

With the upcoming deprecation of python 2.7, does it make sense to add the information about which python versions a plugin supports? This information could be obtained from the Programming Language :: Python :: X trove classifiers.

Ordering for PRs

#143 deals with the display ordering, but also it might be useful to consider adding instructions on where new plugins should be put in the json file itself. Since it is clearly not ordered by alphabet perhaps mentioning that it is OK to add to the bottom will be sufficient.

include author_email in plugin registry

many setup.json files will include the author_email field (see e.g. here).

since one of the main purposes of the plugin registry is to connect prospective developers with existing developers, we should show the email, at least on the detail page

aiida-quantumespresso: `code_home` wrong value

code_home is for the homepage of the code of the plugin (should be obvious because a plugin does not need to have anything to do with an external code).

TODO: code_home must be changed to point to the plugin repo

more clever `pip install` instructions

if

  • the pip_url points to a package on PyPI and
  • the version parsed by the registry is an alpha/beta/rc version

add --pre to the pip install instructions.

Accelerate the fetch and test install by run only for newly added plugin

When new plugin is added to the plugins.yaml, the preview CI will go through all plugins to test, which is time-consuming and hides the test output information among other plugins output.
The make_pages can accept packages and only fetch and test install on those plugins. If we can ensure the new plugin is always added at the end of plugins.yaml then we can get the plugin name and in CI only run the test for it.

make code home mandatory

as of may 25th, 2020, all 49 registered plugin packages provide the code_home variable.
I see no reason to keep it optional - if the case arises, we will reconsider

Do not show the warnings directly but fold it in that can be unfold to see the detail

The aiida-registry is now for users as well, the warnings shown in details may scare users out from using the plugin. The warnings were supposed to show to developers to fix the issues that are not proper in the plugin, thus should be more invisible to users.
The solution we agree after discuss with @khsrali is to not show the warnings one by one but fold it in an icon that show the number of warnings and can be unfolded to check the details.

For the errors, we keep it as it is with showing the long traceback since the error means the plugin has problem that either prevent user to use or the entrypoint information are not properly displayed. The errors are for developers to take the action ASAP.

GSoC: UI polishing

UI polishing need to happened before the final release of the new registry page. @AhmedBasem20
We keep this list and focus on things in a dedicate PR. Please keep this list update with more new requirement on UI.

  • The checkbox format and type.
  • #252
  • Each plugin name in the description page is better to be a bit larger.
  • Make the website responsive, fix the design on small screens.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.