shipgrav 1.0.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.
- shipgrav-1.0.0/.github/test_conda_env.yml +11 -0
- shipgrav-1.0.0/.github/workflows/draft-pdf.yml +24 -0
- shipgrav-1.0.0/.github/workflows/release-publish.yml +119 -0
- shipgrav-1.0.0/.github/workflows/test.yml +68 -0
- shipgrav-1.0.0/.gitignore +7 -0
- shipgrav-1.0.0/.readthedocs.yml +13 -0
- shipgrav-1.0.0/CHANGELOG +10 -0
- shipgrav-1.0.0/CONTRIBUTORS +1 -0
- shipgrav-1.0.0/LICENSE +675 -0
- shipgrav-1.0.0/PKG-INFO +44 -0
- shipgrav-1.0.0/docs/Makefile +20 -0
- shipgrav-1.0.0/docs/_static/SR2312_serial_laptop.png +0 -0
- shipgrav-1.0.0/docs/_static/TN400_FAA.png +0 -0
- shipgrav-1.0.0/docs/_static/TN400_ccp.png +0 -0
- shipgrav-1.0.0/docs/_static/cursor.png +0 -0
- shipgrav-1.0.0/docs/_static/rmba.png +0 -0
- shipgrav-1.0.0/docs/_static/roll_coherence.png +0 -0
- shipgrav-1.0.0/docs/_templates/mynavigation.html +10 -0
- shipgrav-1.0.0/docs/conf.py +62 -0
- shipgrav-1.0.0/docs/index.rst +39 -0
- shipgrav-1.0.0/docs/make.bat +35 -0
- shipgrav-1.0.0/docs/requirements.txt +10 -0
- shipgrav-1.0.0/example-scripts/RMBA_calc.py +232 -0
- shipgrav-1.0.0/example-scripts/dgs_bgm_comp.py +127 -0
- shipgrav-1.0.0/example-scripts/dgs_ccp_calc.py +120 -0
- shipgrav-1.0.0/example-scripts/dgs_raw_comp.py +203 -0
- shipgrav-1.0.0/example-scripts/download_data.sh +79 -0
- shipgrav-1.0.0/example-scripts/interactive_line_pick.py +166 -0
- shipgrav-1.0.0/example-scripts/mru_coherence.py +127 -0
- shipgrav-1.0.0/joss/paper.bib +188 -0
- shipgrav-1.0.0/joss/paper.md +62 -0
- shipgrav-1.0.0/pyproject.toml +30 -0
- shipgrav-1.0.0/readme.md +24 -0
- shipgrav-1.0.0/shipgrav/__init__.py +147 -0
- shipgrav-1.0.0/shipgrav/database.toml +24 -0
- shipgrav-1.0.0/shipgrav/grav.py +1260 -0
- shipgrav-1.0.0/shipgrav/io.py +749 -0
- shipgrav-1.0.0/shipgrav/nav.py +91 -0
- shipgrav-1.0.0/shipgrav/tests/__init__.py +16 -0
- shipgrav-1.0.0/shipgrav/tests/__main__.py +3 -0
- shipgrav-1.0.0/shipgrav/tests/ex_files/AT05_01_bgm.RGS +4 -0
- shipgrav-1.0.0/shipgrav/tests/ex_files/DGStest_laptop.dat +1001 -0
- shipgrav-1.0.0/shipgrav/tests/ex_files/IXBlue.yaml +160 -0
- shipgrav-1.0.0/shipgrav/tests/ex_files/SR2312_dgs_raw.txt +2 -0
- shipgrav-1.0.0/shipgrav/tests/ex_files/SR2312_mru.txt +12 -0
- shipgrav-1.0.0/shipgrav/tests/ex_files/TN400_bgm.Raw +2 -0
- shipgrav-1.0.0/shipgrav/tests/ex_files/TN400_nav.Raw +2 -0
- shipgrav-1.0.0/shipgrav/tests/test_grav_data.py +75 -0
- shipgrav-1.0.0/shipgrav/tests/test_grav_nodata.py +47 -0
- shipgrav-1.0.0/shipgrav/tests/test_io.py +55 -0
- shipgrav-1.0.0/shipgrav/tests/test_nav.py +41 -0
- shipgrav-1.0.0/shipgrav/tests/test_utils.py +33 -0
- shipgrav-1.0.0/shipgrav/utils.py +275 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Draft PDF
|
|
2
|
+
on: [workflow_dispatch]
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
paper:
|
|
6
|
+
runs-on: ubuntu-latest
|
|
7
|
+
name: Paper Draft
|
|
8
|
+
steps:
|
|
9
|
+
- name: Checkout
|
|
10
|
+
uses: actions/checkout@v4
|
|
11
|
+
- name: Build draft PDF
|
|
12
|
+
uses: openjournals/openjournals-draft-action@master
|
|
13
|
+
with:
|
|
14
|
+
journal: joss
|
|
15
|
+
# This should be the path to the paper within your repo.
|
|
16
|
+
paper-path: joss/paper.md
|
|
17
|
+
- name: Upload
|
|
18
|
+
uses: actions/upload-artifact@v4
|
|
19
|
+
with:
|
|
20
|
+
name: paper
|
|
21
|
+
# This is the output path where Pandoc will write the compiled
|
|
22
|
+
# PDF. Note, this should be the same directory as the input
|
|
23
|
+
# paper.md
|
|
24
|
+
path: joss/paper.pdf
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
name: Publish Python 🐍 distribution 📦 to TestPyPI
|
|
2
|
+
|
|
3
|
+
on: push
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
name: Build distribution 📦
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
- name: Set up Python
|
|
13
|
+
uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: "3.x"
|
|
16
|
+
- name: Install pypa/build
|
|
17
|
+
run: >-
|
|
18
|
+
python3 -m
|
|
19
|
+
pip install
|
|
20
|
+
build
|
|
21
|
+
--user
|
|
22
|
+
- name: Build a binary wheel and a source tarball
|
|
23
|
+
run: python3 -m build
|
|
24
|
+
- name: Store the distribution packages
|
|
25
|
+
uses: actions/upload-artifact@v4
|
|
26
|
+
with:
|
|
27
|
+
name: python-package-distributions
|
|
28
|
+
path: dist/
|
|
29
|
+
|
|
30
|
+
publish-to-pypi:
|
|
31
|
+
name: >-
|
|
32
|
+
Publish Python 🐍 distribution 📦 to TestPyPI
|
|
33
|
+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
|
|
34
|
+
needs:
|
|
35
|
+
- build
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
environment:
|
|
38
|
+
name: pypi
|
|
39
|
+
url: https://pypi.org/p/shipgrav
|
|
40
|
+
permissions:
|
|
41
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
42
|
+
|
|
43
|
+
steps:
|
|
44
|
+
- name: Download all the dists
|
|
45
|
+
uses: actions/download-artifact@v4
|
|
46
|
+
with:
|
|
47
|
+
name: python-package-distributions
|
|
48
|
+
path: dist/
|
|
49
|
+
- name: Publish distribution 📦 to PyPI
|
|
50
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
51
|
+
|
|
52
|
+
github-release:
|
|
53
|
+
name: >-
|
|
54
|
+
Sign the Python 🐍 distribution 📦 with Sigstore
|
|
55
|
+
and upload them to GitHub Release
|
|
56
|
+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
|
|
57
|
+
needs:
|
|
58
|
+
- build
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
|
|
61
|
+
permissions:
|
|
62
|
+
contents: write # IMPORTANT: mandatory for making GitHub Releases
|
|
63
|
+
id-token: write # IMPORTANT: mandatory for sigstore
|
|
64
|
+
|
|
65
|
+
steps:
|
|
66
|
+
- name: Download all the dists
|
|
67
|
+
uses: actions/download-artifact@v4
|
|
68
|
+
with:
|
|
69
|
+
name: python-package-distributions
|
|
70
|
+
path: dist/
|
|
71
|
+
- name: Sign the dists with Sigstore
|
|
72
|
+
uses: sigstore/gh-action-sigstore-python@v2.1.1
|
|
73
|
+
with:
|
|
74
|
+
inputs: >-
|
|
75
|
+
./dist/*.tar.gz
|
|
76
|
+
./dist/*.whl
|
|
77
|
+
- name: Create GitHub Release
|
|
78
|
+
env:
|
|
79
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
80
|
+
run: >-
|
|
81
|
+
gh release create
|
|
82
|
+
'${{ github.ref_name }}'
|
|
83
|
+
--repo '${{ github.repository }}'
|
|
84
|
+
--notes ""
|
|
85
|
+
- name: Upload artifact signatures to GitHub Release
|
|
86
|
+
env:
|
|
87
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
88
|
+
# Upload to GitHub Release using the `gh` CLI.
|
|
89
|
+
# `dist/` contains the built packages, and the
|
|
90
|
+
# sigstore-produced signatures and certificates.
|
|
91
|
+
run: >-
|
|
92
|
+
gh release upload
|
|
93
|
+
'${{ github.ref_name }}' dist/**
|
|
94
|
+
--repo '${{ github.repository }}'
|
|
95
|
+
|
|
96
|
+
publish-to-testpypi:
|
|
97
|
+
name: Publish Python 🐍 distribution 📦 to TestPyPI
|
|
98
|
+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
|
|
99
|
+
needs:
|
|
100
|
+
- build
|
|
101
|
+
runs-on: ubuntu-latest
|
|
102
|
+
|
|
103
|
+
environment:
|
|
104
|
+
name: testpypi
|
|
105
|
+
url: https://test.pypi.org/p/shipgrav
|
|
106
|
+
|
|
107
|
+
permissions:
|
|
108
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
109
|
+
|
|
110
|
+
steps:
|
|
111
|
+
- name: Download all the dists
|
|
112
|
+
uses: actions/download-artifact@v4
|
|
113
|
+
with:
|
|
114
|
+
name: python-package-distributions
|
|
115
|
+
path: dist/
|
|
116
|
+
- name: Publish distribution 📦 to TestPyPI
|
|
117
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
118
|
+
with:
|
|
119
|
+
repository-url: https://test.pypi.org/legacy/
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: tests
|
|
2
|
+
on:
|
|
3
|
+
#push:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
pull_request:
|
|
6
|
+
branches:
|
|
7
|
+
# only branches from forks which have the form 'user:branch-name'
|
|
8
|
+
- '**:**'
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: '42 0 * * 6'
|
|
11
|
+
jobs:
|
|
12
|
+
run_tests:
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest]
|
|
17
|
+
python: [3.9, "3.10"]
|
|
18
|
+
add_package: [""]
|
|
19
|
+
continue-on-error: [false]
|
|
20
|
+
include:
|
|
21
|
+
- os: macos-latest
|
|
22
|
+
python: 3.9
|
|
23
|
+
continue-on-error: false
|
|
24
|
+
- os: windows-latest
|
|
25
|
+
python: 3.9
|
|
26
|
+
continue-on-error: false
|
|
27
|
+
- os: ubuntu-latest
|
|
28
|
+
python: 3.9
|
|
29
|
+
add_package: features
|
|
30
|
+
continue-on-error: true
|
|
31
|
+
- os: macos-latest
|
|
32
|
+
python: 3.9
|
|
33
|
+
add_package: features
|
|
34
|
+
continue-on-error: true
|
|
35
|
+
- os: windows-latest
|
|
36
|
+
python: 3.9
|
|
37
|
+
add_package: features
|
|
38
|
+
continue-on-error: true
|
|
39
|
+
runs-on: ${{ matrix.os }}
|
|
40
|
+
continue-on-error: ${{ matrix.continue-on-error }}
|
|
41
|
+
defaults:
|
|
42
|
+
run:
|
|
43
|
+
shell: bash -l {0}
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
- name: Setup conda
|
|
47
|
+
uses: conda-incubator/setup-miniconda@v3
|
|
48
|
+
with:
|
|
49
|
+
python-version: ${{ matrix.python }}
|
|
50
|
+
environment-file: .github/test_conda_env.yml
|
|
51
|
+
- name: print conda environment info
|
|
52
|
+
run: |
|
|
53
|
+
conda info -a
|
|
54
|
+
conda list
|
|
55
|
+
- name: install package
|
|
56
|
+
run: |
|
|
57
|
+
pip install -v --no-deps .
|
|
58
|
+
conda list
|
|
59
|
+
- name: run test suite
|
|
60
|
+
run: |
|
|
61
|
+
mkdir empty; cd empty
|
|
62
|
+
cp -r ../shipgrav/tests/ex_files .
|
|
63
|
+
coverage run --include='*/shipgrav/*' -m shipgrav.tests
|
|
64
|
+
coverage xml -o ../coverage.xml
|
|
65
|
+
- name: upload coverage
|
|
66
|
+
uses: codecov/codecov-action@v3
|
|
67
|
+
env:
|
|
68
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
shipgrav-1.0.0/CHANGELOG
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
2024-07-15 Hannah F Mark <hmark@whoi.edu>
|
|
2
|
+
|
|
3
|
+
* PEP8 reformat, typos
|
|
4
|
+
* include some 2D functions for Parker method, rename the 1D one
|
|
5
|
+
* repo is now in PFPE org instead of WHOIGit
|
|
6
|
+
|
|
7
|
+
2024-04-23 Hannah F Mark <hmark@whoi.edu>
|
|
8
|
+
|
|
9
|
+
* docs/conf.py, readme.md, shipgrav/__init__.py: updated repo URLS
|
|
10
|
+
after repo tranfered to WHOIGit
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Mark, Hannah F.
|