Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ jobs:
run: |
cd mpcontribs-client
python${{ matrix.python-version }} -m pip install --no-deps .
python${{ matrix.python-version }} -m flake8 --max-line-length 100
python${{ matrix.python-version }} -m pycodestyle --max-line-length 100 .
python${{ matrix.python-version }} -m pytest -n auto -v -s --cov=mpcontribs/client --cov-report=term-missing --cov-report=xml --ignore=bravado
python${{ matrix.python-version }} -m build --outdir ../dist

Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ exclude: |
)

repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.12.0
hooks:
- id: ruff
args: [--fix, --ignore, "D,E501,E741,E402"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
Expand Down
1 change: 0 additions & 1 deletion mpcontribs-api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ Documentation = "https://docs.materialsproject.org/services/mpcontribs"
dev = [
"flake8",
"pytest",
"pytest-flake8",
"pytest-pycodestyle",
"pytest-xdist",
]
Expand Down
4 changes: 3 additions & 1 deletion mpcontribs-client/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ where = ["."]
exclude = ["tests"]
include = ["mpcontribs.client"]

[tool.ruff.lint.pycodestyle]
max-line-length = 100

[project]
name = "mpcontribs-client"
dynamic = ["version"]
Expand Down Expand Up @@ -53,7 +56,6 @@ Documentation = "https://docs.materialsproject.org/services/mpcontribs"
dev = [
"flake8",
"pytest",
"pytest-flake8",
"pytest-pycodestyle",
"pytest-cov",
"pytest-xdist",
Expand Down
7 changes: 4 additions & 3 deletions mpcontribs-client/tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import pytest
import logging
from unittest.mock import MagicMock, patch

from unittest.mock import patch, MagicMock
from mpcontribs.client import validate_email, Client, email_format
import pytest
from swagger_spec_validator.common import SwaggerValidationError

from mpcontribs.client import Client, email_format, validate_email

logger = logging.Logger(__name__)
logger.propagate = True

Expand Down
2 changes: 1 addition & 1 deletion mpcontribs-lux/mpcontribs/lux/autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def pydantic_model(self) -> Type[BaseModel]:
self.file_name, orient=orient, lines=self.fmt == "jsonl"
)
break
except Exception as exc:
except Exception:
continue
else:
raise ValueError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import gzip
import json
from pathlib import Path

import numpy as np
import pytest
Expand Down
1 change: 0 additions & 1 deletion mpcontribs-portal/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Documentation = "https://docs.materialsproject.org/services/mpcontribs"
dev = [
"flake8",
"pytest",
"pytest-flake8",
"pytest-pycodestyle",
"pytest-xdist",
]
Expand Down