Skip to content

Commit

Permalink
use pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Sep 16, 2023
1 parent 6d4b300 commit 591eb43
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 73 deletions.
4 changes: 2 additions & 2 deletions .github/actions/create-dev-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ runs:

- name: Install Dev Dependencies 📦
run: |
pip install --upgrade pip
pip install --upgrade .[dev]
pip install -U pip
pip install -U -e .[dev]
shell: bash
18 changes: 7 additions & 11 deletions .github/workflows/comment.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
name: CI
name: Comment on PRs with plugin metadata issues

on: [pull_request]

jobs:

check-plugin-metadata:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install prerequisites
run: pip install --upgrade pip
- name: Install
run: pip install -e . -v
- name: Checkout Repo ⚡️
uses: actions/checkout@v3
- name: Create dev environment
uses: ./.github/actions/create-dev-env

- name: fetch metadata
id: fetch_metadata
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: aiida-registry fetch

- name: Create commit comment
if: steps.fetch_metadata.outputs.error
uses: peter-evans/commit-comment@v1
Expand Down
24 changes: 24 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
The MIT License (MIT)

Copyright (c), 2014-2020, ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE
(Theory and Simulation of Materials (THEOS) and National Centre for
Computational Design and Discovery of Novel Materials (NCCR MARVEL)),
Switzerland and ROBERT BOSCH LLC, USA. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2 changes: 1 addition & 1 deletion aiida_registry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import os

__version__ = "0.1.0"
__version__ = "0.3.0"

# Absolute paths
pwd = os.path.split(os.path.abspath(__file__))[0]
Expand Down
22 changes: 8 additions & 14 deletions bin/aiida-registry → aiida_registry/cli.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""CLI for AiiDA registry."""
import click

from aiida_registry.make_pages import make_pages
from aiida_registry.test_install import test_install_all


@click.group()
def cli():
pass
"""CLI for AiiDA registry."""


@cli.command()
Expand All @@ -22,16 +25,8 @@ def cli():
default=True,
help="Allow fetching wheels from PyPI",
)
def fetch(package, fetch_pypi, fetch_wheel):
from aiida_registry.make_pages import make_pages

make_pages()


@cli.command()
def html():
from aiida_registry.make_pages import make_pages

def fetch(package, fetch_pypi, fetch_wheel): # pylint: disable=unused-argument
"""Fetch data from PyPI and write to JSON file."""
make_pages()


Expand All @@ -43,8 +38,7 @@ def html():
help="Container image to use for the install",
)
def test_install(container_image):
from aiida_registry.test_install import test_install_all

"""Test installing all plugins in a Docker container."""
test_install_all(container_image)


Expand Down
2 changes: 1 addition & 1 deletion aiida_registry/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_install_one_docker(container_image, plugin):
)
extract_metadata = container.exec_run(
workdir=_DOCKER_WORKDIR,
cmd="python ./bin/analyze_entrypoints.py -o result.json",
cmd="python ./analyze_entrypoints.py -o result.json",
)
error_message = handle_error(
extract_metadata,
Expand Down
1 change: 1 addition & 0 deletions bin/analyze_entrypoints.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""""
Fetch information about plugins and print it in a human-readable format.
Expand Down
51 changes: 51 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "aiida-registry"
dynamic = ["version"] # read from aiida_registry/__init__.py
description = "Registry of AiiDA plugins"
authors = [{name = "The AiiDA team", email = "developers@aiida.net"}]
readme = "README.md"
license = {file = "LICENSE.txt"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: AiiDA",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering"
]
keywords = ["aiida", "workflows"]
requires-python = ">=3.9"
dependencies = [
"jinja2~=2.11",
"requests~=2.28.1",
"requests-cache~=0.5.2",
"requirements-parser~=0.2.0",
"poetry~=1.1.15",
"tomlkit",
"click~=7.1",
"pyyaml~=6.0",
"docker~=5.0",
# https://github.com/aws/aws-sam-cli/issues/3661
"markupsafe~=2.0.1",
# dev dependencies
"pre-commit~=2.2",
"pylint~=2.16.1",
"pytest~=6.2.2",
"pytest-regressions~=2.5.0",
]

[project.urls]
Home = "https://aiida-registry.github.io/"
Documentation = "https://github.com/aiidateam/aiida-registry/wiki"
Source = "https://github.com/aiidateam/aiida-core"

[project.scripts]
aiida-registry = "aiida_registry.cli:cli"
44 changes: 0 additions & 44 deletions setup.py

This file was deleted.

1 comment on commit 591eb43

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

Please sign in to comment.