diff --git a/pyproject.toml b/pyproject.toml index 45a3453..545a2b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,6 @@ build-backend = "setuptools.build_meta" [project] name = "PyTransit" -version = "2.6.8" description = 'Fast and painless exoplanet transit light curve modelling.' authors=[{name='Hannu Parviainen', email='hpparvi@gmail.com'}] classifiers=[ @@ -21,13 +20,14 @@ keywords = ['astronomy', 'astrophysics', 'exoplanets'] requires-python = ">= 3.8" readme = "README.md" license = {text = "GPLv2"} -dynamic = ["dependencies"] +dynamic = ["version", "dependencies"] [project.urls] homepage = '/~https://github.com/hpparvi/PyTransit' [tool.setuptools.dynamic] dependencies = {file = ["requirements.txt"]} +version = {attr = "pytransit.__version__"} [tool.setuptools] include-package-data = true diff --git a/pytransit/__init__.py b/pytransit/__init__.py index e042992..71c0172 100644 --- a/pytransit/__init__.py +++ b/pytransit/__init__.py @@ -41,59 +41,53 @@ """ -import warnings -from numba import NumbaDeprecationWarning - -#TODO: Find where we're using generated_jit and fix it... - -with warnings.catch_warnings(): - warnings.simplefilter('ignore', NumbaDeprecationWarning) - - from .version import __version__ - - # Generic - # ------- - from .models.transitmodel import TransitModel - from .contamination.filter import DeltaFilter, BoxcarFilter, TabulatedFilter, sdss_g, sdss_r, sdss_i, sdss_z - - # Numba models - # ------------ - from .models.qpower2 import QPower2Model - from .models.ma_quadratic import QuadraticModel - from .models.ma_uniform import UniformModel - from .models.eclipse_model import EclipseModel - from .models.ma_chromosphere import ChromosphereModel - from .models.general import GeneralModel - from .models.osmodel import OblateStarModel - from .models.gdmodel import GravityDarkenedModel - - from .models import RoadRunnerModel, OblatePlanetModel, TransmissionSpectroscopyModel - - TSModel = TransmissionSpectroscopyModel - OPModel = OblatePlanetModel - RRModel = RoadRunnerModel - - # OpenCL models - # ------------- - from .models.qpower2_cl import QPower2ModelCL - from .models.ma_quadratic_cl import QuadraticModelCL - from .models.ma_uniform_cl import UniformModelCL - - # LDTk limb darkening for the Swift model - # --------------------------------------- - from .models.ldtkldm import LDTkLDModel, LDTkLD - - # Log posterior functions - # ----------------------- - from .lpf.lpf import BaseLPF - from .lpf.transitlpf import TransitLPF - from .lpf.cntlpf import PhysContLPF - from .lpf.baselines.legendrebaseline import LegendreBaseline - from .lpf.baselines.linearbaseline import LinearModelBaseline - from .lpf.transitanalysis import TransitAnalysis - - # Utilities - # --------- - from .param.parameter import UniformPrior, NormalPrior - from .utils import md_rs_from_rho - from .utils.mocklc import create_mock_light_curve +__version__ = '2.6.9' + +# Generic +# ------- +from .models.transitmodel import TransitModel +from .contamination.filter import DeltaFilter, BoxcarFilter, TabulatedFilter, sdss_g, sdss_r, sdss_i, sdss_z + +# Numba models +# ------------ +from .models.qpower2 import QPower2Model +from .models.ma_quadratic import QuadraticModel +from .models.ma_uniform import UniformModel +from .models.eclipse_model import EclipseModel +from .models.ma_chromosphere import ChromosphereModel +from .models.general import GeneralModel +from .models.osmodel import OblateStarModel +from .models.gdmodel import GravityDarkenedModel + +from .models import RoadRunnerModel, OblatePlanetModel, TransmissionSpectroscopyModel + +TSModel = TransmissionSpectroscopyModel +OPModel = OblatePlanetModel +RRModel = RoadRunnerModel + +# OpenCL models +# ------------- +from .models.qpower2_cl import QPower2ModelCL +from .models.ma_quadratic_cl import QuadraticModelCL +from .models.ma_uniform_cl import UniformModelCL + +# LDTk limb darkening for the Swift model +# --------------------------------------- + +from .models.ldtkldm import LDTkLDModel #, LDTkLD +from .models.ldtkldm import LDTkLD + +# Log posterior functions +# ----------------------- +from .lpf.lpf import BaseLPF +from .lpf.transitlpf import TransitLPF +from .lpf.cntlpf import PhysContLPF +from .lpf.baselines.legendrebaseline import LegendreBaseline +from .lpf.baselines.linearbaseline import LinearModelBaseline +from .lpf.transitanalysis import TransitAnalysis + +# Utilities +# --------- +from .param.parameter import UniformPrior, NormalPrior +from .utils import md_rs_from_rho +from .utils.mocklc import create_mock_light_curve diff --git a/pytransit/version.py b/pytransit/version.py deleted file mode 100644 index 6132ccc..0000000 --- a/pytransit/version.py +++ /dev/null @@ -1,19 +0,0 @@ -# PyTransit: fast and easy exoplanet transit modelling in Python. -# Copyright (C) 2010-2019 Hannu Parviainen -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -from semantic_version import Version - -__version__ = Version('2.6.8')