Skip to content

Commit

Permalink
Add __all__ to __init__.py (#126)
Browse files Browse the repository at this point in the history
* Add __all__ to __init__.py

* Restore pip install for PMM

Keep this check here until the conda-forge distribution is updated with
the plate-model-manager dependency.
  • Loading branch information
cpalfonso authored Nov 8, 2023
1 parent 5f775a3 commit 533a238
Showing 1 changed file with 43 additions and 15 deletions.
58 changes: 43 additions & 15 deletions gplately/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,26 +163,32 @@

__version__ = "1.1"

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"])
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 +208,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 533a238

Please sign in to comment.