diff --git a/.gitmodules b/.gitmodules index b50d574f..d4e34ae4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "bhtom_registration"] path = bhtom_registration url = https://github.com/maja-jablonska/bhtom_registration +[submodule "bhtom_custom_registration"] + path = bhtom_custom_registration + url = https://github.com/maja-jablonska/bhtom_custom_registration diff --git a/Docker/web_Dockerfile b/Docker/web_Dockerfile index e1eedbcd..3e1ba148 100644 --- a/Docker/web_Dockerfile +++ b/Docker/web_Dockerfile @@ -9,11 +9,13 @@ COPY requirements.txt /requirements.txt COPY manage.py /manage.py COPY entrypoint.sh /entrypoint.sh +COPY bhtom2 /bhtom2 +COPY bhtom_base /bhtom_base +COPY bhtom_custom_registration /bhtom_custom_registration +COPY Docker/.bhtom.env /bhtom2/.bhtom.env + RUN pwd RUN --mount=type=cache,target=/root/.cache python -m pip install -r requirements.txt -COPY bhtom2 /bhtom2 -COPY Docker/.bhtom.env /bhtom2/.bhtom.env - CMD ["sh", "entrypoint.sh"] \ No newline at end of file diff --git a/bhtom2/brokers/aavso.py b/bhtom2/brokers/aavso.py index 4a0cda15..bace1161 100644 --- a/bhtom2/brokers/aavso.py +++ b/bhtom2/brokers/aavso.py @@ -8,8 +8,8 @@ from django.conf import settings from django.db import transaction -from bhtom_dataproducts.models import ReducedDatum, DatumValue -from bhtom_targets.models import Target +from bhtom_base.bhtom_dataproducts.models import ReducedDatum, DatumValue +from bhtom_base.bhtom_targets.models import Target from bhtom2.brokers.bhtom_broker import BHTOMBroker, LightcurveUpdateReport, return_for_no_new_points from bhtom2.external_service.data_source_information import DataSource, AAVSO_ACCEPTED_FLAGS, FILTERS diff --git a/bhtom2/brokers/antares.py b/bhtom2/brokers/antares.py index 5149cde7..ed00be12 100644 --- a/bhtom2/brokers/antares.py +++ b/bhtom2/brokers/antares.py @@ -16,9 +16,9 @@ import marshmallow from django.db import transaction -from bhtom_alerts.alerts import GenericQueryForm, GenericAlert -from bhtom_dataproducts.models import ReducedDatum, DatumValue -from bhtom_targets.models import Target, TargetName +from bhtom_base.bhtom_alerts.alerts import GenericQueryForm, GenericAlert +from bhtom_base.bhtom_dataproducts.models import ReducedDatum, DatumValue +from bhtom_base.bhtom_targets.models import Target, TargetName from bhtom2.brokers.bhtom_broker import BHTOMBroker, return_for_no_new_points from bhtom2.brokers.lightcurve_update import LightcurveUpdateReport diff --git a/bhtom2/brokers/bhtom_broker.py b/bhtom2/brokers/bhtom_broker.py index 39b30326..e273f727 100644 --- a/bhtom2/brokers/bhtom_broker.py +++ b/bhtom2/brokers/bhtom_broker.py @@ -3,8 +3,8 @@ from typing import List, Optional import numpy as np -from bhtom_alerts.alerts import GenericBroker -from bhtom_targets.models import Target +from bhtom_base.bhtom_alerts.alerts import GenericBroker +from bhtom_base.bhtom_targets.models import Target from bhtom2.external_service.data_source_information import DataSource, FILTERS, TARGET_NAME_KEYS from bhtom2.external_service.filter_name import filter_name diff --git a/bhtom2/brokers/gaia_alerts.py b/bhtom2/brokers/gaia_alerts.py index 029459a9..a841e7c5 100644 --- a/bhtom2/brokers/gaia_alerts.py +++ b/bhtom2/brokers/gaia_alerts.py @@ -11,16 +11,16 @@ from django import forms from django.db import transaction -from bhtom_alerts.alerts import GenericAlert -from bhtom_alerts.alerts import GenericQueryForm -from bhtom_dataproducts.models import ReducedDatum +from bhtom_base.bhtom_alerts.alerts import GenericAlert +from bhtom_base.bhtom_alerts.alerts import GenericQueryForm +from bhtom_base.bhtom_dataproducts.models import ReducedDatum from bhtom2 import settings from bhtom2.brokers.bhtom_broker import BHTOMBroker, LightcurveUpdateReport, return_for_no_new_points from bhtom2.external_service.data_source_information import DataSource, FILTERS from bhtom2.external_service.external_service_request import query_external_service from bhtom2.external_service.filter_name import filter_name -from bhtom_dataproducts.models import DatumValue +from bhtom_base.bhtom_dataproducts.models import DatumValue def g_gaia_error(mag: float) -> float: diff --git a/bhtom2/brokers/lightcurve_update.py b/bhtom2/brokers/lightcurve_update.py index 460e7e49..b9b7790b 100644 --- a/bhtom2/brokers/lightcurve_update.py +++ b/bhtom2/brokers/lightcurve_update.py @@ -3,8 +3,8 @@ import numpy as np -from bhtom_dataproducts.models import ReducedDatum -from bhtom_targets.models import Target +from bhtom_base.bhtom_dataproducts.models import ReducedDatum +from bhtom_base.bhtom_targets.models import Target LightcurveUpdateReport = namedtuple('LightcurveUpdateReport', ['new_points', 'last_jd', 'last_mag']) diff --git a/bhtom2/brokers/ztf.py b/bhtom2/brokers/ztf.py index 26bb36d0..98cb32f5 100644 --- a/bhtom2/brokers/ztf.py +++ b/bhtom2/brokers/ztf.py @@ -11,8 +11,8 @@ from bhtom2.exceptions.external_service import NoResultException, InvalidExternalServiceResponseException from bhtom2.external_service.data_source_information import DataSource, FILTERS, ZTF_DR8_FILTERS from bhtom2.external_service.external_service_request import query_external_service -from bhtom_dataproducts.models import ReducedDatum, DatumValue -from bhtom_targets.models import Target, TargetExtra +from bhtom_base.bhtom_dataproducts.models import ReducedDatum, DatumValue +from bhtom_base.bhtom_targets.models import Target, TargetExtra # For DR8 diff --git a/bhtom2/dataproducts/dataproduct_extra_data.py b/bhtom2/dataproducts/dataproduct_extra_data.py index 6159615d..1e3c3fd3 100644 --- a/bhtom2/dataproducts/dataproduct_extra_data.py +++ b/bhtom2/dataproducts/dataproduct_extra_data.py @@ -1,7 +1,7 @@ from typing import Dict, List, Optional, Any import json -from bhtom_dataproducts.models import DataProduct +from bhtom_base.bhtom_dataproducts.models import DataProduct from bhtom2.utils.bhtom_logger import BHTOMLogger diff --git a/bhtom2/dataproducts/last_jd.py b/bhtom2/dataproducts/last_jd.py index 10fa14d1..c101d3a6 100644 --- a/bhtom2/dataproducts/last_jd.py +++ b/bhtom2/dataproducts/last_jd.py @@ -1,4 +1,4 @@ -from bhtom_targets.models import Target +from bhtom_base.bhtom_targets.models import Target import logging from typing import Optional from sentry_sdk import capture_exception diff --git a/bhtom2/dataproducts/sun_separation_update.py b/bhtom2/dataproducts/sun_separation_update.py index 361946a6..2f7e5bfb 100644 --- a/bhtom2/dataproducts/sun_separation_update.py +++ b/bhtom2/dataproducts/sun_separation_update.py @@ -4,7 +4,7 @@ from astropy import units as u from astropy.coordinates import get_sun, SkyCoord from astropy.time import Time -from bhtom_targets.models import Target +from bhtom_base.bhtom_targets.models import Target from bhtom2.utils.bhtom_logger import BHTOMLogger diff --git a/bhtom2/external_service/catalog_name_lookup.py b/bhtom2/external_service/catalog_name_lookup.py index 84dcdc73..73368775 100644 --- a/bhtom2/external_service/catalog_name_lookup.py +++ b/bhtom2/external_service/catalog_name_lookup.py @@ -7,7 +7,7 @@ from bhtom2.external_service.data_source_information import DataSource, TARGET_NAME_KEYS from bhtom2.utils.bhtom_logger import BHTOMLogger -from bhtom_targets.models import Target +from bhtom_base.bhtom_targets.models import Target logger: BHTOMLogger = BHTOMLogger(__name__, '[Catalog name lookup]') alerce: Alerce = Alerce() diff --git a/bhtom2/harvesters/antares.py b/bhtom2/harvesters/antares.py index b25d0297..493bb2cd 100644 --- a/bhtom2/harvesters/antares.py +++ b/bhtom2/harvesters/antares.py @@ -1,8 +1,8 @@ from typing import Optional from django.core.exceptions import ObjectDoesNotExist -from bhtom_catalogs.harvester import AbstractHarvester -from bhtom_targets.models import Target +from bhtom_base.bhtom_catalogs.harvester import AbstractHarvester +from bhtom_base.bhtom_targets.models import Target from antares_client.search import get_by_ztf_object_id, get_by_id from antares_client._api.models import Locus diff --git a/bhtom2/harvesters/gaia_alerts.py b/bhtom2/harvesters/gaia_alerts.py index 63500bc2..0d923312 100644 --- a/bhtom2/harvesters/gaia_alerts.py +++ b/bhtom2/harvesters/gaia_alerts.py @@ -6,8 +6,8 @@ import pandas as pd from django.conf import settings from django.core.exceptions import ObjectDoesNotExist -from bhtom_catalogs.harvester import AbstractHarvester -from bhtom_targets.models import Target +from bhtom_base.bhtom_catalogs.harvester import AbstractHarvester +from bhtom_base.bhtom_targets.models import Target from bhtom2.exceptions.external_service import NoResultException, InvalidExternalServiceResponseException from bhtom2.external_service.data_source_information import DataSource, TARGET_NAME_KEYS diff --git a/bhtom2/harvesters/tns.py b/bhtom2/harvesters/tns.py index f3a83fcc..664f9294 100644 --- a/bhtom2/harvesters/tns.py +++ b/bhtom2/harvesters/tns.py @@ -6,8 +6,8 @@ from collections import OrderedDict from django.conf import settings -from bhtom_catalogs.harvester import AbstractHarvester -from bhtom_common.exceptions import ImproperCredentialsException +from bhtom_base.bhtom_catalogs.harvester import AbstractHarvester +from bhtom_base.bhtom_common.exceptions import ImproperCredentialsException TNS_URL = 'https://www.wis-tns.org' diff --git a/bhtom2/hooks.py b/bhtom2/hooks.py index 9c118ccb..c733514f 100644 --- a/bhtom2/hooks.py +++ b/bhtom2/hooks.py @@ -3,7 +3,7 @@ from bhtom2.external_service.catalog_name_lookup import query_all_services from bhtom2.utils.bhtom_logger import BHTOMLogger from bhtom2.utils.extinction import ogle_extinction -from bhtom_targets.models import TargetExtra +from bhtom_base.bhtom_targets.models import TargetExtra logger: BHTOMLogger = BHTOMLogger(__name__, '[Hooks]') diff --git a/bhtom2/settings.py b/bhtom2/settings.py index b11d460e..d7589e56 100644 --- a/bhtom2/settings.py +++ b/bhtom2/settings.py @@ -24,6 +24,7 @@ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) + BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Environment variables @@ -56,20 +57,19 @@ 'django.contrib.sites', 'django_extensions', 'guardian', - 'bhtom_base', - 'bhtom_common', + 'bhtom_base.bhtom_common', 'django_comments', 'bootstrap4', 'crispy_forms', 'rest_framework', 'django_filters', 'django_gravatar', - 'bhtom_targets', - 'bhtom_alerts', - 'bhtom_catalogs', - 'bhtom_observations', - 'bhtom_dataproducts', - 'bhtom_registration', + 'bhtom_base.bhtom_targets', + 'bhtom_base.bhtom_alerts', + 'bhtom_base.bhtom_catalogs', + 'bhtom_base.bhtom_observations', + 'bhtom_base.bhtom_dataproducts', + 'bhtom_custom_registration.bhtom_registration', 'rest_framework.authtoken', 'bhtom2' ] @@ -82,10 +82,10 @@ 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'bhtom_common.middleware.Raise403Middleware', - 'bhtom_common.middleware.ExternalServiceMiddleware', - 'bhtom_common.middleware.AuthStrategyMiddleware', - 'bhtom_registration.middleware.RedirectAuthenticatedUsersFromRegisterMiddleware', + 'bhtom_base.bhtom_common.middleware.Raise403Middleware', + 'bhtom_base.bhtom_common.middleware.ExternalServiceMiddleware', + 'bhtom_base.bhtom_common.middleware.AuthStrategyMiddleware', + 'bhtom_custom_registration.bhtom_registration.middleware.RedirectAuthenticatedUsersFromRegisterMiddleware', ] ROOT_URLCONF = 'bhtom2.urls' @@ -276,25 +276,25 @@ } DATA_PROCESSORS = { - 'photometry': 'bhtom_dataproducts.processors.photometry_processor.PhotometryProcessor', - 'spectroscopy': 'bhtom_dataproducts.processors.spectroscopy_processor.SpectroscopyProcessor', + 'photometry': 'bhtom_base.bhtom_dataproducts.processors.photometry_processor.PhotometryProcessor', + 'spectroscopy': 'bhtom_base.bhtom_dataproducts.processors.spectroscopy_processor.SpectroscopyProcessor', } TOM_FACILITY_CLASSES = [ - 'bhtom_observations.facilities.lco.LCOFacility', - 'bhtom_observations.facilities.gemini.GEMFacility', - 'bhtom_observations.facilities.soar.SOARFacility', - 'bhtom_observations.facilities.lt.LTFacility' + 'bhtom_base.bhtom_observations.facilities.lco.LCOFacility', + 'bhtom_base.bhtom_observations.facilities.gemini.GEMFacility', + 'bhtom_base.bhtom_observations.facilities.soar.SOARFacility', + 'bhtom_base.bhtom_observations.facilities.lt.LTFacility' ] TOM_ALERT_CLASSES = [ - 'bhtom_alerts.brokers.alerce.ALeRCEBroker', - 'bhtom_alerts.brokers.lasair.LasairBroker', - 'bhtom_alerts.brokers.mars.MARSBroker', - 'bhtom_alerts.brokers.scimma.SCIMMABroker', - 'bhtom_alerts.brokers.scout.ScoutBroker', - 'bhtom_alerts.brokers.tns.TNSBroker', - 'bhtom_alerts.brokers.fink.FinkBroker', + 'bhtom_base.bhtom_alerts.brokers.alerce.ALeRCEBroker', + 'bhtom_base.bhtom_alerts.brokers.lasair.LasairBroker', + 'bhtom_base.bhtom_alerts.brokers.mars.MARSBroker', + 'bhtom_base.bhtom_alerts.brokers.scimma.SCIMMABroker', + 'bhtom_base.bhtom_alerts.brokers.scout.ScoutBroker', + 'bhtom_base.bhtom_alerts.brokers.tns.TNSBroker', + 'bhtom_base.bhtom_alerts.brokers.fink.FinkBroker', 'bhtom2.brokers.gaia_alerts.GaiaAlertsBroker', 'bhtom2.brokers.aavso.AAVSOBroker', 'bhtom2.brokers.ztf.ZTFBroker', @@ -311,9 +311,9 @@ 'bhtom2.harvesters.gaia_alerts.GaiaAlertsHarvester', 'bhtom2.harvesters.tns.TNSHarvester', 'bhtom2.harvesters.antares.ANTARESHarvester', - 'bhtom_catalogs.harvesters.simbad.SimbadHarvester', - 'bhtom_catalogs.harvesters.ned.NEDHarvester', - 'bhtom_catalogs.harvesters.jplhorizons.JPLHorizonsHarvester', + 'bhtom_base.bhtom_catalogs.harvesters.simbad.SimbadHarvester', + 'bhtom_base.bhtom_catalogs.harvesters.ned.NEDHarvester', + 'bhtom_base.bhtom_catalogs.harvesters.jplhorizons.JPLHorizonsHarvester', ] HARVESTERS = { @@ -367,10 +367,10 @@ HOOKS = { 'target_post_save': 'bhtom2.hooks.target_post_save', - 'observation_change_state': 'bhtom_common.hooks.observation_change_state', - 'data_product_post_upload': 'bhtom_dataproducts.hooks.data_product_post_upload', - 'data_product_post_save': 'bhtom_dataproducts.hooks.data_product_post_save', - 'multiple_data_products_post_save': 'bhtom_dataproducts.hooks.multiple_data_products_post_save', + 'observation_change_state': 'bhtom_base.bhtom_common.hooks.observation_change_state', + 'data_product_post_upload': 'bhtom_base.bhtom_dataproducts.hooks.data_product_post_upload', + 'data_product_post_save': 'bhtom_base.bhtom_dataproducts.hooks.data_product_post_save', + 'multiple_data_products_post_save': 'bhtom_base.bhtom_dataproducts.hooks.multiple_data_products_post_save', } AUTO_THUMBNAILS = False diff --git a/bhtom2/signals.py b/bhtom2/signals.py index 461ee1d5..f1ec31ec 100644 --- a/bhtom2/signals.py +++ b/bhtom2/signals.py @@ -1,6 +1,6 @@ from django.db.models.signals import pre_save from django.dispatch import receiver -from bhtom_targets.models import Target +from bhtom_base.bhtom_targets.models import Target from bhtom2.utils.bhtom_logger import BHTOMLogger from bhtom2.utils.coordinate_utils import fill_galactic_coordinates diff --git a/bhtom2/templatetags/dataproduct_extras.py b/bhtom2/templatetags/dataproduct_extras.py index 309e327c..5144dc20 100644 --- a/bhtom2/templatetags/dataproduct_extras.py +++ b/bhtom2/templatetags/dataproduct_extras.py @@ -10,11 +10,11 @@ from plotly import offline import plotly.graph_objs as go -from bhtom_dataproducts.forms import DataProductUploadForm -from bhtom_dataproducts.models import DataProduct, ReducedDatum -from bhtom_dataproducts.processors.data_serializers import SpectrumSerializer -from bhtom_observations.models import ObservationRecord -from bhtom_targets.models import Target +from bhtom_base.bhtom_dataproducts.forms import DataProductUploadForm +from bhtom_base.bhtom_dataproducts.models import DataProduct, ReducedDatum +from bhtom_base.bhtom_dataproducts.processors.data_serializers import SpectrumSerializer +from bhtom_base.bhtom_observations.models import ObservationRecord +from bhtom_base.bhtom_targets.models import Target register = template.Library() diff --git a/bhtom2/tests/brokers/test_aavso.py b/bhtom2/tests/brokers/test_aavso.py index ad680eec..e0c26352 100644 --- a/bhtom2/tests/brokers/test_aavso.py +++ b/bhtom2/tests/brokers/test_aavso.py @@ -3,8 +3,8 @@ from unittest.mock import patch from django.test import TestCase -from bhtom_dataproducts.models import ReducedDatum -from bhtom_targets.models import Target +from bhtom_base.bhtom_dataproducts.models import ReducedDatum +from bhtom_base.bhtom_targets.models import Target from bhtom2.brokers.aavso import AAVSOBroker from bhtom2.brokers.bhtom_broker import LightcurveUpdateReport diff --git a/bhtom2/tests/brokers/test_gaia_alerts.py b/bhtom2/tests/brokers/test_gaia_alerts.py index dc0d93aa..f42315c8 100644 --- a/bhtom2/tests/brokers/test_gaia_alerts.py +++ b/bhtom2/tests/brokers/test_gaia_alerts.py @@ -3,8 +3,8 @@ from unittest.mock import patch from django.test import TestCase -from bhtom_dataproducts.models import ReducedDatum -from bhtom_targets.models import Target +from bhtom_base.bhtom_dataproducts.models import ReducedDatum +from bhtom_base.bhtom_targets.models import Target from bhtom2.brokers.bhtom_broker import LightcurveUpdateReport from bhtom2.external_service.data_source_information import DataSource, TARGET_NAME_KEYS diff --git a/bhtom2/tests/brokers/test_ztf.py b/bhtom2/tests/brokers/test_ztf.py index cabce7d9..1a6b7b59 100644 --- a/bhtom2/tests/brokers/test_ztf.py +++ b/bhtom2/tests/brokers/test_ztf.py @@ -4,8 +4,8 @@ from unittest.mock import patch from django.test import TestCase -from bhtom_dataproducts.models import ReducedDatum -from bhtom_targets.models import Target +from bhtom_base.bhtom_dataproducts.models import ReducedDatum +from bhtom_base.bhtom_targets.models import Target from bhtom2.external_service.data_source_information import DataSource, TARGET_NAME_KEYS from bhtom2.brokers.bhtom_broker import LightcurveUpdateReport diff --git a/bhtom2/tests/dataproducts/test_last_jd.py b/bhtom2/tests/dataproducts/test_last_jd.py index 8c757a9a..941429d1 100644 --- a/bhtom2/tests/dataproducts/test_last_jd.py +++ b/bhtom2/tests/dataproducts/test_last_jd.py @@ -1,5 +1,5 @@ from django.test import TestCase -from bhtom_targets.models import Target +from bhtom_base.bhtom_targets.models import Target from typing import Optional from bhtom2.dataproducts.last_jd import update_last_jd diff --git a/bhtom2/tests/harvesters/test_gaia_alerts.py b/bhtom2/tests/harvesters/test_gaia_alerts.py index 5eb1b609..8fc995be 100644 --- a/bhtom2/tests/harvesters/test_gaia_alerts.py +++ b/bhtom2/tests/harvesters/test_gaia_alerts.py @@ -6,7 +6,7 @@ from django.test import TestCase from django.conf import settings -from bhtom_targets.models import Target +from bhtom_base.bhtom_targets.models import Target from bhtom2.harvesters.gaia_alerts import fetch_alerts_csv, search_term_in_gaia_data, get, \ GaiaAlertsHarvester diff --git a/bhtom2/tests/utils/test_coordinate_utils.py b/bhtom2/tests/utils/test_coordinate_utils.py index b1baf125..21b107b8 100644 --- a/bhtom2/tests/utils/test_coordinate_utils.py +++ b/bhtom2/tests/utils/test_coordinate_utils.py @@ -1,5 +1,5 @@ from django.test import TestCase -from bhtom_targets.models import Target +from bhtom_base.bhtom_targets.models import Target from bhtom2.utils.coordinate_utils import fill_galactic_coordinates diff --git a/bhtom2/tests/utils/test_extinction.py b/bhtom2/tests/utils/test_extinction.py index c42bc596..39dddfe8 100644 --- a/bhtom2/tests/utils/test_extinction.py +++ b/bhtom2/tests/utils/test_extinction.py @@ -2,7 +2,7 @@ from unittest.mock import patch from django.test import TestCase -from bhtom_targets.models import Target +from bhtom_base.bhtom_targets.models import Target from bhtom2.utils.extinction import ogle_extinction diff --git a/bhtom2/urls.py b/bhtom2/urls.py index 22dc013b..27ec52c3 100644 --- a/bhtom2/urls.py +++ b/bhtom2/urls.py @@ -14,13 +14,14 @@ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.urls import path, include -from bhtom_targets.views import TargetDetailView + +from bhtom_base.bhtom_targets.views import TargetDetailView from bhtom2.views import BrokerQueryListView urlpatterns = [ - path('', include('bhtom_registration.registration_flows.approval_required.urls', namespace='registration')), + path('', include('bhtom_custom_registration.bhtom_registration.registration_flows.approval_required.urls', namespace='registration')), path('alerts/query/list/', BrokerQueryListView.as_view(template_name='bhtom_alerts/brokerquery_list.html'), name='alerts:list'), path('targets//', TargetDetailView.as_view(template_name='bhtom_targets/target_detail.html'), name='detail'), - path('', include('bhtom_common.urls')), + path('', include('bhtom_base.bhtom_common.urls')), ] diff --git a/bhtom2/utils/coordinate_utils.py b/bhtom2/utils/coordinate_utils.py index 73a229fc..b78d6ca1 100644 --- a/bhtom2/utils/coordinate_utils.py +++ b/bhtom2/utils/coordinate_utils.py @@ -1,6 +1,6 @@ from astropy.coordinates import Angle, SkyCoord import astropy.units as u -from bhtom_targets.models import Target +from bhtom_base.bhtom_targets.models import Target from bhtom2.utils.bhtom_logger import BHTOMLogger diff --git a/bhtom2/utils/extinction.py b/bhtom2/utils/extinction.py index 39c7e06a..9d2a1f9c 100644 --- a/bhtom2/utils/extinction.py +++ b/bhtom2/utils/extinction.py @@ -3,7 +3,7 @@ from astropy import units as u from astropy.coordinates import SkyCoord from astroquery.ogle import Ogle -from bhtom_targets.models import Target +from bhtom_base.bhtom_targets.models import Target from bhtom2.utils.bhtom_logger import BHTOMLogger diff --git a/bhtom2/utils/observation_data_extra_data_utils.py b/bhtom2/utils/observation_data_extra_data_utils.py index 513d3885..eb132a82 100644 --- a/bhtom2/utils/observation_data_extra_data_utils.py +++ b/bhtom2/utils/observation_data_extra_data_utils.py @@ -2,8 +2,8 @@ from typing import Any, Dict, Optional, List from astropy.io import ascii -from bhtom_dataproducts.exceptions import InvalidFileFormatException -from bhtom_dataproducts.models import DataProduct +from bhtom_base.bhtom_dataproducts.exceptions import InvalidFileFormatException +from bhtom_base.bhtom_dataproducts.models import DataProduct FACILITY_NAME_KEY: str = "facility" OBSERVATION_TIME_KEY: str = "observation_time" diff --git a/bhtom2/views.py b/bhtom2/views.py index d55003a9..a3085dd2 100644 --- a/bhtom2/views.py +++ b/bhtom2/views.py @@ -1,7 +1,7 @@ from django_filters.views import FilterView -from bhtom_alerts.alerts import get_service_classes -from bhtom_alerts.models import BrokerQuery -from bhtom_alerts.views import BrokerQueryFilter +from bhtom_base.bhtom_alerts.alerts import get_service_classes +from bhtom_base.bhtom_alerts.models import BrokerQuery +from bhtom_base.bhtom_alerts.views import BrokerQueryFilter class BrokerQueryListView(FilterView): diff --git a/bhtom_base b/bhtom_base index 9b1c2e1b..55f6a450 160000 --- a/bhtom_base +++ b/bhtom_base @@ -1 +1 @@ -Subproject commit 9b1c2e1b80583a6dc66cc07063289c6c60a75b1d +Subproject commit 55f6a45066970e8010e1c4b8841aa4e23549492d diff --git a/bhtom_registration b/bhtom_registration deleted file mode 160000 index 24b82fce..00000000 --- a/bhtom_registration +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 24b82fce282cc5fa9bb4be1ffe390fd2d0de6b41