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
34 changes: 34 additions & 0 deletions .github/workflows/autoformat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Auto-format Code

on:
push:
branches: [main, develop]

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install formatters
run: pip install black isort

- name: Format with Black
run: black .

- name: Sort imports with isort
run: isort .

- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git diff --quiet || (git add -A && git commit -m "Auto-format code")
git push
35 changes: 35 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Deploy Docs

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

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
pip install sphinx sphinx-rtd-theme sphinx-autodoc-typehints
pip install -e . # Install your package

- name: Build documentation
run: |
cd docs
make html

- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
70 changes: 70 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This workflow will upload a Python Package to PyPI when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
release-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Build release distributions
run: |
# NOTE: put your own distribution build steps here.
python -m pip install build
python -m build

- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

# Dedicated environments with protections for publishing are strongly recommended.
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
environment:
name: pypi
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
# url: https://pypi.org/p/YOURPROJECT
#
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
# ALTERNATIVE: exactly, uncomment the following line instead:
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pySEQ - Sequentially Nested Target Trial Emulation
# pySEQTarget - Sequentially Nested Target Trial Emulation

Implementation of sequential trial emulation for the analysis of
observational databases. The ‘SEQTaRget’ software accommodates
Expand All @@ -9,13 +9,13 @@ intention-to-treat and per-protocol effects, and can adjust for
potential selection bias.

## Installation
You can install the development version of pySEQ from github with:
You can install the development version of pySEQTarget from github with:
```shell
pip install git+https://github.com/CausalInference/pySEQ
pip install git+https://github.com/CausalInference/pySEQTarget
```
Or from pypi iwth
```shell
pip install pySEQ
pip install pySEQTarget
```

## Setting up your Analysis
Expand All @@ -25,7 +25,7 @@ From the user side, this amounts to creating a dataclass, `SEQopts`, and then fe

```python
import polars as pl
from pySEQ import SEQuential, SEQopts
from pySEQTarget import SEQuential, SEQopts

data = pl.from_pandas(SEQdata)
options = SEQopts(km_curves = True)
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions pySEQ/docs/source/conf.py → docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'SEQuential'
copyright = "2024, Ryan O'Dea, Alejandro Szmulewicz"
author = "Ryan O'Dea, Alejandro Szmulewicz"
release = '0.1.0'
project = 'pySEQTarget'
copyright = "2025, Ryan O'Dea, Alejandro Szmulewicz, Tom Palmer, Miguel Hernan"
author = "Ryan O'Dea, Alejandro Szmulewicz, Tom Palmer, Miguel Hernan"
release = '0.9.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
17 changes: 17 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. pySEQTarget documentation master file, created by
sphinx-quickstart on Mon Nov 24 20:43:34 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

pySEQTarget documentation
=========================

Add your content using ``reStructuredText`` syntax. See the
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
documentation for details.


.. toctree::
:maxdepth: 2
:caption: Contents:

5 changes: 0 additions & 5 deletions pySEQ/analysis/__init__.py

This file was deleted.

107 changes: 0 additions & 107 deletions pySEQ/analysis/_risk_estimates.py

This file was deleted.

25 changes: 0 additions & 25 deletions pySEQ/analysis/_subgroup_fit.py

This file was deleted.

Loading