Skip to content

Commit

Permalink
Merge pull request #1730 from ReactionMechanismGenerator/remove_future
Browse files Browse the repository at this point in the history
Remove future imports and py2/py3 compatibility imports
  • Loading branch information
mliu49 committed Sep 27, 2019
2 parents 788c9c7 + 63a2b4b commit 91cdd1d
Show file tree
Hide file tree
Showing 79 changed files with 3 additions and 153 deletions.
1 change: 0 additions & 1 deletion environment.yml
Expand Up @@ -16,7 +16,6 @@ dependencies:
- coverage
- cython >=0.25.2
- ffmpeg
- future
- gprof2dot
- graphviz
- h5py
Expand Down
1 change: 0 additions & 1 deletion rmg.py
Expand Up @@ -31,7 +31,6 @@
"""
RMG is an automatic chemical mechanism generator. It is awesomely awesome.
"""
from __future__ import print_function

import os.path
import logging
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/chemkin.pyx
Expand Up @@ -29,8 +29,6 @@
This module contains functions for writing of Chemkin input files.
"""

from __future__ import division

import logging
import math
import os.path
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/data/kinetics/database.py
Expand Up @@ -29,8 +29,6 @@
###############################################################################


from __future__ import division, print_function

import logging
import os.path
from copy import deepcopy
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/data/kinetics/family.py
Expand Up @@ -31,8 +31,6 @@
"""
This module contains functionality for working with kinetics families.
"""
from __future__ import division

import codecs
import itertools
import logging
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/data/kinetics/groups.py
Expand Up @@ -33,8 +33,6 @@
groups, including support for using group additivity to estimate rate
coefficients.
"""
from __future__ import division

import logging
import math
import warnings
Expand Down
1 change: 0 additions & 1 deletion rmgpy/data/kinetics/kineticsTest.py
Expand Up @@ -28,7 +28,6 @@
# #
###############################################################################

from __future__ import print_function
import os
import unittest

Expand Down
1 change: 0 additions & 1 deletion rmgpy/data/kinetics/library.py
Expand Up @@ -31,7 +31,6 @@
"""
This module contains functionality for working with kinetics libraries.
"""
from __future__ import division

import codecs
import logging
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/data/solvation.py
Expand Up @@ -31,8 +31,6 @@
"""
"""
from __future__ import division

import logging
import math
import os.path
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/data/statmech.py
Expand Up @@ -28,8 +28,6 @@
# #
###############################################################################

from __future__ import division

import logging
import os.path

Expand Down
2 changes: 0 additions & 2 deletions rmgpy/data/statmechfit.py
Expand Up @@ -32,8 +32,6 @@
Contains functions for fitting of molecular degrees of freedom from
macroscopic properties, particularly the heat capacity.
"""
from __future__ import division

import logging
import math

Expand Down
2 changes: 0 additions & 2 deletions rmgpy/data/thermo.py
Expand Up @@ -31,8 +31,6 @@
"""
"""
from __future__ import division

import itertools
import logging
import math
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/data/thermoTest.py
Expand Up @@ -28,8 +28,6 @@
# #
###############################################################################

from __future__ import division

import math
import os
import unittest
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/data/transport.py
Expand Up @@ -32,8 +32,6 @@
A class for returning and estimating the transport properties of a species
"""
from __future__ import division

import logging
import os.path
from copy import deepcopy
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/kinetics/arrhenius.pyx
Expand Up @@ -27,8 +27,6 @@
# #
###############################################################################

from __future__ import division

import numpy as np
cimport numpy as np
from libc.math cimport exp, sqrt, log10
Expand Down
1 change: 0 additions & 1 deletion rmgpy/kinetics/arrheniusTest.py
Expand Up @@ -31,7 +31,6 @@
"""
This script contains unit tests of the :mod:`rmgpy.kinetics.arrhenius` module.
"""
from __future__ import division

import math
import unittest
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/kinetics/chebyshev.pyx
Expand Up @@ -27,8 +27,6 @@
# #
###############################################################################

from __future__ import division

import logging

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion rmgpy/kinetics/chebyshevTest.py
Expand Up @@ -31,7 +31,6 @@
"""
This script contains unit tests of the :mod:`rmgpy.kinetics.chebyshev` module.
"""
from __future__ import division

import unittest

Expand Down
1 change: 0 additions & 1 deletion rmgpy/kinetics/diffusionLimited.py
Expand Up @@ -27,7 +27,6 @@
# DEALINGS IN THE SOFTWARE. #
# #
###############################################################################
from __future__ import division

import logging
import math
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/kinetics/falloff.pyx
Expand Up @@ -32,8 +32,6 @@ This module contains classes representing pressure-dependent kinetics models
of "standard" falloff.
"""

from __future__ import division

from libc.math cimport exp, log, log10

cimport rmgpy.constants as constants
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/kinetics/kineticsdata.pyx
Expand Up @@ -27,8 +27,6 @@
# #
###############################################################################

from __future__ import division

import numpy as np
cimport numpy as np
from libc.math cimport log
Expand Down
1 change: 0 additions & 1 deletion rmgpy/kinetics/model.pyx
Expand Up @@ -31,7 +31,6 @@
This module contains base classes that represent various rate coefficient
models.
"""
from __future__ import division

import numpy as np
cimport numpy as np
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/kinetics/surface.pyx
Expand Up @@ -27,8 +27,6 @@
# #
###############################################################################

from __future__ import division

import numpy as np
cimport numpy as np
from libc.math cimport exp, sqrt
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/kinetics/tunneling.pyx
Expand Up @@ -32,8 +32,6 @@ This module contains classes representing various models of tunneling through
a reaction barrier.
"""

from __future__ import division

import logging

import cython
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/kinetics/uncertainties.pyx
Expand Up @@ -32,8 +32,6 @@
This module contains information related to kinetic uncertainties
"""

from __future__ import division

import numpy as np
cimport numpy as np

Expand Down
1 change: 0 additions & 1 deletion rmgpy/molecule/converter.py
Expand Up @@ -31,7 +31,6 @@
"""
This module provides methods for converting molecules between RMG, RDKit, and OpenBabel.
"""
from __future__ import print_function

import logging
import sys
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/molecule/draw.py
Expand Up @@ -46,8 +46,6 @@
"""

from __future__ import division

import logging
import math
import os.path
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/molecule/inchi.py
Expand Up @@ -28,8 +28,6 @@
# #
###############################################################################

from __future__ import division

import itertools
import re
import warnings
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/molecule/isomorphismTest.py
Expand Up @@ -28,8 +28,6 @@
# #
###############################################################################

from __future__ import division

import itertools
import logging

Expand Down
7 changes: 1 addition & 6 deletions rmgpy/molecule/molecule.py
Expand Up @@ -36,17 +36,12 @@
describe the corresponding atom or bond.
"""

from __future__ import division

import itertools
import logging
import os
from collections import OrderedDict, defaultdict
from copy import deepcopy
try:
from urllib.parse import quote # py3
except ImportError:
from urllib import quote # py2
from urllib.parse import quote

import cython
import numpy as np
Expand Down
5 changes: 1 addition & 4 deletions rmgpy/molecule/pathfinder.py
Expand Up @@ -33,10 +33,7 @@
The paths generally consist of alternating atoms and bonds.
"""
import itertools
try:
from queue import Queue # py3
except ImportError:
from Queue import Queue # py2
from queue import Queue

import cython

Expand Down
2 changes: 0 additions & 2 deletions rmgpy/molecule/resonanceTest.py
Expand Up @@ -28,8 +28,6 @@
# #
###############################################################################

from __future__ import division

import unittest

from external.wip import work_in_progress
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/molecule/symmetry.py
Expand Up @@ -32,8 +32,6 @@
This module provides functionality for estimating the symmetry number of a
molecule from its chemical graph representation.
"""
from __future__ import division

import itertools


Expand Down
2 changes: 0 additions & 2 deletions rmgpy/pdep/collisionTest.py
Expand Up @@ -31,8 +31,6 @@
"""
This module contains unit tests of the :mod:`rmgpy.pdep.collision` module.
"""
from __future__ import division

import unittest

from rmgpy.pdep.collision import SingleExponentialDown
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/pdep/network.py
Expand Up @@ -32,8 +32,6 @@
This module contains the :class:`Network` class, a representation of a
pressure-dependent unimolecular reaction network
"""
from __future__ import division

import logging
import math

Expand Down
2 changes: 0 additions & 2 deletions rmgpy/qm/molecule.py
Expand Up @@ -28,8 +28,6 @@
# #
###############################################################################

from __future__ import division

import logging
import math
import os
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/quantity.py
Expand Up @@ -33,8 +33,6 @@
particularly the :class:`Quantity` class for representing physical quantities.
"""

from __future__ import division

import logging

import cython
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/quantityTest.py
Expand Up @@ -31,8 +31,6 @@
"""
This script contains unit tests of the :mod:`rmgpy.quantity` module.
"""
from __future__ import print_function

import unittest

import numpy as np
Expand Down
7 changes: 1 addition & 6 deletions rmgpy/reaction.py
Expand Up @@ -40,17 +40,12 @@
representing a set of chemical reactions and the species involved.
"""

from __future__ import division

import logging
import math
import os.path
from copy import deepcopy
from functools import reduce
try:
from urllib.parse import quote # py3
except ImportError:
from urllib import quote # py2
from urllib.parse import quote

import cython
import numpy as np
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/reactionTest.py
Expand Up @@ -32,8 +32,6 @@
This module contains unit tests of the rmgpy.reaction module.
"""

from __future__ import division

import unittest

import cantera as ct
Expand Down
1 change: 0 additions & 1 deletion rmgpy/rmg/main.py
Expand Up @@ -32,7 +32,6 @@
This module contains the main execution functionality for Reaction Mechanism
Generator (RMG).
"""
from __future__ import print_function

import copy
import gc
Expand Down
1 change: 0 additions & 1 deletion rmgpy/rmg/model.py
Expand Up @@ -31,7 +31,6 @@
"""
Contains classes for working with the reaction model generated by RMG.
"""
from __future__ import print_function

import gc
import itertools
Expand Down
2 changes: 0 additions & 2 deletions rmgpy/solver/liquidTest.py
Expand Up @@ -28,8 +28,6 @@
# #
###############################################################################

from __future__ import division

import os
import unittest

Expand Down

0 comments on commit 91cdd1d

Please sign in to comment.