diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 51ef2e3..005769b 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -2,6 +2,9 @@ name: Lint on: [push] +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest @@ -10,22 +13,20 @@ jobs: python-version: ["3.9", "3.11"] steps: - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - cache: pip - cache-dependency-path: requirements-dev.txt + - name: Install dependencies run: | - pip install -r requirements-dev.txt - pip install ruff + pip install ruff mypy --upgrade + - name: ruff run: | ruff check . ruff format --check . + - name: mypy - run: | - mypy --version - rm -rf .mypy_cache - mypy $(find . -name "*.py" | xargs) + run: mypy ${{ github.event.repository.name }} diff --git a/.mypy.ini b/.mypy.ini deleted file mode 100644 index 312c11a..0000000 --- a/.mypy.ini +++ /dev/null @@ -1,16 +0,0 @@ -[mypy] - -[mypy-ovito.*] -ignore_missing_imports = True -[mypy-lammps.*] -ignore_missing_imports = True -[mypy-setuptools.*] -ignore_missing_imports = True -[mypy-seaborn.*] -ignore_missing_imports = True -[mypy-mpi4py.*] -ignore_missing_imports = True -[mypy-pymatgen.*] -ignore_missing_imports = True -[mypy-ruamel.*] -ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml index 9aff12f..cdbfae2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ version = "0.0.3" description = "Analysis tool for simulations of grain boundaries and interfaces" authors = [{name = "Alexander Bonkowski", email = "alexander.bonkowski@rwth-aachen.de"}] maintainers = [{name = "Alexander Bonkowski"}] -dependencies = ["numpy", "pandas", "scipy"] +dependencies = ["numpy", "pandas", "scipy", "seaborn"] requires-python = ">=3.8" readme = "README.md" license = {file = "LICENSE"} @@ -77,6 +77,9 @@ lint.ignore = [ lint.pydocstyle.convention = "google" lint.isort.required-imports = ["from __future__ import annotations"] +[tool.mypy] +ignore_missing_imports = true + [tool.codespell] ignore-words-list = """ cna diff --git a/requirements-dev.txt b/requirements-dev.txt index ae5f19a..1422f48 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,11 +1,7 @@ -ovito -Pyside6<=6.7.0 -pymatgen ase -black -pylint mypy +ovito +pymatgen +Pyside6<=6.7.0 pytest -data-science-types -pydocstyle -flake8 +ruff diff --git a/requirements.txt b/requirements.txt index 4f374c5..07af6a3 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,4 @@ -matplotlib -numpy -scipy -coverage -seaborn -pandas -jupyter +numpy==1.26.4 +pandas==2.2.2 +scipy==1.13.0 +seaborn==0.13.2