diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2bbf609f..69c65e03 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,12 +21,12 @@ jobs: steps: - name: Checkout bmds-server uses: actions/checkout@v3 - - name: Checkout bmds@next + - name: Checkout bmds@main uses: actions/checkout@v3 with: repository: USEPA/bmds-private path: venv - ref: next + ref: main token: ${{ secrets.USEPA_BMDS_PRIVATE_PAT }} - uses: actions/setup-python@v4 with: @@ -55,8 +55,7 @@ jobs: export "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib" sudo cp vendor/libnlopt.so /usr/local/lib/libnlopt.so.0 sudo ln -s /lib/x86_64-linux-gnu/libgsl.so /usr/local/lib/libgsl.so.25 - export "BMD_DLL=$GITHUB_WORKSPACE/venv/bmds/bin/BMDS330/libDRBMD.so" - echo $BMD_DLL + export "BMD_DLL=$GITHUB_WORKSPACE/venv/bmds/bmdscore.cpython-*-x86_64-linux-gnu.so" ldd $BMD_DLL - name: lint run: | @@ -141,12 +140,12 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Checkout bmds@next + - name: Checkout bmds@main uses: actions/checkout@v3 with: repository: USEPA/bmds-private path: venv - ref: next + ref: main token: ${{ secrets.USEPA_BMDS_PRIVATE_PAT }} - uses: actions/setup-python@v4 with: @@ -176,8 +175,7 @@ jobs: export "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib" sudo cp vendor/libnlopt.so /usr/local/lib/libnlopt.so.0 sudo ln -s /lib/x86_64-linux-gnu/libgsl.so /usr/local/lib/libgsl.so.25 - export "BMD_DLL=$GITHUB_WORKSPACE/venv/bmds/bin/BMDS330/libDRBMD.so" - echo $BMD_DLL + export "BMD_DLL=$GITHUB_WORKSPACE/venv/bmds/bmdscore.cpython-*-x86_64-linux-gnu.so" ldd $BMD_DLL # https://github.community/t/how-to-retry-a-failed-step-in-github-actions-workflow/125880 - name: run integration tests diff --git a/bmds_server/analysis/executor.py b/bmds_server/analysis/executor.py index 5b1d24e6..c09f9f98 100644 --- a/bmds_server/analysis/executor.py +++ b/bmds_server/analysis/executor.py @@ -3,11 +3,10 @@ from typing import NamedTuple, Self import bmds -from bmds.bmds3.constants import DistType -from bmds.bmds3.models.multi_tumor import Multitumor, MultitumorBase -from bmds.bmds3.sessions import BmdsSession -from bmds.bmds3.types.nested_dichotomous import IntralitterCorrelation, LitterSpecificCovariate -from bmds.constants import ModelClass +from bmds.constants import DistType, ModelClass +from bmds.models.multi_tumor import Multitumor, MultitumorBase +from bmds.sessions import BmdsSession +from bmds.types.nested_dichotomous import IntralitterCorrelation, LitterSpecificCovariate from .schema import AnalysisSessionSchema from .transforms import ( diff --git a/bmds_server/analysis/models.py b/bmds_server/analysis/models.py index 59f8ead2..984bdcc9 100644 --- a/bmds_server/analysis/models.py +++ b/bmds_server/analysis/models.py @@ -8,10 +8,10 @@ import bmds import pandas as pd import reversion -from bmds.bmds3.batch import BatchBase, BmdsSessionBatch, MultitumorBatch -from bmds.bmds3.recommender.recommender import RecommenderSettings -from bmds.bmds3.types.sessions import VersionSchema +from bmds.batch import BatchBase, BmdsSessionBatch, MultitumorBatch from bmds.constants import ModelClass +from bmds.recommender.recommender import RecommenderSettings +from bmds.types.sessions import VersionSchema from django.conf import settings from django.core.cache import cache from django.core.exceptions import ValidationError diff --git a/bmds_server/analysis/reporting/docx.py b/bmds_server/analysis/reporting/docx.py index 15c8bb48..d70dec8c 100644 --- a/bmds_server/analysis/reporting/docx.py +++ b/bmds_server/analysis/reporting/docx.py @@ -5,9 +5,8 @@ import docx from bmds import __version__ -from bmds.bmds3.reporting import write_setting_p from bmds.datasets.transforms.polyk import PolyKAdjustment -from bmds.reporting.styling import Report +from bmds.reporting.styling import Report, write_setting_p from django.conf import settings from django.utils.timezone import now diff --git a/bmds_server/analysis/reporting/excel.py b/bmds_server/analysis/reporting/excel.py index cf2f893b..49b84bc3 100644 --- a/bmds_server/analysis/reporting/excel.py +++ b/bmds_server/analysis/reporting/excel.py @@ -3,8 +3,8 @@ from typing import Any import pandas as pd -from bmds.bmds3.sessions import BmdsSession from bmds.constants import Dtype +from bmds.sessions import BmdsSession from ..executor import AnalysisSession, MultiTumorSession diff --git a/bmds_server/analysis/schema.py b/bmds_server/analysis/schema.py index 4ca46f1c..5c9fb13d 100644 --- a/bmds_server/analysis/schema.py +++ b/bmds_server/analysis/schema.py @@ -2,8 +2,8 @@ from io import StringIO import pandas as pd -from bmds.bmds3.types.sessions import VersionSchema from bmds.datasets.transforms.polyk import PolyKAdjustment +from bmds.types.sessions import VersionSchema from pydantic import BaseModel, Field, field_validator from rest_framework.schemas.openapi import SchemaGenerator diff --git a/bmds_server/analysis/transforms.py b/bmds_server/analysis/transforms.py index 61383872..6f2ee2f0 100644 --- a/bmds_server/analysis/transforms.py +++ b/bmds_server/analysis/transforms.py @@ -2,11 +2,11 @@ from enum import StrEnum import bmds -from bmds.bmds3.types.continuous import ContinuousModelSettings -from bmds.bmds3.types.dichotomous import DichotomousModelSettings -from bmds.bmds3.types.nested_dichotomous import NestedDichotomousModelSettings -from bmds.bmds3.types.priors import PriorClass from bmds.constants import Dtype +from bmds.types.continuous import ContinuousModelSettings +from bmds.types.dichotomous import DichotomousModelSettings +from bmds.types.nested_dichotomous import NestedDichotomousModelSettings +from bmds.types.priors import PriorClass from .validators.datasets import AdverseDirection diff --git a/bmds_server/analysis/validators/__init__.py b/bmds_server/analysis/validators/__init__.py index 3836a137..b13f9db7 100644 --- a/bmds_server/analysis/validators/__init__.py +++ b/bmds_server/analysis/validators/__init__.py @@ -1,4 +1,4 @@ -from bmds.bmds3.recommender import RecommenderSettings +from bmds.recommender import RecommenderSettings from ...common.validation import pydantic_validate from .datasets import validate_datasets diff --git a/bmds_server/analysis/validators/options.py b/bmds_server/analysis/validators/options.py index 33778f65..3bce3d8e 100644 --- a/bmds_server/analysis/validators/options.py +++ b/bmds_server/analysis/validators/options.py @@ -1,10 +1,10 @@ from typing import Any import bmds -from bmds.bmds3.constants import DistType -from bmds.bmds3.types.continuous import ContinuousRiskType -from bmds.bmds3.types.dichotomous import DichotomousRiskType -from bmds.bmds3.types.nested_dichotomous import LitterSpecificCovariate +from bmds.constants import DistType +from bmds.types.continuous import ContinuousRiskType +from bmds.types.dichotomous import DichotomousRiskType +from bmds.types.nested_dichotomous import LitterSpecificCovariate from django.conf import settings from django.core.exceptions import ValidationError from pydantic import BaseModel, Field diff --git a/bmds_server/analysis/validators/selectors.py b/bmds_server/analysis/validators/selectors.py index 6cd38d69..4cc01e0a 100644 --- a/bmds_server/analysis/validators/selectors.py +++ b/bmds_server/analysis/validators/selectors.py @@ -1,4 +1,4 @@ -from bmds.bmds3.selected import SelectedModelSchema +from bmds.selected import SelectedModelSchema from pydantic import BaseModel diff --git a/compose/app/Dockerfile b/compose/app/Dockerfile index b44fd73c..c48a853a 100644 --- a/compose/app/Dockerfile +++ b/compose/app/Dockerfile @@ -42,5 +42,5 @@ USER app ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH -RUN ldd /usr/local/lib/python3.11/site-packages/bmds/bmdscore.cpython-311-x86_64-linux-gnu.so && \ +RUN ldd /usr/local/lib/python3.11/site-packages/bmds/bmdscore.cpython-*-x86_64-linux-gnu.so && \ python /app/test.py diff --git a/compose/app/test.py b/compose/app/test.py index c326ec45..ff6c8563 100644 --- a/compose/app/test.py +++ b/compose/app/test.py @@ -1,5 +1,5 @@ import bmds -from bmds.bmds3.models.dichotomous import Logistic +from bmds.models.dichotomous import Logistic dataset = bmds.DichotomousDataset( doses=[0, 50, 100, 150, 200], ns=[100, 100, 100, 100, 100], incidences=[0, 5, 30, 65, 90] diff --git a/tests/analysis/test_api.py b/tests/analysis/test_api.py index 3f43b76f..1b03aed5 100644 --- a/tests/analysis/test_api.py +++ b/tests/analysis/test_api.py @@ -4,7 +4,7 @@ import docx import pandas as pd import pytest -from bmds.bmds3.recommender import RecommenderSettings +from bmds.recommender import RecommenderSettings from django.urls import reverse from rest_framework.test import APIClient diff --git a/tests/analysis/test_executor.py b/tests/analysis/test_executor.py index 8fbf25cf..ff950713 100644 --- a/tests/analysis/test_executor.py +++ b/tests/analysis/test_executor.py @@ -1,7 +1,7 @@ from copy import deepcopy -from bmds.bmds3.constants import ContinuousModelIds, DichotomousModelIds -from bmds.bmds3.types.priors import PriorClass +from bmds.constants import ContinuousModelIds, DichotomousModelIds +from bmds.types.priors import PriorClass from bmds_server.analysis.executor import AnalysisSession diff --git a/tests/analysis/test_transforms.py b/tests/analysis/test_transforms.py index 484c6db8..d138cc43 100644 --- a/tests/analysis/test_transforms.py +++ b/tests/analysis/test_transforms.py @@ -1,8 +1,8 @@ import bmds import pytest -from bmds.bmds3.types.continuous import ContinuousRiskType -from bmds.bmds3.types.dichotomous import DichotomousRiskType from bmds.constants import M_Exponential, M_ExponentialM3, M_ExponentialM5 +from bmds.types.continuous import ContinuousRiskType +from bmds.types.dichotomous import DichotomousRiskType from bmds_server.analysis import transforms diff --git a/tests/conftest.py b/tests/conftest.py index 87336b19..365942d3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,7 @@ from pathlib import Path import pytest -from bmds.bmds3.recommender import RecommenderSettings +from bmds.recommender import RecommenderSettings from django.core.management import call_command