Skip to content

Commit

Permalink
fixed workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cdavro committed Dec 16, 2023
1 parent 318c299 commit f7ad7ac
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 43 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/test_extractor.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit Test Workflow
name: Unit Tests

on: [push, pull_request]

Expand All @@ -24,4 +24,4 @@ jobs:
- name: Run unit tests
run: |
python -m unittest discover xyz_frame_extractor/tests
python -m unittest discover xyz_frame_extractor/tests
41 changes: 41 additions & 0 deletions .github/workflows/xyz_frame_extractor_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: xyz_frame_extractor tests

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-20.04

strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run xyz_frame_extractor and verify outputs
run: |
python -m xyz_frame_extractor examples/original_trajectories/water-MD_NVT-Trajectory.xyz water-MD_NVT-Trajectory_2_1_nothing.xyz --stride 2 --skip 1 --mode nothing
python -m xyz_frame_extractor examples/original_trajectories/water-MD_NVT-Trajectory.xyz water-MD_NVT-Trajectory_2_1_copy.xyz --stride 2 --skip 1 --mode copy
python -m xyz_frame_extractor examples/original_trajectories/water-MD_NVT-Trajectory.xyz water-MD_NVT-Trajectory_2_1_lattice_3.xyz --stride 2 --skip 1 --mode extended --lattice "19.734 19.734 19.734"
python -m xyz_frame_extractor examples/original_trajectories/water-MD_NVT-Trajectory.xyz water-MD_NVT-Trajectory_2_1_lattice_9.xyz --stride 2 --skip 1 --mode extended --lattice "19.734 0.0 0.0 0.0 19.734 0.0 0.0 0.0 19.734"
python -m xyz_frame_extractor examples/original_trajectories/water-MD_NVT-Trajectory.xyz water-MD_NVT-Trajectory_2_1_cell.xyz --stride 2 --skip 1 --mode extended --cell_file examples/original_trajectories/water-MD_NVT-Cell.cell
python -m xyz_frame_extractor examples/original_trajectories/water-MD_NPT-Trajectory.xyz water-MD_NPT-Trajectory_2_1_nothing.xyz --stride 2 --skip 1 --mode nothing
python -m xyz_frame_extractor examples/original_trajectories/water-MD_NPT-Trajectory.xyz water-MD_NPT-Trajectory_2_1_copy.xyz --stride 2 --skip 1 --mode copy
python -m xyz_frame_extractor examples/original_trajectories/water-MD_NPT-Trajectory.xyz water-MD_NPT-Trajectory_2_1_cell.xyz --stride 2 --skip 1 --mode extended --cell_file examples/original_trajectories/water-MD_NPT-Cell.cell
# Verification step
for file in water-MD_NVT-Trajectory_2_1_nothing.xyz water-MD_NVT-Trajectory_2_1_copy.xyz water-MD_NVT-Trajectory_2_1_lattice_3.xyz water-MD_NVT-Trajectory_2_1_lattice_9.xyz water-MD_NVT-Trajectory_2_1_cell.xyz water-MD_NPT-Trajectory_2_1_nothing.xyz water-MD_NPT-Trajectory_2_1_copy.xyz water-MD_NPT-Trajectory_2_1_cell.xyz
do
diff $file examples/ref_trajectories/$file
done

0 comments on commit f7ad7ac

Please sign in to comment.