Skip to content

Commit 16c024e

Browse files
authored
Merge pull request #87 from mphowardlab/azplugins-v1
Release azplugins v1
2 parents b782744 + f235ace commit 16c024e

File tree

321 files changed

+7901
-27918
lines changed

Some content is hidden

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

321 files changed

+7901
-27918
lines changed

.clang-format

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
BasedOnStyle: WebKit
3+
AccessModifierOffset: 0
4+
AlignAfterOpenBracket: Align
5+
AlignEscapedNewlines: 'Left'
6+
AlignOperands: 'true'
7+
AlignTrailingComments: 'true'
8+
AllowAllArgumentsOnNextLine: 'false'
9+
AllowAllParametersOfDeclarationOnNextLine: 'false'
10+
AllowShortFunctionsOnASingleLine: Empty
11+
AllowShortIfStatementsOnASingleLine: 'false'
12+
AllowShortLoopsOnASingleLine: 'false'
13+
BinPackArguments: 'false'
14+
BinPackParameters: 'false'
15+
BreakBeforeBraces: Whitesmiths
16+
BreakConstructorInitializers: BeforeColon
17+
ColumnLimit: '100'
18+
CompactNamespaces: 'true'
19+
Cpp11BracedListStyle: 'true'
20+
FixNamespaceComments: 'true'
21+
IndentWidth: '4'
22+
KeepEmptyLinesAtTheStartOfBlocks: false
23+
Language: Cpp
24+
NamespaceIndentation: None
25+
PointerAlignment: Left
26+
SortIncludes: 'true'
27+
SpaceAfterCStyleCast: 'false'
28+
SpaceAfterTemplateKeyword: 'false'
29+
SpaceBeforeParens: ControlStatements
30+
SpacesInAngles: 'false'
31+
SpaceInEmptyParentheses: false
32+
Standard: Cpp11
33+
TabWidth: '4'
34+
UseTab: Never
35+
36+
...

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/test.yml

Lines changed: 0 additions & 93 deletions
This file was deleted.

.github/workflows/unit-test.yaml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
name: Unit test
2+
3+
env:
4+
COMPONENT_NAME: azplugins
5+
6+
# Most components should not modify the rest of this file. When needed, merge in updates from
7+
# https://github.com/glotzerlab/hoomd-component-template/
8+
9+
#############################################################################################
10+
# HOOMD-blue version to build.
11+
HOOMD_BLUE_VERSION: v4.8.2
12+
# prevent deadlocked MPI tests from causing the job to cancel
13+
MPIEXEC_TIMEOUT: 3000
14+
# allow mpirun to execute as root in the tests
15+
OMPI_ALLOW_RUN_AS_ROOT: 1
16+
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
17+
# allow openmpi to oversubscribe cores
18+
PRTE_MCA_rmaps_default_mapping_policy: ":oversubscribe"
19+
OMPI_MCA_rmaps_base_oversubscribe: "true"
20+
# prevent errors from mis-configured openib systems
21+
OMPI_MCA_btl: "vader,self"
22+
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
cancel-in-progress: true
26+
27+
on:
28+
pull_request:
29+
push:
30+
branches: [main]
31+
32+
workflow_dispatch:
33+
34+
defaults:
35+
run:
36+
shell: bash
37+
38+
jobs:
39+
build_test:
40+
name: Build and test [${{ matrix.name }}]
41+
runs-on: ubuntu-24.04
42+
container:
43+
image: nvidia/cuda:12.5.0-devel-ubuntu22.04
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
include:
48+
- name: "CPU"
49+
enable_gpu: "OFF"
50+
enable_mpi: "OFF"
51+
- name: "CPU, MPI"
52+
enable_gpu: "OFF"
53+
enable_mpi: "ON"
54+
- name: "GPU"
55+
enable_gpu: "ON"
56+
enable_mpi: "OFF"
57+
- name: "GPU, MPI"
58+
enable_gpu: "ON"
59+
enable_mpi: "ON"
60+
61+
steps:
62+
- name: Restore cached HOOMD-blue build
63+
id: cache
64+
uses: actions/cache/restore@v4
65+
with:
66+
path: install
67+
key: hoomd-blue-${{ env.HOOMD_BLUE_VERSION }}-${{ matrix.enable_mpi }}-gpu-${{ matrix.enable_gpu }}
68+
- name: Install git
69+
run: |
70+
apt-get update
71+
apt-get install git --yes
72+
- name: Checkout HOOMD-blue
73+
uses: actions/checkout@v4
74+
with:
75+
repository: glotzerlab/hoomd-blue
76+
path: hoomd-blue
77+
submodules: true
78+
ref: ${{ env.HOOMD_BLUE_VERSION }}
79+
- name: Create Python Environment
80+
uses: mamba-org/setup-micromamba@v1
81+
with:
82+
environment-name: test
83+
environment-file: hoomd-blue/.github/workflows/environments/py312-conda-lock.yml
84+
micromamba-root-path: ${{ github.workspace }}/micromamba
85+
86+
- name: Configure conda environment variables
87+
run: |
88+
echo "PYTHONPATH=$GITHUB_WORKSPACE/install" >> $GITHUB_ENV
89+
echo "CONDA_PREFIX=$MAMBA_ROOT_PREFIX/envs/test" >> $GITHUB_ENV
90+
echo "CMAKE_PREFIX_PATH=$MAMBA_ROOT_PREFIX/envs/test" >> $GITHUB_ENV
91+
echo "$MAMBA_ROOT_PREFIX/envs/test/bin" >> $GITHUB_PATH
92+
93+
- name: Configure HOOMD-blue
94+
if: steps.cache.outputs.cache-hit != 'true'
95+
run: |
96+
cmake -B build-hoomd-blue -S hoomd-blue \
97+
-GNinja \
98+
-DCMAKE_BUILD_TYPE=Release \
99+
-DENABLE_GPU=${ENABLE_GPU} \
100+
-DENABLE_MPI=${ENABLE_MPI} \
101+
-DCUDA_ARCH_LIST="70" \
102+
-DBUILD_TESTING=OFF \
103+
-DPLUGINS="" \
104+
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install
105+
env:
106+
ENABLE_GPU: ${{ matrix.enable_gpu }}
107+
ENABLE_MPI: ${{ matrix.enable_mpi }}
108+
- name: Build HOOMD-blue
109+
if: steps.cache.outputs.cache-hit != 'true'
110+
run: ninja install -j $(($(getconf _NPROCESSORS_ONLN) + 2))
111+
working-directory: build-hoomd-blue
112+
- name: Cache HOOMD-blue build
113+
if: steps.cache.outputs.cache-hit != 'true'
114+
uses: actions/cache/save@v4
115+
with:
116+
path: install
117+
key: hoomd-blue-${{ env.HOOMD_BLUE_VERSION }}-${{ matrix.enable_mpi }}-gpu-${{ matrix.enable_gpu }}
118+
119+
- name: Checkout component
120+
uses: actions/checkout@v4
121+
with:
122+
path: component
123+
- name: Configure component
124+
run: CMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install cmake -S component -B build-component -GNinja -DCMAKE_BUILD_TYPE=Release
125+
- name: Build component
126+
run: ninja install -j $(($(getconf _NPROCESSORS_ONLN) + 2))
127+
working-directory: build-component
128+
129+
- name: Run pytest (serial)
130+
run: python3 -m pytest --pyargs hoomd.${COMPONENT_NAME} -x -v -ra --durations=0 --durations-min=0.1
131+
- name: Run pytest (MPI)
132+
if: ${{ matrix.enable_mpi == 'ON' }}
133+
run: mpirun -n 2 ${GITHUB_WORKSPACE}/install/hoomd/pytest/pytest-openmpi.sh --pyargs hoomd.${COMPONENT_NAME} -x -v -ra --durations=0 --durations-min=0.1 || (( cat pytest.out.1 && exit 1 ))

.pre-commit-config.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
ci:
2+
autoupdate_schedule: quarterly
3+
autoupdate_branch: 'main'
4+
autofix_prs: false
5+
6+
repos:
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: 'v4.4.0'
9+
hooks:
10+
- id: end-of-file-fixer
11+
exclude_types: [svg]
12+
- id: trailing-whitespace
13+
exclude_types: [svg]
14+
- id: check-json
15+
- id: check-yaml
16+
- id: check-case-conflict
17+
- id: fix-encoding-pragma
18+
args:
19+
- --remove
20+
- id: mixed-line-ending
21+
- repo: https://github.com/glotzerlab/fix-license-header
22+
rev: v0.3.2
23+
hooks:
24+
- id: fix-license-header
25+
name: Fix license headers (Python)
26+
types_or: [python]
27+
args:
28+
- --license-file=LICENSE
29+
- --num=2
30+
- --add=Part of azplugins, released under the BSD 3-Clause License.
31+
- --keep-before=#!
32+
- id: fix-license-header
33+
name: Fix license headers (C)
34+
types_or: [c, c++, cuda, inc]
35+
args:
36+
- --license-file=LICENSE
37+
- --num=2
38+
- --add=Part of azplugins, released under the BSD 3-Clause License.
39+
- --comment-prefix=//
40+
- id: fix-license-header
41+
name: Fix license headers (reStructuredText)
42+
types_or: [rst]
43+
args:
44+
- --license-file=LICENSE
45+
- --num=2
46+
- --add=Part of azplugins, released under the BSD 3-Clause License.
47+
- --keep-after=.. include
48+
- --keep-after=.. automodule
49+
- --comment-prefix=..
50+
- repo: https://github.com/pre-commit/mirrors-clang-format
51+
rev: v16.0.6
52+
hooks:
53+
- id: clang-format
54+
types_or: [c, c++, cuda, inc]
55+
- repo: https://github.com/astral-sh/ruff-pre-commit
56+
rev: v0.2.2
57+
hooks:
58+
- id: ruff-format
59+
- id: ruff

.readthedocs.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
3+
sphinx:
4+
configuration: doc/conf.py
5+
fail_on_warning: true
6+
7+
build:
8+
os: ubuntu-22.04
9+
tools:
10+
python: "mambaforge-22.9"
11+
jobs:
12+
post_install:
13+
- wget https://github.com/glotzerlab/hoomd-blue/releases/download/v4.8.2/hoomd-4.8.2.tar.gz
14+
- tar -xzvf hoomd-4.8.2.tar.gz
15+
- python doc/mock_install.py hoomd-4.8.2/hoomd src
16+
17+
conda:
18+
environment: doc/environment.yaml

.readthedocs.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)