Skip to content

Commit 6618b69

Browse files
authored
Merge pull request #1 from clinicedc/feature/odm-study-definition-export
Add ODM 1.3.2 Study Definition export (scheduled CRFs)
2 parents de0518e + 94e2f7a commit 6618b69

16 files changed

Lines changed: 1649 additions & 6 deletions

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
version: 2
3+
updates:
4+
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"

.github/workflows/build.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
name: build
3+
4+
# yamllint disable-line rule:truthy
5+
on: [push, pull_request]
6+
7+
jobs:
8+
build:
9+
name: >-
10+
build (Python ${{ matrix.python-version }},
11+
Django ${{ matrix.django-version }},
12+
${{ matrix.database }})
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ['3.12', '3.13', '3.14']
19+
django-version: ['5.2', '6.0', 'dev']
20+
database: ['mysql', 'postgres']
21+
22+
services:
23+
mysql:
24+
image: mysql:latest
25+
env:
26+
MYSQL_DATABASE: mysql
27+
# pragma: allowlist secret
28+
MYSQL_ROOT_PASSWORD: root
29+
ports:
30+
- 3306:3306
31+
options: >-
32+
--health-cmd="mysqladmin ping"
33+
--health-interval=10s
34+
--health-timeout=5s
35+
--health-retries=3
36+
37+
postgres:
38+
image: postgres:latest
39+
env:
40+
POSTGRES_DB: test_db
41+
# pragma: allowlist secret
42+
POSTGRES_PASSWORD: postgres
43+
ports:
44+
- 5432:5432
45+
options: >-
46+
--health-cmd pg_isready
47+
--health-interval 10s
48+
--health-timeout 5s
49+
--health-retries 5
50+
51+
steps:
52+
- name: Install pycups and words dependency
53+
run: |
54+
sudo sed -i 's/azure\.//' /etc/apt/sources.list
55+
sudo apt-get -y update
56+
sudo apt-get install libcups2-dev wamerican
57+
58+
- uses: actions/checkout@v4
59+
60+
- name: Install uv and set the python version
61+
uses: astral-sh/setup-uv@v6
62+
with:
63+
python-version: ${{ matrix.python-version }}
64+
enable-cache: true
65+
66+
- name: Install dependencies
67+
run: |
68+
uv sync --dev --no-sources
69+
if [ "${{ matrix.django-version }}" = "dev" ]; then
70+
uv pip install \
71+
"django @ git+https://github.com/django/django.git@main"
72+
else
73+
uv pip install \
74+
"django~=${{ matrix.django-version }}.0"
75+
fi
76+
77+
- name: Run tests
78+
env:
79+
SELECTED_DATABASE: ${{ matrix.database }}
80+
run: |
81+
uv run --dev --no-sources runtests.py

.yamllint

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# allow "on" until yamllint stops checking keys for truthy!
2+
# https://github.com/adrienverge/yamllint/issues/158
3+
---
4+
extends: default
5+
6+
rules:
7+
comments-indentation: disable
8+
braces: disable
9+
line-length:
10+
max: 120
11+
truthy:
12+
level: error
13+
allowed-values: ['true', 'false', 'on']

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ name = "edc-cdisc"
33
version = "0.1.1"
44
description = "CDISC compliance"
55
readme = "README.rst"
6-
requires-python = ">=3.14"
6+
requires-python = ">=3.12"
77
dependencies = [
88
"clinicedc>=4.0.6",
9+
"lxml>=5.0",
910
]
1011

1112
[dependency-groups]
1213
dev = [
1314
"clinicedc-tests>=1.2.2",
15+
"psycopg>=3.2",
1416
"ruff>=0.15.15",
1517
"sphinx>=9.1.0",
1618
]

runtests.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env python
2+
3+
from clinicedc_tests.config import func_main
4+
5+
if __name__ == "__main__":
6+
func_main(
7+
"edc_cdisc.tests.test_settings",
8+
"edc_cdisc.tests",
9+
)

src/edc_cdisc/apps.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from django.apps import AppConfig as DjangoAppConfig
2+
3+
4+
class AppConfig(DjangoAppConfig):
5+
name = "edc_cdisc"
6+
verbose_name = "Edc CDISC"
7+
default_auto_field = "django.db.models.BigAutoField"

src/edc_cdisc/odm/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .serializer import ODMStudySerializer
2+
3+
__all__ = ["ODMStudySerializer"]

0 commit comments

Comments
 (0)