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
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: '3.13'
- name: Install Poetry
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: '3.12'
- name: Install Poetry
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v0.6.0

Internal changes:
- Updated GitHub Actions.
- Updated dev dependencies.

## v0.5.0

New:
Expand Down
8 changes: 5 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class Base(DeclarativeBase):
class Person(cdm54.BasePersonCdm54, Base):
pass


# Etc. for all other tables
```
This approach allows for the greatest customization possibilities.
Expand Down Expand Up @@ -162,6 +163,7 @@ E.g. for the person table:
```python
from omop_cdm.constants import CDM_SCHEMA


class Person(Base):
__tablename__ = "person"
__table_args__ = {"schema": CDM_SCHEMA}
Expand All @@ -185,10 +187,10 @@ from sqlalchemy.orm import Mapped, mapped_column, relationship


class Narcissus(Base):
__tablename__ = 'narcissus'
__table_args__ = {'schema': CDM_SCHEMA}
__tablename__ = "narcissus"
__table_args__ = {"schema": CDM_SCHEMA}

person_id: Mapped[int] = mapped_column(ForeignKey('cdm_schema.person.person_id'))
person_id: Mapped[int] = mapped_column(ForeignKey("cdm_schema.person.person_id"))
loved_by_narcissus: Mapped[bool] = mapped_column(Boolean, default=False)

person: Mapped["Person"] = relationship("Person")
Expand Down
326 changes: 172 additions & 154 deletions poetry.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "omop-cdm"
version = "0.5.0"
version = "0.6.0"
description = "SQLAlchemy ORM of the OHDSI OMOP CDM"
authors = [
{name = "Spayralbe", email = "stefan@thehyve.nl"},
Expand Down Expand Up @@ -34,15 +34,15 @@ dependencies = [
"Changelog" = "https://github.com/thehyve/omop-cdm/blob/main/CHANGELOG.md"

[tool.poetry.group.dev.dependencies]
nox = "^2026.2.9"
ruff = "^0.15.9"
pre-commit = "^4.5.1"
nox = "^2026.8.10"
ruff = "^0.16.2"
pre-commit = "^4.6.2"

[tool.poetry.group.test.dependencies]
pytest = "^8.4.1"
pytest-cov = "^6.2.1"
testcontainers = "^4.13.2"
psycopg2-binary = "^2.9.9"
pytest = "^9.1.1"
pytest-cov = "^7.1.0"
testcontainers = "^4.15.0"
psycopg2-binary = "^2.9.12"

[build-system]
requires = ["poetry-core>=2.0"]
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from sqlalchemy import Connection, Engine, MetaData, create_engine, select
from sqlalchemy.orm import Session
from sqlalchemy.sql.ddl import CreateSchema, DropSchema
from testcontainers.postgres import PostgresContainer
from testcontainers.community.postgres import PostgresContainer

POSTGRES_IMAGE = "postgres:16-alpine"

Expand Down
Loading