Skip to content

Commit

Permalink
Fix up conflicts and isort again
Browse files Browse the repository at this point in the history
  • Loading branch information
aarchiba committed Aug 23, 2021
1 parent 21c72cc commit fe543ad
Show file tree
Hide file tree
Showing 23 changed files with 57 additions and 67 deletions.
4 changes: 3 additions & 1 deletion tests/test_datafiles.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""Test installation of PINT data files"""
import os
import tempfile

import pytest

import pint.config
import tempfile


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/test_density.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from astropy.time import Time
from pylab import *

import pint.toa as toa
import pint.simulation as simulation
import pint.toa as toa
from pint.models import get_model


Expand Down
8 changes: 4 additions & 4 deletions tests/test_derived_quantities.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
from pint.derived_quantities import (
a1sini,
companion_mass,
gamma,
mass_funct,
mass_funct2,
omdot,
omdot_to_mtot,
pbdot,
pulsar_age,
pulsar_B,
pulsar_B_lightcyl,
pulsar_edot,
pulsar_mass,
omdot,
pbdot,
gamma,
omdot_to_mtot,
)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_downhill_fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import pint.fitter
from pint.models import get_model
from pint.models.timing_model import MissingTOAs
from pint.toa import merge_TOAs
from pint.simulation import make_fake_toas_uniform
from pint.toa import merge_TOAs

par_eccentric = """
PSR J1234+5678
Expand Down
18 changes: 10 additions & 8 deletions tests/test_fake_toas.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import astropy.units as u
import pint.simulation
from pint.models.model_builder import get_model, get_model_and_toas
from pint.toa import get_TOAs
import pint.residuals
import io
import numpy as np
import tempfile
import os
import tempfile

import astropy.units as u
import numpy as np
from pinttestdata import datadir, testdir

import pint.config
import pint.residuals
import pint.simulation
from pint.fitter import GLSFitter
from pinttestdata import datadir, testdir
from pint.models.model_builder import get_model, get_model_and_toas
from pint.toa import get_TOAs


def test_noise_addition():
Expand Down
4 changes: 1 addition & 3 deletions tests/test_fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
from pinttestdata import datadir

import pint.models as tm
from pint import fitter, toa, simulation
from pinttestdata import datadir
import pint.models.parameter as param
from pint import ls
from pint import fitter, ls, simulation, toa
from pint.models import get_model, get_model_and_toas


Expand Down
2 changes: 1 addition & 1 deletion tests/test_fitter_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
WLSFitter,
)
from pint.models.model_builder import get_model
from pint.toa import get_TOAs
from pint.simulation import make_fake_toas_uniform
from pint.toa import get_TOAs


@pytest.fixture
Expand Down
9 changes: 4 additions & 5 deletions tests/test_flagging_clustering.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
"""Tests for clustering and flagging"""
import copy
import logging
import os
import unittest
import pytest
import copy

import astropy.units as u
import numpy as np
import pytest
from pinttestdata import datadir

import pint.models.model_builder as mb
import pint.toa as toa
from pint.models import PhaseJump, parameter as p
from pint.residuals import Residuals
from pinttestdata import datadir
from pint.models import parameter as p
from pint.models import PhaseJump


class SimpleSetup:
Expand Down
12 changes: 6 additions & 6 deletions tests/test_infostrings.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
"""Tests for adding info strings to parfiles and tim files"""
import logging
import os
import unittest
import pytest
import copy
import io
import logging
import os
import platform
import unittest

import astropy.units as u
import numpy as np
import pytest
from pinttestdata import datadir

import pint
import pint.models.model_builder as mb
import pint.toa as toa
from pint.residuals import Residuals
from pinttestdata import datadir
import pint


class SimpleSetup:
Expand Down
5 changes: 3 additions & 2 deletions tests/test_jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import pint.toa
from pint.models import PhaseJump, get_model, parameter as p
from pint.residuals import Residuals
from pint.simulation import make_fake_toas_uniform


class SimpleSetup:
Expand Down Expand Up @@ -248,7 +249,7 @@ def test_multiple_jumps_add():
first_jump = jmp
else:
second_jump = jmp
toas = pint.toa.make_fake_toas(57000, 60000 - 1, 10, m)
toas = make_fake_toas_uniform(57000, 60000 - 1, 10, m)

first_jump.quantity = 100 * u.us
second_jump.quantity = 0 * u.us
Expand Down Expand Up @@ -323,7 +324,7 @@ def small():
"""
)
)
t = pint.toa.make_fake_toas(58000, 60000, 20, m)
t = make_fake_toas_uniform(58000, 60000, 20, m)

class R:
pass
Expand Down
4 changes: 2 additions & 2 deletions tests/test_model_derivatives.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import numdifftools
import numpy as np
import pytest
from astropy import units as u
from hypothesis import HealthCheck, Verbosity, assume, given, settings
from hypothesis.strategies import composite, floats, integers, sampled_from
from numpy.testing import assert_allclose
from astropy import units as u

import pint.toa
import pint.simulation
import pint.toa
from pint.models import get_model


Expand Down
2 changes: 1 addition & 1 deletion tests/test_parametercovariancematrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
WLSFitter,
)
from pint.models.model_builder import get_model
from pint.toa import get_TOAs
from pint.simulation import make_fake_toas_uniform
from pint.toa import get_TOAs


@pytest.fixture
Expand Down
4 changes: 3 additions & 1 deletion tests/test_plk_widget.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from tkinter import Frame

import astropy.units as u
import pytest

from pint.pintk.plk import PlkWidget
from tkinter import Frame


@pytest.fixture
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pulse_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

import pint.fitter
from pint.models import get_model
from pint.toa import get_TOAs
from pint.simulation import make_fake_toas_uniform
from pint.residuals import Residuals
from pint.simulation import make_fake_toas_uniform
from pint.toa import get_TOAs

parfile = os.path.join(datadir, "withpn.par")
timfile = os.path.join(datadir, "withpn.tim")
Expand Down
6 changes: 1 addition & 5 deletions tests/test_random_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@
# matplotlib.use('TKAgg')
import matplotlib.pyplot as plt
import numpy as np
import astropy.units as u

from pint.models import get_model, get_model_and_toas
from pint import fitter, toa, simulation
import pytest
from pinttestdata import datadir

import pint.models.parameter as param
from pint import fitter, ls, toa, utils
from pint import fitter, ls, simulation, toa, utils
from pint.models import get_model, get_model_and_toas


Expand Down
2 changes: 1 addition & 1 deletion tests/test_residuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
from pint.models import get_model
from pint.models.dispersion_model import Dispersion
from pint.residuals import CombinedResiduals, Residuals, WidebandTOAResiduals
from pint.toa import get_TOAs
from pint.simulation import make_fake_toas_uniform
from pint.toa import get_TOAs
from pint.utils import weighted_mean

os.chdir(datadir)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_solar_wind.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
from pinttestdata import datadir

from pint.fitter import WidebandTOAFitter
from pint.toa import get_TOAs
from pint.models import get_model
from pint.simulation import make_fake_toas_uniform
from pinttestdata import datadir
from pint.toa import get_TOAs

os.chdir(datadir)

Expand Down
8 changes: 3 additions & 5 deletions tests/test_stigma.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
import astropy.units as u
import numpy as np
import pytest
import tempfile

from pint.models import get_model
import pint.toa as toa
import pint.simulation as simulation
import test_derivative_utils as tdu
from pinttestdata import datadir

import pint.simulation as simulation
import pint.toa as toa
from pint.models import get_model
from pint.residuals import Residuals

stigma_template = """
Expand Down
8 changes: 4 additions & 4 deletions tests/test_timing_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
import astropy.units as u
import numpy as np
import pytest
from pinttestdata import datadir
from pint.simulation import make_fake_toas_uniform
from pint.toa import get_TOAs
from astropy.time import Time
from pinttestdata import datadir

from pint.models import (
DEFAULT_ORDER,
AstrometryEquatorial,
BinaryELL1,
PhaseJump,
Spindown,
TimingModel,
PhaseJump,
Wave,
get_model,
parameter as p,
)
from pint.simulation import make_fake_toas_uniform
from pint.toa import get_TOAs


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/test_toa.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

from pint.models import get_model
from pint.observatory import get_observatory
from pint.toa import TOA, TOAs
from pint.simulation import make_fake_toas_uniform
from pint.toa import TOA, TOAs


class TestTOA(unittest.TestCase):
Expand Down
3 changes: 1 addition & 2 deletions tests/test_toa_pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

import pint.models
import pint.toa
from pint import toa
from pint import simulation
from pint import simulation, toa


@pytest.fixture
Expand Down
5 changes: 1 addition & 4 deletions tests/test_toa_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@
from astropy.utils.iers import conf
from hypothesis import given
from hypothesis.extra.numpy import arrays
from pint import toa, simulation
from pint.observatory import bipm_default
from pint.models import get_model, get_model_and_toas
from hypothesis.strategies import floats, integers, sampled_from
from pinttestdata import datadir

from pint import toa
from pint import simulation, toa
from pint.models import get_model, get_model_and_toas
from pint.observatory import bipm_default

Expand Down
6 changes: 1 addition & 5 deletions tests/test_toa_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@
from astropy.time import Time
from pinttestdata import datadir

from pint import simulation, toa
from pint.models import get_model
from pint import toa, simulation
from pinttestdata import datadir
from astropy.time import Time
import numpy as np
import astropy.units as u


def test_roundtrip_bary_toa_Tempo2format(tmpdir):
Expand Down

0 comments on commit fe543ad

Please sign in to comment.