Skip to content

Commit

Permalink
remove six requirement; fix toml bug; start on release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
bd-j committed Mar 26, 2024
1 parent 9ef8fcb commit b20756b
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 8 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Release
on:
push:
branches:
- main
tags:
- "*"
# pull_request:
workflow_dispatch:
inputs:
prerelease:
description: "Run a pre-release, testing the build"
required: false
type: boolean
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_wheels:
name: Build wheel for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-22.04"
- "macos-14"
steps:
- uses: pypa/cibuildwheel@v2.16.5
- uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.os }}
path: ./wheelhouse/*.whl


build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U build twine
- name: Build sdist
run: |
python -m pip install -U pip
python -m build --sdist .
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz

publish:
environment:
name: pypi
url: https://pypi.org/p/fsps
permissions:
id-token: write
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@v1.8.12
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
os: [ubuntu-latest, macos-latest]
steps:
- name: Clone the repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Clone fsps
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: cconroy20/fsps
path: fsps
Expand All @@ -31,7 +31,7 @@ jobs:
python -m pip install -U pip pytest
python -m pip install -U fsps astro-sedpy astropy
python -m pip install -U scipy
python -m pip install -U six dynesty
python -m pip install -U dynesty
python -m pip install .
env:
SPS_HOME: ${{ github.workspace }}/fsps
Expand Down
1 change: 0 additions & 1 deletion prospect/fitting/nested.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import sys, time
import numpy as np
from numpy.random import normal, multivariate_normal
from six.moves import range

try:
import nestle
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = [
{ name="Ben Johnson", email="benjamin.johnson@cfa.harvard.edu" },
]
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">= 3.9"
license = { text = "MIT License" }
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ numpy >= 1.14.2
scipy >= 1.1.0
astropy
h5py
astro-sedpy
six
astro-sedpy

0 comments on commit b20756b

Please sign in to comment.