Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 1 addition & 1 deletion .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The following packages are installed into the Python environment `.venv`:
- LAMMPS
- MPICH
- CMake
- pre-commit (including hooks)
- prek (including hooks)
- Test packages including pytest
- Doc packages including sphinx

Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/build_py.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ SCRIPT_PATH=$(dirname $(realpath -s $0))
cd ${SCRIPT_PATH}/..

uv sync --dev --python 3.12 --extra cpu --extra torch --extra jax --extra lmp --extra test --extra docs
pre-commit install
prek install
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"postCreateCommand": ".devcontainer/build_py.sh && .devcontainer/download_libtorch.sh && .devcontainer/build_cxx.sh && pre-commit install-hooks",
"postCreateCommand": ".devcontainer/build_py.sh && .devcontainer/download_libtorch.sh && .devcontainer/build_cxx.sh && prek install-hooks",
"remoteEnv": {
"PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/.venv/bin",
"DP_ENABLE_PYTORCH": "1",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ jobs:
run: uv pip install -e .[cpu,test]

- name: Install pre-commit tools
Comment thread
njzjz marked this conversation as resolved.
Outdated
run: uv tool install pre-commit
run: uv tool install prek

- name: Install pre-commit hooks
Comment thread
njzjz marked this conversation as resolved.
Outdated
run: pre-commit install --install-hooks
run: prek install --install-hooks

- name: Verify installation
run: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ repos:
hooks:
- id: flake8
additional_dependencies:
- torchfix==0.6.0
- torchfix==0.7.0
Comment thread
njzjz marked this conversation as resolved.
- flake8-pyproject==1.2.3
# numpydoc
- repo: https://github.com/Carreau/velin
Expand Down
6 changes: 3 additions & 3 deletions doc/development/coding-conventions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ style with some modifications.
Run scripts to check the code
=============================

It's a good idea to install `pre-commit <https://pre-commit.com>`_ on your repository:
It's a good idea to install `prek <https://github.com/j178/prek>`_ on your repository:

.. code-block:: bash

$ pip install pre-commit
$ pre-commit install
$ uv tool install prek
$ prek install

The scripts will be run automatically before each commit and will fix the code style
issues automatically.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ dp = "deepmd.main:main"

[dependency-groups]
dev = [
"pre-commit",
"prek",
"cmake",
"mpich",
]
Expand Down
Loading