Skip to content

clean code

clean code #2

Workflow file for this run

name: Publish openms
on:
push:
branches:
- main
tags:
- v*
jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Download the artifact
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Test the wheel
run: |
ls dist
wheel=$(find dist/*whl)
echo $wheel
pip install $wheel
pip install pyscf
python -c "from openms.config import MPI; assert \"FakeComm\" in str(MPI.COMM_WORLD)"
python3 tests/qmc/01-qmc_rhf.py
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: openmpi
- name: Test the wheel
run: |
pip install mpi4py
python -c "import mpi4py"
python -c "from openms.config import MPI; assert \"mpi4py\" in str(MPI.COMM_WORLD)"
python3 tests/qedhf/01-qedhf.py
publish-to-pypi:
name:
Publish Python distribution to PyPI
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
packages_dir: dist/
password: ${{ secrets.PYPI_API_TOKEN }}