pyStrata 0.5.3__tar.gz → 0.6.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.
- pystrata-0.6.0/.coveragerc +10 -0
- pystrata-0.6.0/.editorconfig +22 -0
- pystrata-0.6.0/.git-blame-ignore-revs +4 -0
- pystrata-0.6.0/.github/dependabot.yml +33 -0
- pystrata-0.6.0/.github/workflows/dependabot-auto-merge.yml +70 -0
- pystrata-0.6.0/.github/workflows/docs.yml +19 -0
- pystrata-0.6.0/.github/workflows/interop.yml +63 -0
- pystrata-0.6.0/.github/workflows/linter.yml +17 -0
- pystrata-0.6.0/.github/workflows/pre-commit.yml +16 -0
- pystrata-0.6.0/.github/workflows/python-app.yml +39 -0
- pystrata-0.6.0/.github/workflows/python-publish.yml +33 -0
- pystrata-0.6.0/.github/workflows/updater.yaml +25 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/.gitignore +8 -0
- pystrata-0.6.0/.pre-commit-config.yaml +42 -0
- pystrata-0.6.0/.prettierignore +8 -0
- pystrata-0.6.0/.prettierrc +4 -0
- pystrata-0.6.0/.readthedocs.yaml +23 -0
- pystrata-0.6.0/CHANGELOG.md +291 -0
- pystrata-0.6.0/CLAUDE.md +86 -0
- pystrata-0.6.0/CONTRIBUTING.md +209 -0
- pystrata-0.6.0/DOC_PROMPT.md +69 -0
- pystrata-0.6.0/MANIFEST.in +5 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/Makefile +1 -2
- pystrata-0.6.0/PKG-INFO +99 -0
- pystrata-0.6.0/README.md +48 -0
- pystrata-0.6.0/TODO.md +4 -0
- pystrata-0.6.0/bench/benchmark_numba.py +191 -0
- pystrata-0.6.0/docs/Makefile +200 -0
- pystrata-0.6.0/docs/_static/custom.css +77 -0
- pystrata-0.6.0/docs/api/dam.rst +137 -0
- pystrata-0.6.0/docs/api/generic.rst +19 -0
- pystrata-0.6.0/docs/api/index.rst +114 -0
- pystrata-0.6.0/docs/api/logic_tree.rst +39 -0
- pystrata-0.6.0/docs/api/motion.rst +52 -0
- pystrata-0.6.0/docs/api/output.rst +58 -0
- pystrata-0.6.0/docs/api/propagation.rst +50 -0
- pystrata-0.6.0/docs/api/runner.rst +20 -0
- pystrata-0.6.0/docs/api/site.rst +74 -0
- pystrata-0.6.0/docs/api/tools.rst +31 -0
- pystrata-0.6.0/docs/api/units.rst +15 -0
- pystrata-0.6.0/docs/api/variation.rst +99 -0
- pystrata-0.6.0/docs/changelog.rst +2 -0
- pystrata-0.6.0/docs/conf.py +104 -0
- pystrata-0.6.0/docs/developer-guide/contributing.rst +2 -0
- pystrata-0.6.0/docs/examples/example-01.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-02.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-03.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-04.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-05.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-06.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-07.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-08.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-09.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-10.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-11.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-12.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-13.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-14.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-15.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-16.nblink +3 -0
- pystrata-0.6.0/docs/examples/example-17.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-18.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-19.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-20.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-21.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-22.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-23.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-24.nblink +1 -0
- pystrata-0.6.0/docs/examples/example-25.nblink +1 -0
- pystrata-0.6.0/docs/examples/index.rst +141 -0
- pystrata-0.6.0/docs/getting-started/index.rst +9 -0
- pystrata-0.6.0/docs/getting-started/installation.rst +158 -0
- pystrata-0.6.0/docs/getting-started/introduction.rst +105 -0
- pystrata-0.6.0/docs/getting-started/quickstart.rst +259 -0
- pystrata-0.6.0/docs/index.rst +85 -0
- pystrata-0.6.0/docs/make.bat +263 -0
- pystrata-0.6.0/docs/references.rst +98 -0
- pystrata-0.6.0/docs/refs.bib +342 -0
- pystrata-0.6.0/docs/theory/index.rst +65 -0
- pystrata-0.6.0/docs/theory/nonlinear_models.rst +191 -0
- pystrata-0.6.0/docs/theory/site_response.rst +161 -0
- pystrata-0.6.0/docs/theory/uncertainty.rst +143 -0
- pystrata-0.6.0/docs/theory/wave_propagation.rst +161 -0
- pystrata-0.6.0/docs/user-guide/calculations.rst +156 -0
- pystrata-0.6.0/docs/user-guide/dams.rst +75 -0
- pystrata-0.6.0/docs/user-guide/index.rst +158 -0
- pystrata-0.6.0/docs/user-guide/logic_trees.rst +134 -0
- pystrata-0.6.0/docs/user-guide/motions.rst +165 -0
- pystrata-0.6.0/docs/user-guide/outputs.rst +255 -0
- pystrata-0.6.0/docs/user-guide/parallel.rst +119 -0
- pystrata-0.6.0/docs/user-guide/profiles.rst +173 -0
- pystrata-0.6.0/docs/user-guide/variation.rst +86 -0
- pystrata-0.6.0/examples/README.md +6 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/examples/data/NIS090.AT2 +1 -1
- pystrata-0.6.0/examples/data/ncm_example.json.gz +0 -0
- pystrata-0.6.0/examples/example-01.ipynb +483 -0
- pystrata-0.6.0/examples/example-02.ipynb +333 -0
- pystrata-0.6.0/examples/example-03.ipynb +511 -0
- pystrata-0.6.0/examples/example-04.ipynb +462 -0
- pystrata-0.6.0/examples/example-05.ipynb +253 -0
- pystrata-0.6.0/examples/example-06.ipynb +323 -0
- pystrata-0.6.0/examples/example-07.ipynb +290 -0
- pystrata-0.6.0/examples/example-08.ipynb +1421 -0
- pystrata-0.6.0/examples/example-09.ipynb +386 -0
- pystrata-0.6.0/examples/example-10.ipynb +181 -0
- pystrata-0.6.0/examples/example-11.ipynb +517 -0
- pystrata-0.6.0/examples/example-12.ipynb +533 -0
- pystrata-0.6.0/examples/example-13.ipynb +330 -0
- pystrata-0.6.0/examples/example-14.ipynb +1457 -0
- pystrata-0.6.0/examples/example-15.ipynb +1050 -0
- pystrata-0.6.0/examples/example-16.ipynb +897 -0
- pystrata-0.6.0/examples/example-17.ipynb +425 -0
- pystrata-0.6.0/examples/example-18.ipynb +526 -0
- pystrata-0.6.0/examples/example-19.ipynb +522 -0
- pystrata-0.6.0/examples/example-20.ipynb +559 -0
- pystrata-0.6.0/examples/example-21.ipynb +876 -0
- pystrata-0.6.0/examples/example-22.ipynb +602 -0
- pystrata-0.6.0/examples/example-23.ipynb +572 -0
- pystrata-0.6.0/examples/example-24.ipynb +397 -0
- pystrata-0.6.0/examples/example-25.ipynb +876 -0
- pystrata-0.6.0/examples/site_response_logic_tree.json +124 -0
- pystrata-0.6.0/pyproject.toml +167 -0
- pystrata-0.6.0/pytest.ini +2 -0
- pystrata-0.6.0/scripts.sh +63 -0
- pystrata-0.6.0/setup.cfg +4 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/setup.py +0 -1
- pystrata-0.6.0/src/pyStrata.egg-info/PKG-INFO +99 -0
- pystrata-0.6.0/src/pyStrata.egg-info/SOURCES.txt +201 -0
- pystrata-0.6.0/src/pyStrata.egg-info/dependency_links.txt +1 -0
- pystrata-0.6.0/src/pyStrata.egg-info/requires.txt +41 -0
- pystrata-0.6.0/src/pyStrata.egg-info/scm_file_list.json +197 -0
- pystrata-0.6.0/src/pyStrata.egg-info/scm_version.json +8 -0
- pystrata-0.6.0/src/pyStrata.egg-info/top_level.txt +1 -0
- pystrata-0.6.0/src/pystrata/__init__.py +170 -0
- pystrata-0.6.0/src/pystrata/_contracts.py +41 -0
- pystrata-0.6.0/src/pystrata/_version.py +24 -0
- pystrata-0.6.0/src/pystrata/dam/__init__.py +58 -0
- pystrata-0.6.0/src/pystrata/dam/analytical.py +311 -0
- pystrata-0.6.0/src/pystrata/dam/canyon.py +178 -0
- pystrata-0.6.0/src/pystrata/dam/model.py +527 -0
- pystrata-0.6.0/src/pystrata/dam/propagation.py +558 -0
- pystrata-0.6.0/src/pystrata/dam/sliding.py +278 -0
- pystrata-0.6.0/src/pystrata/data/aaa21-profiles.json.gz +0 -0
- pystrata-0.6.0/src/pystrata/data/boore-et-al-2011.csv.gz +0 -0
- pystrata-0.6.0/src/pystrata/data/boore-joyner-97-hard_rock.csv.gz +0 -0
- pystrata-0.6.0/src/pystrata/factories.py +426 -0
- pystrata-0.6.0/src/pystrata/generic.py +270 -0
- pystrata-0.6.0/src/pystrata/logic_tree.py +768 -0
- pystrata-0.6.0/src/pystrata/motion.py +691 -0
- pystrata-0.6.0/src/pystrata/output.py +1466 -0
- pystrata-0.6.0/src/pystrata/propagation.py +1580 -0
- pystrata-0.6.0/src/pystrata/runner.py +358 -0
- pystrata-0.6.0/src/pystrata/site.py +1757 -0
- pystrata-0.6.0/src/pystrata/tools.py +563 -0
- pystrata-0.6.0/src/pystrata/units.py +141 -0
- pystrata-0.6.0/src/pystrata/variation.py +1597 -0
- pystrata-0.6.0/tests/contracts_test.py +23 -0
- pystrata-0.6.0/tests/dam_canyon_test.py +250 -0
- pystrata-0.6.0/tests/dam_sliding_test.py +271 -0
- pystrata-0.6.0/tests/dam_test.py +525 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/data/2516b_a.smc +13 -13
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/data/NIS090.AT2 +1 -1
- pystrata-0.6.0/tests/data/profiles/profile-00000.csv.gz +0 -0
- pystrata-0.6.0/tests/data/profiles/profile-00001.csv.gz +0 -0
- pystrata-0.6.0/tests/data/profiles/profile-00002.csv.gz +0 -0
- pystrata-0.6.0/tests/data/profiles/profile-00003.csv.gz +0 -0
- pystrata-0.6.0/tests/data/profiles/profile-00004.csv.gz +0 -0
- pystrata-0.6.0/tests/data/profiles/profile-00005.csv.gz +0 -0
- pystrata-0.6.0/tests/data/profiles/profile-00006.csv.gz +0 -0
- pystrata-0.6.0/tests/data/profiles/profile-00007.csv.gz +0 -0
- pystrata-0.6.0/tests/data/profiles/profile-00008.csv.gz +0 -0
- pystrata-0.6.0/tests/data/profiles/profile-00009.csv.gz +0 -0
- pystrata-0.6.0/tests/data/test_logic_tree.json +226 -0
- pystrata-0.6.0/tests/dispersion_test.py +209 -0
- pystrata-0.6.0/tests/factories_test.py +186 -0
- pystrata-0.6.0/tests/kappa_test.py +319 -0
- pystrata-0.6.0/tests/logic_tree_test.py +507 -0
- pystrata-0.6.0/tests/motion_test.py +200 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/notebooks_test.py +17 -18
- pystrata-0.6.0/tests/output_test.py +605 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/propagation_test.py +285 -17
- pystrata-0.6.0/tests/runner_test.py +263 -0
- pystrata-0.6.0/tests/site_test.py +441 -0
- pystrata-0.6.0/tests/test_pygmm_interop.py +107 -0
- pystrata-0.6.0/tests/tools_test.py +150 -0
- pystrata-0.6.0/tests/units_test.py +157 -0
- pystrata-0.6.0/tests/variation_test.py +712 -0
- pystrata-0.6.0/uv.lock +2915 -0
- pystrata-0.5.3/CONTRIBUTING.md +0 -105
- pystrata-0.5.3/HISTORY.md +0 -82
- pystrata-0.5.3/MANIFEST.in +0 -6
- pystrata-0.5.3/PKG-INFO +0 -112
- pystrata-0.5.3/README.md +0 -91
- pystrata-0.5.3/examples/README.md +0 -22
- pystrata-0.5.3/examples/example-01.ipynb +0 -483
- pystrata-0.5.3/examples/example-02.ipynb +0 -355
- pystrata-0.5.3/examples/example-03.ipynb +0 -529
- pystrata-0.5.3/examples/example-04.ipynb +0 -242
- pystrata-0.5.3/examples/example-05.ipynb +0 -210
- pystrata-0.5.3/examples/example-06.ipynb +0 -349
- pystrata-0.5.3/examples/example-07.ipynb +0 -334
- pystrata-0.5.3/examples/example-08.ipynb +0 -1358
- pystrata-0.5.3/examples/example-09.ipynb +0 -411
- pystrata-0.5.3/examples/example-10.ipynb +0 -222
- pystrata-0.5.3/examples/example-11.ipynb +0 -524
- pystrata-0.5.3/examples/example-12.ipynb +0 -545
- pystrata-0.5.3/examples/example-13.ipynb +0 -331
- pystrata-0.5.3/examples/example-14.ipynb +0 -1353
- pystrata-0.5.3/examples/example-15.ipynb +0 -342
- pystrata-0.5.3/pyproject.toml +0 -90
- pystrata-0.5.3/pytest.ini +0 -4
- pystrata-0.5.3/requirements.txt +0 -16
- pystrata-0.5.3/requirements_dev.txt +0 -21
- pystrata-0.5.3/requirements_rtfd.txt +0 -13
- pystrata-0.5.3/runtime.txt +0 -1
- pystrata-0.5.3/src/pystrata/__init__.py +0 -38
- pystrata-0.5.3/src/pystrata/motion.py +0 -367
- pystrata-0.5.3/src/pystrata/output.py +0 -832
- pystrata-0.5.3/src/pystrata/propagation.py +0 -690
- pystrata-0.5.3/src/pystrata/site.py +0 -1422
- pystrata-0.5.3/src/pystrata/tools.py +0 -299
- pystrata-0.5.3/src/pystrata/variation.py +0 -929
- pystrata-0.5.3/tests/motion_test.py +0 -96
- pystrata-0.5.3/tests/output_test.py +0 -59
- pystrata-0.5.3/tests/site_test.py +0 -230
- pystrata-0.5.3/tests/variation_test.py +0 -245
- {pystrata-0.5.3 → pystrata-0.6.0}/AUTHORS.md +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/LICENSE +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/data/approach_3.xlsx +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/examples/data/best100_GM_linux.txt +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/src/pystrata/data/published_curves.toml +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/__init__.py +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/data/ChiChi.txt +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/data/ds-example-2a-le.xlsx +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/data/ds-example-4-eql.xlsx +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/data/ds-example-5-eql.xlsx +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/data/kishida_2009.json +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/data/nrattle.ctl +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/data/qwl_tests.json +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/data/test_nrattle_02mar12.nrattle_amps4plot.out +0 -0
- {pystrata-0.5.3 → pystrata-0.6.0}/tests/data/test_nrattle_02mar12.nrattle_complex_spectra.out +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# http://editorconfig.org
|
|
2
|
+
|
|
3
|
+
root = true
|
|
4
|
+
|
|
5
|
+
[*]
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 4
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
charset = utf-8
|
|
11
|
+
end_of_line = lf
|
|
12
|
+
max_line_length = 79
|
|
13
|
+
|
|
14
|
+
[*.bat]
|
|
15
|
+
indent_style = tab
|
|
16
|
+
end_of_line = crlf
|
|
17
|
+
|
|
18
|
+
[LICENSE]
|
|
19
|
+
insert_final_newline = false
|
|
20
|
+
|
|
21
|
+
[Makefile]
|
|
22
|
+
indent_style = tab
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
updates:
|
|
4
|
+
# Python dependencies, resolved through uv.lock.
|
|
5
|
+
#
|
|
6
|
+
# Security updates are enabled separately in the repository settings and
|
|
7
|
+
# only cover direct dependencies with a known advisory. Most of this
|
|
8
|
+
# project's alerts are against transitive packages pinned in uv.lock
|
|
9
|
+
# (mistune and bleach via nbconvert, starlette and tornado via the docs
|
|
10
|
+
# server, pillow via matplotlib), which are only bumped when the lock file
|
|
11
|
+
# itself is refreshed -- that is what these version updates do.
|
|
12
|
+
- package-ecosystem: "uv"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "weekly"
|
|
16
|
+
day: "sunday"
|
|
17
|
+
open-pull-requests-limit: 10
|
|
18
|
+
commit-message:
|
|
19
|
+
prefix: "deps"
|
|
20
|
+
groups:
|
|
21
|
+
# One pull request per week for the routine bumps, rather than one
|
|
22
|
+
# per package. Majors stay ungrouped so they are reviewed on their
|
|
23
|
+
# own.
|
|
24
|
+
production:
|
|
25
|
+
dependency-type: "production"
|
|
26
|
+
update-types:
|
|
27
|
+
- "minor"
|
|
28
|
+
- "patch"
|
|
29
|
+
development:
|
|
30
|
+
dependency-type: "development"
|
|
31
|
+
update-types:
|
|
32
|
+
- "minor"
|
|
33
|
+
- "patch"
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Merges Dependabot's grouped development-dependency updates once every check
|
|
2
|
+
# on the pull request has passed. Production dependencies and major bumps are
|
|
3
|
+
# left for manual review, so nothing that ships to users merges unreviewed.
|
|
4
|
+
#
|
|
5
|
+
# The CI gate is implemented here rather than through branch protection with
|
|
6
|
+
# required status checks, because that would also refuse direct pushes to the
|
|
7
|
+
# branch until checks pass.
|
|
8
|
+
|
|
9
|
+
name: Dependabot auto-merge
|
|
10
|
+
|
|
11
|
+
# Both workflows run on a pull request. Triggering on either means whichever
|
|
12
|
+
# finishes last sees a fully green commit; the earlier one finds the other
|
|
13
|
+
# still running and does nothing.
|
|
14
|
+
on:
|
|
15
|
+
workflow_run:
|
|
16
|
+
workflows: ["Python application", "Lint with Ruff"]
|
|
17
|
+
types: [completed]
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: write
|
|
21
|
+
pull-requests: write
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
auto-merge:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
if: >
|
|
27
|
+
github.event.workflow_run.conclusion == 'success' &&
|
|
28
|
+
github.event.workflow_run.event == 'pull_request' &&
|
|
29
|
+
github.event.workflow_run.actor.login == 'dependabot[bot]'
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- name: Merge when every check has passed
|
|
33
|
+
env:
|
|
34
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
35
|
+
REPO: ${{ github.repository }}
|
|
36
|
+
SHA: ${{ github.event.workflow_run.head_sha }}
|
|
37
|
+
BRANCH: ${{ github.event.workflow_run.head_branch }}
|
|
38
|
+
run: |
|
|
39
|
+
set -euo pipefail
|
|
40
|
+
|
|
41
|
+
# Only the grouped development updates merge on their own. The
|
|
42
|
+
# group name is defined in .github/dependabot.yml and appears
|
|
43
|
+
# in the branch Dependabot creates.
|
|
44
|
+
case "$BRANCH" in
|
|
45
|
+
dependabot/*/development-*) ;;
|
|
46
|
+
*)
|
|
47
|
+
echo "Branch $BRANCH is not the development group; leaving for review."
|
|
48
|
+
exit 0
|
|
49
|
+
;;
|
|
50
|
+
esac
|
|
51
|
+
|
|
52
|
+
pr=$(gh api "repos/$REPO/commits/$SHA/pulls" --jq '.[0].number // empty')
|
|
53
|
+
if [ -z "$pr" ]; then
|
|
54
|
+
echo "No pull request found for $SHA."
|
|
55
|
+
exit 0
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# One workflow finishing does not mean the commit is green.
|
|
59
|
+
unfinished=$(gh api "repos/$REPO/commits/$SHA/check-runs" --paginate \
|
|
60
|
+
--jq '[.check_runs[]
|
|
61
|
+
| select(.status != "completed"
|
|
62
|
+
or (.conclusion | IN("success", "skipped", "neutral") | not))]
|
|
63
|
+
| length')
|
|
64
|
+
if [ "$unfinished" -ne 0 ]; then
|
|
65
|
+
echo "$unfinished check(s) still running or not successful; not merging."
|
|
66
|
+
exit 0
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
echo "All checks passed; merging #$pr."
|
|
70
|
+
gh pr merge "$pr" --repo "$REPO" --squash --delete-branch
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Build docs
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
docs:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v7.0.1
|
|
10
|
+
- name: Install uv
|
|
11
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
12
|
+
with:
|
|
13
|
+
version: "latest"
|
|
14
|
+
# nbsphinx converts the notebooks with pandoc
|
|
15
|
+
- name: Install pandoc
|
|
16
|
+
run: sudo apt-get update && sudo apt-get install -y pandoc
|
|
17
|
+
# Warnings are errors, so that broken references and markup are caught
|
|
18
|
+
- name: Build the documentation
|
|
19
|
+
run: uv run --extra docs sphinx-build -b html -W --keep-going docs docs/_build/html
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Interop
|
|
2
|
+
|
|
3
|
+
# Test this package against the development branches of its siblings. They
|
|
4
|
+
# depend on each other (pystrata on pyrvt, pygmm on pyrotd, and their tests on
|
|
5
|
+
# each other), and the locked releases on PyPI lag the development branches.
|
|
6
|
+
on: [push, pull_request]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
interop:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Check out this repository
|
|
13
|
+
uses: actions/checkout@v7.0.1
|
|
14
|
+
with:
|
|
15
|
+
path: ${{ github.event.repository.name }}
|
|
16
|
+
fetch-depth: 0
|
|
17
|
+
- name: Check out pystrata (development branch)
|
|
18
|
+
if: github.event.repository.name != 'pystrata'
|
|
19
|
+
uses: actions/checkout@v7.0.1
|
|
20
|
+
with:
|
|
21
|
+
repository: arkottke/pystrata
|
|
22
|
+
ref: dev
|
|
23
|
+
path: pystrata
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
- name: Check out pygmm (development branch)
|
|
26
|
+
if: github.event.repository.name != 'pygmm'
|
|
27
|
+
uses: actions/checkout@v7.0.1
|
|
28
|
+
with:
|
|
29
|
+
repository: arkottke/pygmm
|
|
30
|
+
ref: dev
|
|
31
|
+
path: pygmm
|
|
32
|
+
fetch-depth: 0
|
|
33
|
+
- name: Check out pyrvt (development branch)
|
|
34
|
+
if: github.event.repository.name != 'pyrvt'
|
|
35
|
+
uses: actions/checkout@v7.0.1
|
|
36
|
+
with:
|
|
37
|
+
repository: arkottke/pyrvt
|
|
38
|
+
ref: dev
|
|
39
|
+
path: pyrvt
|
|
40
|
+
fetch-depth: 0
|
|
41
|
+
- name: Check out pyrotd (development branch)
|
|
42
|
+
if: github.event.repository.name != 'pyrotd'
|
|
43
|
+
uses: actions/checkout@v7.0.1
|
|
44
|
+
with:
|
|
45
|
+
repository: arkottke/pyrotd
|
|
46
|
+
ref: dev
|
|
47
|
+
path: pyrotd
|
|
48
|
+
fetch-depth: 0
|
|
49
|
+
- name: Install uv
|
|
50
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
51
|
+
with:
|
|
52
|
+
version: "latest"
|
|
53
|
+
- name: Install the four packages from source
|
|
54
|
+
run: |
|
|
55
|
+
uv venv --python 3.13 .venv
|
|
56
|
+
uv pip install --python .venv/bin/python \
|
|
57
|
+
-e "./pyrvt[cli,test]" -e "./pygmm[slope,test]" \
|
|
58
|
+
-e "./pystrata[test]" -e ./pyrotd pytest-cov
|
|
59
|
+
- name: Test
|
|
60
|
+
# The interop tests are skipped unless the siblings are installed
|
|
61
|
+
run: |
|
|
62
|
+
cd ${{ github.event.repository.name }}
|
|
63
|
+
../.venv/bin/python -m pytest -ra
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Lint with Ruff
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
jobs:
|
|
4
|
+
ruff:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
steps:
|
|
7
|
+
- uses: actions/checkout@v7.0.1
|
|
8
|
+
- name: Install uv
|
|
9
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
10
|
+
with:
|
|
11
|
+
version: "latest"
|
|
12
|
+
- name: Set up Python
|
|
13
|
+
run: uv python install 3.13
|
|
14
|
+
- name: Install dependencies
|
|
15
|
+
run: uv sync --dev
|
|
16
|
+
- name: Run pre-commit on all files
|
|
17
|
+
run: uv run pre-commit run --all-files
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: pre-commit
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
pre-commit:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v7.0.1
|
|
10
|
+
- name: Install uv
|
|
11
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
12
|
+
with:
|
|
13
|
+
version: "latest"
|
|
14
|
+
# The same hooks as a local commit: formatting, whitespace and prettier
|
|
15
|
+
- name: Run pre-commit
|
|
16
|
+
run: uvx pre-commit run --all-files --show-diff-on-failure
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Python application
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
python-version: ["3.13", "3.14"]
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v7.0.1
|
|
14
|
+
- name: Install uv
|
|
15
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
16
|
+
with:
|
|
17
|
+
version: "latest"
|
|
18
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
19
|
+
run: uv python install ${{ matrix.python-version }}
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: |
|
|
22
|
+
uv sync --all-extras --dev
|
|
23
|
+
- name: Lint with ruff
|
|
24
|
+
run: |
|
|
25
|
+
uv run ruff check .
|
|
26
|
+
- name: Format check with ruff
|
|
27
|
+
run: |
|
|
28
|
+
uv run ruff format --check .
|
|
29
|
+
- name: Install package
|
|
30
|
+
run: |
|
|
31
|
+
uv pip install -e .
|
|
32
|
+
- name: Test with pytest
|
|
33
|
+
run: |
|
|
34
|
+
uv run pytest --cov-config=pyproject.toml --cov=pystrata --cov=tests --cov-report xml
|
|
35
|
+
- name: Run codacy-coverage-reporter
|
|
36
|
+
uses: codacy/codacy-coverage-reporter-action@v1.3.0
|
|
37
|
+
with:
|
|
38
|
+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
|
39
|
+
coverage-reports: coverage.xml
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Uploads the package to PyPI when a release is created.
|
|
2
|
+
#
|
|
3
|
+
# Authentication uses PyPI Trusted Publishing: GitHub mints a short-lived OIDC
|
|
4
|
+
# token scoped to this workflow, so there is no long-lived API token stored as
|
|
5
|
+
# a repository secret. The matching publisher is configured on PyPI under the
|
|
6
|
+
# project's Publishing settings and must name this repository and this
|
|
7
|
+
# workflow file.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [created]
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
deploy:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
# Required to mint the OIDC token used for trusted publishing
|
|
22
|
+
id-token: write
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v7.0.1
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
28
|
+
with:
|
|
29
|
+
version: "latest"
|
|
30
|
+
- name: Build
|
|
31
|
+
run: uv build
|
|
32
|
+
- name: Publish to PyPI
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: GitHub Actions Version Updater
|
|
2
|
+
|
|
3
|
+
# Controls when the action will run.
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
|
|
7
|
+
schedule:
|
|
8
|
+
# Automatically run on every Sunday
|
|
9
|
+
- cron: "0 0 * * 0"
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v7.0.1
|
|
17
|
+
with:
|
|
18
|
+
# [Required] Access token with `workflow` scope.
|
|
19
|
+
token: ${{ secrets.UPDATER_TOKEN }}
|
|
20
|
+
|
|
21
|
+
- name: Run GitHub Actions Version Updater
|
|
22
|
+
uses: saadmk11/github-actions-version-updater@v0.9.0
|
|
23
|
+
with:
|
|
24
|
+
# [Required] Access token with `workflow` scope.
|
|
25
|
+
token: ${{ secrets.UPDATER_TOKEN }}
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
.idea/**/dynamic.xml
|
|
20
20
|
.idea/**/uiDesigner.xml
|
|
21
21
|
|
|
22
|
+
.vscode/
|
|
23
|
+
|
|
22
24
|
# Gradle:
|
|
23
25
|
.idea/**/gradle.xml
|
|
24
26
|
.idea/**/libraries
|
|
@@ -122,6 +124,7 @@ target/
|
|
|
122
124
|
|
|
123
125
|
# pyenv
|
|
124
126
|
.python-version
|
|
127
|
+
src/pystrata/_version.py
|
|
125
128
|
|
|
126
129
|
# celery beat schedule file
|
|
127
130
|
celerybeat-schedule
|
|
@@ -185,3 +188,8 @@ tags
|
|
|
185
188
|
references/
|
|
186
189
|
working/
|
|
187
190
|
scratch.*
|
|
191
|
+
|
|
192
|
+
.DS_Store
|
|
193
|
+
|
|
194
|
+
# Local PyPI credentials file
|
|
195
|
+
.pyirc
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Scientific data files are read with fixed-width or exact parsing, so the
|
|
2
|
+
# whitespace and end-of-file hooks must not rewrite them.
|
|
3
|
+
exclude: '^(data/|tests/data/|src/pystrata/data/|examples/data/)'
|
|
4
|
+
repos:
|
|
5
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
6
|
+
# Ruff version.
|
|
7
|
+
rev: v0.15.4
|
|
8
|
+
hooks:
|
|
9
|
+
# Run the formatter.
|
|
10
|
+
- id: ruff-format
|
|
11
|
+
# Run the linter.
|
|
12
|
+
- id: ruff
|
|
13
|
+
args:
|
|
14
|
+
[--fix]
|
|
15
|
+
- repo: https://github.com/PyCQA/docformatter
|
|
16
|
+
rev: v1.7.7
|
|
17
|
+
hooks:
|
|
18
|
+
- id: docformatter
|
|
19
|
+
language_version: python3.12
|
|
20
|
+
args:
|
|
21
|
+
[--in-place, --wrap-summaries=88, --wrap-descriptions=88]
|
|
22
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
23
|
+
rev: v6.0.0
|
|
24
|
+
hooks:
|
|
25
|
+
- id: trailing-whitespace
|
|
26
|
+
- id: check-json
|
|
27
|
+
# Unsafe required for mkdocs.yml format
|
|
28
|
+
- id: check-yaml
|
|
29
|
+
args: [--unsafe]
|
|
30
|
+
- id: check-toml
|
|
31
|
+
- id: end-of-file-fixer
|
|
32
|
+
- id: requirements-txt-fixer
|
|
33
|
+
- repo: local
|
|
34
|
+
hooks:
|
|
35
|
+
# Pinned: the pre-commit mirror only offers 4.0 alphas after 3.1.0, and
|
|
36
|
+
# 4.0.0-alpha.8 hangs. Needs node on PATH.
|
|
37
|
+
- id: prettier
|
|
38
|
+
name: prettier
|
|
39
|
+
entry: prettier --write --ignore-unknown
|
|
40
|
+
language: node
|
|
41
|
+
additional_dependencies: ["prettier@3.9.10"]
|
|
42
|
+
files: \.(md|yml)$
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Read the Docs configuration file
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
version: 2
|
|
4
|
+
|
|
5
|
+
build:
|
|
6
|
+
os: ubuntu-24.04
|
|
7
|
+
tools:
|
|
8
|
+
# The floor of requires-python; see "Version support policy" in CLAUDE.md
|
|
9
|
+
python: "3.13"
|
|
10
|
+
apt_packages:
|
|
11
|
+
# nbsphinx converts the markdown of the example notebooks with pandoc
|
|
12
|
+
- pandoc
|
|
13
|
+
|
|
14
|
+
# The notebooks are not executed (nbsphinx_execute = "never" in docs/conf.py)
|
|
15
|
+
sphinx:
|
|
16
|
+
configuration: docs/conf.py
|
|
17
|
+
|
|
18
|
+
python:
|
|
19
|
+
install:
|
|
20
|
+
- method: pip
|
|
21
|
+
path: .
|
|
22
|
+
extra_requirements:
|
|
23
|
+
- docs
|