Skip to content

Commit

Permalink
Remove pylint references
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar committed Nov 18, 2024
1 parent 8c33e3f commit 0f90ea3
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 20 deletions.
1 change: 0 additions & 1 deletion aiida_mlip/calculations/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ def define(cls, spec: CalcJobProcessSpec) -> None:
message="Some output files missing or cannot be read",
)

# pylint: disable=too-many-locals
def prepare_for_submission(
self, folder: aiida.common.folders.Folder
) -> datastructures.CalcInfo:
Expand Down
1 change: 0 additions & 1 deletion aiida_mlip/calculations/singlepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def define(cls, spec: CalcJobProcessSpec) -> None:
print("defining outputnode")
spec.default_output_node = "results_dict"

# pylint: disable=too-many-locals
def prepare_for_submission(
self, folder: aiida.common.folders.Folder
) -> datastructures.CalcInfo:
Expand Down
1 change: 0 additions & 1 deletion aiida_mlip/calculations/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ def define(cls, spec: CalcJobProcessSpec) -> None:
message="Some output files missing or cannot be read",
)

# pylint: disable=too-many-locals
def prepare_for_submission(
self, folder: aiida.common.folders.Folder
) -> datastructures.CalcInfo:
Expand Down
1 change: 0 additions & 1 deletion aiida_mlip/data/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def from_local(
return cls(file=file_path, architecture=architecture, filename=filename)

@classmethod
# pylint: disable=too-many-arguments
def from_uri(
cls,
uri: str,
Expand Down
2 changes: 1 addition & 1 deletion aiida_mlip/helpers/help_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def load_model(
"""
if model is None:
loaded_model = ModelData.from_uri(
"https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model", # pylint: disable=line-too-long
"https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model",
architecture,
cache_dir=cache_dir,
)
Expand Down
1 change: 0 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
if current_year == copyright_first_year
else f"{copyright_first_year}-{current_year}"
)
# pylint: disable=redefined-builtin
copyright = f"{copyright_year_string}, {copyright_owners}. All rights reserved"

# The version info for the project you're documenting, acts as replacement for
Expand Down
3 changes: 1 addition & 2 deletions examples/calculations/submit_geomopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def cli(
opt_cell_fully,
steps,
) -> None:
# pylint: disable=too-many-arguments
"""Click interface."""
try:
code = load_code(codelabel)
Expand All @@ -133,4 +132,4 @@ def cli(


if __name__ == "__main__":
cli() # pylint: disable=no-value-for-parameter
cli()
3 changes: 1 addition & 2 deletions examples/calculations/submit_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def cli(
codelabel, struct, model, arch, device, precision, ensemble, md_dict_str
) -> None:
"""Click interface."""
# pylint: disable=too-many-arguments
md_dict = ast.literal_eval(md_dict_str)
try:
code = load_code(codelabel)
Expand All @@ -115,4 +114,4 @@ def cli(


if __name__ == "__main__":
cli() # pylint: disable=no-value-for-parameter
cli()
3 changes: 1 addition & 2 deletions examples/calculations/submit_singlepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def singlepoint(params: dict) -> None:
"--precision", default="float64", type=str, help="Chosen level of precision."
)
def cli(codelabel, struct, model, arch, device, precision) -> None:
# pylint: disable=too-many-arguments
"""Click interface."""
try:
code = load_code(codelabel)
Expand All @@ -97,4 +96,4 @@ def cli(codelabel, struct, model, arch, device, precision) -> None:


if __name__ == "__main__":
cli() # pylint: disable=no-value-for-parameter
cli()
1 change: 0 additions & 1 deletion tests/calculations/test_singlepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def test_sp_nostruct(fixture_sandbox, generate_calc_job, model_folder, janus_cod
"""Test singlepoint calculation with error input."""
entry_point_name = "mlip.sp"
model_file = model_folder / "mace_mp_small.model"
# pylint:disable=line-too-long
inputs = {
"metadata": {"options": {"resources": {"num_machines": 1}}},
"code": janus_code,
Expand Down
5 changes: 2 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# pylint: disable=redefined-outer-name,too-many-statements
"""Initialise a text database and profile for pytest."""

import os
Expand All @@ -13,11 +12,11 @@
from aiida.plugins import CalculationFactory
import pytest

pytest_plugins = ["aiida.manage.tests.pytest_fixtures"] # pylint: disable=invalid-name
pytest_plugins = ["aiida.manage.tests.pytest_fixtures"]


@pytest.fixture(scope="function", autouse=True)
def clear_database_auto(aiida_profile_clean): # pylint: disable=unused-argument
def clear_database_auto(aiida_profile_clean):
"""Automatically clear database in between tests."""


Expand Down
4 changes: 0 additions & 4 deletions tests/data/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def test_download_fresh_file_keep(tmp_path):
path_test.unlink(missing_ok=True)

# Construct a ModelData instance downloading a non-cached file
# pylint:disable=line-too-long
model = ModelData.from_uri(
uri="https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model",
filename="mace.model",
Expand All @@ -65,7 +64,6 @@ def test_download_fresh_file(tmp_path):
path_test.unlink(missing_ok=True)

# Construct a ModelData instance downloading a non-cached file
# pylint:disable=line-too-long
model = ModelData.from_uri(
uri="https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model",
filename="mace.model",
Expand All @@ -80,15 +78,13 @@ def test_download_fresh_file(tmp_path):

def test_no_download_cached_file(tmp_path):
"""Test if the caching prevents saving duplicate model in the database."""
# pylint:disable=line-too-long
existing_model = ModelData.from_uri(
uri="https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model",
filename="mace_existing.model",
cache_dir=tmp_path,
architecture="mace_mp",
)
# Construct a ModelData instance that should use the cached file
# pylint:disable=line-too-long
model = ModelData.from_uri(
uri="https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model",
cache_dir=tmp_path,
Expand Down

0 comments on commit 0f90ea3

Please sign in to comment.