Skip to content

Commit 4f6854d

Browse files
authored
v0.2.19 (#668)
2 parents 658a511 + 4bb4069 commit 4f6854d

File tree

193 files changed

+2182
-1414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+2182
-1414
lines changed

.git_archival.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
4+
ref-names: $Format:%D$

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git_archival.txt export-subst

.github/workflows/benchmark.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Python package
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: 3.12
16+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
17+
- name: Install dependencies
18+
run: uv pip install --system .[amber,ase,pymatgen,benchmark] rdkit openbabel-wheel
19+
- name: Run benchmarks
20+
uses: CodSpeedHQ/action@v2
21+
with:
22+
token: ${{ secrets.CODSPEED_TOKEN }}
23+
run: pytest benchmark/ --codspeed

.github/workflows/pyright.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
on:
2+
- push
3+
- pull_request
4+
5+
name: Type checker
6+
jobs:
7+
pyright:
8+
name: pyright
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@master
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: '3.12'
15+
- run: pip install uv
16+
- run: uv pip install --system -e .[amber,ase,pymatgen] rdkit openbabel-wheel
17+
- uses: jakebailey/pyright-action@v2
18+
with:
19+
version: 1.1.363

.github/workflows/test.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@ jobs:
1212
python-version: ["3.7", "3.8", "3.12"]
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616
# set up conda
1717
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v4
18+
uses: actions/setup-python@v5
1919
with:
2020
python-version: ${{ matrix.python-version }}
21-
# install rdkit and openbabel
22-
- name: Install rdkit
23-
run: python -m pip install rdkit openbabel-wheel
21+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
2422
- name: Install dependencies
25-
run: python -m pip install .[amber,ase,pymatgen] coverage ./tests/plugin
23+
run: uv pip install --system .[amber,ase,pymatgen] coverage ./tests/plugin rdkit openbabel-wheel
2624
- name: Test
2725
run: cd tests && coverage run --source=../dpdata -m unittest && cd .. && coverage combine tests/.coverage && coverage report
2826
- name: Run codecov

.github/workflows/test_import.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
name: test Python import
2-
3-
on:
4-
- push
5-
- pull_request
6-
7-
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-python@v2
13-
with:
14-
python-version: '3.9'
15-
architecture: 'x64'
16-
- run: python -m pip install .
17-
- run: python -c 'import dpdata'
1+
name: test Python import
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: '3.9'
15+
architecture: 'x64'
16+
- run: python -m pip install uv
17+
- run: python -m uv pip install --system .
18+
- run: python -c 'import dpdata'

.pre-commit-config.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.5.0
5+
rev: v4.6.0
66
hooks:
77
# there are many log files in tests
88
# TODO: seperate py files and log files
@@ -16,10 +16,12 @@ repos:
1616
- id: check-merge-conflict
1717
- id: check-symlinks
1818
- id: check-toml
19+
- id: mixed-line-ending
20+
args: ["--fix=lf"]
1921
# Python
2022
- repo: https://github.com/astral-sh/ruff-pre-commit
2123
# Ruff version.
22-
rev: v0.3.5
24+
rev: v0.4.7
2325
hooks:
2426
- id: ruff
2527
args: ["--fix"]

benchmark/__init__.py

Whitespace-only changes.

benchmark/test_import.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from __future__ import annotations
2+
3+
import subprocess
4+
import sys
5+
6+
import pytest
7+
8+
9+
@pytest.mark.benchmark
10+
def test_import():
11+
"""Test import dpdata."""
12+
subprocess.check_output(
13+
[sys.executable, "-c", "'from dpdata import LabeledSystem'"]
14+
).decode("ascii")
15+
16+
17+
@pytest.mark.benchmark
18+
def test_cli():
19+
"""Test dpdata command."""
20+
subprocess.check_output([sys.executable, "-m", "dpdata", "-h"]).decode("ascii")

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# add these directories to sys.path here. If the directory is relative to the
1212
# documentation root, use os.path.abspath to make it absolute, like shown here.
1313
#
14+
from __future__ import annotations
15+
1416
import os
1517
import subprocess as sp
1618
import sys
@@ -207,3 +209,4 @@ def setup(app):
207209
# jupyterlite
208210
jupyterlite_contents = "./nb"
209211
jupyterlite_bind_ipynb_suffix = False
212+
jupyterlite_silence = False

0 commit comments

Comments
 (0)