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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
name: Python Unit Test
uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@master
with:
python-version: '3.9'
python-version: '3.13'
13 changes: 0 additions & 13 deletions .github/workflows/image_build_push.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: PyPI Poetry Publish
uses: uc-cdis/.github/.github/workflows/python_package_index_publish.yaml@master
with:
PYTHON_VERSION: '3.9'
PYTHON_VERSION: '3.13'
# This will attempt push to test PyPI first and only push to prod if it works
DO_TEST_PUBLISH_FIRST: true
secrets:
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ repos:
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
additional_dependencies: ['gibberish-detector']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@
}
],
"results": {},
"generated_at": "2025-08-01T21:17:57Z"
"generated_at": "2026-01-09T16:31:16Z"
}
28 changes: 0 additions & 28 deletions Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# datamodelutils
[![Docker Repository on Quay](https://quay.io/repository/cdis/datamodelutils/status "Docker Repository on Quay")](https://quay.io/repository/cdis/datamodelutils)

Wrapper utils to allow gen3datamodel.models to be loaded after initialization.

Expand Down Expand Up @@ -28,7 +27,6 @@ will produce output of
```

# CLI Utilities
The datamodelutils has a [docker](https://quay.io/repository/cdis/datamodelutils) image that exposes admin commands to manage or interact with datamodel

## datamodel_postgres_admin
Script to do database creation and migration
Expand Down
10 changes: 8 additions & 2 deletions datamodelutils/repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@


def main():
import IPython
import os

try:
import ipython
except ModuleNotFoundError:
raise Exception(
"The repl script requires IPython. `poetry add 'datamodelutils[IPython]'`"
)

db_host = os.environ["PG_HOST"]
db_name = os.environ["PG_NAME"]
db_user = os.environ["PG_USER"]
Expand All @@ -21,7 +27,7 @@ def main():
g = PsqlGraphDriver(host=db_host, user=db_user, password=db_pass, database=db_name)
ss = g.session_scope
with g.session_scope() as session:
IPython.embed()
ipython.embed()


if __name__ == "__main__":
Expand Down
1,627 changes: 1,012 additions & 615 deletions poetry.lock

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "datamodelutils"
version = "1.1.2"
version = "1.2.0"
description = "Gen3 Data Model Utils"
authors = ["CTDS UChicago <cdis@uchicago.edu>"]
license = "Apache-2.0"
Expand All @@ -10,19 +10,23 @@ packages = [
{ include = "./datamodelutils" }
]


[tool.poetry.dependencies]
python = ">=3.9,<4"
dictionaryutils = ">=3.4.11"
gen3datamodel = ">=3.2.1"
python = ">=3.13,<4"
dictionaryutils = ">=3"
gen3datamodel = ">=3"
psqlgraph = "*"
sqlalchemy = ">=1.3.0,<2"
sqlalchemy = "<3"
ipython = { version = "*", optional = true }

[tool.poetry.group.dev.dependencies]
pytest = ">=7,<8"
mock = "*"
pytest-cov = "*"
coverage = "*"
deptry = "^0.24.0"

[tool.poetry.extras]
ipython = ["ipython"]

[tool.poetry.scripts]
datamodel_postgres_admin = 'datamodelutils.postgres_admin:main'
Expand Down