rupture-generator 2026.10.1__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.
- rupture_generator-2026.10.1/.github/workflows/benchmarks.yml +84 -0
- rupture_generator-2026.10.1/.github/workflows/ci.yml +20 -0
- rupture_generator-2026.10.1/.github/workflows/claude-review.yml +11 -0
- rupture_generator-2026.10.1/.github/workflows/publish-PyPI.yml +115 -0
- rupture_generator-2026.10.1/.github/workflows/vale.yml +54 -0
- rupture_generator-2026.10.1/.gitignore +38 -0
- rupture_generator-2026.10.1/.python-version +1 -0
- rupture_generator-2026.10.1/.vale/config/vocabularies/rupture_generator/accept.txt +49 -0
- rupture_generator-2026.10.1/.vale/ucgmsim/Carry.yml +37 -0
- rupture_generator-2026.10.1/.vale/ucgmsim/DoubleHyphen.yml +21 -0
- rupture_generator-2026.10.1/.vale.ini +76 -0
- rupture_generator-2026.10.1/.yamllint.yml +18 -0
- rupture_generator-2026.10.1/CITATION.cff +26 -0
- rupture_generator-2026.10.1/Cargo.lock +653 -0
- rupture_generator-2026.10.1/Cargo.toml +14 -0
- rupture_generator-2026.10.1/Justfile +49 -0
- rupture_generator-2026.10.1/LICENSE +47 -0
- rupture_generator-2026.10.1/PKG-INFO +265 -0
- rupture_generator-2026.10.1/README.md +235 -0
- rupture_generator-2026.10.1/benchmarks/report.py +191 -0
- rupture_generator-2026.10.1/benchmarks/test_end_to_end.py +64 -0
- rupture_generator-2026.10.1/benchmarks/test_kernels.py +73 -0
- rupture_generator-2026.10.1/crates/kernels/Cargo.toml +27 -0
- rupture_generator-2026.10.1/crates/kernels/src/eikonal.rs +433 -0
- rupture_generator-2026.10.1/crates/kernels/src/field.rs +347 -0
- rupture_generator-2026.10.1/crates/kernels/src/lib.rs +155 -0
- rupture_generator-2026.10.1/crates/kernels/src/pulse.rs +323 -0
- rupture_generator-2026.10.1/crates/kernels/tests/common/mod.rs +158 -0
- rupture_generator-2026.10.1/crates/kernels/tests/eikonal_contract.rs +561 -0
- rupture_generator-2026.10.1/crates/kernels/tests/pulse_contract.rs +391 -0
- rupture_generator-2026.10.1/docs/hero.py +228 -0
- rupture_generator-2026.10.1/docs/images/beavan_slip.png +0 -0
- rupture_generator-2026.10.1/docs/images/rupture_viewer.png +0 -0
- rupture_generator-2026.10.1/docs/images/slip_rise_rake.png +0 -0
- rupture_generator-2026.10.1/examples/alpine_hope.geojson +25 -0
- rupture_generator-2026.10.1/examples/alpine_hope.toml +245 -0
- rupture_generator-2026.10.1/examples/beavan.geojson +12 -0
- rupture_generator-2026.10.1/examples/beavan.toml +250 -0
- rupture_generator-2026.10.1/examples/colombia.geojson +28 -0
- rupture_generator-2026.10.1/examples/colombia.toml +180 -0
- rupture_generator-2026.10.1/examples/crustal.toml +118 -0
- rupture_generator-2026.10.1/examples/from_realisation.py +245 -0
- rupture_generator-2026.10.1/examples/hope.geojson +6 -0
- rupture_generator-2026.10.1/examples/landers.geojson +8 -0
- rupture_generator-2026.10.1/examples/landers.toml +153 -0
- rupture_generator-2026.10.1/examples/northridge.geojson +6 -0
- rupture_generator-2026.10.1/examples/northridge.toml +141 -0
- rupture_generator-2026.10.1/examples/two_faults.geojson +15 -0
- rupture_generator-2026.10.1/examples/two_faults.toml +52 -0
- rupture_generator-2026.10.1/examples/two_faults_segments.toml +45 -0
- rupture_generator-2026.10.1/examples/venezuela.geojson +51 -0
- rupture_generator-2026.10.1/examples/venezuela.toml +160 -0
- rupture_generator-2026.10.1/lefthook.yml +41 -0
- rupture_generator-2026.10.1/pyproject.toml +162 -0
- rupture_generator-2026.10.1/rupture_generator/__init__.py +131 -0
- rupture_generator-2026.10.1/rupture_generator/_kernels.pyi +22 -0
- rupture_generator-2026.10.1/rupture_generator/cli.py +98 -0
- rupture_generator-2026.10.1/rupture_generator/config.py +957 -0
- rupture_generator-2026.10.1/rupture_generator/errors.py +8 -0
- rupture_generator-2026.10.1/rupture_generator/formats/__init__.py +0 -0
- rupture_generator-2026.10.1/rupture_generator/formats/fields.py +261 -0
- rupture_generator-2026.10.1/rupture_generator/formats/srf.py +399 -0
- rupture_generator-2026.10.1/rupture_generator/geometry/__init__.py +28 -0
- rupture_generator-2026.10.1/rupture_generator/geometry/crs.py +177 -0
- rupture_generator-2026.10.1/rupture_generator/geometry/geojson.py +315 -0
- rupture_generator-2026.10.1/rupture_generator/geometry/geometry.py +332 -0
- rupture_generator-2026.10.1/rupture_generator/record.py +143 -0
- rupture_generator-2026.10.1/rupture_generator/rupture/__init__.py +0 -0
- rupture_generator-2026.10.1/rupture_generator/rupture/generator.py +551 -0
- rupture_generator-2026.10.1/rupture_generator/rupture/medium.py +420 -0
- rupture_generator-2026.10.1/rupture_generator/rupture/models.py +1031 -0
- rupture_generator-2026.10.1/rupture_generator/rupture/propagator.py +447 -0
- rupture_generator-2026.10.1/rupture_generator/rupture/realisation.py +231 -0
- rupture_generator-2026.10.1/rupture_generator/rupture/source.py +218 -0
- rupture_generator-2026.10.1/rupture_generator/sampling/__init__.py +38 -0
- rupture_generator-2026.10.1/rupture_generator/sampling/field.py +283 -0
- rupture_generator-2026.10.1/rupture_generator/sampling/norta.py +513 -0
- rupture_generator-2026.10.1/rupture_generator/sampling/von_karman.py +58 -0
- rupture_generator-2026.10.1/rupture_generator/view.py +556 -0
- rupture_generator-2026.10.1/rupture_generator.egg-info/PKG-INFO +265 -0
- rupture_generator-2026.10.1/rupture_generator.egg-info/SOURCES.txt +100 -0
- rupture_generator-2026.10.1/rupture_generator.egg-info/dependency_links.txt +1 -0
- rupture_generator-2026.10.1/rupture_generator.egg-info/entry_points.txt +3 -0
- rupture_generator-2026.10.1/rupture_generator.egg-info/requires.txt +19 -0
- rupture_generator-2026.10.1/rupture_generator.egg-info/scm_file_list.json +96 -0
- rupture_generator-2026.10.1/rupture_generator.egg-info/scm_version.json +8 -0
- rupture_generator-2026.10.1/rupture_generator.egg-info/top_level.txt +1 -0
- rupture_generator-2026.10.1/setup.cfg +4 -0
- rupture_generator-2026.10.1/tests/__init__.py +0 -0
- rupture_generator-2026.10.1/tests/conftest.py +54 -0
- rupture_generator-2026.10.1/tests/test_config.py +283 -0
- rupture_generator-2026.10.1/tests/test_fields.py +126 -0
- rupture_generator-2026.10.1/tests/test_medium.py +90 -0
- rupture_generator-2026.10.1/tests/test_models.py +198 -0
- rupture_generator-2026.10.1/tests/test_numerics.py +202 -0
- rupture_generator-2026.10.1/tests/test_pipeline.py +324 -0
- rupture_generator-2026.10.1/tests/test_propagator.py +171 -0
- rupture_generator-2026.10.1/tests/test_record.py +54 -0
- rupture_generator-2026.10.1/tests/test_srf.py +281 -0
- rupture_generator-2026.10.1/tests/test_validation.py +421 -0
- rupture_generator-2026.10.1/tests/test_view.py +98 -0
- rupture_generator-2026.10.1/uv.lock +1379 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
name: Benchmarks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
pull-requests: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
benchmarks:
|
|
12
|
+
name: Kernels and end to end
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
19
|
+
- uses: Swatinem/rust-cache@v2
|
|
20
|
+
- uses: astral-sh/setup-uv@v5
|
|
21
|
+
with:
|
|
22
|
+
enable-cache: true
|
|
23
|
+
cache-dependency-glob: "**/pyproject.toml"
|
|
24
|
+
|
|
25
|
+
# The base branch runs its own suite, when it has one, so each side is timed
|
|
26
|
+
# by the benchmarks written for its own API. Both run on the same runner, one
|
|
27
|
+
# after the other, which is as close to a like-for-like comparison as a
|
|
28
|
+
# shared runner gives.
|
|
29
|
+
- name: Benchmark the base
|
|
30
|
+
env:
|
|
31
|
+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
32
|
+
run: |
|
|
33
|
+
if git cat-file -e "$BASE_SHA:benchmarks/test_kernels.py" 2>/dev/null; then
|
|
34
|
+
git worktree add ../base "$BASE_SHA"
|
|
35
|
+
cd ../base
|
|
36
|
+
uv sync --all-extras --dev
|
|
37
|
+
uv run --no-sync pytest benchmarks -q --benchmark-json "$GITHUB_WORKSPACE/base.json"
|
|
38
|
+
else
|
|
39
|
+
echo "The base has no benchmark suite; the report shows the head alone."
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
- name: Benchmark the head
|
|
43
|
+
run: |
|
|
44
|
+
uv sync --all-extras --dev
|
|
45
|
+
uv run --no-sync pytest benchmarks -q --benchmark-json head.json
|
|
46
|
+
|
|
47
|
+
- name: Render the report
|
|
48
|
+
env:
|
|
49
|
+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
50
|
+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
51
|
+
run: |
|
|
52
|
+
base=()
|
|
53
|
+
if [ -f base.json ]; then
|
|
54
|
+
base=(--base base.json)
|
|
55
|
+
fi
|
|
56
|
+
uv run --no-sync python benchmarks/report.py head.json "${base[@]}" \
|
|
57
|
+
--head-ref "${HEAD_SHA::7}" --base-ref "${BASE_SHA::7}" > report.md
|
|
58
|
+
cat report.md >> "$GITHUB_STEP_SUMMARY"
|
|
59
|
+
|
|
60
|
+
# One report per pull request, rewritten on each run rather than appended.
|
|
61
|
+
- name: Post the report to the pull request
|
|
62
|
+
env:
|
|
63
|
+
GH_TOKEN: ${{ github.token }}
|
|
64
|
+
PR: ${{ github.event.pull_request.number }}
|
|
65
|
+
REPO: ${{ github.repository }}
|
|
66
|
+
run: |
|
|
67
|
+
marker=$(head -n 1 report.md)
|
|
68
|
+
id=$(gh api "repos/$REPO/issues/$PR/comments" --paginate \
|
|
69
|
+
--jq ".[] | select(.body | startswith(\"$marker\")) | .id" | tail -n 1)
|
|
70
|
+
if [ -n "$id" ]; then
|
|
71
|
+
gh api -X PATCH "repos/$REPO/issues/comments/$id" -F body=@report.md > /dev/null
|
|
72
|
+
else
|
|
73
|
+
gh pr comment "$PR" --repo "$REPO" --body-file report.md
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
- uses: actions/upload-artifact@v4
|
|
77
|
+
if: always()
|
|
78
|
+
with:
|
|
79
|
+
name: benchmarks
|
|
80
|
+
path: |
|
|
81
|
+
head.json
|
|
82
|
+
base.json
|
|
83
|
+
report.md
|
|
84
|
+
if-no-files-found: ignore
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [master]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
ci:
|
|
10
|
+
uses: ucgmsim/meta-ci-action/.github/workflows/ci.yml@v2
|
|
11
|
+
with:
|
|
12
|
+
# npdlint parses the package, which needs the interpreter
|
|
13
|
+
# requires-python names.
|
|
14
|
+
python-version: "3.14"
|
|
15
|
+
# `test` and `vis` are extras and `dev` is a dependency group, so both
|
|
16
|
+
# flags are needed; `vis` brings rerun-sdk, which the viewer tests import.
|
|
17
|
+
uv-extra-args: "--all-extras --dev"
|
|
18
|
+
enable-coverage: true
|
|
19
|
+
cov-package: rupture_generator
|
|
20
|
+
cov-fail-under: 95
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
run-name: Publish Python Package to PyPI for release ${{ github.event.release.tag_name || inputs.tag_name || github.ref_name }}
|
|
3
|
+
|
|
4
|
+
# A published GitHub release builds the wheels and sdist at its tag and uploads them
|
|
5
|
+
# through PyPI's trusted publishing; setuptools-scm takes the version from the tag.
|
|
6
|
+
# The same release is what Zenodo archives.
|
|
7
|
+
on:
|
|
8
|
+
release:
|
|
9
|
+
types: [published]
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
tag_name:
|
|
13
|
+
description: "Git tag to checkout and publish"
|
|
14
|
+
required: false
|
|
15
|
+
type: string
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build-wheels:
|
|
19
|
+
name: Build wheels on ${{ matrix.os }}
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout code
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
with:
|
|
29
|
+
ref: ${{ inputs.tag_name || github.ref }}
|
|
30
|
+
fetch-depth: 0
|
|
31
|
+
|
|
32
|
+
- name: Set up Rust
|
|
33
|
+
uses: dtolnay/rust-toolchain@stable
|
|
34
|
+
|
|
35
|
+
- name: Add macOS Rust targets
|
|
36
|
+
if: runner.os == 'macOS'
|
|
37
|
+
uses: dtolnay/rust-toolchain@stable
|
|
38
|
+
with:
|
|
39
|
+
targets: x86_64-apple-darwin, aarch64-apple-darwin
|
|
40
|
+
|
|
41
|
+
- name: Build wheels
|
|
42
|
+
uses: pypa/cibuildwheel@v4.1.0
|
|
43
|
+
env:
|
|
44
|
+
# requires-python is >=3.14.
|
|
45
|
+
CIBW_BUILD: cp314-*
|
|
46
|
+
CIBW_PRERELEASE_PYTHONS: "True"
|
|
47
|
+
CIBW_SKIP: "*-musllinux_*"
|
|
48
|
+
CIBW_ARCHS_MACOS: "x86_64 arm64"
|
|
49
|
+
CIBW_ARCHS_LINUX: "x86_64"
|
|
50
|
+
CIBW_ARCHS_WINDOWS: "AMD64"
|
|
51
|
+
# cibuildwheel runs the linux versions only inside a
|
|
52
|
+
# container. This means we need to install rust inside that
|
|
53
|
+
# container before we go ahead and build.
|
|
54
|
+
CIBW_BEFORE_ALL_LINUX: >
|
|
55
|
+
curl https://sh.rustup.rs -sSf | sh -s -- -y &&
|
|
56
|
+
source "$HOME/.cargo/env"
|
|
57
|
+
CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin"
|
|
58
|
+
|
|
59
|
+
- name: Store the distribution packages
|
|
60
|
+
uses: actions/upload-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
name: python-package-distributions-${{ matrix.os }}
|
|
63
|
+
path: ./wheelhouse/*.whl
|
|
64
|
+
|
|
65
|
+
build-sdist:
|
|
66
|
+
name: Build source distribution
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
steps:
|
|
69
|
+
- name: Checkout code
|
|
70
|
+
uses: actions/checkout@v4
|
|
71
|
+
with:
|
|
72
|
+
ref: ${{ inputs.tag_name || github.ref }}
|
|
73
|
+
fetch-depth: 0
|
|
74
|
+
|
|
75
|
+
- name: Set up Python
|
|
76
|
+
uses: actions/setup-python@v5
|
|
77
|
+
with:
|
|
78
|
+
python-version: "3.14"
|
|
79
|
+
|
|
80
|
+
- name: Install build
|
|
81
|
+
run: python -m pip install build
|
|
82
|
+
|
|
83
|
+
- name: Build sdist
|
|
84
|
+
run: python -m build --sdist
|
|
85
|
+
|
|
86
|
+
- name: Store the distribution packages
|
|
87
|
+
uses: actions/upload-artifact@v4
|
|
88
|
+
with:
|
|
89
|
+
name: python-package-distributions-sdist
|
|
90
|
+
path: dist/*.tar.gz
|
|
91
|
+
|
|
92
|
+
publish-to-pypi:
|
|
93
|
+
name: Publish to PyPI
|
|
94
|
+
needs:
|
|
95
|
+
- build-wheels
|
|
96
|
+
- build-sdist
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
|
|
99
|
+
environment:
|
|
100
|
+
name: pypi
|
|
101
|
+
url: https://pypi.org/p/rupture-generator
|
|
102
|
+
|
|
103
|
+
permissions:
|
|
104
|
+
id-token: write
|
|
105
|
+
|
|
106
|
+
steps:
|
|
107
|
+
- name: Download all the dists
|
|
108
|
+
uses: actions/download-artifact@v4
|
|
109
|
+
with:
|
|
110
|
+
pattern: python-package-distributions-*
|
|
111
|
+
path: dist
|
|
112
|
+
merge-multiple: true
|
|
113
|
+
|
|
114
|
+
- name: Publish distribution to PyPI
|
|
115
|
+
uses: pypa/gh-action-pypi-publish@v1.13.0
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Vale
|
|
2
|
+
|
|
3
|
+
on: [pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
vale:
|
|
7
|
+
name: Prose lint
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v4
|
|
11
|
+
|
|
12
|
+
- name: Install Vale
|
|
13
|
+
env:
|
|
14
|
+
VALE_VERSION: "3.19.0"
|
|
15
|
+
run: |
|
|
16
|
+
curl -sSfL \
|
|
17
|
+
"https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz" \
|
|
18
|
+
| sudo tar -xz -C /usr/local/bin vale
|
|
19
|
+
vale --version
|
|
20
|
+
|
|
21
|
+
# Fetches the styles named by `Packages` in .vale.ini into StylesPath.
|
|
22
|
+
# The project vocabulary under .vale/config is committed and survives the
|
|
23
|
+
# sync.
|
|
24
|
+
- name: Sync Vale styles
|
|
25
|
+
run: vale sync
|
|
26
|
+
|
|
27
|
+
# `git ls-files` rather than a fixed path list: it picks up new
|
|
28
|
+
# directories on its own and never walks .venv or target/. Rust is in
|
|
29
|
+
# scope alongside Python: the crates under crates/ have as much
|
|
30
|
+
# explanatory prose in them as the Python does.
|
|
31
|
+
#
|
|
32
|
+
# Vale exits 0 when every alert is a warning or a suggestion, so the gate
|
|
33
|
+
# is "Vale printed nothing". Status 2 and above is Vale itself failing.
|
|
34
|
+
- name: Vale
|
|
35
|
+
run: |
|
|
36
|
+
status=0
|
|
37
|
+
vale --output=line $(git ls-files '*.py' '*.md' '*.rs') > alerts.txt || status=$?
|
|
38
|
+
if [ "$status" -gt 1 ]; then
|
|
39
|
+
echo "::error::Vale exited with status $status"
|
|
40
|
+
exit "$status"
|
|
41
|
+
fi
|
|
42
|
+
cat alerts.txt
|
|
43
|
+
count=$(wc -l < alerts.txt)
|
|
44
|
+
if [ "$count" -gt 0 ]; then
|
|
45
|
+
{
|
|
46
|
+
echo "### Vale: $count alert(s)"
|
|
47
|
+
echo '```'
|
|
48
|
+
cat alerts.txt
|
|
49
|
+
echo '```'
|
|
50
|
+
} >> "$GITHUB_STEP_SUMMARY"
|
|
51
|
+
echo "::error::Vale reported $count alert(s)"
|
|
52
|
+
exit 1
|
|
53
|
+
fi
|
|
54
|
+
echo "Vale is clean."
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
|
|
12
|
+
# Rust
|
|
13
|
+
target/
|
|
14
|
+
|
|
15
|
+
# The compiled extensions. Build them with `uv sync --extra test --group dev`.
|
|
16
|
+
# A committed binary goes stale silently: it disagrees with `_kernels.pyi` and with
|
|
17
|
+
# the Rust it claims to be, and no gate can tell -- pytest imports the .so and
|
|
18
|
+
# passes while clippy checks source that never reached it.
|
|
19
|
+
*.so
|
|
20
|
+
*.pyd
|
|
21
|
+
*.dylib
|
|
22
|
+
|
|
23
|
+
# Hypothesis
|
|
24
|
+
.hypothesis/
|
|
25
|
+
|
|
26
|
+
### Vale ###
|
|
27
|
+
# `vale sync` downloads the styles named by `Packages` in .vale.ini into
|
|
28
|
+
# StylesPath. Only the project vocabulary under .vale/config is tracked.
|
|
29
|
+
/.vale/*
|
|
30
|
+
!/.vale/config/
|
|
31
|
+
/.vale/config/*
|
|
32
|
+
!/.vale/config/vocabularies/
|
|
33
|
+
# The repo's own style, alongside the downloaded packages.
|
|
34
|
+
!/.vale/ucgmsim/
|
|
35
|
+
|
|
36
|
+
### Coverage ###
|
|
37
|
+
.coverage
|
|
38
|
+
htmlcov/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Project vocabulary for Vale. One term per line, treated as a regex.
|
|
2
|
+
|
|
3
|
+
# The project and the tools and formats around it
|
|
4
|
+
rupture-generator
|
|
5
|
+
genslip
|
|
6
|
+
SRF
|
|
7
|
+
TOML
|
|
8
|
+
CRS
|
|
9
|
+
GEM
|
|
10
|
+
USGS
|
|
11
|
+
QGIS
|
|
12
|
+
codec
|
|
13
|
+
toolchain
|
|
14
|
+
docstrings
|
|
15
|
+
|
|
16
|
+
# Rupture modelling
|
|
17
|
+
[Ss]ubfaults?
|
|
18
|
+
eikonal
|
|
19
|
+
supershear
|
|
20
|
+
circulant
|
|
21
|
+
NORTA
|
|
22
|
+
von
|
|
23
|
+
|
|
24
|
+
# People and places in the references and examples
|
|
25
|
+
Beroza
|
|
26
|
+
Dieterich
|
|
27
|
+
Graves
|
|
28
|
+
Pitarka
|
|
29
|
+
Landers
|
|
30
|
+
Northridge
|
|
31
|
+
Beavan
|
|
32
|
+
|
|
33
|
+
# British spelling, the house style
|
|
34
|
+
[Cc]entres?
|
|
35
|
+
[Cc]olou?r(?:s|ed|ing)?
|
|
36
|
+
[Mm]etres?
|
|
37
|
+
[Kk]ilometres?
|
|
38
|
+
[Cc]entimetres?
|
|
39
|
+
Darfield
|
|
40
|
+
Mw
|
|
41
|
+
Charing
|
|
42
|
+
pytest
|
|
43
|
+
config
|
|
44
|
+
Heaton
|
|
45
|
+
Hudnut
|
|
46
|
+
Gerstenberger
|
|
47
|
+
Seebeck
|
|
48
|
+
Somerville
|
|
49
|
+
Catia
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: existence
|
|
3
|
+
message: "Figurative 'carry': '%s'. Name what the thing contains, stores, records, sets or applies."
|
|
4
|
+
level: error
|
|
5
|
+
ignorecase: true
|
|
6
|
+
nonword: true
|
|
7
|
+
# `ai-tells.FigurativeCarries` gates on a head-noun list or on a
|
|
8
|
+
# determiner-fronted subject, and by its own account leaves the bare plural
|
|
9
|
+
# subject out because arithmetic prose puts the carry noun in that slot. Four
|
|
10
|
+
# forms go straight through it:
|
|
11
|
+
#
|
|
12
|
+
# Points carry the geometry bare plural subject, no determiner
|
|
13
|
+
# ... the header subject and verb split by a newline
|
|
14
|
+
# carries
|
|
15
|
+
# ... holds column indices and carries coordinated verb, no subject
|
|
16
|
+
# ... the benchmark doesn't carry bare infinitive after an auxiliary
|
|
17
|
+
#
|
|
18
|
+
# This repo has no freight, logistics or biology prose, so it does not need
|
|
19
|
+
# that rule's discrimination: here the word is a smell in every part of speech
|
|
20
|
+
# it has. The tokens below take the verb in all four inflections (finite,
|
|
21
|
+
# infinitive, participle and gerund), the agent noun, and the compound noun.
|
|
22
|
+
#
|
|
23
|
+
# The one sense left alone is the other word spelt the same way: the carry of
|
|
24
|
+
# an adder and the carrier of a modulated signal, both of which name a
|
|
25
|
+
# specific object rather than standing in for "contains". Neither appears in
|
|
26
|
+
# the Python, but the crate under crates/kernels/ is numerics and its FFT code
|
|
27
|
+
# is signal processing, so the exemption is cheap insurance against a docstring
|
|
28
|
+
# that has to say "carry bit".
|
|
29
|
+
tokens:
|
|
30
|
+
# Verb in every inflection, and with it the gerund ("the carrying of state")
|
|
31
|
+
# and the participial adjective ("the carrying dimension").
|
|
32
|
+
- '\bcarr(?:y|ies|ied|ying)\b(?\b)'
|
|
33
|
+
# Noun: the compound, which the token above cannot reach because the `\b`
|
|
34
|
+
# after "carry" fails against the following letter.
|
|
35
|
+
- '\bcarry[-\s]?overs?\b'
|
|
36
|
+
# Agent noun.
|
|
37
|
+
- '\bcarriers?\b(?\b)'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: existence
|
|
3
|
+
message: "ASCII em dash: '%s'. Use a comma, a full stop or parentheses."
|
|
4
|
+
level: error
|
|
5
|
+
nonword: true
|
|
6
|
+
# `ai-tells.DoubleHyphen` matches a bare `--` anywhere, which in a numpydoc
|
|
7
|
+
# docstring means every section underline ("Parameters\n----------") and every
|
|
8
|
+
# `# ---` banner comment. That is why .vale.ini switches it off, and switching
|
|
9
|
+
# it off is what let the ASCII em dash back in.
|
|
10
|
+
#
|
|
11
|
+
# The spaced form is the one that is always punctuation, and it is separable:
|
|
12
|
+
# an underline and a banner are an unbroken run of hyphens, so no whitespace
|
|
13
|
+
# ever sits between them. Requiring whitespace on both sides of exactly two
|
|
14
|
+
# hyphens takes the punctuation and leaves the underlines alone. A CLI flag
|
|
15
|
+
# (`--all-extras`) has no trailing space either, so it stays quiet too, which
|
|
16
|
+
# is the other half of what the upstream rule's message asks for.
|
|
17
|
+
#
|
|
18
|
+
# `ai-tells.EmDashUsage` bans the real em dash as well, so the fix here is the
|
|
19
|
+
# comma, the full stop or the parentheses, not a nicer-looking dash.
|
|
20
|
+
tokens:
|
|
21
|
+
- '\s--\s'
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
StylesPath = .vale
|
|
2
|
+
|
|
3
|
+
# Pinned to a release tag rather than named. A bare name resolves through the
|
|
4
|
+
# Vale package registry to `releases/latest/download`, so `vale sync` fetches
|
|
5
|
+
# whatever the package is on the day the job runs, and CI turns red on a commit
|
|
6
|
+
# that changed nothing. A new ai-tells release can add several rules at once,
|
|
7
|
+
# such as `ConsequenceClause`, `ConsequenceParticiple` and `FigurativeWorth`.
|
|
8
|
+
# Vale derives the style name from the zip filename, so the names under
|
|
9
|
+
# `BasedOnStyles` are unchanged.
|
|
10
|
+
#
|
|
11
|
+
# Bump these on purpose: check the releases pages, raise the tag, run
|
|
12
|
+
# `vale sync`, and fix the prose the new rules find in its own commit.
|
|
13
|
+
Packages = https://github.com/tbhb/vale-ai-tells/releases/download/v1.37.0/ai-tells.zip, https://github.com/vale-cli/proselint/releases/download/v0.3.4/proselint.zip, https://github.com/vale-cli/Google/releases/download/v0.7.1/Google.zip
|
|
14
|
+
|
|
15
|
+
Vocab = rupture_generator
|
|
16
|
+
|
|
17
|
+
[*.md]
|
|
18
|
+
BasedOnStyles = Vale, ai-tells, proselint, Google, ucgmsim
|
|
19
|
+
# Author-year citations, "Beavan et al. (2012)", and units, "spacing (km)".
|
|
20
|
+
Google.Parens = NO
|
|
21
|
+
|
|
22
|
+
# The README's own voice: its walk-through of extending the model speaks to the
|
|
23
|
+
# reader, and its tables list settings in threes.
|
|
24
|
+
[README.md]
|
|
25
|
+
Google.Acronyms = NO
|
|
26
|
+
Google.Latin = NO
|
|
27
|
+
Google.Passive = NO
|
|
28
|
+
Google.We = NO
|
|
29
|
+
ai-tells.EmptyPadding = NO
|
|
30
|
+
ai-tells.FormalRegister = NO
|
|
31
|
+
ai-tells.VerbTricolon = NO
|
|
32
|
+
|
|
33
|
+
[*.{py,rs}]
|
|
34
|
+
BasedOnStyles = ai-tells, proselint, Google, ucgmsim
|
|
35
|
+
|
|
36
|
+
# ---------------------------------------------------------------------------
|
|
37
|
+
# Vale has no reStructuredText or numpydoc parser, and no way to scope a rule
|
|
38
|
+
# inside a source file: TokenIgnores, BlockIgnores and `vale off` comments all
|
|
39
|
+
# apply to markup formats only. So numpydoc section underlines, `name : type`
|
|
40
|
+
# parameter lines, array shapes, doctest blocks and inline literals reach
|
|
41
|
+
# these rules as ordinary prose, and switching the rule off for Python is the
|
|
42
|
+
# only lever available.
|
|
43
|
+
# ---------------------------------------------------------------------------
|
|
44
|
+
|
|
45
|
+
# Section underlines ("Parameters\n----------") and `# ---` comment banners.
|
|
46
|
+
# `ucgmsim.DoubleHyphen` takes the spaced form this leaves behind, which is
|
|
47
|
+
# the one that is always punctuation.
|
|
48
|
+
ai-tells.DoubleHyphen = NO
|
|
49
|
+
# The `name : type` parameter lines every numpydoc docstring is made of.
|
|
50
|
+
ai-tells.ColonUsage = NO
|
|
51
|
+
# Array shapes `(n_dip, n_strike)`, call signatures and the units that qualify
|
|
52
|
+
# almost every quantity: "spacing (km)".
|
|
53
|
+
Google.Parens = NO
|
|
54
|
+
# A dotted name reads as a missing space after a period: "'d.D' should have
|
|
55
|
+
# one space" for `np.ndarray`.
|
|
56
|
+
Google.Spacing = NO
|
|
57
|
+
# The abbreviations are the vocabulary of the field: SRF, CRS, FFT, NORTA,
|
|
58
|
+
# Mw. The rule wants each spelled out in the file that uses
|
|
59
|
+
# it, which per-module reference docs cannot do.
|
|
60
|
+
Google.Acronyms = NO
|
|
61
|
+
# Leading axes elided in array shapes, `(..., 3)`, and elided arguments in
|
|
62
|
+
# prose and doctests.
|
|
63
|
+
Google.Ellipses = NO
|
|
64
|
+
proselint.Typography = NO
|
|
65
|
+
# Punctuation next to a backticked identifier, as in `config["geometry"]`.
|
|
66
|
+
Google.Quotes = NO
|
|
67
|
+
# TODO, FIXME and NOTE are code annotations, not prose left unfinished.
|
|
68
|
+
proselint.Annotations = NO
|
|
69
|
+
|
|
70
|
+
# ---------------------------------------------------------------------------
|
|
71
|
+
# Domain vocabulary that general-prose rules read as figure of speech.
|
|
72
|
+
# ---------------------------------------------------------------------------
|
|
73
|
+
|
|
74
|
+
# "shape" is the array dimension tuple, which the rule's own guidance names as
|
|
75
|
+
# an exemption.
|
|
76
|
+
ai-tells.FigurativeShape = NO
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# yamllint's defaults are written for hand-authored documents, and every YAML
|
|
2
|
+
# file in this repo but the hook and Vale configs is a GitHub Actions workflow.
|
|
3
|
+
# Without this the pre-push yamllint hook fires on the workflows for things
|
|
4
|
+
# Actions requires.
|
|
5
|
+
extends: default
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
# Workflows are not multi-document streams and GitHub does not want a
|
|
9
|
+
# leading `---`.
|
|
10
|
+
document-start: disable
|
|
11
|
+
# `on:` is the Actions trigger key, not the YAML 1.1 boolean `on`.
|
|
12
|
+
truthy:
|
|
13
|
+
check-keys: false
|
|
14
|
+
# Job names, URLs, action refs and ${{ }} expressions do not wrap, so the
|
|
15
|
+
# limit leaves room for them.
|
|
16
|
+
line-length:
|
|
17
|
+
max: 140
|
|
18
|
+
allow-non-breakable-words: true
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
type: software
|
|
4
|
+
title: "rupture_generator: kinematic earthquake rupture generation"
|
|
5
|
+
abstract: >-
|
|
6
|
+
Generates kinematic earthquake rupture models on multi-segment fault systems
|
|
7
|
+
described in GeoJSON, and writes them as Standard Rupture Format files.
|
|
8
|
+
A port and extension of SCEC BBP's genslip.
|
|
9
|
+
authors:
|
|
10
|
+
- family-names: Faulkner
|
|
11
|
+
given-names: Jake
|
|
12
|
+
affiliation: University of Canterbury
|
|
13
|
+
- family-names: Bradley
|
|
14
|
+
given-names: Brendon
|
|
15
|
+
affiliation: University of Canterbury
|
|
16
|
+
- family-names: Pajaro
|
|
17
|
+
given-names: Cesar
|
|
18
|
+
affiliation: University of Canterbury
|
|
19
|
+
repository-code: "https://github.com/ucgmsim/rupture_generator"
|
|
20
|
+
url: "https://github.com/ucgmsim/rupture_generator"
|
|
21
|
+
license: MIT
|
|
22
|
+
keywords:
|
|
23
|
+
- earthquake
|
|
24
|
+
- kinematic rupture
|
|
25
|
+
- ground motion simulation
|
|
26
|
+
- standard rupture format
|