Skip to content

Implement PpafmParameters class based on pydantic.BaseModel #767

Implement PpafmParameters class based on pydantic.BaseModel

Implement PpafmParameters class based on pydantic.BaseModel #767

Workflow file for this run

---
name: continuous-integration
on: [push, pull_request]
jobs:
test-package:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install package and its dependencies
run: |
pip install -e .[dev,opencl]
pip install pocl-binary-distribution
- name: Run pytest
# run: PPAFM_RECOMPILE=1 pytest tests examples -v --cov --cov-report json # Re-enable this when #232 is resolved
run: PPAFM_RECOMPILE=1 pytest tests examples/PTCDA_Hartree_dz2 -v --cov --cov-report json
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
flags: python-${{ matrix.python-version }}
- name: Save test images
uses: actions/upload-artifact@v3
with:
name: test-images
path: ./*.png
test-docker:
name: Test docker image on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] # Further: test docker builds on different OS
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Build a Docker image
run: docker build -t ppafm:latest .
- name: Execute the container.
run: |
cd examples/PTCDA_single/
docker run --rm -v ${PWD}:/exec ppafm:latest ppafm-generate-ljff -i PTCDA.xyz
docker run --rm -v ${PWD}:/exec ppafm:latest ppafm-generate-elff-point-charges -i PTCDA.xyz --tip s
docker run --rm -v ${PWD}:/exec ppafm:latest ppafm-relaxed-scan -k 0.5 -q -0.10
docker run --rm -v ${PWD}:/exec ppafm:latest ppafm-plot-results -k 0.5 -q -0.10 --arange 0.5 2.0 2 --df