Skip to content

Commit

Permalink
Apply ruff to descriptors (#168)
Browse files Browse the repository at this point in the history
* Update docstrings for ruff

* Remove pylint references
  • Loading branch information
ElliottKasoar authored Nov 20, 2024
1 parent 6a03e15 commit af4fdf6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion aiida_mlip/calculations/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def define(cls, spec: CalcJobProcessSpec) -> None:
"parser_name"
].default = "mlip.descriptors_parser"

# pylint: disable=too-many-locals
def prepare_for_submission(
self, folder: aiida.common.folders.Folder
) -> datastructures.CalcInfo:
Expand Down
6 changes: 2 additions & 4 deletions examples/calculations/submit_descriptors.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""Example code for submitting descriptors calculation."""

import click

from aiida.common import NotExistent
from aiida.engine import run_get_node
from aiida.orm import Bool, Str, load_code
from aiida.plugins import CalculationFactory
import click

from aiida_mlip.helpers.help_load import load_model, load_structure

Expand Down Expand Up @@ -107,7 +106,6 @@ def cli(
calc_per_element,
calc_per_atom,
) -> None:
# pylint: disable=too-many-arguments
"""Click interface."""
try:
code = load_code(codelabel)
Expand All @@ -132,4 +130,4 @@ def cli(


if __name__ == "__main__":
cli() # pylint: disable=no-value-for-parameter
cli()
10 changes: 4 additions & 6 deletions tests/calculations/test_descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@

import subprocess

from ase.build import bulk
import pytest

from aiida.common import datastructures
from aiida.engine import run
from aiida.orm import Bool, Str, StructureData
from aiida.plugins import CalculationFactory
from ase.build import bulk
import pytest

from aiida_mlip.data.model import ModelData


def test_descriptors(fixture_sandbox, generate_calc_job, janus_code, model_folder):
"""Test generating descriptors calculation job"""

"""Test generating descriptors calculation job."""
entry_point_name = "mlip.descriptors"
model_file = model_folder / "mace_mp_small.model"
inputs = {
Expand Down Expand Up @@ -69,7 +67,7 @@ def test_descriptors(fixture_sandbox, generate_calc_job, janus_code, model_folde


def test_run_descriptors(model_folder, janus_code):
"""Test running descriptors calculation"""
"""Test running descriptors calculation."""
model_file = model_folder / "mace_mp_small.model"
inputs = {
"metadata": {"options": {"resources": {"num_machines": 1}}},
Expand Down

0 comments on commit af4fdf6

Please sign in to comment.