Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
21f0d20
added dream
Dec 8, 2025
f488b9e
updated_algorithm
Feb 11, 2026
13c0777
updated_code
Feb 11, 2026
444c054
added sliding weighting values
Mar 16, 2026
7601297
fixed testing error
Mar 16, 2026
4c8a8ff
newest version
May 11, 2026
b6ca5f9
newest version
May 11, 2026
c40187f
Added metric calclations.
PhilippVerpoort May 20, 2026
961ac10
Harmonising algorithm names.
PhilippVerpoort May 20, 2026
c43fdad
Improved settings for pareto probabilities.
PhilippVerpoort May 20, 2026
712c8fc
Dropping field modes Diversify_{2,3}.
PhilippVerpoort May 20, 2026
0aaa343
Corrected pareto prob parameter range.
PhilippVerpoort May 20, 2026
8407f7f
Cleaned up code.
PhilippVerpoort Aug 30, 2026
e23c095
Fixed calc_meetings.
PhilippVerpoort Aug 30, 2026
12e82fb
Fixed settings=None bug in allocate_pandas.
PhilippVerpoort Aug 30, 2026
88a9eb1
Made pandas an optional dependency.
PhilippVerpoort Aug 30, 2026
27cbd13
Fixed pandas handling in allocate.py.
PhilippVerpoort Aug 30, 2026
b0f0a17
Fixed demog_scores and demog_total bug.
PhilippVerpoort Aug 30, 2026
1455fa5
Moved pytest to dependency group.
PhilippVerpoort Aug 30, 2026
5a6cddd
Code deduplication between DREAM and HERMES.
PhilippVerpoort Aug 30, 2026
aef584d
Expose default parameters in DREAM and HERMES.
PhilippVerpoort Aug 30, 2026
c3dfd5d
Fixed val_cluster bug in DREAM.
PhilippVerpoort Aug 30, 2026
3571151
Removed obsolete n_attempts from DREAM and HERMES
PhilippVerpoort Aug 30, 2026
49f8eb6
Checked and fixed formatting and lintering with ruff
PhilippVerpoort Aug 30, 2026
5fc8a3b
Added CI
PhilippVerpoort Aug 30, 2026
0d4d1c5
Added build system and moved tests
PhilippVerpoort Aug 30, 2026
219088d
Merge branch 'main' into develop/new-algorithms
PhilippVerpoort Aug 31, 2026
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
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on:
pull_request:
push:
branches:
- main

jobs:
# 1) Run the test suite against every supported Python version.
tests:
name: Tests
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
uv sync --all-extras

- name: Run tests
run: |
uv run pytest -v

# 2) Lint and formatting checks with ruff.
lint:
name: Lint & format (ruff)
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Install dependencies
run: |
uv sync --group dev

- name: Ruff lint
run: |
uv run ruff check .

- name: Ruff format check
run: |
uv run ruff format --check .
8 changes: 7 additions & 1 deletion groupselect/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
"""GroupSelect: allocate participants into diverse groups."""

from groupselect.algorithms import Algorithm
from groupselect.field_mode import FieldMode
from groupselect.allocate_numpy import allocate_numpy
from groupselect.allocation import Allocation, AllocationEnsemble, AllocatorResult
from groupselect.allocation import (
Allocation,
AllocationEnsemble,
AllocatorResult,
)


try:
Expand Down
14 changes: 11 additions & 3 deletions groupselect/algorithms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Available allocation algorithms and lookup of their implementations."""

from enum import Enum, unique
from importlib import import_module

Expand All @@ -7,14 +9,20 @@
# Define Enum data type for different algorithms
@unique
class Algorithm(Enum):
"""Identifier for a supported allocation algorithm."""

Legacy = 0
# Heuristic = 1 # TODO: Add heuristic algorithm
DREAM = 1
HERMES = 2


# Define functions of algorithms.
algorithm_funcs = {
algorithm: getattr(
import_module('groupselect.algorithms.algorithm_' + algorithm.name.lower()),
'algorithm_' + algorithm.name.lower()
import_module(
"groupselect.algorithms.algorithm_" + algorithm.name.lower()
),
"algorithm_" + algorithm.name.lower(),
)
for algorithm in Algorithm
}
Loading
Loading