Skip to content

Commit

Permalink
Merge pull request #165 from kazewong/PackagingUpdate
Browse files Browse the repository at this point in the history
Packaging update
  • Loading branch information
kazewong authored Oct 17, 2024
2 parents 6feea3d + 4055acb commit c9e2cf0
Show file tree
Hide file tree
Showing 15 changed files with 2,900 additions and 1,473 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

name: Python package

on: [push, pull_request]
on: [push]

jobs:
build:
Expand All @@ -14,18 +14,22 @@ jobs:
matrix:
python-version: ["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: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install .
- name: Test with pytest
run: |
pytest
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install the project
run: uv sync --all-extras --dev

- name: Run tests
# For example, using `pytest`
run: uv run pytest

- name: Run build
run: uv build
40 changes: 24 additions & 16 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,28 @@ jobs:

runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install the project
run: uv sync --all-extras --dev

- name: Run tests
# For example, using `pytest`
run: uv run pytest

- name: Run build
run: uv build

- name: Publish package
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
155 changes: 0 additions & 155 deletions example/GW150914_TaylorF2.py

This file was deleted.

Loading

0 comments on commit c9e2cf0

Please sign in to comment.