Skip to content

Commit

Permalink
Add __all__ to __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cpalfonso committed Nov 8, 2023
1 parent 5f775a3 commit 1b42c6a
Showing 1 changed file with 35 additions and 15 deletions.
50 changes: 35 additions & 15 deletions gplately/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,26 +163,24 @@

__version__ = "1.1"

import plate_model_manager

from . import (
data,
download,
geometry,
gpml,
grids,
read_geometries,
reconstruction,
plot,
oceans,
plot,
pygplates,
read_geometries,
reconstruction,
)

from .data import DataCollection
from .download import DataServer
from .grids import (
Raster,
# TimeRaster,
)
from .grids import Raster
from .read_geometries import get_valid_geometries, get_geometries
from .plot import PlotTopologies
from .reconstruction import (
Expand All @@ -202,11 +200,33 @@
"_ReconstructByTopologies": False,
}

try:
import plate_model_manager
except ImportError:
print("The plate_model_manager is not installed, installing it now!")
import subprocess
import sys

subprocess.call([sys.executable, "-m", "pip", "install", "plate-model-manager"])
__all__ = [
# Modules
"data",
"download",
"geometry",
"gpml",
"grids",
"oceans",
"plot",
"pygplates",
"read_geometries",
"reconstruction",
"plate_model_manager",
# Classes
"DataCollection",
"DataServer",
"PlateReconstruction",
"PlotTopologies",
"Points",
"Raster",
"SeafloorGrid",
"_ContinentCollision",
"_DefaultCollision",
"_ReconstructByTopologies",
# Functions
"get_geometries",
"get_valid_geometries",
# Constants
"EARTH_RADIUS",
]

0 comments on commit 1b42c6a

Please sign in to comment.