glidertest 0.0.1a0__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.
- glidertest-0.0.1a0/.github/workflows/pypi.yml +48 -0
- glidertest-0.0.1a0/.github/workflows/tests.yml +39 -0
- glidertest-0.0.1a0/.gitignore +166 -0
- glidertest-0.0.1a0/LICENSE +21 -0
- glidertest-0.0.1a0/PKG-INFO +73 -0
- glidertest-0.0.1a0/README.md +21 -0
- glidertest-0.0.1a0/glidertest/_version.py +1 -0
- glidertest-0.0.1a0/glidertest/fetchers.py +21 -0
- glidertest-0.0.1a0/glidertest/tools.py +590 -0
- glidertest-0.0.1a0/glidertest.egg-info/PKG-INFO +73 -0
- glidertest-0.0.1a0/glidertest.egg-info/SOURCES.txt +19 -0
- glidertest-0.0.1a0/glidertest.egg-info/dependency_links.txt +1 -0
- glidertest-0.0.1a0/glidertest.egg-info/requires.txt +12 -0
- glidertest-0.0.1a0/glidertest.egg-info/top_level.txt +1 -0
- glidertest-0.0.1a0/notebooks/demo.ipynb +370 -0
- glidertest-0.0.1a0/pyproject.toml +59 -0
- glidertest-0.0.1a0/requirements-dev.txt +13 -0
- glidertest-0.0.1a0/requirements.txt +12 -0
- glidertest-0.0.1a0/setup.cfg +4 -0
- glidertest-0.0.1a0/tests/test_fetchers.py +6 -0
- glidertest-0.0.1a0/tests/test_tools.py +45 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- published
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
packages:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: release
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Set up Python
|
|
18
|
+
uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.x"
|
|
21
|
+
|
|
22
|
+
- name: Get tags
|
|
23
|
+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
|
24
|
+
shell: bash
|
|
25
|
+
|
|
26
|
+
- name: Install build tools
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine
|
|
29
|
+
|
|
30
|
+
shell: bash
|
|
31
|
+
|
|
32
|
+
- name: Build binary wheel
|
|
33
|
+
run: python -m build --sdist --wheel . --outdir dist
|
|
34
|
+
|
|
35
|
+
- name: CheckFiles
|
|
36
|
+
run: |
|
|
37
|
+
ls dist
|
|
38
|
+
shell: bash
|
|
39
|
+
|
|
40
|
+
- name: Test wheels
|
|
41
|
+
run: |
|
|
42
|
+
cd dist && python -m pip install *.whl
|
|
43
|
+
python -m twine check *
|
|
44
|
+
shell: bash
|
|
45
|
+
|
|
46
|
+
- name: Publish a Python distribution to PyPI
|
|
47
|
+
if: success() && github.event_name == 'release'
|
|
48
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
run:
|
|
10
|
+
runs-on: ${{ matrix.os }}
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python-version: ["3.8", "3.10", "3.12"]
|
|
14
|
+
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
15
|
+
fail-fast: true
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
|
|
22
|
+
- name: Setup Micromamba
|
|
23
|
+
uses: mamba-org/setup-micromamba@v1
|
|
24
|
+
|
|
25
|
+
- name: Python ${{ matrix.python-version }}
|
|
26
|
+
shell: bash -l {0}
|
|
27
|
+
run: >
|
|
28
|
+
micromamba create --name TEST python=${{ matrix.python-version }} pytest --file requirements-dev.txt --channel conda-forge
|
|
29
|
+
&& micromamba activate TEST
|
|
30
|
+
- name: Install glidertest
|
|
31
|
+
shell: bash -l {0}
|
|
32
|
+
run: >
|
|
33
|
+
micromamba activate TEST
|
|
34
|
+
&& python -m pip install -e . --no-deps --force-reinstall
|
|
35
|
+
- name: Tests
|
|
36
|
+
shell: bash -l {0}
|
|
37
|
+
run: >
|
|
38
|
+
micromamba activate TEST
|
|
39
|
+
&& python -m pytest -rxs tests/
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
*_version.py
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
#Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# poetry
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
103
|
+
#poetry.lock
|
|
104
|
+
|
|
105
|
+
# pdm
|
|
106
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
107
|
+
#pdm.lock
|
|
108
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
109
|
+
# in version control.
|
|
110
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
111
|
+
.pdm.toml
|
|
112
|
+
.pdm-python
|
|
113
|
+
.pdm-build/
|
|
114
|
+
|
|
115
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
116
|
+
__pypackages__/
|
|
117
|
+
|
|
118
|
+
# Celery stuff
|
|
119
|
+
celerybeat-schedule
|
|
120
|
+
celerybeat.pid
|
|
121
|
+
|
|
122
|
+
# SageMath parsed files
|
|
123
|
+
*.sage.py
|
|
124
|
+
|
|
125
|
+
# Environments
|
|
126
|
+
.env
|
|
127
|
+
.venv
|
|
128
|
+
env/
|
|
129
|
+
venv/
|
|
130
|
+
ENV/
|
|
131
|
+
env.bak/
|
|
132
|
+
venv.bak/
|
|
133
|
+
|
|
134
|
+
# Spyder project settings
|
|
135
|
+
.spyderproject
|
|
136
|
+
.spyproject
|
|
137
|
+
|
|
138
|
+
# Mac/OSX
|
|
139
|
+
.DS_Store
|
|
140
|
+
|
|
141
|
+
# Rope project settings
|
|
142
|
+
.ropeproject
|
|
143
|
+
|
|
144
|
+
# mkdocs documentation
|
|
145
|
+
/site
|
|
146
|
+
|
|
147
|
+
# mypy
|
|
148
|
+
.mypy_cache/
|
|
149
|
+
.dmypy.json
|
|
150
|
+
dmypy.json
|
|
151
|
+
|
|
152
|
+
# Pyre type checker
|
|
153
|
+
.pyre/
|
|
154
|
+
|
|
155
|
+
# pytype static type analyzer
|
|
156
|
+
.pytype/
|
|
157
|
+
|
|
158
|
+
# Cython debug symbols
|
|
159
|
+
cython_debug/
|
|
160
|
+
|
|
161
|
+
# PyCharm
|
|
162
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
163
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
164
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
165
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
166
|
+
#.idea/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Callum Rollo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: glidertest
|
|
3
|
+
Version: 0.0.1a0
|
|
4
|
+
Summary: Diagnostic tests of glider quality
|
|
5
|
+
Maintainer-email: Callum Rollo <c.rollo@outlook.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2024 Callum Rollo
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: documentation, https://github.com/callumrollo/glidertest
|
|
29
|
+
Project-URL: homepage, https://github.com/callumrollo/glidertest
|
|
30
|
+
Project-URL: repository, https://github.com/callumrollo/glidertest
|
|
31
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
32
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
33
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
37
|
+
Requires-Python: >=3.8
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
License-File: LICENSE
|
|
40
|
+
Requires-Dist: netcdf4
|
|
41
|
+
Requires-Dist: pooch
|
|
42
|
+
Requires-Dist: xarray
|
|
43
|
+
Requires-Dist: numpy
|
|
44
|
+
Requires-Dist: matplotlib
|
|
45
|
+
Requires-Dist: pandas
|
|
46
|
+
Requires-Dist: seaborn
|
|
47
|
+
Requires-Dist: scipy
|
|
48
|
+
Requires-Dist: cmocean
|
|
49
|
+
Requires-Dist: skyfield
|
|
50
|
+
Requires-Dist: tqdm
|
|
51
|
+
Requires-Dist: gsw
|
|
52
|
+
|
|
53
|
+
# glidertest
|
|
54
|
+
|
|
55
|
+
This is a repo to diagnose issues in glider data such as CTD thermal lag.
|
|
56
|
+
|
|
57
|
+
This is a work in progress, all contributions welcome!
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Usage
|
|
61
|
+
|
|
62
|
+
Install a local, development version of this by cloning the repo, opening a terminal in the home directory (next to this readme file) and running these commands:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
pip install -r requirements-dev.txt
|
|
66
|
+
pip install -e .
|
|
67
|
+
```
|
|
68
|
+
This installs glidertest locally. -e ensures that any edits you make in the files will be picked up by scripts that import functions from glidertest.
|
|
69
|
+
|
|
70
|
+
Check out the example notebook `notebooks/demo.ipynb` for example functionality
|
|
71
|
+
|
|
72
|
+
As input, glidertest takes [OceanGliders format files](https://github.com/OceanGlidersCommunity/OG-format-user-manual)
|
|
73
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# glidertest
|
|
2
|
+
|
|
3
|
+
This is a repo to diagnose issues in glider data such as CTD thermal lag.
|
|
4
|
+
|
|
5
|
+
This is a work in progress, all contributions welcome!
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Usage
|
|
9
|
+
|
|
10
|
+
Install a local, development version of this by cloning the repo, opening a terminal in the home directory (next to this readme file) and running these commands:
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
pip install -r requirements-dev.txt
|
|
14
|
+
pip install -e .
|
|
15
|
+
```
|
|
16
|
+
This installs glidertest locally. -e ensures that any edits you make in the files will be picked up by scripts that import functions from glidertest.
|
|
17
|
+
|
|
18
|
+
Check out the example notebook `notebooks/demo.ipynb` for example functionality
|
|
19
|
+
|
|
20
|
+
As input, glidertest takes [OceanGliders format files](https://github.com/OceanGlidersCommunity/OG-format-user-manual)
|
|
21
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.0.1a0'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import pooch
|
|
2
|
+
import xarray as xr
|
|
3
|
+
|
|
4
|
+
server = "https://callumrollo.com/files"
|
|
5
|
+
data_source_og = pooch.create(
|
|
6
|
+
path=pooch.os_cache("glidertest"),
|
|
7
|
+
base_url=server,
|
|
8
|
+
registry={
|
|
9
|
+
"sea076_20230906T0852_R.nc": "sha256:19e55e7018dc578a58a184b9d03e403e18470f59d20038deff59ab962c737902",
|
|
10
|
+
"sea076_20230906T0852_delayed.nc": "sha256:bd50b2c1019b49f8c14381de8f78aa67d66e9d9e89607bbcedff246be60e6c92",
|
|
11
|
+
},
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def load_sample_dataset(dataset_name="sea076_20230906T0852_delayed.nc"):
|
|
16
|
+
if dataset_name in data_source_og.registry.keys():
|
|
17
|
+
file_path = data_source_og.fetch(dataset_name)
|
|
18
|
+
return xr.open_dataset(file_path)
|
|
19
|
+
else:
|
|
20
|
+
msg = f"Requested sample dataset {dataset_name} not known"
|
|
21
|
+
raise ValueError(msg)
|