Skip to content

Commit

Permalink
Merge pull request #210 from AlexKurek/master
Browse files Browse the repository at this point in the history
Remove unused modules
  • Loading branch information
ndilalla committed Aug 14, 2024
2 parents 5312256 + 45ca06f commit 040ca25
Show file tree
Hide file tree
Showing 23 changed files with 12 additions and 48 deletions.
4 changes: 1 addition & 3 deletions astromodels/core/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
import os
import warnings
from dataclasses import dataclass
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
from typing import Dict, Iterable, List, Tuple, Union

import numpy as np
import pandas as pd
import scipy.integrate
from astromodels.core.memoization import use_astromodels_memoization
from astromodels.core.my_yaml import my_yaml
from astromodels.core.parameter import IndependentVariable, Parameter
from astromodels.core.property import FunctionProperty
Expand Down
2 changes: 1 addition & 1 deletion astromodels/core/model_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import re
import warnings
from typing import Any, Dict, List, Optional, Union
from typing import Dict, List

from astromodels.core import (
model,
Expand Down
1 change: 0 additions & 1 deletion astromodels/core/node_type.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import collections
import itertools
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Tuple, Type, Any
from rich.tree import Tree
Expand Down
2 changes: 1 addition & 1 deletion astromodels/core/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import contextlib
import copy
import warnings
from typing import Any, Dict, List, Optional, Tuple
from typing import Any, Dict, Optional, Tuple

import astropy.units as u
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion astromodels/core/property.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import collections
import copy
from typing import Any, Dict, List, Optional, Tuple, Union
from typing import Any, Dict, List, Optional

from astromodels.utils.logging import setup_logger

Expand Down
4 changes: 1 addition & 3 deletions astromodels/core/tree.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import collections
import os
import uuid
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict

from future import standard_library

Expand Down
1 change: 0 additions & 1 deletion astromodels/core/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import astropy.units as u

from astromodels.core.tree import Node
from astromodels.utils.pretty_list import dict_to_list

# This module keeps the configuration of the units used in astromodels
Expand Down
1 change: 0 additions & 1 deletion astromodels/functions/dark_matter/dm_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import astropy.units as astropy_units
import numpy as np
import six
from scipy.interpolate import RegularGridInterpolator

from astromodels.functions.function import Function1D, FunctionMeta
Expand Down
2 changes: 1 addition & 1 deletion astromodels/functions/functions_1D/absorption.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import math
from dataclasses import dataclass
from pathlib import Path
from typing import Any, Dict, List, Optional
from typing import List

import astropy.units as astropy_units
import numba as nb
Expand Down
3 changes: 0 additions & 3 deletions astromodels/functions/functions_1D/blackbody.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
from __future__ import division

import astropy.units as astropy_units
import numpy as np
from past.utils import old_div

import astromodels.functions.numba_functions as nb_func
from astromodels.core.units import get_units
from astromodels.functions.function import (
Function1D,
FunctionMeta,
ModelAssertionViolation,
)


Expand Down
1 change: 0 additions & 1 deletion astromodels/functions/functions_1D/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import numpy as np
from past.utils import old_div

import astromodels.functions.numba_functions as nb_func
from astromodels.core.units import get_units
from astromodels.functions.function import Function1D, FunctionMeta
from astromodels.utils.configuration import astromodels_config
Expand Down
4 changes: 0 additions & 4 deletions astromodels/functions/functions_1D/polynomials.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import astropy.units as astropy_units
import numpy as np
from past.utils import old_div

import astromodels.functions.numba_functions as nb_func
from astromodels.core.units import get_units
from astromodels.functions.function import (
Function1D,
FunctionMeta,
ModelAssertionViolation,
)


Expand Down
8 changes: 1 addition & 7 deletions astromodels/functions/functions_1D/powerlaws.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import math
import warnings
from typing import Iterable

import astropy.units as astropy_units
import numpy as np
import six
from past.utils import old_div
from scipy.special import erfcinv, gamma, gammaincc
from scipy.special import gamma, gammaincc

import astromodels.functions.numba_functions as nb_func
from astromodels.core.units import get_units
from astromodels.functions.function import (
Function1D,
FunctionMeta,
Expand Down
1 change: 0 additions & 1 deletion astromodels/functions/numba_functions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import ctypes
import math

import numba as nb
Expand Down
3 changes: 1 addition & 2 deletions astromodels/functions/template_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import warnings
from dataclasses import dataclass
from pathlib import Path
from typing import Any, Dict, List, Optional, Union
from typing import Dict, List, Optional, Union

import astropy.io.fits as fits
import astropy.units as u
Expand All @@ -15,7 +15,6 @@

from interpolation import interp
from interpolation.splines import eval_linear
from joblib import Parallel, delayed

from astromodels.core.parameter import Parameter
from astromodels.functions.function import Function1D, FunctionMeta
Expand Down
2 changes: 1 addition & 1 deletion astromodels/sources/point_source.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import division

import collections
from typing import Any, Dict, List, Optional, Union
from typing import Dict, Optional

import astropy.units as u
import numba as nb
Expand Down
2 changes: 1 addition & 1 deletion astromodels/sources/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from enum import Enum, unique
from astromodels.utils.logging import setup_logger
from typing import Dict, Optional, List, Any
from typing import Dict, List, Any

from astromodels.core.parameter import Parameter

Expand Down
6 changes: 1 addition & 5 deletions astromodels/tests/test_polarization.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
from __future__ import division

import os

import copy

import numpy as np
import math

from astromodels import u, update_logging_level
from astromodels import update_logging_level
from astromodels.core.polarization import *
from astromodels.core.model import Model
from astromodels.core.model_parser import *
Expand Down
1 change: 0 additions & 1 deletion astromodels/tests/test_template_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from astromodels import Model, PointSource, clone_model, load_model
from astromodels.functions import (
Band,
MissingDataFile,
Powerlaw,
TemplateModel,
TemplateModelFactory,
Expand Down
1 change: 0 additions & 1 deletion astromodels/tests/test_tree.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import print_function

import gc
import os
from builtins import range

import astropy.units as u
Expand Down
3 changes: 1 addition & 2 deletions astromodels/utils/configuration.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from pathlib import Path
from typing import Any, Dict, Optional
from typing import Optional

from omegaconf import OmegaConf
from omegaconf.dictconfig import DictConfig
Expand Down
4 changes: 0 additions & 4 deletions astromodels/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
# create a wrapper which just uses print

try:

from IPython.display import display

except ImportError:

def display(*args):
"""
Mock version of display, used if there is no ipython installed
Expand All @@ -19,11 +17,9 @@ def display(*args):


try:

from IPython.display import Latex

except ImportError:

class Latex(object):
"""
Mock version of the IPython Latex object, used if there is no ipython installed
Expand Down
2 changes: 0 additions & 2 deletions astromodels/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

from astromodels.utils.configuration import astromodels_config

from .file_utils import _get_data_file_path

try:

from threeML.config.config import threeML_config
Expand Down

0 comments on commit 040ca25

Please sign in to comment.