Skip to content

Commit

Permalink
Add manifest and publishing wokrflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mobiusklein committed Sep 10, 2023
1 parent 5f25749 commit 5ae1cb9
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Publish Package

on:
push:
tags:
- "v*-python"

jobs:
build-package:
name: Build Python package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest setuptools jsonschema pytest-cov twine build
- name: Install python package
run: |
pip install implementations/python/
- name: Test with pytest
run: |
pytest -r a implementations/python/tests/
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
working-directory: implementations/python
run: |
python -m build -s -w
twine upload dist/*
4 changes: 2 additions & 2 deletions implementations/python/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
*.pyc
build/*
build/
.coverage
*.egg-info
dist/*
dist/
Untitled*
.ipynb_checkpoints
.pytest_cache
2 changes: 2 additions & 0 deletions implementations/python/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
recursive-include mzpaf/data *.json
include data/*.json

0 comments on commit 5ae1cb9

Please sign in to comment.