Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/buildwheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build Wheels

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

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-15-intel is an Intel runner, macos-14 is Apple silicon
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
windows-latest,
windows-11-arm,
macos-15-intel,
macos-14,
]

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.10.11"

- name: Build wheels
uses: pypa/cibuildwheel@v3.4.0
# env:
# CIBW_BUILD_FRONTEND: value
# ...
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

publish:
name: Publish to PyPI
needs: build_wheels
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- name: Download wheel artifacts
uses: actions/download-artifact@v5
with:
path: dist
pattern: cibw-wheels-*
merge-multiple: true

- name: Publish distributions to PyPI with attestations
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist
attestations: true
34 changes: 34 additions & 0 deletions .github/workflows/nox-pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Nox Pylint

on:
push:
branches:
- main
- feature/**
pull_request:
branches:
- main

jobs:
pylint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.10.11"

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install dependencies
run: uv sync --group github

- name: Run pylint session
run: uv run nox -s pylint
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tests

on:
push:
branches:
- main
- feature/**
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.10.11"

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install dependencies
run: uv sync --group github

- name: Run tests
run: uv run pytest --benchmark-disable --cov=respondpy --cov-report=term-missing --cov-report=xml tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
fail_ci_if_error: false
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# RESPONDPY

[![Coverage](https://codecov.io/gh/SyndemicsLab/respondpy/branch/main/graph/badge.svg)](https://app.codecov.io/gh/SyndemicsLab/respondpy)
[![Tests](https://github.com/SyndemicsLab/respondpy/actions/workflows/tests.yml/badge.svg)](https://github.com/SyndemicsLab/respondpy/actions/workflows/tests.yml)
[![Nox Pylint](https://github.com/SyndemicsLab/respondpy/actions/workflows/nox-pylint.yml/badge.svg)](https://github.com/SyndemicsLab/respondpy/actions/workflows/nox-pylint.yml)
[![PyPI Deploy](https://github.com/SyndemicsLab/respondpy/actions/workflows/buildwheels.yml/badge.svg)](https://github.com/SyndemicsLab/respondpy/actions/workflows/buildwheels.yml)

:snake: Welcome to RESPOND for Python! :snake: This repository acts as a set of python bindings for the Syndemics Lab's RESPOND model. As such, it is simply a set of wrappers and helper functions for ease of use in various lab projects. Our project can be installed from PyPI or built locally.

## RESPOND
Expand Down
23 changes: 23 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
################################################################################
# File: noxfile.py #
# Project: respondpy #
# Created Date: 2026-04-08 #
# Author: Matthew Carroll #
# ----- #
# Last Modified: 2026-04-08 #
# Modified By: Matthew Carroll #
# ----- #
# Copyright (c) 2026 Syndemics Lab at Boston Medical Center #
################################################################################

from __future__ import annotations

import nox # type: ignore[import-not-found] # pylint: disable=import-error


@nox.session(python=["3.12"], venv_backend="uv")
def pylint(session: nox.Session) -> None:
"""Run pylint checks for source code only."""
session.env["PYTHONPATH"] = "src"
session.install("pylint", "numpy", "polars")
session.run("pylint", "src/respondpy")
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ keywords = ["simulation", "Opioid Use Disorder", "Syndemics"]
license = "AGPL-3.0-or-later"
license-files = ["LICENSE.txt"]
dependencies = [
"nox>=2026.2.9",
"numpy",
"polars>=1.37.1",
"pytest-cov>=7.0.0",
Expand Down
111 changes: 111 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading