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
4 changes: 2 additions & 2 deletions .github/workflows/pub-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
steps:
- uses: actions/checkout@master

- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@master
with:
python-version: 3.9
python-version: "3.10"

- name: Install pypa/build
run: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.8", "3.12"]
python-version: ["3.10", "3.13"]

steps:
- uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_import.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'
architecture: 'x64'
- run: python -m pip install uv
- run: python -m uv pip install --system .
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you use this software, please cite the following paper:

## Installation

dpdata only supports Python 3.8 and above. You can [setup a conda/pip environment](https://docs.deepmodeling.com/faq/conda.html), and then use one of the following methods to install dpdata:
dpdata only supports Python 3.10 and above. You can [setup a conda/pip environment](https://docs.deepmodeling.com/faq/conda.html), and then use one of the following methods to install dpdata:

- Install via pip: `pip install dpdata`
- Install via conda: `conda install -c conda-forge dpdata`
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation

dpdata only supports Python 3.8 and above. You can [setup a conda/pip environment](https://docs.deepmodeling.com/faq/conda.html), and then use one of the following methods to install dpdata:
dpdata only supports Python 3.10 and above. You can [setup a conda/pip environment](https://docs.deepmodeling.com/faq/conda.html), and then use one of the following methods to install dpdata:

- Install via pip: `pip install dpdata`
- Install via conda: `conda install -c conda-forge dpdata`
Expand Down
4 changes: 3 additions & 1 deletion dpdata/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
from __future__ import annotations

from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Callable
from typing import TYPE_CHECKING

from .plugin import Plugin

if TYPE_CHECKING:
from collections.abc import Callable

import ase.calculators.calculator


Expand Down
6 changes: 1 addition & 5 deletions dpdata/plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
from __future__ import annotations

import importlib
from importlib import metadata
from pathlib import Path

try:
from importlib import metadata
except ImportError: # for Python<3.8
import importlib_metadata as metadata

PACKAGE_BASE = "dpdata.plugins"
NOT_LOADABLE = ("__init__.py",)

Expand Down
4 changes: 3 additions & 1 deletion dpdata/plugins/ase.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import os
from typing import TYPE_CHECKING, Generator
from typing import TYPE_CHECKING

import numpy as np

Expand All @@ -10,6 +10,8 @@
from dpdata.format import Format

if TYPE_CHECKING:
from collections.abc import Generator

import ase
from ase.optimize.optimize import Optimizer

Expand Down
3 changes: 2 additions & 1 deletion dpdata/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from typing import (
TYPE_CHECKING,
Any,
Iterable,
Literal,
overload,
)
Expand All @@ -37,6 +36,8 @@
)

if TYPE_CHECKING:
from collections.abc import Iterable

import parmed


Expand Down
4 changes: 3 additions & 1 deletion dpdata/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io
import os
from contextlib import contextmanager
from typing import TYPE_CHECKING, Generator, Literal, overload
from typing import TYPE_CHECKING, Literal, overload

import numpy as np

Expand Down Expand Up @@ -130,6 +130,8 @@ def utf8len(s: str) -> int:


if TYPE_CHECKING:
from collections.abc import Generator

FileType = io.IOBase | str | os.PathLike


Expand Down
11 changes: 4 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ authors = [
]
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
]
dependencies = [
Expand All @@ -26,10 +26,8 @@ dependencies = [
'wcmatch',
'lmdb',
'msgpack-numpy',
'importlib_metadata>=1.4; python_version < "3.8"',
'typing_extensions; python_version < "3.8"',
]
requires-python = ">=3.8"
requires-python = ">=3.10"
readme = "README.md"
keywords = ["lammps", "vasp", "deepmd-kit"]

Expand All @@ -46,8 +44,7 @@ test = [
]
ase = ['ase']
amber = [
'parmed; python_version >= "3.8"',
'parmed<4; python_version < "3.8"',
'parmed',
]
pymatgen = ['pymatgen']
docs = [
Expand Down
2 changes: 1 addition & 1 deletion tests/plugin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies = [
'dpdata',
]
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.10"

[project.entry-points.'dpdata.plugins']
random = "dpdata_plugin_test:ep"
Loading