Skip to content

Commit

Permalink
Merge pull request #127 from adrn/build-jan2024
Browse files Browse the repository at this point in the history
Modernize packaging and update to support pymc > v4
  • Loading branch information
adrn committed Mar 6, 2024
2 parents 4752082 + 3516c31 commit c4206ce
Show file tree
Hide file tree
Showing 69 changed files with 4,482 additions and 3,679 deletions.
12 changes: 0 additions & 12 deletions .circleci/branch_name_check.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .circleci/ci_skip_check.sh

This file was deleted.

95 changes: 0 additions & 95 deletions .circleci/config.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .circleci/execute_notebooks.sh

This file was deleted.

2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

73 changes: 73 additions & 0 deletions .github/workflows/cd.yml
@@ -0,0 +1,73 @@
name: Continuous Deployment

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
release:
types:
- published

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

env:
FORCE_COLOR: 3

jobs:
dist:
name: Distribution build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: hynek/build-and-inspect-python-package@v2

# Upload to Test PyPI on every commit on main.
test-publish:
needs: [dist]
name: Test Publish to TestPyPI
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if:
github.repository_owner == 'adrn' && github.event_name == 'push' &&
github.ref == 'refs/heads/main'

steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Upload package to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

publish:
needs: [dist]
name: Publish to PyPI
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release' && github.event.action == 'published'
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,42 @@
name: Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

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

env:
FORCE_COLOR: 3

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: ["ubuntu-latest", "macos-latest"]
steps:

- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -e .[test]
- name: Test package
run: >-
python -m pytest -ra --cov --cov-report=xml --cov-report=term --durations=20
- name: Upload coverage report
uses: codecov/codecov-action@v4.1.0
84 changes: 0 additions & 84 deletions .github/workflows/packaging.yml

This file was deleted.

0 comments on commit c4206ce

Please sign in to comment.