GPlates / gplately

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

gplately.pygplates.FeatureCollection is broken #195

Open michaelchin opened 2 weeks ago

michaelchin commented 2 weeks ago
          Hi @michaelchin, 

Maybe we can modify and incorporate this unit test file in the automated Pytest cases.

You should absolutely add these tests to the automated testing. Is there any reason why all these tests are not run automatically using CI?

The reason that the features were not pickled might be because the setstate and getstate functions were not implemented.

I'm just using pygplates.FeatureCollection at this stage. There are still problems:

Screenshot 2024-06-17 at 9 29 36 AM
  1. It looks like filenames has become a global variable, appending multiple filenames from other FeatureCollections. Execute the same cell and the filenames are appended again.
  2. The FeatureCollection is not properly loaded when you specify the filename using the filenames keyword. In my example above, if you set gplot.time=0 and access the gplot.COBs attribute, you get a None.

As far as I can tell this object is completely broken. You should build and example on your machine and test a fix for this thoroughly. I say this because all of the workflows which make use of multiprocessing rely on this working. This is high priority stuff!

Originally posted by @brmather in https://github.com/GPlates/gplately/issues/186#issuecomment-2172704370

michaelchin commented 2 weeks ago

I tried to roll back my changes, but, unfortunately, found the FeatureCollection class was even in worse condition before my code changes. Since the class is very simple and straightforward, I think we should fix it instead of rolling back to a much worse version.

michaelchin commented 2 weeks ago

I rolled back FeatureCollection class code changes to 2d6a98d02866cb4205d0e680087dbc0a75a029fd. All my recent changes on FeatureCollection class have been dropped. Since the new pygplates will come out soon, the gplately/pygplates.py will be removed after the new pygplates release. We should not waste too much time on the FeatureCollection class.

@brmather let me know if the rollback has fixed your problems. Thanks.

michaelchin commented 2 weeks ago

I tried to roll back my changes, but, unfortunately, found the FeatureCollection class was even in worse condition before my code changes. Since the class is very simple and straightforward, I think we should fix it instead of rolling back to a much worse version.

No, we should not waster time to fix the new code. Simply roll back the code changes and wait for new pygplates release to get rid of pygplates.py.

michaelchin commented 1 week ago

Rollback has been completed in 2d6a98d02866cb4205d0e680087dbc0a75a029fd and 25c75cd36448f4bafb0977c6b597c625beb0c6f4. I will close this issue in 7 days if no further problems are reported. Unpin this issue and downgrade the priority to 'medium'.

michaelchin commented 3 days ago

pending close

michaelchin commented 56 minutes ago

wait until 10 July, 2024 for Ben's return