obsarray 1.0.3__tar.gz → 1.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.
Files changed (104) hide show
  1. obsarray-1.1/.github/workflows/publish.yml +97 -0
  2. obsarray-1.1/.github/workflows/tests.yml +72 -0
  3. obsarray-1.1/.gitignore +128 -0
  4. obsarray-1.1/.pre-commit-config.yaml +21 -0
  5. obsarray-1.1/.readthedocs.yaml +28 -0
  6. obsarray-1.1/MANIFEST.in +2 -0
  7. obsarray-1.1/PKG-INFO +130 -0
  8. obsarray-1.1/README.md +95 -0
  9. obsarray-1.1/docs/Makefile +20 -0
  10. obsarray-1.1/docs/_static/custom.css +4 -0
  11. obsarray-1.1/docs/_templates/autosummary/attribute.rst +5 -0
  12. obsarray-1.1/docs/_templates/autosummary/base.rst +5 -0
  13. obsarray-1.1/docs/_templates/autosummary/class.rst +33 -0
  14. obsarray-1.1/docs/_templates/autosummary/function.rst +5 -0
  15. obsarray-1.1/docs/_templates/autosummary/method.rst +5 -0
  16. obsarray-1.1/docs/_templates/autosummary/module.rst +66 -0
  17. {obsarray-1.0.3 → obsarray-1.1}/docs/conf.py +8 -2
  18. obsarray-1.1/docs/content/developer/developer_guide.rst +5 -0
  19. obsarray-1.1/docs/content/user/api.rst +106 -0
  20. obsarray-1.1/docs/content/user/flag_accessor.rst +124 -0
  21. obsarray-1.1/docs/content/user/quickstart.rst +97 -0
  22. obsarray-1.1/docs/content/user/templater.rst +172 -0
  23. obsarray-1.1/docs/content/user/unc_accessor.rst +201 -0
  24. obsarray-1.1/docs/content/user/unc_conventions.rst +89 -0
  25. obsarray-1.1/docs/content/user/user_guide.rst +13 -0
  26. obsarray-1.1/docs/docutils.conf +2 -0
  27. obsarray-1.1/docs/figs/comet_logo.png +0 -0
  28. obsarray-1.1/docs/figs/obsarray.png +0 -0
  29. obsarray-1.1/docs/index.rst +66 -0
  30. obsarray-1.1/docs/make.bat +36 -0
  31. {obsarray-1.0.3 → obsarray-1.1}/notebook/test_register_err_corr_form.py +0 -3
  32. {obsarray-1.0.3 → obsarray-1.1}/obsarray/__init__.py +8 -3
  33. obsarray-1.1/obsarray/conventions.py +84 -0
  34. {obsarray-1.0.3 → obsarray-1.1}/obsarray/err_corr.py +3 -7
  35. {obsarray-1.0.3 → obsarray-1.1}/obsarray/flag_accessor.py +21 -19
  36. obsarray-1.1/obsarray/options.py +78 -0
  37. {obsarray-1.0.3 → obsarray-1.1}/obsarray/templater/dataset_util.py +20 -13
  38. {obsarray-1.0.3 → obsarray-1.1}/obsarray/templater/dstemplater.py +1 -1
  39. {obsarray-1.0.3 → obsarray-1.1}/obsarray/templater/template_util.py +5 -2
  40. {obsarray-1.0.3 → obsarray-1.1}/obsarray/templater/tests/test_dataset_util.py +3 -1
  41. obsarray-1.1/obsarray/test/test_conventions.py +127 -0
  42. {obsarray-1.0.3 → obsarray-1.1}/obsarray/test/test_flag_accessor.py +0 -16
  43. obsarray-1.1/obsarray/test/test_options.py +51 -0
  44. {obsarray-1.0.3 → obsarray-1.1}/obsarray/test/test_unc_accessor.py +4 -7
  45. {obsarray-1.0.3 → obsarray-1.1}/obsarray/test/test_utils.py +8 -16
  46. {obsarray-1.0.3 → obsarray-1.1}/obsarray/unc_accessor.py +24 -25
  47. {obsarray-1.0.3 → obsarray-1.1}/obsarray/utils.py +5 -3
  48. obsarray-1.1/obsarray.egg-info/PKG-INFO +130 -0
  49. obsarray-1.1/obsarray.egg-info/SOURCES.txt +92 -0
  50. {obsarray-1.0.3 → obsarray-1.1}/obsarray.egg-info/requires.txt +12 -5
  51. obsarray-1.1/obsarray.egg-info/scm_file_list.json +89 -0
  52. obsarray-1.1/obsarray.egg-info/scm_version.json +8 -0
  53. obsarray-1.1/obsarray.egg-info/top_level.txt +1 -0
  54. obsarray-1.1/pyproject.toml +80 -0
  55. obsarray-1.1/quality_documentation/.gitignore +295 -0
  56. obsarray-1.1/quality_documentation/QualityDocumentation.tex +122 -0
  57. obsarray-1.1/quality_documentation/base/CookiecutterMacros.tex +7 -0
  58. obsarray-1.1/quality_documentation/base/acronyms.tex +10 -0
  59. obsarray-1.1/quality_documentation/base/history.tex +10 -0
  60. obsarray-1.1/quality_documentation/base/metadata.tex +23 -0
  61. obsarray-1.1/quality_documentation/base/pythoninputstyle.tex +20 -0
  62. obsarray-1.1/quality_documentation/base/sil2.tex +11 -0
  63. obsarray-1.1/quality_documentation/base/sil3.tex +11 -0
  64. obsarray-1.1/quality_documentation/base/sources.bib +22 -0
  65. obsarray-1.1/quality_documentation/base/sources.tex +5 -0
  66. obsarray-1.1/quality_documentation/countpdfpages.sh +8 -0
  67. obsarray-1.1/quality_documentation/footnotehyper-sphinx.sty +269 -0
  68. obsarray-1.1/quality_documentation/obsarray_QF-59.docm +0 -0
  69. obsarray-1.1/quality_documentation/obsarray_requirements.docx +0 -0
  70. obsarray-1.1/quality_documentation/review_checklists/qf-16a.docx +0 -0
  71. obsarray-1.1/quality_documentation/review_checklists/qf-16b.docx +0 -0
  72. obsarray-1.1/quality_documentation/review_checklists/qf-16c.docx +0 -0
  73. obsarray-1.1/quality_documentation/review_checklists/qf-16d.docx +0 -0
  74. obsarray-1.1/quality_documentation/review_checklists/qf-16e.docx +0 -0
  75. obsarray-1.1/quality_documentation/review_checklists/qf-16f.docx +0 -0
  76. obsarray-1.1/quality_documentation/softwareRequirements.sty +153 -0
  77. obsarray-1.1/quality_documentation/sphinx.sty +1960 -0
  78. obsarray-1.1/quality_documentation/sphinxcyrillic.sty +55 -0
  79. obsarray-1.1/quality_documentation/sphinxhighlight.sty +105 -0
  80. obsarray-1.1/quality_documentation/sphinxhowto.cls +102 -0
  81. obsarray-1.1/quality_documentation/sphinxmanual.cls +128 -0
  82. obsarray-1.1/quality_documentation/sphinxmessages.sty +21 -0
  83. obsarray-1.1/quality_documentation/sphinxmulticell.sty +317 -0
  84. obsarray-1.1/quality_documentation/uml/copy your design png file into this folder.txt +1 -0
  85. obsarray-1.0.3/MANIFEST.in +0 -2
  86. obsarray-1.0.3/PKG-INFO +0 -57
  87. obsarray-1.0.3/README.md +0 -35
  88. obsarray-1.0.3/obsarray/_version.py +0 -21
  89. obsarray-1.0.3/obsarray.egg-info/PKG-INFO +0 -57
  90. obsarray-1.0.3/obsarray.egg-info/SOURCES.txt +0 -33
  91. obsarray-1.0.3/obsarray.egg-info/top_level.txt +0 -5
  92. obsarray-1.0.3/pyproject.toml +0 -47
  93. obsarray-1.0.3/setup.py +0 -7
  94. obsarray-1.0.3/versioneer.py +0 -2334
  95. {obsarray-1.0.3 → obsarray-1.1}/LICENSE +0 -0
  96. {obsarray-1.0.3 → obsarray-1.1}/obsarray/templater/__init__.py +0 -0
  97. {obsarray-1.0.3 → obsarray-1.1}/obsarray/templater/dswriter.py +0 -0
  98. {obsarray-1.0.3 → obsarray-1.1}/obsarray/templater/tests/__init__.py +0 -0
  99. {obsarray-1.0.3 → obsarray-1.1}/obsarray/templater/tests/test_dswriter.py +0 -0
  100. {obsarray-1.0.3 → obsarray-1.1}/obsarray/templater/tests/test_template_util.py +0 -0
  101. {obsarray-1.0.3 → obsarray-1.1}/obsarray/test/__init__.py +0 -0
  102. {obsarray-1.0.3 → obsarray-1.1}/obsarray/test/test_err_corr_forms.py +0 -0
  103. {obsarray-1.0.3 → obsarray-1.1}/obsarray.egg-info/dependency_links.txt +0 -0
  104. {obsarray-1.0.3 → obsarray-1.1}/setup.cfg +0 -0
@@ -0,0 +1,97 @@
1
+ name: Publish to PyPI
2
+
3
+ # Triggered by pushing a v* tag, or manually via the "Run workflow" button.
4
+ on:
5
+ push:
6
+ tags: ["v*"]
7
+ workflow_dispatch:
8
+ inputs:
9
+ confirm:
10
+ description: "Type 'publish' to confirm release"
11
+ required: true
12
+
13
+ jobs:
14
+ # -----------------------------------------------------------------------
15
+ # Guard: manual runs require the confirmation input.
16
+ # -----------------------------------------------------------------------
17
+ check:
18
+ name: Check confirmation
19
+ runs-on: ubuntu-latest
20
+ if: >
21
+ github.event_name == 'push' ||
22
+ github.event.inputs.confirm == 'publish'
23
+ steps:
24
+ - run: echo "Confirmed — proceeding with release."
25
+
26
+ # -----------------------------------------------------------------------
27
+ # Test gate: don't publish if tests fail.
28
+ # -----------------------------------------------------------------------
29
+ test:
30
+ name: Tests (Python 3.13)
31
+ needs: check
32
+ runs-on: ubuntu-latest
33
+ steps:
34
+ - uses: actions/checkout@v7
35
+ - uses: actions/setup-python@v7
36
+ with:
37
+ python-version: "3.13"
38
+ cache: pip
39
+ - run: pip install -e ".[dev]"
40
+ - run: pytest --cov=obsarray
41
+
42
+ # -----------------------------------------------------------------------
43
+ # Build source distribution and wheel.
44
+ # -----------------------------------------------------------------------
45
+ build:
46
+ name: Build distribution
47
+ needs: test
48
+ runs-on: ubuntu-latest
49
+ steps:
50
+ - uses: actions/checkout@v7
51
+ with:
52
+ fetch-depth: 0 # full history so setuptools_scm picks up the tag
53
+
54
+ - uses: actions/setup-python@v7
55
+ with:
56
+ python-version: "3.13"
57
+
58
+ - name: Build
59
+ run: |
60
+ pip install build
61
+ python -m build
62
+
63
+ - name: Store distribution packages
64
+ uses: actions/upload-artifact@v7
65
+ with:
66
+ name: dist
67
+ path: dist/
68
+
69
+ # -----------------------------------------------------------------------
70
+ # Publish to PyPI via trusted publisher (OIDC — no API token needed).
71
+ #
72
+ # One-time setup required in the PyPI project settings:
73
+ # Publisher: GitHub Actions
74
+ # Owner: comet-toolkit
75
+ # Repository: obsarray
76
+ # Workflow: publish.yml
77
+ # Environment: pypi
78
+ # -----------------------------------------------------------------------
79
+ publish:
80
+ name: Publish to PyPI
81
+ needs: build
82
+ runs-on: ubuntu-latest
83
+ environment:
84
+ name: pypi
85
+ url: https://pypi.org/p/obsarray
86
+ permissions:
87
+ id-token: write # required for OIDC trusted publishing
88
+
89
+ steps:
90
+ - name: Download distribution packages
91
+ uses: actions/download-artifact@v8
92
+ with:
93
+ name: dist
94
+ path: dist/
95
+
96
+ - name: Publish to PyPI
97
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,72 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ test:
11
+ name: "Python ${{ matrix.python-version }}"
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ python-version: ["3.11", "3.12", "3.13"]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v7
21
+
22
+ - name: Set up Python ${{ matrix.python-version }}
23
+ uses: actions/setup-python@v7
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+ cache: pip
27
+
28
+ - name: Install dependencies
29
+ run: pip install -e ".[dev]"
30
+
31
+ - name: Run tests
32
+ run: |
33
+ mkdir -p test_report
34
+ pytest \
35
+ --html=test_report/report.html \
36
+ --cov-report html:test_report/cov_report \
37
+ --cov-report xml:test_report/coverage.xml \
38
+ --junitxml=test_report/junit.xml \
39
+ --cov=obsarray
40
+
41
+ - name: Upload test report
42
+ if: always()
43
+ uses: actions/upload-artifact@v7
44
+ with:
45
+ name: test-report-py${{ matrix.python-version }}
46
+ path: test_report/
47
+ retention-days: 7
48
+
49
+ - name: Upload coverage to Codecov
50
+ if: matrix.python-version == '3.13'
51
+ uses: codecov/codecov-action@v7
52
+ with:
53
+ files: test_report/coverage.xml
54
+ token: ${{ secrets.CODECOV_TOKEN }}
55
+ fail_ci_if_error: false
56
+
57
+ lint:
58
+ name: Lint
59
+ runs-on: ubuntu-latest
60
+ steps:
61
+ - uses: actions/checkout@v7
62
+ - uses: actions/setup-python@v7
63
+ with:
64
+ python-version: "3.13"
65
+ cache: pip
66
+ - run: pip install -e ".[dev]"
67
+ - name: ruff format
68
+ run: ruff format --check obsarray
69
+ - name: ruff lint
70
+ run: ruff check obsarray
71
+ - name: mypy
72
+ run: mypy obsarray
@@ -0,0 +1,128 @@
1
+ # macOS
2
+ .DS_Store
3
+
4
+ # Mypy cache
5
+ .mypy_cache
6
+
7
+ # Ruff cache
8
+ .ruff_cache
9
+
10
+ # Compiles docs for gitlab pages
11
+ public
12
+ latex
13
+
14
+ # Visual studio / pycharm folders
15
+ .idea
16
+ .vscode
17
+
18
+ # Byte-compiled / optimized / DLL files
19
+ __pycache__/
20
+ *.py[cod]
21
+ *$py.class
22
+
23
+ # C extensions
24
+ *.so
25
+
26
+ # Distribution / packaging
27
+ .Python
28
+ env/
29
+ build/
30
+ develop-eggs/
31
+ dist/
32
+ downloads/
33
+ eggs/
34
+ .eggs/
35
+ lib/
36
+ lib64/
37
+ parts/
38
+ sdist/
39
+ var/
40
+ wheels/
41
+ *.egg-info/
42
+ .installed.cfg
43
+ *.egg
44
+ docs/_build
45
+ docs/content/api
46
+
47
+ # PyInstaller
48
+ # Usually these files are written by a python script from a template
49
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
50
+ *.manifest
51
+ *.spec
52
+
53
+ # Installer logs
54
+ pip-log.txt
55
+ pip-delete-this-directory.txt
56
+
57
+ # Unit test / coverage reports
58
+ htmlcov/
59
+ .tox/
60
+ .coverage
61
+ .coverage.*
62
+ .cache
63
+ nosetests.xml
64
+ coverage.xml
65
+ *.cover
66
+ .hypothesis/
67
+ .pytest_cache/
68
+ test_report/
69
+
70
+ # Translations
71
+ *.mo
72
+ *.pot
73
+
74
+ # Django stuff:
75
+ *.log
76
+ local_settings.py
77
+
78
+ # Flask stuff:
79
+ instance/
80
+ .webassets-cache
81
+
82
+ # Scrapy stuff:
83
+ .scrapy
84
+
85
+ # Sphinx documentation
86
+ docs/_build/
87
+ docs/content/user/generated/
88
+
89
+ # PyBuilder
90
+ target/
91
+
92
+ # Jupyter Notebook
93
+ .ipynb_checkpoints
94
+
95
+ # pyenv
96
+ .python-version
97
+
98
+ # celery beat schedule file
99
+ celerybeat-schedule
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # dotenv
105
+ .env
106
+
107
+ # virtualenv
108
+ .venv
109
+ venv/
110
+ ENV/
111
+
112
+ # Spyder project settings
113
+ .spyderproject
114
+ .spyproject
115
+
116
+ # Rope project settings
117
+ .ropeproject
118
+
119
+ # mkdocs documentation
120
+ /site
121
+
122
+ # mypy
123
+ .mypy_cache/
124
+
125
+ # IDE settings
126
+ .vscode/.git.old
127
+
128
+ CLAUDE.md
@@ -0,0 +1,21 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: check-added-large-files
6
+
7
+ - repo: https://github.com/astral-sh/ruff-pre-commit
8
+ rev: v0.15.13
9
+ hooks:
10
+ - id: ruff-check
11
+ args: [--fix]
12
+ - id: ruff-format
13
+
14
+ - repo: https://github.com/pre-commit/mirrors-mypy
15
+ rev: v2.1.0
16
+ hooks:
17
+ - id: mypy
18
+ # Match the CI lint job: check the package only, with numpy/xarray
19
+ # type information available (CI installs the package).
20
+ files: ^obsarray/
21
+ additional_dependencies: [numpy, xarray]
@@ -0,0 +1,28 @@
1
+ # Read the Docs configuration file for Sphinx projects
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Set the OS, Python version and other tools you might need
8
+ build:
9
+ os: ubuntu-24.04
10
+ tools:
11
+ python: "3.13"
12
+ jobs:
13
+ # Read the Docs clones shallowly; setuptools_scm needs the tags to
14
+ # derive the version shown in the docs.
15
+ post_checkout:
16
+ - git fetch --unshallow || true
17
+
18
+ # Build documentation in the "docs/" directory with Sphinx
19
+ sphinx:
20
+ configuration: docs/conf.py
21
+
22
+ # Install the package with its docs extras from pyproject.toml
23
+ python:
24
+ install:
25
+ - method: pip
26
+ path: .
27
+ extra_requirements:
28
+ - docs
@@ -0,0 +1,2 @@
1
+ include README.md
2
+ include LICENSE
obsarray-1.1/PKG-INFO ADDED
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.4
2
+ Name: obsarray
3
+ Version: 1.1
4
+ Summary: Extension to xarray for handling uncertainty-quantified observation data
5
+ Author-email: CoMet Toolkit Team <team@comet-toolkit.org>
6
+ Project-URL: Homepage, https://github.com/comet-toolkit/obsarray
7
+ Project-URL: Documentation, https://obsarray.readthedocs.io
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: numpy
18
+ Requires-Dist: xarray
19
+ Requires-Dist: netcdf4
20
+ Requires-Dist: comet_maths
21
+ Provides-Extra: dev
22
+ Requires-Dist: ruff==0.15.13; extra == "dev"
23
+ Requires-Dist: mypy==2.1.0; extra == "dev"
24
+ Requires-Dist: pre-commit; extra == "dev"
25
+ Requires-Dist: pytest; extra == "dev"
26
+ Requires-Dist: pytest-html; extra == "dev"
27
+ Requires-Dist: pytest-cov; extra == "dev"
28
+ Provides-Extra: docs
29
+ Requires-Dist: sphinx; extra == "docs"
30
+ Requires-Dist: sphinx_book_theme; extra == "docs"
31
+ Requires-Dist: sphinx_design; extra == "docs"
32
+ Requires-Dist: sphinx_autosummary_accessors; extra == "docs"
33
+ Requires-Dist: ipython; extra == "docs"
34
+ Dynamic: license-file
35
+
36
+ # obsarray: Measurement uncertainty handling in Python
37
+
38
+ [![Tests](https://github.com/comet-toolkit/obsarray/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/comet-toolkit/obsarray/actions/workflows/tests.yml)
39
+ [![codecov](https://codecov.io/gh/comet-toolkit/obsarray/branch/main/graph/badge.svg?token=PZTGG03VQY)](https://codecov.io/gh/comet-toolkit/obsarray)
40
+ [![Documentation Status](https://readthedocs.org/projects/obsarray/badge/?version=latest)](https://obsarray.readthedocs.io/en/latest/?badge=latest)
41
+ [![PyPI](https://img.shields.io/pypi/v/obsarray)](https://pypi.org/project/obsarray/)
42
+
43
+ **obsarray** is an extension to [xarray](https://docs.xarray.dev/en/stable/) for defining, storing and interfacing with uncertainty information using standardised metadata. It is particularly designed to work well with [netCDF](https://www.unidata.ucar.edu/software/netcdf/) files and for the Earth Observation community.
44
+
45
+ > **Upcoming change:** obsarray currently follows v0.1 of the
46
+ > [UNC specification](https://comet-toolkit.github.io/unc_website/) for
47
+ > uncertainty metadata. A future release will default to
48
+ > [draft v0.2](https://comet-toolkit.github.io/unc_website/specification/draft-v0.2/unc_specification.html),
49
+ > which is proposed for inclusion in the CF conventions and is not backwards
50
+ > compatible with v0.1. See
51
+ > [what this means for you](https://obsarray.readthedocs.io/en/latest/content/user/unc_conventions.html).
52
+
53
+ obsarray is part of the [CoMet Toolkit](https://www.comet-toolkit.org) (community metrology toolkit), and can combined with the [punpy](https://punpy.readthedocs.io/en/latest/) (propagating uncertainties in python) module for very simple propagation of defined data uncertainties through arbitrary python functions.
54
+
55
+ ## Installation
56
+
57
+ obsarray is installable via pip:
58
+
59
+ ```bash
60
+ pip install obsarray
61
+ ```
62
+
63
+ ## Documentation
64
+
65
+ For more information visit our [documentation](https://obsarray.readthedocs.io/en/latest).
66
+
67
+ ## Development
68
+
69
+ Clone the repository and install it in editable mode with the development
70
+ extras:
71
+
72
+ ```bash
73
+ pip install -e ".[dev]" # Development tools (ruff, mypy, pytest, …)
74
+ pip install -e ".[docs]" # Documentation build (sphinx, …)
75
+ ```
76
+
77
+ Install the pre-commit hooks after cloning:
78
+
79
+ ```bash
80
+ pre-commit install
81
+ ```
82
+
83
+ When you commit, `ruff` will lint and format your code and `mypy` will
84
+ type-check it. If it makes corrections the commit will be aborted so you can
85
+ review the changes — just commit again once you are happy.
86
+
87
+ Run the test suite with:
88
+
89
+ ```bash
90
+ pytest
91
+ ```
92
+
93
+ ### Releasing
94
+
95
+ The package version is derived from git tags by
96
+ [setuptools_scm](https://setuptools-scm.readthedocs.io), so there is no
97
+ version number to edit in the source. To release, tag `main` and push the tag:
98
+
99
+ ```bash
100
+ git tag v<X.Y.Z>
101
+ git push origin v<X.Y.Z>
102
+ ```
103
+
104
+ This triggers the `publish.yml` GitHub Actions workflow, which runs the tests,
105
+ builds the sdist and wheel, and publishes them to PyPI via trusted publishing.
106
+ The workflow can also be run manually from the GitHub Actions UI (type
107
+ `publish` in the confirmation input).
108
+
109
+ ## Compatibility
110
+
111
+ obsarray requires Python 3.11 or later and is tested on Python 3.11, 3.12,
112
+ and 3.13.
113
+
114
+ ## License
115
+
116
+ obsarray is free software licensed under the
117
+ [GNU Lesser General Public License (v3)](./LICENSE).
118
+
119
+ ## Acknowledgements
120
+
121
+ obsarray has been developed by the [CoMet Toolkit Team](mailto:team@comet-toolkit.org).
122
+
123
+ The development has been funded by:
124
+
125
+ * The UK's Department for Business, Energy and Industrial Strategy's (BEIS) National Measurement System (NMS) programme
126
+ * The IDEAS-QA4EO project funded by the European Space Agency.
127
+
128
+ ## Project status
129
+
130
+ obsarray is under active development. It is beta software.
obsarray-1.1/README.md ADDED
@@ -0,0 +1,95 @@
1
+ # obsarray: Measurement uncertainty handling in Python
2
+
3
+ [![Tests](https://github.com/comet-toolkit/obsarray/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/comet-toolkit/obsarray/actions/workflows/tests.yml)
4
+ [![codecov](https://codecov.io/gh/comet-toolkit/obsarray/branch/main/graph/badge.svg?token=PZTGG03VQY)](https://codecov.io/gh/comet-toolkit/obsarray)
5
+ [![Documentation Status](https://readthedocs.org/projects/obsarray/badge/?version=latest)](https://obsarray.readthedocs.io/en/latest/?badge=latest)
6
+ [![PyPI](https://img.shields.io/pypi/v/obsarray)](https://pypi.org/project/obsarray/)
7
+
8
+ **obsarray** is an extension to [xarray](https://docs.xarray.dev/en/stable/) for defining, storing and interfacing with uncertainty information using standardised metadata. It is particularly designed to work well with [netCDF](https://www.unidata.ucar.edu/software/netcdf/) files and for the Earth Observation community.
9
+
10
+ > **Upcoming change:** obsarray currently follows v0.1 of the
11
+ > [UNC specification](https://comet-toolkit.github.io/unc_website/) for
12
+ > uncertainty metadata. A future release will default to
13
+ > [draft v0.2](https://comet-toolkit.github.io/unc_website/specification/draft-v0.2/unc_specification.html),
14
+ > which is proposed for inclusion in the CF conventions and is not backwards
15
+ > compatible with v0.1. See
16
+ > [what this means for you](https://obsarray.readthedocs.io/en/latest/content/user/unc_conventions.html).
17
+
18
+ obsarray is part of the [CoMet Toolkit](https://www.comet-toolkit.org) (community metrology toolkit), and can combined with the [punpy](https://punpy.readthedocs.io/en/latest/) (propagating uncertainties in python) module for very simple propagation of defined data uncertainties through arbitrary python functions.
19
+
20
+ ## Installation
21
+
22
+ obsarray is installable via pip:
23
+
24
+ ```bash
25
+ pip install obsarray
26
+ ```
27
+
28
+ ## Documentation
29
+
30
+ For more information visit our [documentation](https://obsarray.readthedocs.io/en/latest).
31
+
32
+ ## Development
33
+
34
+ Clone the repository and install it in editable mode with the development
35
+ extras:
36
+
37
+ ```bash
38
+ pip install -e ".[dev]" # Development tools (ruff, mypy, pytest, …)
39
+ pip install -e ".[docs]" # Documentation build (sphinx, …)
40
+ ```
41
+
42
+ Install the pre-commit hooks after cloning:
43
+
44
+ ```bash
45
+ pre-commit install
46
+ ```
47
+
48
+ When you commit, `ruff` will lint and format your code and `mypy` will
49
+ type-check it. If it makes corrections the commit will be aborted so you can
50
+ review the changes — just commit again once you are happy.
51
+
52
+ Run the test suite with:
53
+
54
+ ```bash
55
+ pytest
56
+ ```
57
+
58
+ ### Releasing
59
+
60
+ The package version is derived from git tags by
61
+ [setuptools_scm](https://setuptools-scm.readthedocs.io), so there is no
62
+ version number to edit in the source. To release, tag `main` and push the tag:
63
+
64
+ ```bash
65
+ git tag v<X.Y.Z>
66
+ git push origin v<X.Y.Z>
67
+ ```
68
+
69
+ This triggers the `publish.yml` GitHub Actions workflow, which runs the tests,
70
+ builds the sdist and wheel, and publishes them to PyPI via trusted publishing.
71
+ The workflow can also be run manually from the GitHub Actions UI (type
72
+ `publish` in the confirmation input).
73
+
74
+ ## Compatibility
75
+
76
+ obsarray requires Python 3.11 or later and is tested on Python 3.11, 3.12,
77
+ and 3.13.
78
+
79
+ ## License
80
+
81
+ obsarray is free software licensed under the
82
+ [GNU Lesser General Public License (v3)](./LICENSE).
83
+
84
+ ## Acknowledgements
85
+
86
+ obsarray has been developed by the [CoMet Toolkit Team](mailto:team@comet-toolkit.org).
87
+
88
+ The development has been funded by:
89
+
90
+ * The UK's Department for Business, Energy and Industrial Strategy's (BEIS) National Measurement System (NMS) programme
91
+ * The IDEAS-QA4EO project funded by the European Space Agency.
92
+
93
+ ## Project status
94
+
95
+ obsarray is under active development. It is beta software.
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = python -msphinx
7
+ SPHINXPROJ = obsarray
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,4 @@
1
+ code.literal {
2
+ color: #404040 !important;
3
+ background-color: #fbfbfb !important;
4
+ }
@@ -0,0 +1,5 @@
1
+ {{ objname | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. auto{{ objtype }}:: {{ objname }}
@@ -0,0 +1,5 @@
1
+ {{ fullname | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. auto{{ objtype }}:: {{ objname }}
@@ -0,0 +1,33 @@
1
+ {{ objname | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. autoclass:: {{ objname }}
6
+
7
+ {% block methods %}
8
+ .. automethod:: __init__
9
+
10
+ {% if methods %}
11
+ .. rubric:: {{ _('Methods') }}
12
+
13
+ .. autosummary::
14
+ :toctree:
15
+ :nosignatures:
16
+ {% for item in methods %}
17
+ ~{{ name }}.{{ item }}
18
+ {%- endfor %}
19
+ {% endif %}
20
+ {% endblock %}
21
+
22
+ {% block attributes %}
23
+ {% if attributes %}
24
+ .. rubric:: {{ _('Attributes') }}
25
+
26
+ .. autosummary::
27
+ :toctree:
28
+ :nosignatures:
29
+ {% for item in attributes %}
30
+ ~{{ name }}.{{ item }}
31
+ {%- endfor %}
32
+ {% endif %}
33
+ {% endblock %}
@@ -0,0 +1,5 @@
1
+ {{ objname | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. auto{{ objtype }}:: {{ objname }}
@@ -0,0 +1,5 @@
1
+ {{ objname | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. auto{{ objtype }}:: {{ objname }}