gdrift 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gdrift-0.1.0/.gitattributes +0 -0
- gdrift-0.1.0/.github/workflows/docs.yml +131 -0
- gdrift-0.1.0/.github/workflows/lint.yml +25 -0
- gdrift-0.1.0/.github/workflows/publish.yml +146 -0
- gdrift-0.1.0/.github/workflows/test_firedrake.yml +60 -0
- gdrift-0.1.0/.gitignore +187 -0
- gdrift-0.1.0/.zenodo.json +36 -0
- gdrift-0.1.0/CITATION.cff +20 -0
- gdrift-0.1.0/LICENSE +21 -0
- gdrift-0.1.0/Makefile +19 -0
- gdrift-0.1.0/PKG-INFO +52 -0
- gdrift-0.1.0/README.md +5 -0
- gdrift-0.1.0/docs/CNAME +1 -0
- gdrift-0.1.0/docs/api.md +131 -0
- gdrift-0.1.0/docs/assets/images/logo.svg +61 -0
- gdrift-0.1.0/docs/assets/images/thumbnails/gadopt_loading_field.png +0 -0
- gdrift-0.1.0/docs/assets/stylesheets/extra.css +139 -0
- gdrift-0.1.0/docs/citation.md +17 -0
- gdrift-0.1.0/docs/data-catalog.md +35 -0
- gdrift-0.1.0/docs/examples/index.md +65 -0
- gdrift-0.1.0/docs/index.md +50 -0
- gdrift-0.1.0/docs/overrides/.gitkeep +0 -0
- gdrift-0.1.0/examples/Makefile +57 -0
- gdrift-0.1.0/examples/TerraMT512vs.dat +257 -0
- gdrift-0.1.0/examples/anelasticity_corrections/Makefile +23 -0
- gdrift-0.1.0/examples/anelasticity_corrections/demo.py +243 -0
- gdrift-0.1.0/examples/anelasticity_corrections/expected.pkl +0 -0
- gdrift-0.1.0/examples/anelasticity_corrections/generate_expected.py +77 -0
- gdrift-0.1.0/examples/anelasticity_corrections/generate_thumbnail.py +58 -0
- gdrift-0.1.0/examples/anelasticity_corrections/test_demo.py +65 -0
- gdrift-0.1.0/examples/gadopt_loading_field/Makefile +24 -0
- gdrift-0.1.0/examples/gadopt_loading_field/demo.py +247 -0
- gdrift-0.1.0/examples/gadopt_loading_field/expected.pkl +0 -0
- gdrift-0.1.0/examples/gadopt_loading_field/generate_expected.py +48 -0
- gdrift-0.1.0/examples/gadopt_loading_field/test_demo.py +96 -0
- gdrift-0.1.0/examples/geodynamic_adiabat/Makefile +23 -0
- gdrift-0.1.0/examples/geodynamic_adiabat/demo.py +196 -0
- gdrift-0.1.0/examples/geodynamic_adiabat/expected.pkl +0 -0
- gdrift-0.1.0/examples/geodynamic_adiabat/generate_expected.py +66 -0
- gdrift-0.1.0/examples/geodynamic_adiabat/generate_thumbnail.py +60 -0
- gdrift-0.1.0/examples/geodynamic_adiabat/test_demo.py +89 -0
- gdrift-0.1.0/examples/linearisation/Makefile +23 -0
- gdrift-0.1.0/examples/linearisation/demo.py +215 -0
- gdrift-0.1.0/examples/linearisation/expected.pkl +0 -0
- gdrift-0.1.0/examples/linearisation/generate_expected.py +92 -0
- gdrift-0.1.0/examples/linearisation/generate_thumbnail.py +70 -0
- gdrift-0.1.0/examples/linearisation/test_demo.py +106 -0
- gdrift-0.1.0/examples/mantle_solidus/Makefile +23 -0
- gdrift-0.1.0/examples/mantle_solidus/demo.py +144 -0
- gdrift-0.1.0/examples/mantle_solidus/expected.pkl +0 -0
- gdrift-0.1.0/examples/mantle_solidus/generate_expected.py +82 -0
- gdrift-0.1.0/examples/mantle_solidus/generate_thumbnail.py +60 -0
- gdrift-0.1.0/examples/mantle_solidus/test_demo.py +88 -0
- gdrift-0.1.0/examples/temperature_to_vs/Makefile +23 -0
- gdrift-0.1.0/examples/temperature_to_vs/demo.py +310 -0
- gdrift-0.1.0/examples/temperature_to_vs/expected.pkl +0 -0
- gdrift-0.1.0/examples/temperature_to_vs/generate_expected.py +117 -0
- gdrift-0.1.0/examples/temperature_to_vs/generate_thumbnail.py +81 -0
- gdrift-0.1.0/examples/temperature_to_vs/test_demo.py +96 -0
- gdrift-0.1.0/examples/tomography_models/Makefile +15 -0
- gdrift-0.1.0/examples/tomography_models/demo.py +217 -0
- gdrift-0.1.0/examples/tomography_models/generate_thumbnail.py +58 -0
- gdrift-0.1.0/gdrift/__init__.py +134 -0
- gdrift-0.1.0/gdrift/_version.py +34 -0
- gdrift-0.1.0/gdrift/adiabat.py +172 -0
- gdrift-0.1.0/gdrift/anelasticity.py +550 -0
- gdrift-0.1.0/gdrift/constants.py +34 -0
- gdrift-0.1.0/gdrift/datasetnames.py +434 -0
- gdrift-0.1.0/gdrift/datasets.json +1969 -0
- gdrift-0.1.0/gdrift/earthmodel3d.py +589 -0
- gdrift-0.1.0/gdrift/gplates/__init__.py +8 -0
- gdrift-0.1.0/gdrift/gplates/coastlines.py +178 -0
- gdrift-0.1.0/gdrift/io.py +372 -0
- gdrift-0.1.0/gdrift/metadata.py +375 -0
- gdrift-0.1.0/gdrift/mineralogy.py +975 -0
- gdrift-0.1.0/gdrift/profile.py +597 -0
- gdrift-0.1.0/gdrift/seismic.py +147 -0
- gdrift-0.1.0/gdrift/utility.py +671 -0
- gdrift-0.1.0/gdrift.egg-info/PKG-INFO +52 -0
- gdrift-0.1.0/gdrift.egg-info/SOURCES.txt +111 -0
- gdrift-0.1.0/gdrift.egg-info/dependency_links.txt +1 -0
- gdrift-0.1.0/gdrift.egg-info/requires.txt +28 -0
- gdrift-0.1.0/gdrift.egg-info/top_level.txt +1 -0
- gdrift-0.1.0/mkdocs.yml +103 -0
- gdrift-0.1.0/pyproject.toml +104 -0
- gdrift-0.1.0/requirements.txt +10 -0
- gdrift-0.1.0/scripts/apply_metadata_enrichment.py +326 -0
- gdrift-0.1.0/scripts/apply_new_model_metadata.py +177 -0
- gdrift-0.1.0/scripts/batch_convert_slb.py +126 -0
- gdrift-0.1.0/scripts/convert_hefesto_to_hdf5.py +678 -0
- gdrift-0.1.0/scripts/convert_llnl_jps.py +186 -0
- gdrift-0.1.0/scripts/convert_reveal_wendland.py +216 -0
- gdrift-0.1.0/scripts/convert_seismic_models.py +1084 -0
- gdrift-0.1.0/scripts/convert_slb_to_hdf5.py +517 -0
- gdrift-0.1.0/scripts/enrich_datasets_metadata.py +563 -0
- gdrift-0.1.0/scripts/fix_seismic_units.py +130 -0
- gdrift-0.1.0/scripts/generate_data_catalog.py +416 -0
- gdrift-0.1.0/scripts/generate_thumbnails.py +67 -0
- gdrift-0.1.0/scripts/generate_tomography_gallery.py +481 -0
- gdrift-0.1.0/scripts/upload_singlepart.py +84 -0
- gdrift-0.1.0/scripts/upload_to_s3.py +115 -0
- gdrift-0.1.0/setup.cfg +11 -0
- gdrift-0.1.0/tests/test_adiabat.py +74 -0
- gdrift-0.1.0/tests/test_anelasticity.py +251 -0
- gdrift-0.1.0/tests/test_data_management.py +132 -0
- gdrift-0.1.0/tests/test_hash.py +7 -0
- gdrift-0.1.0/tests/test_interpolation_kernels.py +132 -0
- gdrift-0.1.0/tests/test_metadata_consistency.py +263 -0
- gdrift-0.1.0/tests/test_profile.py +78 -0
- gdrift-0.1.0/tests/test_regional_seismic.py +166 -0
- gdrift-0.1.0/tests/test_server_hashes.py +60 -0
- gdrift-0.1.0/tests/test_thermodynamic_models.py +240 -0
|
File without changes
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
name: Deploy Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
# Sets permissions for GitHub Pages deployment
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
pages: write
|
|
13
|
+
id-token: write
|
|
14
|
+
|
|
15
|
+
# Allow only one concurrent deployment
|
|
16
|
+
concurrency:
|
|
17
|
+
group: "pages"
|
|
18
|
+
cancel-in-progress: false
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
# Build and deploy documentation
|
|
22
|
+
build-and-deploy:
|
|
23
|
+
name: Build and deploy docs
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
container:
|
|
26
|
+
image: firedrakeproject/firedrake-vanilla-default:dev-main
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- name: Install system dependencies
|
|
30
|
+
run: |
|
|
31
|
+
apt-get update
|
|
32
|
+
apt-get install -y python3-venv libgeos-dev libproj-dev proj-data
|
|
33
|
+
git config --global --add safe.directory $GITHUB_WORKSPACE
|
|
34
|
+
|
|
35
|
+
- name: Checkout repository
|
|
36
|
+
uses: actions/checkout@v4
|
|
37
|
+
with:
|
|
38
|
+
fetch-depth: 0
|
|
39
|
+
|
|
40
|
+
- name: Set up virtual environment
|
|
41
|
+
run: |
|
|
42
|
+
python3 -m venv --system-site-packages .venv
|
|
43
|
+
. .venv/bin/activate
|
|
44
|
+
pip install --upgrade pip
|
|
45
|
+
|
|
46
|
+
- name: Install gadopt
|
|
47
|
+
run: |
|
|
48
|
+
. .venv/bin/activate
|
|
49
|
+
pip install git+https://github.com/g-adopt/g-adopt.git
|
|
50
|
+
|
|
51
|
+
- name: Install gdrift and docs dependencies
|
|
52
|
+
run: |
|
|
53
|
+
. .venv/bin/activate
|
|
54
|
+
pip install -e ".[docs,examples]"
|
|
55
|
+
|
|
56
|
+
- name: Install Jupyter kernel
|
|
57
|
+
run: |
|
|
58
|
+
. .venv/bin/activate
|
|
59
|
+
python -m ipykernel install --prefix .venv --name python3
|
|
60
|
+
|
|
61
|
+
- name: Prepare demo data and notebooks
|
|
62
|
+
working-directory: examples
|
|
63
|
+
run: |
|
|
64
|
+
. $GITHUB_WORKSPACE/.venv/bin/activate
|
|
65
|
+
make all
|
|
66
|
+
env:
|
|
67
|
+
MPLBACKEND: Agg
|
|
68
|
+
|
|
69
|
+
- name: Generate thumbnails
|
|
70
|
+
run: |
|
|
71
|
+
. .venv/bin/activate
|
|
72
|
+
python scripts/generate_thumbnails.py
|
|
73
|
+
env:
|
|
74
|
+
MPLBACKEND: Agg
|
|
75
|
+
|
|
76
|
+
- name: Copy notebooks to docs
|
|
77
|
+
run: |
|
|
78
|
+
for demo in mantle_solidus anelasticity_corrections geodynamic_adiabat linearisation tomography_models temperature_to_vs gadopt_loading_field; do
|
|
79
|
+
if [ -f "examples/${demo}/demo.ipynb" ]; then
|
|
80
|
+
mkdir -p "docs/examples/${demo}"
|
|
81
|
+
cp "examples/${demo}/demo.ipynb" "docs/examples/${demo}/demo.ipynb"
|
|
82
|
+
echo "Copied ${demo}/demo.ipynb"
|
|
83
|
+
fi
|
|
84
|
+
done
|
|
85
|
+
|
|
86
|
+
- name: Generate Data Catalog
|
|
87
|
+
run: |
|
|
88
|
+
. .venv/bin/activate
|
|
89
|
+
python scripts/generate_data_catalog.py
|
|
90
|
+
|
|
91
|
+
- name: Generate Tomography Gallery
|
|
92
|
+
run: |
|
|
93
|
+
. .venv/bin/activate
|
|
94
|
+
python scripts/generate_tomography_gallery.py
|
|
95
|
+
env:
|
|
96
|
+
MPLBACKEND: Agg
|
|
97
|
+
timeout-minutes: 30
|
|
98
|
+
|
|
99
|
+
- name: Verify generated files
|
|
100
|
+
run: |
|
|
101
|
+
test -f docs/data-catalog-generated.md || { echo "FAIL: data-catalog-generated.md not found"; exit 1; }
|
|
102
|
+
test -f docs/data-catalog-incomplete.md || { echo "FAIL: data-catalog-incomplete.md not found"; exit 1; }
|
|
103
|
+
test -f docs/tomography-gallery-generated.md || { echo "FAIL: tomography-gallery-generated.md not found"; exit 1; }
|
|
104
|
+
test -d docs/assets/images/tomography || { echo "FAIL: tomography image directory not found"; exit 1; }
|
|
105
|
+
test -f docs/assets/images/tomography/reference_cross_section.png || { echo "FAIL: reference map not found"; exit 1; }
|
|
106
|
+
for demo in mantle_solidus anelasticity_corrections geodynamic_adiabat linearisation tomography_models temperature_to_vs; do
|
|
107
|
+
test -f "docs/assets/images/thumbnails/${demo}.png" || { echo "FAIL: thumbnail ${demo}.png not found"; exit 1; }
|
|
108
|
+
done
|
|
109
|
+
for demo in mantle_solidus anelasticity_corrections geodynamic_adiabat linearisation tomography_models temperature_to_vs gadopt_loading_field; do
|
|
110
|
+
test -f "docs/examples/${demo}/demo.ipynb" || { echo "FAIL: notebook ${demo}/demo.ipynb not found"; exit 1; }
|
|
111
|
+
done
|
|
112
|
+
echo "OK: All generated files present"
|
|
113
|
+
|
|
114
|
+
- name: Build documentation
|
|
115
|
+
run: |
|
|
116
|
+
. .venv/bin/activate
|
|
117
|
+
mkdocs build --strict
|
|
118
|
+
env:
|
|
119
|
+
MPLBACKEND: Agg
|
|
120
|
+
|
|
121
|
+
- name: Setup Pages
|
|
122
|
+
uses: actions/configure-pages@v4
|
|
123
|
+
|
|
124
|
+
- name: Upload Pages artifact
|
|
125
|
+
uses: actions/upload-pages-artifact@v3
|
|
126
|
+
with:
|
|
127
|
+
path: site/
|
|
128
|
+
|
|
129
|
+
- name: Deploy to GitHub Pages
|
|
130
|
+
id: deployment
|
|
131
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Run lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
linter:
|
|
10
|
+
name: "Run linter"
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
16
|
+
- name: Setup Python
|
|
17
|
+
uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: '3.10'
|
|
20
|
+
- name: Install linter
|
|
21
|
+
run: |
|
|
22
|
+
python3 -m pip install flake8
|
|
23
|
+
- name: Lint
|
|
24
|
+
run: |
|
|
25
|
+
make lint
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
name: Run tests before publishing
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
container:
|
|
13
|
+
image: firedrakeproject/firedrake-vanilla-default:dev-main
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
OMP_NUM_THREADS: 1
|
|
17
|
+
MPLBACKEND: Agg
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Install system dependencies
|
|
21
|
+
run: |
|
|
22
|
+
apt-get update
|
|
23
|
+
apt-get install -y python3-venv
|
|
24
|
+
git config --global --add safe.directory $GITHUB_WORKSPACE
|
|
25
|
+
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0
|
|
29
|
+
|
|
30
|
+
- name: Set up virtual environment
|
|
31
|
+
run: |
|
|
32
|
+
python3 -m venv --system-site-packages .venv
|
|
33
|
+
. .venv/bin/activate
|
|
34
|
+
pip install --upgrade pip
|
|
35
|
+
|
|
36
|
+
- name: Install gadopt
|
|
37
|
+
run: |
|
|
38
|
+
. .venv/bin/activate
|
|
39
|
+
pip install git+https://github.com/g-adopt/g-adopt.git
|
|
40
|
+
|
|
41
|
+
- name: Install gdrift
|
|
42
|
+
run: |
|
|
43
|
+
. .venv/bin/activate
|
|
44
|
+
pip install -e .
|
|
45
|
+
pip install matplotlib pytest boto3
|
|
46
|
+
|
|
47
|
+
- name: Run unit tests
|
|
48
|
+
run: |
|
|
49
|
+
. .venv/bin/activate
|
|
50
|
+
python -m pytest tests/ -v --maxfail=5 --tb=short
|
|
51
|
+
|
|
52
|
+
build:
|
|
53
|
+
name: Build distribution
|
|
54
|
+
needs: test
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@v4
|
|
59
|
+
with:
|
|
60
|
+
fetch-depth: 0
|
|
61
|
+
|
|
62
|
+
- uses: actions/setup-python@v5
|
|
63
|
+
with:
|
|
64
|
+
python-version: "3.12"
|
|
65
|
+
|
|
66
|
+
- name: Install build tools
|
|
67
|
+
run: pip install build setuptools-scm
|
|
68
|
+
|
|
69
|
+
- name: Build sdist and wheel
|
|
70
|
+
run: python -m build
|
|
71
|
+
|
|
72
|
+
- name: Verify version matches tag
|
|
73
|
+
run: |
|
|
74
|
+
TAG="${GITHUB_REF#refs/tags/v}"
|
|
75
|
+
WHEEL=$(ls dist/*.whl)
|
|
76
|
+
WHEEL_VERSION=$(python -c "import re, sys; m=re.search(r'gdrift-([^-]+)-', sys.argv[1]); print(m.group(1))" "$WHEEL")
|
|
77
|
+
echo "Tag version: $TAG"
|
|
78
|
+
echo "Wheel version: $WHEEL_VERSION"
|
|
79
|
+
if [ "$TAG" != "$WHEEL_VERSION" ]; then
|
|
80
|
+
echo "ERROR: Tag version ($TAG) does not match wheel version ($WHEEL_VERSION)"
|
|
81
|
+
exit 1
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
- uses: actions/upload-artifact@v4
|
|
85
|
+
with:
|
|
86
|
+
name: dist
|
|
87
|
+
path: dist/
|
|
88
|
+
|
|
89
|
+
publish-testpypi:
|
|
90
|
+
name: Publish to TestPyPI
|
|
91
|
+
needs: build
|
|
92
|
+
runs-on: ubuntu-latest
|
|
93
|
+
environment: testpypi
|
|
94
|
+
permissions:
|
|
95
|
+
id-token: write
|
|
96
|
+
|
|
97
|
+
steps:
|
|
98
|
+
- uses: actions/download-artifact@v4
|
|
99
|
+
with:
|
|
100
|
+
name: dist
|
|
101
|
+
path: dist/
|
|
102
|
+
|
|
103
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
104
|
+
with:
|
|
105
|
+
repository-url: https://test.pypi.org/legacy/
|
|
106
|
+
skip-existing: true
|
|
107
|
+
|
|
108
|
+
publish-pypi:
|
|
109
|
+
name: Publish to PyPI
|
|
110
|
+
needs: publish-testpypi
|
|
111
|
+
runs-on: ubuntu-latest
|
|
112
|
+
environment: pypi
|
|
113
|
+
permissions:
|
|
114
|
+
id-token: write
|
|
115
|
+
|
|
116
|
+
steps:
|
|
117
|
+
- uses: actions/download-artifact@v4
|
|
118
|
+
with:
|
|
119
|
+
name: dist
|
|
120
|
+
path: dist/
|
|
121
|
+
|
|
122
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
123
|
+
|
|
124
|
+
github-release:
|
|
125
|
+
name: Create GitHub Release
|
|
126
|
+
needs: publish-pypi
|
|
127
|
+
runs-on: ubuntu-latest
|
|
128
|
+
permissions:
|
|
129
|
+
contents: write
|
|
130
|
+
|
|
131
|
+
steps:
|
|
132
|
+
- uses: actions/checkout@v4
|
|
133
|
+
|
|
134
|
+
- uses: actions/download-artifact@v4
|
|
135
|
+
with:
|
|
136
|
+
name: dist
|
|
137
|
+
path: dist/
|
|
138
|
+
|
|
139
|
+
- name: Create release
|
|
140
|
+
env:
|
|
141
|
+
GH_TOKEN: ${{ github.token }}
|
|
142
|
+
run: |
|
|
143
|
+
gh release create "${{ github.ref_name }}" \
|
|
144
|
+
dist/* \
|
|
145
|
+
--title "${{ github.ref_name }}" \
|
|
146
|
+
--generate-notes
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Test with Firedrake
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: firedrake-${{ github.head_ref || github.run_id }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
name: Unit tests and examples
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
container:
|
|
18
|
+
image: firedrakeproject/firedrake-vanilla-default:dev-main
|
|
19
|
+
|
|
20
|
+
env:
|
|
21
|
+
OMP_NUM_THREADS: 1
|
|
22
|
+
MPLBACKEND: Agg
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- name: Install system dependencies
|
|
26
|
+
run: |
|
|
27
|
+
apt-get update
|
|
28
|
+
apt-get install -y python3-venv
|
|
29
|
+
git config --global --add safe.directory $GITHUB_WORKSPACE
|
|
30
|
+
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
with:
|
|
33
|
+
fetch-depth: 0
|
|
34
|
+
|
|
35
|
+
- name: Set up virtual environment
|
|
36
|
+
run: |
|
|
37
|
+
python3 -m venv --system-site-packages .venv
|
|
38
|
+
. .venv/bin/activate
|
|
39
|
+
pip install --upgrade pip
|
|
40
|
+
|
|
41
|
+
- name: Install gadopt
|
|
42
|
+
run: |
|
|
43
|
+
. .venv/bin/activate
|
|
44
|
+
pip install git+https://github.com/g-adopt/g-adopt.git
|
|
45
|
+
|
|
46
|
+
- name: Install gdrift
|
|
47
|
+
run: |
|
|
48
|
+
. .venv/bin/activate
|
|
49
|
+
pip install -e .
|
|
50
|
+
pip install matplotlib pytest boto3
|
|
51
|
+
|
|
52
|
+
- name: Run unit tests
|
|
53
|
+
run: |
|
|
54
|
+
. .venv/bin/activate
|
|
55
|
+
python -m pytest tests/ -v --maxfail=5 --tb=short
|
|
56
|
+
|
|
57
|
+
- name: Run example demo tests
|
|
58
|
+
run: |
|
|
59
|
+
. .venv/bin/activate
|
|
60
|
+
python -m pytest examples/ -v --maxfail=5 --tb=short
|
gdrift-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# vs code
|
|
2
|
+
.vscode
|
|
3
|
+
|
|
4
|
+
# Byte-compiled / optimized / DLL files
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
|
|
9
|
+
# C extensions
|
|
10
|
+
*.so
|
|
11
|
+
|
|
12
|
+
# Distribution / packaging
|
|
13
|
+
.Python
|
|
14
|
+
build/
|
|
15
|
+
develop-eggs/
|
|
16
|
+
dist/
|
|
17
|
+
downloads/
|
|
18
|
+
eggs/
|
|
19
|
+
.eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
wheels/
|
|
26
|
+
share/python-wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# PyInstaller
|
|
33
|
+
# Usually these files are written by a python script from a template
|
|
34
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
35
|
+
*.manifest
|
|
36
|
+
*.spec
|
|
37
|
+
|
|
38
|
+
# Installer logs
|
|
39
|
+
pip-log.txt
|
|
40
|
+
pip-delete-this-directory.txt
|
|
41
|
+
|
|
42
|
+
# Unit test / coverage reports
|
|
43
|
+
htmlcov/
|
|
44
|
+
.tox/
|
|
45
|
+
.nox/
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
.cache
|
|
49
|
+
nosetests.xml
|
|
50
|
+
coverage.xml
|
|
51
|
+
*.cover
|
|
52
|
+
*.py,cover
|
|
53
|
+
.hypothesis/
|
|
54
|
+
.pytest_cache/
|
|
55
|
+
cover/
|
|
56
|
+
|
|
57
|
+
# Translations
|
|
58
|
+
*.mo
|
|
59
|
+
*.pot
|
|
60
|
+
|
|
61
|
+
# Django stuff:
|
|
62
|
+
*.log
|
|
63
|
+
local_settings.py
|
|
64
|
+
db.sqlite3
|
|
65
|
+
db.sqlite3-journal
|
|
66
|
+
|
|
67
|
+
# Flask stuff:
|
|
68
|
+
instance/
|
|
69
|
+
.webassets-cache
|
|
70
|
+
|
|
71
|
+
# Scrapy stuff:
|
|
72
|
+
.scrapy
|
|
73
|
+
|
|
74
|
+
# Sphinx documentation
|
|
75
|
+
docs/_build/
|
|
76
|
+
|
|
77
|
+
# PyBuilder
|
|
78
|
+
.pybuilder/
|
|
79
|
+
target/
|
|
80
|
+
|
|
81
|
+
# Jupyter Notebook
|
|
82
|
+
.ipynb_checkpoints
|
|
83
|
+
|
|
84
|
+
# IPython
|
|
85
|
+
profile_default/
|
|
86
|
+
ipython_config.py
|
|
87
|
+
|
|
88
|
+
# pyenv
|
|
89
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
90
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
91
|
+
# .python-version
|
|
92
|
+
|
|
93
|
+
# pipenv
|
|
94
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
95
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
96
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
97
|
+
# install all needed dependencies.
|
|
98
|
+
#Pipfile.lock
|
|
99
|
+
|
|
100
|
+
# poetry
|
|
101
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
102
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
103
|
+
# commonly ignored for libraries.
|
|
104
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
105
|
+
#poetry.lock
|
|
106
|
+
|
|
107
|
+
# pdm
|
|
108
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
109
|
+
#pdm.lock
|
|
110
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
111
|
+
# in version control.
|
|
112
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
113
|
+
.pdm.toml
|
|
114
|
+
|
|
115
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
116
|
+
__pypackages__/
|
|
117
|
+
|
|
118
|
+
# Celery stuff
|
|
119
|
+
celerybeat-schedule
|
|
120
|
+
celerybeat.pid
|
|
121
|
+
|
|
122
|
+
# SageMath parsed files
|
|
123
|
+
*.sage.py
|
|
124
|
+
|
|
125
|
+
# Environments
|
|
126
|
+
.env
|
|
127
|
+
.venv
|
|
128
|
+
env/
|
|
129
|
+
venv/
|
|
130
|
+
ENV/
|
|
131
|
+
env.bak/
|
|
132
|
+
venv.bak/
|
|
133
|
+
|
|
134
|
+
# Spyder project settings
|
|
135
|
+
.spyderproject
|
|
136
|
+
.spyproject
|
|
137
|
+
|
|
138
|
+
# Rope project settings
|
|
139
|
+
.ropeproject
|
|
140
|
+
|
|
141
|
+
# mkdocs documentation
|
|
142
|
+
/site
|
|
143
|
+
|
|
144
|
+
# mypy
|
|
145
|
+
.mypy_cache/
|
|
146
|
+
.dmypy.json
|
|
147
|
+
dmypy.json
|
|
148
|
+
|
|
149
|
+
# Pyre type checker
|
|
150
|
+
.pyre/
|
|
151
|
+
|
|
152
|
+
# gdrift data directories (local cache and personal copies)
|
|
153
|
+
gdrift/data/
|
|
154
|
+
gdrift/data-sia/
|
|
155
|
+
gdrift/data-*/
|
|
156
|
+
|
|
157
|
+
# setuptools-scm generated version file
|
|
158
|
+
gdrift/_version.py
|
|
159
|
+
|
|
160
|
+
# pytype static type analyzer
|
|
161
|
+
.pytype/
|
|
162
|
+
|
|
163
|
+
# Cython debug symbols
|
|
164
|
+
cython_debug/
|
|
165
|
+
|
|
166
|
+
# PyCharm
|
|
167
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
168
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
169
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
170
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
171
|
+
#.idea/
|
|
172
|
+
|
|
173
|
+
# Generated notebooks in examples directories
|
|
174
|
+
examples/*/demo.ipynb
|
|
175
|
+
examples/*/*.png
|
|
176
|
+
examples/*/*.pdf
|
|
177
|
+
|
|
178
|
+
# Auto-generated documentation (regenerated in CI)
|
|
179
|
+
docs/data-catalog-generated.md
|
|
180
|
+
docs/data-catalog-incomplete.md
|
|
181
|
+
docs/tomography-gallery-generated.md
|
|
182
|
+
docs/assets/images/tomography/
|
|
183
|
+
|
|
184
|
+
# Enriched manifest (for review before committing)
|
|
185
|
+
gdrift/datasets.json.enriched
|
|
186
|
+
|
|
187
|
+
*.DS_Store
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "gdrift: Geodynamics Data Reformatting and Integration Facilitation Toolkit",
|
|
3
|
+
"description": "A Python package for loading, processing, and converting geodynamic and seismic data used in large-scale mantle convection studies.",
|
|
4
|
+
"creators": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Ghelichkhan, Sia",
|
|
7
|
+
"affiliation": "Australian National University",
|
|
8
|
+
"orcid": "0000-0002-8453-964X"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"license": {
|
|
12
|
+
"id": "MIT"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"geodynamics",
|
|
16
|
+
"seismic tomography",
|
|
17
|
+
"mantle convection",
|
|
18
|
+
"thermodynamics",
|
|
19
|
+
"earth models",
|
|
20
|
+
"Python"
|
|
21
|
+
],
|
|
22
|
+
"related_identifiers": [
|
|
23
|
+
{
|
|
24
|
+
"identifier": "https://github.com/g-adopt/g-drift",
|
|
25
|
+
"relation": "isSupplementTo",
|
|
26
|
+
"scheme": "url"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"identifier": "https://gdrift.gadopt.org",
|
|
30
|
+
"relation": "isDocumentedBy",
|
|
31
|
+
"scheme": "url"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"upload_type": "software",
|
|
35
|
+
"access_right": "open"
|
|
36
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
type: software
|
|
4
|
+
title: "gdrift: Geodynamics Data Reformatting and Integration Facilitation Toolkit"
|
|
5
|
+
version: "0.1.0"
|
|
6
|
+
date-released: "2026-03-24"
|
|
7
|
+
authors:
|
|
8
|
+
- family-names: Ghelichkhan
|
|
9
|
+
given-names: Sia
|
|
10
|
+
email: siavash.ghelichkhan@anu.edu.au
|
|
11
|
+
orcid: "https://orcid.org/0000-0002-8453-964X"
|
|
12
|
+
repository-code: "https://github.com/g-adopt/g-drift"
|
|
13
|
+
url: "https://gdrift.gadopt.org"
|
|
14
|
+
license: MIT
|
|
15
|
+
keywords:
|
|
16
|
+
- geodynamics
|
|
17
|
+
- seismic tomography
|
|
18
|
+
- mantle convection
|
|
19
|
+
- thermodynamics
|
|
20
|
+
- earth models
|
gdrift-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Sia Ghelichkhan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
gdrift-0.1.0/Makefile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.PHONY: lint test longtest longtest_output convert_demos data-catalog enrich-metadata docs
|
|
2
|
+
|
|
3
|
+
lint:
|
|
4
|
+
@echo "Linting module code"
|
|
5
|
+
@python3 -m flake8 gdrift
|
|
6
|
+
@echo "Linting examples and tests"
|
|
7
|
+
@python3 -m flake8 examples tests
|
|
8
|
+
|
|
9
|
+
data-catalog:
|
|
10
|
+
@echo "Generating data catalog documentation"
|
|
11
|
+
@python3 scripts/generate_data_catalog.py
|
|
12
|
+
|
|
13
|
+
enrich-metadata:
|
|
14
|
+
@echo "Enriching dataset metadata from HDF5 files and web search"
|
|
15
|
+
@python3 scripts/enrich_datasets_metadata.py --web-search
|
|
16
|
+
|
|
17
|
+
docs: data-catalog
|
|
18
|
+
@echo "Building documentation with MkDocs"
|
|
19
|
+
@mkdocs build --strict
|
gdrift-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gdrift
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Geodynamics Data Reformatting and Integration Facilitation Toolkit
|
|
5
|
+
Author-email: Sia Ghelichkhani <siavash.ghelichkhan@anu.edu.au>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/g-adopt/g-drift
|
|
8
|
+
Project-URL: Documentation, https://gdrift.gadopt.org
|
|
9
|
+
Project-URL: Repository, https://github.com/g-adopt/g-drift
|
|
10
|
+
Project-URL: Issues, https://github.com/g-adopt/g-drift/issues
|
|
11
|
+
Keywords: geodynamics,seismic tomography,mantle convection,thermodynamics,earth models
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: numpy>=1.20
|
|
23
|
+
Requires-Dist: scipy>=1.7
|
|
24
|
+
Requires-Dist: h5py>=3.0
|
|
25
|
+
Requires-Dist: tqdm>=4.0
|
|
26
|
+
Requires-Dist: boto3>=1.20
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
29
|
+
Requires-Dist: pytest-cov>=3.0; extra == "dev"
|
|
30
|
+
Requires-Dist: black>=22.0; extra == "dev"
|
|
31
|
+
Requires-Dist: flake8>=5.0; extra == "dev"
|
|
32
|
+
Requires-Dist: mypy>=0.990; extra == "dev"
|
|
33
|
+
Provides-Extra: docs
|
|
34
|
+
Requires-Dist: mkdocs>=1.5; extra == "docs"
|
|
35
|
+
Requires-Dist: mkdocs-material>=9.0; extra == "docs"
|
|
36
|
+
Requires-Dist: mkdocstrings[python]>=0.24; extra == "docs"
|
|
37
|
+
Requires-Dist: mkdocs-jupyter<0.26,>=0.24; extra == "docs"
|
|
38
|
+
Provides-Extra: examples
|
|
39
|
+
Requires-Dist: matplotlib>=3.5; extra == "examples"
|
|
40
|
+
Requires-Dist: jupytext>=1.15; extra == "examples"
|
|
41
|
+
Requires-Dist: nbconvert>=7.0; extra == "examples"
|
|
42
|
+
Requires-Dist: ipykernel>=6.0; extra == "examples"
|
|
43
|
+
Requires-Dist: cartopy>=0.21; extra == "examples"
|
|
44
|
+
Provides-Extra: all
|
|
45
|
+
Requires-Dist: gdrift[dev,docs,examples]; extra == "all"
|
|
46
|
+
Dynamic: license-file
|
|
47
|
+
|
|
48
|
+
# GDRIFT — Geodynamics Data Reformatting and Integration Facilitation Toolkit
|
|
49
|
+
|
|
50
|
+
GDRIFT is the data arm of the [G-ADOPT project](https://gadopt.org), designed to serve as a centralized reference for geodynamic data inputs. Many of the datasets used in large-scale mantle convection inversions and forward models exist in scattered locations, lack proper documentation, and don't follow FAIR (Findable, Accessible, Interoperable, Reusable) principles. GDRIFT aims to change that by maintaining a well-curated repository of essential geodynamic inputs—from 1D reference Earth models and seismic tomography data to thermodynamic lookup tables and solidus profiles.
|
|
51
|
+
|
|
52
|
+
For detailed information about available datasets, documentation, and usage examples, visit [gdrift.gadopt.org](https://gdrift.gadopt.org).
|