GPlates / gplately

GPlately is a Python package to interrogate tectonic plate reconstructions.
https://gplates.github.io/gplately/
GNU General Public License v2.0
56 stars 13 forks source link

pygplate.py #176

Closed michaelchin closed 4 months ago

michaelchin commented 4 months ago

@brmather @lauren-ilano @laurilano

At the beginning of this file, we can see the comments below.

""" A light wrapping of some pyGPlates classes to keep track of filenames.

Each object listed here will have a self.filenames attribute. """

I can understand tracking filenames for RotationModel and FeatureCollection. But why can Feature be associated with "filenames"?

Another question, is the code in this file completed? It seems to me that the pygplate.py is unfinished and not ready to be used yet.

brmather commented 4 months ago

I can understand tracking filenames for RotationModel and FeatureCollection. But why can Feature be associated with "filenames"?

Can you create a pygplates.feature from a filename? If not, we can probably delete this function.

Another question, is the code in this file completed? It seems to me that the pygplate.py is unfinished and not ready to be used yet.

I haven't wrapped all the pygplates functions to include a filename, just the main ones. Since pygplates is imported in the namespace all the existing pygplates functions in there will be accessible. i.e.

from gplately import pygplates

will have a complete set of pygplates functions, with RotationModel and FeatureCollection being overwritten to include filenames for parallelism.

The next release of pygplates will support pickling (and therefore parallel support), so once that's released we can remove our light modification of pygplates objects and enforce the pygplates version in project.toml.

jcannon-gplates commented 4 months ago

The next release of pygplates will support pickling (and therefore parallel support), so once that's released we can remove our light modification of pygplates objects and enforce the pygplates version in project.toml.

Good idea. It won't be long until the next pygplates release.