oceanarray 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.
Files changed (206) hide show
  1. oceanarray-0.1.0/.github/ISSUE_TEMPLATE.md +56 -0
  2. oceanarray-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +47 -0
  3. oceanarray-0.1.0/.github/dependabot.yml +48 -0
  4. oceanarray-0.1.0/.github/workflows/docs.yml +49 -0
  5. oceanarray-0.1.0/.github/workflows/docs_deploy.yml +56 -0
  6. oceanarray-0.1.0/.github/workflows/pypi.yml +54 -0
  7. oceanarray-0.1.0/.github/workflows/tests.yml +35 -0
  8. oceanarray-0.1.0/.gitignore +216 -0
  9. oceanarray-0.1.0/.pre-commit-config.yaml +57 -0
  10. oceanarray-0.1.0/.vscode/settings.json +37 -0
  11. oceanarray-0.1.0/.vscode/tasks.json +22 -0
  12. oceanarray-0.1.0/CHANGELOG.md +48 -0
  13. oceanarray-0.1.0/CITATION.cff +11 -0
  14. oceanarray-0.1.0/CONTRIBUTING.md +153 -0
  15. oceanarray-0.1.0/LICENSE +21 -0
  16. oceanarray-0.1.0/MIGRATION-BASEDIR.md +168 -0
  17. oceanarray-0.1.0/PKG-INFO +503 -0
  18. oceanarray-0.1.0/README.md +445 -0
  19. oceanarray-0.1.0/docs/Makefile +20 -0
  20. oceanarray-0.1.0/docs/source/_static/How do I transform a coordinate system manually_ /342/200/223 Nortek Support Center.pdf +0 -0
  21. oceanarray-0.1.0/docs/source/_static/array_processing.png +0 -0
  22. oceanarray-0.1.0/docs/source/_static/array_processing_v2.png +0 -0
  23. oceanarray-0.1.0/docs/source/_static/code/3_beam_transformation.py +113 -0
  24. oceanarray-0.1.0/docs/source/_static/code/auto_filt.m +1 -0
  25. oceanarray-0.1.0/docs/source/_static/code/hydro_grid.m +440 -0
  26. oceanarray-0.1.0/docs/source/_static/code/microcat2rodb_2.m +1 -0
  27. oceanarray-0.1.0/docs/source/_static/code/microcat2rodb_3.m +1 -0
  28. oceanarray-0.1.0/docs/source/_static/code/microcat_apply_cal.m +719 -0
  29. oceanarray-0.1.0/docs/source/_static/code/microcat_apply_cal_plus.m +1042 -0
  30. oceanarray-0.1.0/docs/source/_static/code/microcat_raw2use_003.m +1 -0
  31. oceanarray-0.1.0/docs/source/_static/code/mooring_interp_wb2_3_5.m +277 -0
  32. oceanarray-0.1.0/docs/source/_static/css/custom.css +48 -0
  33. oceanarray-0.1.0/docs/source/_static/github_solo_workflow.png +0 -0
  34. oceanarray-0.1.0/docs/source/_static/github_workflow2.png +0 -0
  35. oceanarray-0.1.0/docs/source/_static/instrument_processing.png +0 -0
  36. oceanarray-0.1.0/docs/source/_static/instrument_processing_v2.png +0 -0
  37. oceanarray-0.1.0/docs/source/_static/instrument_processing_v4.png +0 -0
  38. oceanarray-0.1.0/docs/source/_static/instrument_processing_v5.png +0 -0
  39. oceanarray-0.1.0/docs/source/_static/instrument_processing_v6.png +0 -0
  40. oceanarray-0.1.0/docs/source/_static/logo.png +0 -0
  41. oceanarray-0.1.0/docs/source/_static/mooring_processing.png +0 -0
  42. oceanarray-0.1.0/docs/source/_static/mooring_processing_V2.png +0 -0
  43. oceanarray-0.1.0/docs/source/_static/mooring_processing_v3.png +0 -0
  44. oceanarray-0.1.0/docs/source/_static/mooring_processing_v4.png +0 -0
  45. oceanarray-0.1.0/docs/source/_static/oceanarray_grid_report.png +0 -0
  46. oceanarray-0.1.0/docs/source/_static/oceanarray_icon.png +0 -0
  47. oceanarray-0.1.0/docs/source/_static/oceanarray_instrument_report.png +0 -0
  48. oceanarray-0.1.0/docs/source/_static/oceanarray_report_header.png +0 -0
  49. oceanarray-0.1.0/docs/source/_static/oceanarray_stack_report.png +0 -0
  50. oceanarray-0.1.0/docs/source/_static/rotary_spectrum_plan.rst +186 -0
  51. oceanarray-0.1.0/docs/source/calibration_dips.rst +24 -0
  52. oceanarray-0.1.0/docs/source/cli_reference.rst +687 -0
  53. oceanarray-0.1.0/docs/source/clock_offset.rst +141 -0
  54. oceanarray-0.1.0/docs/source/conf.py +155 -0
  55. oceanarray-0.1.0/docs/source/directory_structure.rst +134 -0
  56. oceanarray-0.1.0/docs/source/file_naming_conventions.rst +126 -0
  57. oceanarray-0.1.0/docs/source/index.rst +107 -0
  58. oceanarray-0.1.0/docs/source/legacy.rst +60 -0
  59. oceanarray-0.1.0/docs/source/logsheets.rst +223 -0
  60. oceanarray-0.1.0/docs/source/methods/acquisition.rst +98 -0
  61. oceanarray-0.1.0/docs/source/methods/auto_qc.rst +220 -0
  62. oceanarray-0.1.0/docs/source/methods/calibration.rst +107 -0
  63. oceanarray-0.1.0/docs/source/methods/concatenation.rst +54 -0
  64. oceanarray-0.1.0/docs/source/methods/conversion.rst +163 -0
  65. oceanarray-0.1.0/docs/source/methods/multisite_merging.rst +87 -0
  66. oceanarray-0.1.0/docs/source/methods/nortek_coordinate_transform.rst +291 -0
  67. oceanarray-0.1.0/docs/source/methods/standardisation.rst +259 -0
  68. oceanarray-0.1.0/docs/source/methods/time_gridding.rst +180 -0
  69. oceanarray-0.1.0/docs/source/methods/trimming.rst +163 -0
  70. oceanarray-0.1.0/docs/source/methods/vertical_gridding.rst +120 -0
  71. oceanarray-0.1.0/docs/source/migration.rst +168 -0
  72. oceanarray-0.1.0/docs/source/oceanSITES_manual.rst +1514 -0
  73. oceanarray-0.1.0/docs/source/oceanarray.rst +165 -0
  74. oceanarray-0.1.0/docs/source/oceanarray_format.rst +680 -0
  75. oceanarray-0.1.0/docs/source/processing_framework.rst +207 -0
  76. oceanarray-0.1.0/docs/source/project_structure.md +219 -0
  77. oceanarray-0.1.0/docs/source/quickstart.rst +293 -0
  78. oceanarray-0.1.0/docs/source/reports.rst +188 -0
  79. oceanarray-0.1.0/docs/source/roadmap.rst +138 -0
  80. oceanarray-0.1.0/docs/source/setup.md +92 -0
  81. oceanarray-0.1.0/docs/source/style_guide.md +139 -0
  82. oceanarray-0.1.0/docs/source/troubleshooting.rst +119 -0
  83. oceanarray-0.1.0/docs/source/yaml_configuration.rst +756 -0
  84. oceanarray-0.1.0/environment.yml +9 -0
  85. oceanarray-0.1.0/notebooks/demo_check_clock.ipynb +714 -0
  86. oceanarray-0.1.0/notebooks/demo_climatology.ipynb +229 -0
  87. oceanarray-0.1.0/notebooks/demo_clock_offset.ipynb +376 -0
  88. oceanarray-0.1.0/notebooks/demo_instrument.ipynb +375 -0
  89. oceanarray-0.1.0/notebooks/demo_mooring.ipynb +408 -0
  90. oceanarray-0.1.0/notebooks/demo_stage1.ipynb +471 -0
  91. oceanarray-0.1.0/notebooks/demo_stage2.ipynb +166 -0
  92. oceanarray-0.1.0/notebooks/demo_step1.ipynb +696 -0
  93. oceanarray-0.1.0/notebooks/dsE_1_2018_microcat_7518_temperature.png +0 -0
  94. oceanarray-0.1.0/notebooks/legacy/README.md +18 -0
  95. oceanarray-0.1.0/notebooks/legacy/demo_batch_instrument.ipynb +615 -0
  96. oceanarray-0.1.0/notebooks/legacy/demo_instrument_rdb.ipynb +226 -0
  97. oceanarray-0.1.0/notebooks/legacy/demo_mooring_rdb.ipynb +234 -0
  98. oceanarray-0.1.0/oceanarray/__init__.py +20 -0
  99. oceanarray-0.1.0/oceanarray/_version.py +1 -0
  100. oceanarray-0.1.0/oceanarray/cli.py +1343 -0
  101. oceanarray-0.1.0/oceanarray/clock_offset.py +675 -0
  102. oceanarray-0.1.0/oceanarray/config/OS1_sensor_attrs.yaml +49 -0
  103. oceanarray-0.1.0/oceanarray/config/OS1_var_names.yaml +5 -0
  104. oceanarray-0.1.0/oceanarray/config/OS1_vocab_attrs.yaml +84 -0
  105. oceanarray-0.1.0/oceanarray/config/legacy/project_RAPID.yaml +69 -0
  106. oceanarray-0.1.0/oceanarray/config/legacy/rodb_keys.txt +206 -0
  107. oceanarray-0.1.0/oceanarray/config/legacy/rodb_keys.yaml +1012 -0
  108. oceanarray-0.1.0/oceanarray/config/logging.yaml +28 -0
  109. oceanarray-0.1.0/oceanarray/legacy/__init__.py +47 -0
  110. oceanarray-0.1.0/oceanarray/legacy/caldip.py +753 -0
  111. oceanarray-0.1.0/oceanarray/legacy/convertOS.py +527 -0
  112. oceanarray-0.1.0/oceanarray/legacy/find_deployment.py +489 -0
  113. oceanarray-0.1.0/oceanarray/legacy/mooring_rodb.py +429 -0
  114. oceanarray-0.1.0/oceanarray/legacy/process_rodb.py +369 -0
  115. oceanarray-0.1.0/oceanarray/legacy/rodb.py +330 -0
  116. oceanarray-0.1.0/oceanarray/logger.py +192 -0
  117. oceanarray-0.1.0/oceanarray/logsheet/__init__.py +60 -0
  118. oceanarray-0.1.0/oceanarray/logsheet/_columns.py +97 -0
  119. oceanarray-0.1.0/oceanarray/logsheet/_config.py +245 -0
  120. oceanarray-0.1.0/oceanarray/logsheet/_firmware.py +43 -0
  121. oceanarray-0.1.0/oceanarray/logsheet/_latex.py +128 -0
  122. oceanarray-0.1.0/oceanarray/logsheet/_render.py +126 -0
  123. oceanarray-0.1.0/oceanarray/logsheet/builders/__init__.py +13 -0
  124. oceanarray-0.1.0/oceanarray/logsheet/builders/caldip_download.py +195 -0
  125. oceanarray-0.1.0/oceanarray/logsheet/builders/caldip_setup.py +188 -0
  126. oceanarray-0.1.0/oceanarray/logsheet/builders/deployment_setup.py +218 -0
  127. oceanarray-0.1.0/oceanarray/logsheet/builders/mooring_download.py +243 -0
  128. oceanarray-0.1.0/oceanarray/logsheet/builders/recovery.py +157 -0
  129. oceanarray-0.1.0/oceanarray/logsheet/data/column_defs.yaml +686 -0
  130. oceanarray-0.1.0/oceanarray/logsheet/data/latex_templates/_base_instrument.tex.j2 +42 -0
  131. oceanarray-0.1.0/oceanarray/logsheet/data/latex_templates/caldip_download.tex.j2 +47 -0
  132. oceanarray-0.1.0/oceanarray/logsheet/data/latex_templates/caldip_setup.tex.j2 +70 -0
  133. oceanarray-0.1.0/oceanarray/logsheet/data/latex_templates/deployment_setup.tex.j2 +97 -0
  134. oceanarray-0.1.0/oceanarray/logsheet/data/latex_templates/mooring_download.tex.j2 +54 -0
  135. oceanarray-0.1.0/oceanarray/logsheet/data/latex_templates/recovery.tex.j2 +103 -0
  136. oceanarray-0.1.0/oceanarray/mooring_level.py +1368 -0
  137. oceanarray-0.1.0/oceanarray/oceanarray.mplstyle +18 -0
  138. oceanarray-0.1.0/oceanarray/parameters.py +270 -0
  139. oceanarray-0.1.0/oceanarray/plotter.py +942 -0
  140. oceanarray-0.1.0/oceanarray/plotters/__init__.py +97 -0
  141. oceanarray-0.1.0/oceanarray/plotters/_animation.py +261 -0
  142. oceanarray-0.1.0/oceanarray/plotters/_current.py +705 -0
  143. oceanarray-0.1.0/oceanarray/plotters/_diagnostic.py +667 -0
  144. oceanarray-0.1.0/oceanarray/plotters/_helpers.py +57 -0
  145. oceanarray-0.1.0/oceanarray/plotters/_primitives.py +101 -0
  146. oceanarray-0.1.0/oceanarray/plotters/_section.py +16 -0
  147. oceanarray-0.1.0/oceanarray/plotters/_timeseries.py +11 -0
  148. oceanarray-0.1.0/oceanarray/rapid_interp.py +739 -0
  149. oceanarray-0.1.0/oceanarray/read_rbr_hex.py +541 -0
  150. oceanarray-0.1.0/oceanarray/readers.py +303 -0
  151. oceanarray-0.1.0/oceanarray/report/__init__.py +5 -0
  152. oceanarray-0.1.0/oceanarray/report/_array.py +386 -0
  153. oceanarray-0.1.0/oceanarray/report/_grid.py +539 -0
  154. oceanarray-0.1.0/oceanarray/report/_html_helpers.py +1004 -0
  155. oceanarray-0.1.0/oceanarray/report/_instrument.py +853 -0
  156. oceanarray-0.1.0/oceanarray/report/_mooring.py +1385 -0
  157. oceanarray-0.1.0/oceanarray/report/_plots.py +4284 -0
  158. oceanarray-0.1.0/oceanarray/report/_stack.py +941 -0
  159. oceanarray-0.1.0/oceanarray/stage1.py +1959 -0
  160. oceanarray-0.1.0/oceanarray/stage2.py +1160 -0
  161. oceanarray-0.1.0/oceanarray/stage3.py +2494 -0
  162. oceanarray-0.1.0/oceanarray/time_gridding.py +958 -0
  163. oceanarray-0.1.0/oceanarray/tools.py +400 -0
  164. oceanarray-0.1.0/oceanarray/transports.py +1 -0
  165. oceanarray-0.1.0/oceanarray/utilities.py +538 -0
  166. oceanarray-0.1.0/oceanarray/validation.py +389 -0
  167. oceanarray-0.1.0/oceanarray/writers.py +99 -0
  168. oceanarray-0.1.0/oceanarray.egg-info/PKG-INFO +503 -0
  169. oceanarray-0.1.0/oceanarray.egg-info/SOURCES.txt +204 -0
  170. oceanarray-0.1.0/oceanarray.egg-info/dependency_links.txt +1 -0
  171. oceanarray-0.1.0/oceanarray.egg-info/entry_points.txt +2 -0
  172. oceanarray-0.1.0/oceanarray.egg-info/requires.txt +12 -0
  173. oceanarray-0.1.0/oceanarray.egg-info/scm_file_list.json +199 -0
  174. oceanarray-0.1.0/oceanarray.egg-info/scm_version.json +8 -0
  175. oceanarray-0.1.0/oceanarray.egg-info/top_level.txt +1 -0
  176. oceanarray-0.1.0/pyproject.toml +162 -0
  177. oceanarray-0.1.0/pytest.ini +7 -0
  178. oceanarray-0.1.0/requirements-dev.txt +24 -0
  179. oceanarray-0.1.0/requirements-test.txt +5 -0
  180. oceanarray-0.1.0/requirements.txt +25 -0
  181. oceanarray-0.1.0/setup.cfg +4 -0
  182. oceanarray-0.1.0/tests/conftest.py +50 -0
  183. oceanarray-0.1.0/tests/integration/__init__.py +0 -0
  184. oceanarray-0.1.0/tests/integration/conftest.py +24 -0
  185. oceanarray-0.1.0/tests/integration/test_readers.py +3 -0
  186. oceanarray-0.1.0/tests/integration/test_stage1.py +147 -0
  187. oceanarray-0.1.0/tests/integration/test_stage2.py +147 -0
  188. oceanarray-0.1.0/tests/integration/test_time_gridding.py +228 -0
  189. oceanarray-0.1.0/tests/legacy/__init__.py +1 -0
  190. oceanarray-0.1.0/tests/legacy/test_convertOS.py +131 -0
  191. oceanarray-0.1.0/tests/legacy/test_mooring_rodb.py +260 -0
  192. oceanarray-0.1.0/tests/legacy/test_process_rodb.py +172 -0
  193. oceanarray-0.1.0/tests/legacy/test_rodb.py +130 -0
  194. oceanarray-0.1.0/tests/unit/__init__.py +0 -0
  195. oceanarray-0.1.0/tests/unit/test_logger.py +57 -0
  196. oceanarray-0.1.0/tests/unit/test_logsheets.py +678 -0
  197. oceanarray-0.1.0/tests/unit/test_plotters.py +226 -0
  198. oceanarray-0.1.0/tests/unit/test_report.py +648 -0
  199. oceanarray-0.1.0/tests/unit/test_stage1.py +335 -0
  200. oceanarray-0.1.0/tests/unit/test_stage2.py +545 -0
  201. oceanarray-0.1.0/tests/unit/test_stage3.py +296 -0
  202. oceanarray-0.1.0/tests/unit/test_time_gridding.py +401 -0
  203. oceanarray-0.1.0/tests/unit/test_tools.py +321 -0
  204. oceanarray-0.1.0/tests/unit/test_utilities.py +285 -0
  205. oceanarray-0.1.0/tests/unit/test_validation.py +217 -0
  206. oceanarray-0.1.0/tests/unit/test_writers.py +100 -0
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: "🐛 Bug Report / 💡 Feature Request"
3
+ about: "Report a bug or suggest an improvement for the amocarray project"
4
+ title: "[Bug] <brief description>" or "[Feature] <brief description>"
5
+ labels: []
6
+ assignees: []
7
+ ---
8
+
9
+ ## Description
10
+
11
+ Please describe the bug or feature request clearly and concisely.
12
+
13
+ **For bugs:**
14
+ - What did you expect to happen?
15
+ - What actually happened?
16
+ - If applicable, include error messages or stack traces.
17
+
18
+ **For features:**
19
+ - What problem does this feature solve?
20
+ - How would this feature improve the project?
21
+
22
+
23
+ ## Reproduction (for bugs)
24
+
25
+ Please provide steps to reproduce the issue, if possible:
26
+
27
+ 1. Go to '...'
28
+ 2. Run '...'
29
+ 3. Observe '...'
30
+
31
+ If you can, include a minimal, reproducible example or link to a failing test.
32
+
33
+
34
+ ## Environment
35
+
36
+ - OS: [e.g., macOS 13.3, Ubuntu 22.04, etc.]
37
+ - Python version: [e.g., 3.11]
38
+ - amocarray version: [if applicable]
39
+ - Virtualenv / Conda / System Python?: [env type]
40
+
41
+
42
+ ## Checklist
43
+
44
+ - [ ] I have checked the existing [issues](https://github.com/AMOCcommunity/amocarray/issues) to avoid duplicates.
45
+ - [ ] I have included steps to reproduce the issue, if it's a bug.
46
+ - [ ] I have described the motivation clearly, if it's a feature request.
47
+
48
+
49
+ ## Additional context
50
+
51
+ Add any other context or screenshots about the problem or feature request here.
52
+
53
+ ---
54
+
55
+ *This issue template was prepared with assistance from ChatGPT to support clear and collaborative development.*
56
+
@@ -0,0 +1,47 @@
1
+ You can delete unused sections.
2
+
3
+ ## PR Title Convention
4
+
5
+ Please prefix your pull request title with one of the following tags for clarity:
6
+
7
+ - `[DOC]` for documentation updates
8
+ - `[FIX]` for bug fixes
9
+ - `[FEAT]` for new features
10
+ - `[REFACTOR]` for code improvements
11
+ - `[TEST]` for tests
12
+ - `[CI]` for CI/CD or automation updates
13
+ - `[CLEANUP]` for general maintenance
14
+
15
+ Example:
16
+ > `[FIX] Correct dimension handling in OSNAP reader`
17
+
18
+ **Description:**
19
+
20
+ Please describe your changes clearly and concisely.
21
+
22
+ - What is the purpose of this pull request?
23
+ - What issue(s) does it address? Please link them (e.g., closes #12).
24
+ - Briefly explain the approach taken.
25
+
26
+ **Checklist:**
27
+
28
+ - [ ] I have followed the [coding conventions](https://amoccommunity.github.io/amocarray/conventions.html).
29
+ - [ ] I have updated or added tests to cover my changes.
30
+ - [ ] I have updated the documentation if needed.
31
+ - [ ] I have run `pytest` to check that all tests pass.
32
+ - [ ] I have run `pre-commit run --all-files` to lint and format the code.
33
+
34
+ **Related Issues / Pull Requests:**
35
+
36
+ Link any related issues, pull requests, or discussions:
37
+ - Fixes #
38
+ - Related to #
39
+
40
+ **Additional Notes:**
41
+
42
+ Include any additional information reviewers might need:
43
+
44
+ - Screenshots (if UI/outputs are affected)
45
+ - Design decisions or trade-offs
46
+ - Anything reviewers should look at closely
47
+
@@ -0,0 +1,48 @@
1
+ version: 2
2
+ updates:
3
+ # Python dependencies
4
+ - package-ecosystem: "pip"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "monthly"
8
+ day-of-month: "1"
9
+ time: "09:00"
10
+ timezone: "UTC"
11
+ open-pull-requests-limit: 10
12
+ commit-message:
13
+ prefix: "[DEPS]"
14
+ include: "scope"
15
+ reviewers:
16
+ - "eleanorfrajka"
17
+ assignees:
18
+ - "eleanorfrajka"
19
+ labels:
20
+ - "dependencies"
21
+ - "automated"
22
+ groups:
23
+ minor-and-patch:
24
+ patterns:
25
+ - "*"
26
+ update-types:
27
+ - "minor"
28
+ - "patch"
29
+
30
+ # GitHub Actions
31
+ - package-ecosystem: "github-actions"
32
+ directory: "/"
33
+ schedule:
34
+ interval: "monthly"
35
+ day-of-month: "1"
36
+ time: "09:00"
37
+ timezone: "UTC"
38
+ open-pull-requests-limit: 5
39
+ commit-message:
40
+ prefix: "[CI]"
41
+ include: "scope"
42
+ reviewers:
43
+ - "eleanorfrajka"
44
+ assignees:
45
+ - "eleanorfrajka"
46
+ labels:
47
+ - "github-actions"
48
+ - "automated"
@@ -0,0 +1,49 @@
1
+ name: Test documentation build
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - '**.py'
7
+ - '**.ipynb'
8
+ - '**.rst'
9
+ - '**.md'
10
+
11
+ jobs:
12
+ build-docs:
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ contents: write
16
+
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Setup Micromamba
24
+ uses: mamba-org/setup-micromamba@v2
25
+ with:
26
+ environment-file: environment.yml
27
+ init-shell: bash
28
+ condarc: |
29
+ channels:
30
+ - conda-forge
31
+ channel_priority: strict
32
+ cache-environment: true
33
+
34
+ - name: Install package (editable)
35
+ shell: bash -l {0}
36
+ run: |
37
+ micromamba run -n TEST python -m pip install --upgrade pip
38
+ micromamba run -n TEST python -m pip install -e . --no-deps --force-reinstall
39
+
40
+ - name: Build documentation
41
+ shell: bash -l {0}
42
+ run: |
43
+ set -e
44
+ micromamba run -n TEST jupyter nbconvert --to notebook --execute notebooks/demo_instrument.ipynb --output=demo_instrument-output.ipynb --ExecutePreprocessor.allow_errors=True
45
+ micromamba run -n TEST jupyter nbconvert --to notebook --execute notebooks/demo_mooring.ipynb --output=demo_mooring-output.ipynb --ExecutePreprocessor.allow_errors=True
46
+ mv notebooks/*output.ipynb docs/source/
47
+ pushd docs
48
+ micromamba run -n TEST make clean html
49
+ popd
@@ -0,0 +1,56 @@
1
+ name: Deploy Documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ # Optional: manual trigger
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ deploy-docs:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: write
15
+
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - name: Setup Micromamba
23
+ uses: mamba-org/setup-micromamba@v2
24
+ with:
25
+ environment-file: environment.yml
26
+ init-shell: bash
27
+ condarc: |
28
+ channels:
29
+ - conda-forge
30
+ channel_priority: strict
31
+ cache-environment: true
32
+
33
+ - name: Install package (editable)
34
+ shell: bash -l {0}
35
+ run: |
36
+ micromamba run -n TEST python -m pip install --upgrade pip
37
+ micromamba run -n TEST python -m pip install -e . --no-deps --force-reinstall
38
+
39
+ - name: Build documentation
40
+ shell: bash -l {0}
41
+ run: |
42
+ set -e
43
+ micromamba run -n TEST jupyter nbconvert --to notebook --execute notebooks/demo_instrument.ipynb --output=demo_instrument-output.ipynb --ExecutePreprocessor.allow_errors=True
44
+ micromamba run -n TEST jupyter nbconvert --to notebook --execute notebooks/demo_mooring.ipynb --output=demo_mooring-output.ipynb --ExecutePreprocessor.allow_errors=True
45
+ mv notebooks/*output.ipynb docs/source/
46
+ pushd docs
47
+ micromamba run -n TEST make clean html
48
+ popd
49
+
50
+ - name: Deploy to GitHub Pages
51
+ uses: peaceiris/actions-gh-pages@v4
52
+ with:
53
+ github_token: ${{ secrets.GITHUB_TOKEN }}
54
+ publish_dir: docs/build/html
55
+ # Optional: publish_branch: gh-pages
56
+ # Optional: cname: docs.example.org
@@ -0,0 +1,54 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+
6
+ # GitHub recommends pinning actions to a commit SHA.
7
+ # To get a newer version, you will need to update the SHA.
8
+ # You can also reference a tag or branch, but the action may change without warning.
9
+
10
+ # See also https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-python
11
+ name: Publish to PyPI
12
+
13
+ on:
14
+ release:
15
+ types:
16
+ - published
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ jobs:
22
+ release-build:
23
+ runs-on: ubuntu-latest
24
+ environment: test
25
+ permissions:
26
+ id-token: write
27
+
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ with:
31
+ ref: ${{ github.ref }}
32
+ fetch-depth: 0
33
+
34
+ - name: Clean repository before build
35
+ run: git clean -fxd
36
+
37
+ - name: Set up Python
38
+ uses: actions/setup-python@v5
39
+ with:
40
+ python-version: "3.x"
41
+
42
+ - name: Install build tools
43
+ run: |
44
+ python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine
45
+
46
+ - name: Build package
47
+ run: python -m build --sdist --wheel . --outdir dist
48
+
49
+ - name: Check built distributions
50
+ run: python -m twine check dist/*
51
+
52
+ - name: Publish to PyPI
53
+ if: success() && github.event_name == 'release'
54
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,35 @@
1
+ name: Run unit tests
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ matrix:
13
+ os: [ubuntu-latest, macos-latest]
14
+ python-version: ["3.11"]
15
+ fail-fast: true
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Set up Python ${{ matrix.python-version }}
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ cache: "pip"
25
+
26
+ - name: Install dependencies
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ pip install -r requirements-dev.txt
30
+
31
+ - name: Install oceanarray
32
+ run: pip install -e . --no-deps --force-reinstall
33
+
34
+ - name: Run unit tests
35
+ run: pytest tests/unit -m "not slow and not local and not needs_seasenselib" -q
@@ -0,0 +1,216 @@
1
+ setup.sh
2
+ */_version.py
3
+
4
+ # Data files — not stored in the repository
5
+ # Anchored to repo root so oceanarray/logsheets/data/ (package data) is NOT excluded.
6
+ /data/
7
+ outputs/
8
+
9
+ # Legacy individual exclusions (superseded by data/ above)
10
+ data/temp.nc
11
+ *_use.nc
12
+ *_raw.nc
13
+ data/moor/raw/odb_2026/*
14
+
15
+
16
+ # Legacy reference scripts — originals kept locally, not tracked
17
+ oceanarray/legacy/02_aqdp_ploter.py
18
+
19
+ # Caldip prototype and dev scripts (superseded by ../caldip/ package)
20
+ oceanarray/caldip.py
21
+ debug_caldip.py
22
+ example_caldip_usage.py
23
+ simple_caldip_plot.py
24
+ plot_calibration_data.py
25
+ test_caldip.py
26
+ test_caldip_simple.py
27
+ data/moor/proc_calib/
28
+ calibration_data_plot.png
29
+ calibration_dip_comparison.png
30
+ matlab_calibration/
31
+
32
+ logs/*log
33
+
34
+ # Claude Code configuration
35
+ .claude/
36
+
37
+ # VSCode settings
38
+ .vscode/*
39
+
40
+ # Byte-compiled / optimized / DLL files
41
+ __pycache__/
42
+ *.py[cod]
43
+ *$py.class
44
+
45
+ # C extensions
46
+ *.so
47
+
48
+ # Distribution / packaging
49
+ .Python
50
+ build/
51
+ develop-eggs/
52
+ dist/
53
+ downloads/
54
+ eggs/
55
+ .eggs/
56
+ lib/
57
+ lib64/
58
+ parts/
59
+ sdist/
60
+ var/
61
+ wheels/
62
+ share/python-wheels/
63
+ *.egg-info/
64
+ .installed.cfg
65
+ *.egg
66
+ MANIFEST
67
+
68
+ # PyInstaller
69
+ # Usually these files are written by a python script from a template
70
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
71
+ *.manifest
72
+ *.spec
73
+
74
+ # Installer logs
75
+ pip-log.txt
76
+ pip-delete-this-directory.txt
77
+
78
+ # Unit test / coverage reports
79
+ htmlcov/
80
+ .tox/
81
+ .nox/
82
+ .coverage
83
+ .coverage.*
84
+ .cache
85
+ nosetests.xml
86
+ coverage.xml
87
+ *.cover
88
+ *.py,cover
89
+ .hypothesis/
90
+ .pytest_cache/
91
+ cover/
92
+
93
+ # Translations
94
+ *.mo
95
+ *.pot
96
+
97
+ # Django stuff:
98
+ *.log
99
+ local_settings.py
100
+ db.sqlite3
101
+ db.sqlite3-journal
102
+
103
+ # Flask stuff:
104
+ instance/
105
+ .webassets-cache
106
+
107
+ # Scrapy stuff:
108
+ .scrapy
109
+
110
+ # Sphinx documentation
111
+ docs/_build/
112
+
113
+ # PyBuilder
114
+ .pybuilder/
115
+ target/
116
+
117
+ # Jupyter Notebook
118
+ .ipynb_checkpoints
119
+
120
+ # IPython
121
+ profile_default/
122
+ ipython_config.py
123
+
124
+ # pyenv
125
+ # For a library or package, you might want to ignore these files since the code is
126
+ # intended to run in multiple environments; otherwise, check them in:
127
+ .python-version
128
+
129
+ # pipenv
130
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
131
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
132
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
133
+ # install all needed dependencies.
134
+ Pipfile.lock
135
+
136
+ # poetry
137
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
138
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
139
+ # commonly ignored for libraries.
140
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
141
+ poetry.lock
142
+
143
+ # pdm
144
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
145
+ #pdm.lock
146
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
147
+ # in version control.
148
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
149
+ .pdm.toml
150
+ .pdm-python
151
+ .pdm-build/
152
+
153
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
154
+ __pypackages__/
155
+
156
+ # Celery stuff
157
+ celerybeat-schedule
158
+ celerybeat.pid
159
+
160
+ # SageMath parsed files
161
+ *.sage.py
162
+
163
+ # Environments
164
+ .env
165
+ .venv
166
+ env/
167
+ venv/
168
+ ENV/
169
+ env.bak/
170
+ venv.bak/
171
+
172
+ # Spyder project settings
173
+ .spyderproject
174
+ .spyproject
175
+
176
+ # Rope project settings
177
+ .ropeproject
178
+
179
+ # mkdocs documentation
180
+ /site
181
+
182
+ # mypy
183
+ .mypy_cache/
184
+ .dmypy.json
185
+ dmypy.json
186
+
187
+ # Pyre type checker
188
+ .pyre/
189
+
190
+ # pytype static type analyzer
191
+ .pytype/
192
+
193
+ # Cython debug symbols
194
+ cython_debug/
195
+
196
+ # PyCharm
197
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
198
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
199
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
200
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
201
+ .idea/
202
+ data/DSE18_SBE37SM_RS232_03707518_2018_08_26efw1.cnv
203
+ data/moor/proc/dsE_1_2018/microcat/dsE_1_2018_microcat_7518_temperature_raw.png
204
+ data/moor/raw/msm76_2018/rbrsolo/DSE18_101651_20180827_1541.mat
205
+ data/moor/proc/dsE_1_2018/rbrsolo/dsE_1_2018_101646_raw.nc
206
+ .gitignore
207
+ data/moor/raw/msm76_2018/sbe56/DSE18_SBE05606363_2018_08_27.cnv
208
+ data/moor/raw/msm76_2018/sbe56/DSE18_SBE05606364_2018_08_27.cnv
209
+ data/moor/raw/msm76_2018/sbe56/DSE18_SBE05606365_2018_08_27.cnv
210
+ data/moor/raw/msm76_2018/sbe56/DSE18_SBE05606366_2018_08_27.cnv
211
+ data/moor/raw/msm76_2018/sbe56/DSE18_SBE05606370_2018_08_27.cnv
212
+ data/moor/raw/msm76_2018/sbe56/DSE18_SBE05606394_2018_08_27.cnv
213
+ data/moor/raw/msm76_2018/sbe56/DSE18_SBE05606397_2018_08_27.cnv
214
+ data/moor/raw/msm76_2018/sbe56/DSE18_SBE05606401_2018_08_27.cnv
215
+ data/moor/raw/msm76_2018/sbe56/DSE18_SBE05606402_2018_08_27.cnv
216
+ data/moor/raw/msm76_2018/sbe56/DSE18_SBE05606409_2018_08_27.cnv
@@ -0,0 +1,57 @@
1
+ repos:
2
+ - repo: https://github.com/psf/black
3
+ rev: 24.3.0
4
+ hooks:
5
+ - id: black
6
+ language_version: python3
7
+ files: \.(py|ipynb)$
8
+ exclude: ^data/
9
+
10
+ - repo: https://github.com/codespell-project/codespell
11
+ rev: v2.2.6 # Check for the latest version
12
+ hooks:
13
+ - id: codespell
14
+ args: ["--ignore-words-list", "nd"] # Optional: ignore some false positives
15
+
16
+ - repo: https://github.com/pycqa/isort
17
+ rev: 5.13.2
18
+ hooks:
19
+ - id: isort
20
+ language_version: python3
21
+ files: \.(py|ipynb)$
22
+ exclude: ^data/
23
+
24
+ - repo: https://github.com/pre-commit/pre-commit-hooks
25
+ rev: v4.5.0
26
+ hooks:
27
+ - id: end-of-file-fixer
28
+ files: \.(py|yaml|yml|ipynb)$
29
+ exclude: ^data/
30
+ - id: trailing-whitespace
31
+ files: \.(py|yaml|yml|ipynb)$
32
+ exclude: ^data/
33
+ - id: check-yaml
34
+ files: \.(yaml|yml)$
35
+ exclude: ^data/
36
+ - id: check-added-large-files
37
+
38
+ - repo: local
39
+ hooks:
40
+ - id: pytest
41
+ name: pytest
42
+ entry: pytest -q
43
+ language: system
44
+ types: [python]
45
+ exclude: ^data/
46
+
47
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
48
+ rev: v0.3.0
49
+ hooks:
50
+ - id: ruff
51
+ args: [
52
+ "--fix",
53
+ "--exit-zero",
54
+ "--select",
55
+ "E,F,W,C90,ANN,B,BLE,TRY,ARG,SLF",
56
+ ]
57
+ exclude: ^data/
@@ -0,0 +1,37 @@
1
+ {
2
+ // === Python Environment ===
3
+ "python.defaultInterpreterPath": "${workspaceFolder}/venv/bin/python",
4
+ "python.pythonPath": "${workspaceFolder}/venv/bin/python",
5
+ // === Formatting ===
6
+ "python.formatting.provider": "black",
7
+ "editor.formatOnSave": true,
8
+ "editor.codeActionsOnSave": {
9
+ "source.organizeImports": "explicit",
10
+ "source.fixAll": "explicit"
11
+ },
12
+ // === Linting ===
13
+ "python.linting.enabled": true,
14
+ "python.linting.pylintEnabled": false,
15
+ "ruff.enable": true,
16
+ "ruff.lintOnSave": true,
17
+ "ruff.path": [
18
+ "${workspaceFolder}/venv/bin/ruff"
19
+ ],
20
+ "pre-commit.executablePath": "${workspaceFolder}/venv/bin/pre-commit",
21
+ "terminal.integrated.env.osx": {
22
+ "PATH": "${workspaceFolder}/venv/bin:${env:PATH}:/opt/homebrew/bin:/opt/homebrew/opt/tcl-tk@8/bin:$HOME/.pyenv/bin"
23
+ },
24
+ "git.terminalAuthentication": true,
25
+ "git.useGitUserTerminal": true,
26
+ // === VSCode experience ===
27
+ "files.trimTrailingWhitespace": true,
28
+ "files.insertFinalNewline": true,
29
+ "files.autoSave": "onFocusChange",
30
+ // === Jupyter support (optional) ===
31
+ "jupyter.jupyterServerType": "local",
32
+ "python.testing.pytestArgs": [
33
+ "tests"
34
+ ],
35
+ "python.testing.unittestEnabled": false,
36
+ "python.testing.pytestEnabled": true,
37
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "tasks": [
4
+ {
5
+ "label": "Pre-commit: run all hooks",
6
+ "type": "shell",
7
+ "command": "source ./venv/bin/activate && pre-commit run --all-files",
8
+ "problemMatcher": [],
9
+ "group": {
10
+ "kind": "build",
11
+ "isDefault": true
12
+ },
13
+ "presentation": {
14
+ "reveal": "always",
15
+ "panel": "dedicated"
16
+ },
17
+ "runOptions": {
18
+ "runOn": "folderOpen"
19
+ }
20
+ }
21
+ ]
22
+ }