Skip to content

Commit

Permalink
199 sort out various issues in online doc (#204)
Browse files Browse the repository at this point in the history
* test deploy doc action

* update utils/__init__.py

* add PlateModelManager to doc

* fix comments in cleanup_topologies.py

* hide some internal functions from pdoc

* fix license statements

* get rid of pdoc warning messages
  • Loading branch information
michaelchin authored Jun 30, 2024
1 parent 2798165 commit 03f7540
Show file tree
Hide file tree
Showing 49 changed files with 4,373 additions and 2,722 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/deploy_documentation.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Build docs and deploy to GitHub Pages

on:
on:
push:
branches: [update-doc]
branches:
- master
pull_request:
branches:
- master

jobs:
build-and-deploy:
Expand Down Expand Up @@ -40,3 +44,4 @@ jobs:
with:
branch: gh-pages
folder: api/gplately/
target-folder: dev-doc/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ rotation_model, topology_features, static_polygons = gDownload.get_plate_reconst

### The `PlateModelManager` object

... was designed as a substitute of `DataServer` object. The `PlateModelManager` object can be used to download and manage the plate reconstruction model files.
... was introduced as an alternative/substitute to the `DataServer` object. The `PlateModelManager` object can be used to download and manage plate reconstruction models.

```
pm_manager = PlateModelManager()
Expand Down
41 changes: 40 additions & 1 deletion gplately/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
#
# Copyright (C) 2024 The University of Sydney, Australia
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2, as published by
# the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#

"""
![Intro GIF](https://raw.githubusercontent.com/GPlates/gplately/master/Notebooks/NotebookFiles/pdoc_Files/docs_muller19_seed_points.gif)
## Main objects
GPlately's common objects include:
### [DataServer ](https://gplates.github.io/gplately/download.html#gplately.download.DataServer)
### [DataServer](https://gplates.github.io/gplately/download.html#gplately.download.DataServer)
The `DataServer` object automatically downloads and caches files needed for plate reconstructions to a folder in your system.
These plate reconstruction files include rotation models, topology features and static polygons and geometries such as
coastlines, continents and continent-ocean boundaries. Additional data like rasters, grids and feature data can also be installed.
Expand Down Expand Up @@ -52,6 +69,27 @@
------------------
### [PlateModelManager](https://pypi.org/project/plate-model-manager/)
The `PlateModelManager` object was introduced as an alternative/substitute to the `DataServer` object. It can be used to download and manage plate reconstruction models.
```python
pm_manager = PlateModelManager()
model = pm_manager.get_model("Muller2019")
model.set_data_dir("plate-model-repo")
recon_model = PlateReconstruction(
model.get_rotation_model(),
topology_features=model.get_layer("Topologies"),
static_polygons=model.get_layer("StaticPolygons"),
)
gplot = PlotTopologies(
recon_model,
coastlines=model.get_layer("Coastlines"),
COBs=model.get_layer("COBs"),
time=55,
)
```
### [PlateReconstruction](https://gplates.github.io/gplately/reconstruction.html#gplately.reconstruction.PlateReconstruction)
The `PlateReconstruction` object contains tools to reconstruct geological features like tectonic plates and plate boundaries,
and to interrogate plate kinematic data like plate motion velocities, and rates of subduction and seafloor spreading.
Expand Down Expand Up @@ -158,6 +196,7 @@
- [__08 - Predicting Slab Flux__](08-PredictingSlabFlux.html): Predicting the average slab dip angle of subducting oceanic lithosphere.
- [__09 - Motion Paths and Flowlines__](09-CreatingMotionPathsAndFlowlines.html): Using pyGPlates to create motion paths and flowines of points on a tectonic plate to illustrate the plate's trajectory through geological time.
- [__10 - SeafloorGrid__](10-SeafloorGrids.html): Defines the parameters needed to set up a `SeafloorGrid` object, and demonstrates how to produce age and spreading rate grids from a set of plate reconstruction model files.
- [__11 - AndesFluxes__](11-AndesFluxes.html): Demonstrates how the reconstructed subduction history along the Andean margin can be potentially used in the plate kinematics anylysis and data mining.
"""

Expand Down
16 changes: 16 additions & 0 deletions gplately/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# Copyright (C) 2024 The University of Sydney, Australia
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2, as published by
# the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
import argparse
import os
import sys
Expand Down
16 changes: 16 additions & 0 deletions gplately/commands/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright (C) 2024 The University of Sydney, Australia
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2, as published by
# the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
17 changes: 17 additions & 0 deletions gplately/commands/create_age_grids.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2024 The University of Sydney, Australia
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2, as published by
# the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#

import argparse
import datetime
import logging
Expand Down
17 changes: 17 additions & 0 deletions gplately/commands/feature_filter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2024 The University of Sydney, Australia
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2, as published by
# the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#

import abc
import argparse
from typing import List
Expand Down
Loading

0 comments on commit 03f7540

Please sign in to comment.