Skip to content

Commit

Permalink
Merge pull request #87 from OpenFreeEnergy/add_ci_package_build
Browse files Browse the repository at this point in the history
add check_packaging to ci
  • Loading branch information
atravitz authored Jan 10, 2025
2 parents 377cd2b + 61ee3ad commit 43d8232
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
42 changes: 40 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- "3.12"
include:
- os: 'macos'
python-version: "3.11"
python-version: "3.11"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: "Environment Information"
run: |
micromamba info
micromamba info
micromamba list
- name: "Run tests"
Expand All @@ -88,3 +88,41 @@ jobs:
env_vars: OS,PYTHON
fail_ci_if_error: True
verbose: True

check_packaging:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-name: kartograf

- name: install_deps
run: |
python -m pip install -U pip pipx wheel build
- name: build_package_sdist
run: pipx run build --sdist

- name: check_package_build
run: |
DISTRIBUTION=$(ls -t1 dist/kartograf-*.tar.gz | head -n1)
test -n "${DISTRIBUTION}" || { echo "no distribution dist/kartograf-*.tar.gz found"; exit 1; }
- name: install sdist
working-directory: ./dist
run: |
ls -a .
python -m pip install kartograf-*.tar.gz
du -sh kartograf-*.tar.gz
- name: check install
run: pip list

- name: run tests
working-directory: ./dist
run: python -m pytest -n logical --pyargs kartograf
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ dependencies = [
'scipy',
'numpy',
'dill',
'gufe',
]
description="Kartograf is a package for geometrically mapping atoms of two molecules."
readme="README.md"
Expand Down Expand Up @@ -55,4 +54,5 @@ license-files = ["LICENSE"]
where = ['src']

[tool.setuptools.package-data]
kartograf = ["tests/data/*.pdb", "tests/data/*.sdf"]
kartograf = ["tests/data/*.pdb", "tests/data/*.sdf"]

0 comments on commit 43d8232

Please sign in to comment.