GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
768 stars 221 forks source link

GMT_DATASET: Refactor nested classes to improve code readability #3653

Closed seisman closed 6 hours ago

seisman commented 17 hours ago

The GMT_DATASET data structure was originally added in #2729, with nested classes defined like GMT_DATASET->GMT_DATATABLE->GMT_DATASEGMENT.

As initially pointed out in https://github.com/GenericMappingTools/pygmt/pull/2729#discussion_r1390150748, the nested classes are difficult to read and maintain.

This PR moves the GMT_DATATABLE/GMT_DATASEGMENT classes outside of the GMT_DATASET class.