Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: laminlabs/omop
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.2.0
Choose a base ref
...
head repository: laminlabs/omop
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 8 commits
  • 12 files changed
  • 4 contributors

Commits on Nov 21, 2024

  1. 📝 Update release notes

    github-actions committed Nov 21, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    mike182uk Michael Barrett
    Copy the full SHA
    88f2dae View commit details
  2. 🔖 Release 0.2.0

    sunnyosun committed Nov 21, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4fcd618 View commit details

Commits on Feb 5, 2025

  1. ⬆️ Lamindb v1 (#12)

    Signed-off-by: Lukas Heumos <[email protected]>
    Zethson authored Feb 5, 2025
    Copy the full SHA
    91f7d95 View commit details
  2. 📝 Update release notes

    github-actions committed Feb 5, 2025
    Copy the full SHA
    b3551f7 View commit details
  3. 🎨 Release 0.2.1

    Zethson committed Feb 5, 2025
    Copy the full SHA
    7ef96a9 View commit details
  4. Merge branch 'main' of https://github.com/laminlabs/omop

    Zethson committed Feb 5, 2025
    Copy the full SHA
    4286bd9 View commit details

Commits on Feb 16, 2025

  1. 💚 Remove references to deleted migrations (#14)

    falexwolf authored Feb 16, 2025
    Copy the full SHA
    f59efb5 View commit details
  2. 📝 Update release notes

    github-actions committed Feb 16, 2025
    Copy the full SHA
    fc53066 View commit details
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -8,13 +8,13 @@ on:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
env:
GITHUB_EVENT_NAME: ${{ github.event_name }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
python-version: ["3.12"]
timeout-minutes: 15

steps:
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@ fail_fast: false
default_language_version:
python: python3
default_stages:
- commit
- push
- pre-commit
- pre-push
minimum_pre_commit_version: 2.12.0
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
@@ -24,7 +24,7 @@ repos:
docs/notes/
)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
rev: v0.9.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
@@ -44,7 +44,7 @@ repos:
- id: trailing-whitespace
- id: check-case-conflict
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
rev: v1.14.1
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,9 @@
<!-- prettier-ignore -->
Name | PR | Developer | Date | Version
--- | --- | --- | --- | ---
💚 Remove references to deleted migrations | [14](https://github.com/laminlabs/omop/pull/14) | [falexwolf](https://github.com/falexwolf) | 2025-02-16 |
⬆️ Lamindb v1 | [12](https://github.com/laminlabs/omop/pull/12) | [Zethson](https://github.com/Zethson) | 2025-02-05 |
♻️ Clean up | [10](https://github.com/laminlabs/omop/pull/10) | [sunnyosun](https://github.com/sunnyosun) | 2024-11-21 |
🎨 Set blank=True | [9](https://github.com/laminlabs/omop/pull/9) | [sunnyosun](https://github.com/sunnyosun) | 2024-11-17 |
✨Add typehints and validation | [8](https://github.com/laminlabs/omop/pull/8) | [Zethson](https://github.com/Zethson) | 2024-10-09 |
🎨 Fix DecimalField | [4](https://github.com/laminlabs/omop/pull/4) | [sunnyosun](https://github.com/sunnyosun) | 2024-09-16 |
22 changes: 10 additions & 12 deletions docs/notes/inspectdb.ipynb
Original file line number Diff line number Diff line change
@@ -65,12 +65,13 @@
],
"source": [
"for file in [\n",
" \"OMOPCDM_postgresql_5.4_ddl.sql\", \n",
" \"OMOPCDM_postgresql_5.4_indices.sql\", \n",
" \"OMOPCDM_postgresql_5.4_primary_keys.sql\", \n",
" \"OMOPCDM_postgresql_5.4_constraints.sql\"]:\n",
" \"OMOPCDM_postgresql_5.4_ddl.sql\",\n",
" \"OMOPCDM_postgresql_5.4_indices.sql\",\n",
" \"OMOPCDM_postgresql_5.4_primary_keys.sql\",\n",
" \"OMOPCDM_postgresql_5.4_constraints.sql\",\n",
"]:\n",
" print(\"Executing file:\", file)\n",
" with open(file, \"r\") as sql_file:\n",
" with open(file) as sql_file:\n",
" sql_statements = sql_file.read()\n",
"\n",
" statements = sql_statements.split(\";\")\n",
@@ -1144,33 +1145,29 @@
"outputs": [],
"source": [
"def remove_lnchema_classes(file_path):\n",
" \"\"\"\n",
" Removes entire classes starting with \"Lnschema\" from a Python file.\n",
" \"\"\"Removes entire classes starting with \"Lnschema\" from a Python file.\n",
"\n",
" Args:\n",
" file_path: Path to the Python file.\n",
"\n",
" Returns:\n",
" A string containing the modified code without \"Lnschema\" classes.\n",
" \"\"\"\n",
"\n",
" with open(file_path, \"r\") as f:\n",
" with open(file_path) as f:\n",
" content = f.readlines()\n",
"\n",
" # Flag to track if inside a class definition\n",
" in_class = False\n",
" class_name = None\n",
" modified_lines = []\n",
"\n",
" for line in content:\n",
" if line.strip().startswith(\"class Lnschema\"):\n",
" # Start of a class with \"Lnschema\" prefix\n",
" in_class = True\n",
" class_name = line.split()[1] # Extract class name\n",
" line.split()[1] # Extract class name\n",
" elif line.strip() == \"}\" and in_class:\n",
" # End of the class with \"Lnschema\" prefix\n",
" in_class = False\n",
" class_name = None\n",
" elif not in_class:\n",
" # Lines outside a class or not starting with \"Lnschema\" class\n",
" modified_lines.append(line)\n",
@@ -1180,6 +1177,7 @@
"\n",
" return \"\".join(modified_lines)\n",
"\n",
"\n",
"# Example usage\n",
"file_path = \"your_models.py\" # Replace with your actual file path\n",
"modified_code = remove_lnchema_classes(file_path)\n",
13 changes: 9 additions & 4 deletions docs/quickstart.ipynb
Original file line number Diff line number Diff line change
@@ -79,7 +79,9 @@
},
"outputs": [],
"source": [
"df = pd.read_csv(\"./mimic-iv-demo-data-in-the-omop-common-data-model-0.9/1_omop_data_csv/2b_concept.csv\")\n",
"df = pd.read_csv(\n",
" \"./mimic-iv-demo-data-in-the-omop-common-data-model-0.9/1_omop_data_csv/2b_concept.csv\"\n",
")\n",
"df.columns = df.columns.str.lower()\n",
"df.rename(columns={\"concept_class_id\": \"concept_class\"}, inplace=True)\n",
"df.head()"
@@ -105,7 +107,7 @@
"concepts = [op.Concept(**row.to_dict()) for _, row in df.iterrows()]\n",
"for concept in concepts:\n",
" concept.save()\n",
"op.Concept.df()"
"op.Concept.filter().first()"
]
},
{
@@ -121,7 +123,10 @@
"metadata": {},
"outputs": [],
"source": [
"op.Concept.validate([\"Stroke Volume Variation\", \"this concept does not exist\"], field=op.Concept.concept_name)"
"op.Concept.validate(\n",
" [\"Stroke Volume Variation\", \"this concept does not exist\"],\n",
" field=op.Concept.concept_name,\n",
")"
]
}
],
@@ -141,7 +146,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.12.8"
}
},
"nbformat": 4,
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ def lint(session: nox.Session) -> None:

@nox.session()
def build(session):
install_lamindb(session, branch="main")
install_lamindb(session, branch="release")
session.run(*"uv pip install --system .[dev]".split())
run_pytest(session)
build_docs(session, strict=True)
2 changes: 1 addition & 1 deletion omop/__init__.py
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@
Vocabulary
"""

__version__ = "0.1.2" # denote a pre-release for 0.1.0 with 0.1rc1
__version__ = "0.2.1" # denote a pre-release for 0.1.0 with 0.1rc1

from lamindb_setup import _check_instance_setup

4 changes: 3 additions & 1 deletion omop/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -7,7 +7,9 @@
class Migration(migrations.Migration):
initial = True

dependencies: list = []
dependencies: list = [
("lamindb", "0081_revert_textfield_collection"),
]

operations = [
migrations.CreateModel(
Loading