xopr 0.1.2__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 (41) hide show
  1. xopr-0.1.2/.editorconfig +20 -0
  2. xopr-0.1.2/.github/ISSUE_TEMPLATE/01-bug-report.yml +68 -0
  3. xopr-0.1.2/.github/ISSUE_TEMPLATE/config.yml +5 -0
  4. xopr-0.1.2/.github/PULL_REQUEST_TEMPLATE.md +4 -0
  5. xopr-0.1.2/.github/workflows/docs.yml +63 -0
  6. xopr-0.1.2/.github/workflows/publish.yml +119 -0
  7. xopr-0.1.2/.github/workflows/test.yml +56 -0
  8. xopr-0.1.2/.gitignore +252 -0
  9. xopr-0.1.2/CHANGELOG.md +14 -0
  10. xopr-0.1.2/CODE_OF_CONDUCT.md +130 -0
  11. xopr-0.1.2/CONTRIBUTING.md +106 -0
  12. xopr-0.1.2/DEVELOPMENT.md +229 -0
  13. xopr-0.1.2/LICENSE +21 -0
  14. xopr-0.1.2/PKG-INFO +60 -0
  15. xopr-0.1.2/README.md +27 -0
  16. xopr-0.1.2/docs/.gitignore +2 -0
  17. xopr-0.1.2/docs/img/opr-data-access-infra-1.png +0 -0
  18. xopr-0.1.2/docs/index.md +54 -0
  19. xopr-0.1.2/docs/myst.yml +24 -0
  20. xopr-0.1.2/docs/notebooks/.gitignore +4 -0
  21. xopr-0.1.2/docs/notebooks/STAC.ipynb +52057 -0
  22. xopr-0.1.2/docs/notebooks/demo_notebook.ipynb +378 -0
  23. xopr-0.1.2/docs/notebooks/radar_cache/.gitignore +2 -0
  24. xopr-0.1.2/docs/notebooks/search_and_scaling.ipynb +530 -0
  25. xopr-0.1.2/environment.yml +31 -0
  26. xopr-0.1.2/pyproject.toml +48 -0
  27. xopr-0.1.2/requirements.txt +787 -0
  28. xopr-0.1.2/scripts/.gitignore +1 -0
  29. xopr-0.1.2/scripts/build_stac_catalog.py +451 -0
  30. xopr-0.1.2/scripts/upload_to_gcloud.sh +14 -0
  31. xopr-0.1.2/src/xopr/__init__.py +34 -0
  32. xopr-0.1.2/src/xopr/_version.py +34 -0
  33. xopr-0.1.2/src/xopr/cf_units.py +148 -0
  34. xopr-0.1.2/src/xopr/example.py +36 -0
  35. xopr-0.1.2/src/xopr/geometry.py +104 -0
  36. xopr-0.1.2/src/xopr/opr_access.py +1277 -0
  37. xopr-0.1.2/src/xopr/ops_api.py +201 -0
  38. xopr-0.1.2/src/xopr/stac/__init__.py +24 -0
  39. xopr-0.1.2/src/xopr/stac/catalog.py +263 -0
  40. xopr-0.1.2/src/xopr/stac/metadata.py +228 -0
  41. xopr-0.1.2/tests/unit/test_example.py +20 -0
@@ -0,0 +1,20 @@
1
+ # Editor Configuration (http://editorconfig.org)
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ indent_style = space
7
+ indent_size = 4
8
+ end_of_line = lf
9
+ insert_final_newline = true
10
+ trim_trailing_whitespace = true
11
+ max_line_length = 88
12
+
13
+ [*.{json,yml,yaml}]
14
+ indent_size = 2
15
+
16
+ [*.{md,rst}]
17
+ trim_trailing_whitespace = false
18
+
19
+ [Makefile]
20
+ indent_style = tab
@@ -0,0 +1,68 @@
1
+ name: 🐞 Bug report
2
+ description: Report a problem to help improve this project
3
+ title: "[BUG] "
4
+ labels: [bug, triage]
5
+ body:
6
+ - type: checkboxes
7
+ attributes:
8
+ label: Is there an existing issue for this?
9
+ description: Please search to see if an issue already exists for the bug you encountered.
10
+ options:
11
+ - label: I have searched the existing issues
12
+ required: true
13
+
14
+ - type: textarea
15
+ attributes:
16
+ label: Problem description
17
+ description: |
18
+ A concise description of what you're experiencing.
19
+
20
+ Please explain:
21
+
22
+ * **what** you tried to achieve,
23
+ * **how** you went about it (referring to the code sample), and
24
+ * **why** the current behaviour is a problem and what output you expected instead.
25
+ validations:
26
+ required: false
27
+
28
+ - type: textarea
29
+ attributes:
30
+ label: Code sample
31
+ description: >
32
+ Create a [minimal, complete, verifiable example](https://stackoverflow.com/help/mcve).
33
+ Please, paste your code between the ``` tickmarks below or link to a [gist](https://gist.github.com/).
34
+ value: |
35
+ Code run:
36
+
37
+ ```python
38
+ ```
39
+
40
+ Traceback:
41
+
42
+ ```text
43
+ ```
44
+ validations:
45
+ required: false
46
+
47
+ - type: textarea
48
+ attributes:
49
+ label: Environment
50
+ description: >
51
+ Please paste the output of running `depinfo --markdown xopr`
52
+ in your environment between the `details` tags below.
53
+ value: |
54
+ <details>
55
+
56
+ </details>
57
+ validations:
58
+ required: true
59
+
60
+ - type: textarea
61
+ attributes:
62
+ label: Anything else?
63
+ description: |
64
+ Links? References? Anything that will give us more context about the issue you are encountering!
65
+
66
+ Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
67
+ validations:
68
+ required: false
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Community Support
4
+ url: https://github.com/thomasteisberg/xopr/discussions
5
+ about: Please ask and answer questions here.
@@ -0,0 +1,4 @@
1
+ - [ ] fix #(issue number)
2
+ - [ ] description of feature/fix
3
+ - [ ] tests added/passed
4
+ - [ ] add an entry to the [changelog](../CHANGELOG.md)
@@ -0,0 +1,63 @@
1
+ name: Build and Deploy Jupyter Book
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+ pages: write
13
+ id-token: write
14
+
15
+ concurrency:
16
+ group: "pages"
17
+ cancel-in-progress: false
18
+
19
+ env:
20
+ BASE_URL: /xopr
21
+
22
+ jobs:
23
+ build:
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - name: Checkout
27
+ uses: actions/checkout@v4
28
+
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@v4
31
+
32
+ - name: Set up Python
33
+ run: uv python install
34
+
35
+ - name: Install dependencies
36
+ run: uv sync --extra docs
37
+
38
+ - name: Build Jupyter Book
39
+ run: |
40
+ cd docs
41
+ uv run --extra docs jupyter-book build --html --execute
42
+
43
+ - name: Setup Pages
44
+ uses: actions/configure-pages@v5
45
+ if: github.ref == 'refs/heads/main'
46
+
47
+ - name: Upload artifact
48
+ uses: actions/upload-pages-artifact@v3
49
+ if: github.ref == 'refs/heads/main'
50
+ with:
51
+ path: docs/_build/html
52
+
53
+ deploy:
54
+ environment:
55
+ name: github-pages
56
+ url: ${{ steps.deployment.outputs.page_url }}
57
+ runs-on: ubuntu-latest
58
+ needs: build
59
+ if: github.ref == 'refs/heads/main'
60
+ steps:
61
+ - name: Deploy to GitHub Pages
62
+ id: deployment
63
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,119 @@
1
+ name: Publish
2
+ on:
3
+ push:
4
+ tags:
5
+ - "*.*.*"
6
+ jobs:
7
+ build:
8
+ name: Build distribution 📦
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ python-version: ["3.10", "3.11", "3.12"]
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ - name: Install pypa/build
21
+ run: python3 -m pip install build --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-${{ matrix.python-version }}
28
+ path: dist/
29
+
30
+ publish-to-testpypi:
31
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
32
+ name: Publish Python 🐍 distribution 📦 to TestPyPI
33
+ needs:
34
+ - build
35
+ runs-on: ubuntu-latest
36
+
37
+ environment:
38
+ name: testpypi
39
+ url: https://test.pypi.org/p/xopr
40
+
41
+ permissions:
42
+ id-token: write
43
+
44
+ steps:
45
+ - name: Download all the dists
46
+ uses: actions/download-artifact@v4
47
+ with:
48
+ pattern: python-package-distributions-*
49
+ path: dist/
50
+ merge-multiple: true
51
+ - name: Publish distribution 📦 to TestPyPI
52
+ uses: pypa/gh-action-pypi-publish@release/v1
53
+ with:
54
+ repository-url: https://test.pypi.org/legacy/
55
+
56
+ publish-to-pypi:
57
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
58
+ name: Publish Python 🐍 distribution 📦 to PyPI
59
+ needs:
60
+ - publish-to-testpypi
61
+ runs-on: ubuntu-latest
62
+
63
+ environment:
64
+ name: pypi
65
+ url: https://pypi.org/p/xopr
66
+
67
+ permissions:
68
+ id-token: write
69
+
70
+ steps:
71
+ - name: Download all the dists
72
+ uses: actions/download-artifact@v4
73
+ with:
74
+ pattern: python-package-distributions-*
75
+ path: dist/
76
+ merge-multiple: true
77
+ - name: Publish distribution 📦 to PyPI
78
+ uses: pypa/gh-action-pypi-publish@release/v1
79
+
80
+ github-release:
81
+ name: Create GitHub Release with source code
82
+ needs:
83
+ - publish-to-pypi
84
+ runs-on: ubuntu-latest
85
+
86
+ permissions:
87
+ contents: write
88
+
89
+ steps:
90
+ - name: Checkout code
91
+ uses: actions/checkout@v4
92
+ with:
93
+ fetch-depth: 0
94
+ - name: Generate release notes
95
+ id: generate_notes
96
+ run: |
97
+ # Get the previous tag
98
+ PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
99
+
100
+ # Generate changelog from commits
101
+ if [ -n "$PREV_TAG" ]; then
102
+ echo "## Changes since $PREV_TAG" > release_notes.md
103
+ echo "" >> release_notes.md
104
+ git log --pretty=format:"- %s (%h)" $PREV_TAG..HEAD >> release_notes.md
105
+ else
106
+ echo "## Initial Release" > release_notes.md
107
+ echo "" >> release_notes.md
108
+ echo "First release of xopr - Access Open Polar Radar data in the Python data ecosystem" >> release_notes.md
109
+ fi
110
+
111
+ echo "" >> release_notes.md
112
+ echo "## Installation" >> release_notes.md
113
+ echo '```bash' >> release_notes.md
114
+ echo 'pip install xopr==${{ github.ref_name }}' >> release_notes.md
115
+ echo '```' >> release_notes.md
116
+ - name: Create GitHub Release
117
+ env:
118
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119
+ run: gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes-file release_notes.md --title "Release ${{ github.ref_name }}"
@@ -0,0 +1,56 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request_target:
7
+ types: [assigned, opened, synchronize, reopened]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ['3.10', '3.11', '3.12']
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Miniconda
20
+ uses: conda-incubator/setup-miniconda@v3
21
+ with:
22
+ auto-update-conda: true
23
+ python-version: ${{ matrix.python-version }}
24
+ environment-file: environment.yml
25
+ activate-environment: xopr-test
26
+
27
+ - name: Install package
28
+ shell: bash -l {0}
29
+ run: |
30
+ pip install -e .
31
+
32
+ - name: Run flake8
33
+ shell: bash -l {0}
34
+ run: |
35
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37
+
38
+ - name: Run tests with pytest
39
+ shell: bash -l {0}
40
+ run: |
41
+ pytest --cov=xopr --cov-report=html --cov-report=xml --cov-report=term
42
+
43
+ - name: Deploy coverage to GitHub Pages
44
+ uses: peaceiris/actions-gh-pages@v3
45
+ if: github.ref == 'refs/heads/main' && matrix.python-version == '3.12'
46
+ with:
47
+ github_token: ${{ secrets.GITHUB_TOKEN }}
48
+ publish_dir: ./htmlcov
49
+ destination_dir: coverage
50
+
51
+ - name: Coverage comment
52
+ uses: py-cov-action/python-coverage-comment-action@v3
53
+ if: github.event_name == 'pull_request_target'
54
+ with:
55
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56
+ COVERAGE_DATA_BRANCH: main
xopr-0.1.2/.gitignore ADDED
@@ -0,0 +1,252 @@
1
+ ### Linux template
2
+ *~
3
+
4
+ # temporary files which can be created if a process still has a handle open of a deleted file
5
+ .fuse_hidden*
6
+
7
+ # KDE directory preferences
8
+ .directory
9
+
10
+ # Linux trash folder which might appear on any partition or disk
11
+ .Trash-*
12
+
13
+ # .nfs files are created when an open file is removed but is still being accessed
14
+ .nfs*
15
+
16
+ ### Windows template
17
+ # Windows thumbnail cache files
18
+ Thumbs.db
19
+ Thumbs.db:encryptable
20
+ ehthumbs.db
21
+ ehthumbs_vista.db
22
+
23
+ # Dump file
24
+ *.stackdump
25
+
26
+ # Folder config file
27
+ [Dd]esktop.ini
28
+
29
+ # Recycle Bin used on file shares
30
+ $RECYCLE.BIN/
31
+
32
+ # Windows Installer files
33
+ *.cab
34
+ *.msi
35
+ *.msix
36
+ *.msm
37
+ *.msp
38
+
39
+ # Windows shortcuts
40
+ *.lnk
41
+
42
+ ### JupyterNotebooks template
43
+ # gitignore template for Jupyter Notebooks
44
+ # website: http://jupyter.org/
45
+
46
+ .ipynb_checkpoints
47
+ */.ipynb_checkpoints/*
48
+
49
+ # IPython
50
+ profile_default/
51
+ ipython_config.py
52
+
53
+ # Remove previous ipynb_checkpoints
54
+ # git rm -r .ipynb_checkpoints/
55
+
56
+ ### macOS template
57
+ # General
58
+ .DS_Store
59
+ .AppleDouble
60
+ .LSOverride
61
+
62
+ # Icon must end with two \r
63
+ Icon
64
+
65
+ # Thumbnails
66
+ ._*
67
+
68
+ # Files that might appear in the root of a volume
69
+ .DocumentRevisions-V100
70
+ .fseventsd
71
+ .Spotlight-V100
72
+ .TemporaryItems
73
+ .Trashes
74
+ .VolumeIcon.icns
75
+ .com.apple.timemachine.donotpresent
76
+
77
+ # Directories potentially created on remote AFP share
78
+ .AppleDB
79
+ .AppleDesktop
80
+ Network Trash Folder
81
+ Temporary Items
82
+ .apdisk
83
+
84
+ ### Python template
85
+ # Byte-compiled / optimized / DLL files
86
+ __pycache__/
87
+ *.py[cod]
88
+ *$py.class
89
+
90
+ # C extensions
91
+ *.so
92
+
93
+ # Distribution / packaging
94
+ .Python
95
+ build/
96
+ develop-eggs/
97
+ dist/
98
+ downloads/
99
+ eggs/
100
+ .eggs/
101
+ lib/
102
+ lib64/
103
+ parts/
104
+ sdist/
105
+ var/
106
+ wheels/
107
+ share/python-wheels/
108
+ *.egg-info/
109
+ .installed.cfg
110
+ *.egg
111
+ MANIFEST
112
+
113
+ # PyInstaller
114
+ # Usually these files are written by a python script from a template
115
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
116
+ *.manifest
117
+ *.spec
118
+
119
+ # Installer logs
120
+ pip-log.txt
121
+ pip-delete-this-directory.txt
122
+
123
+ # Unit test / coverage reports
124
+ htmlcov/
125
+ .tox/
126
+ .nox/
127
+ .coverage
128
+ .coverage.*
129
+ .cache
130
+ nosetests.xml
131
+ coverage.xml
132
+ *.cover
133
+ *.py,cover
134
+ .hypothesis/
135
+ .pytest_cache/
136
+ cover/
137
+
138
+ # Translations
139
+ *.mo
140
+ *.pot
141
+
142
+ # Django stuff:
143
+ *.log
144
+ local_settings.py
145
+ db.sqlite3
146
+ db.sqlite3-journal
147
+
148
+ # Flask stuff:
149
+ instance/
150
+ .webassets-cache
151
+
152
+ # Scrapy stuff:
153
+ .scrapy
154
+
155
+ # Sphinx documentation
156
+ docs/_build/
157
+ docs/api
158
+
159
+ # PyBuilder
160
+ .pybuilder/
161
+ target/
162
+
163
+ # Jupyter Notebook
164
+
165
+ # IPython
166
+
167
+ # pyenv
168
+ # For a library or package, you might want to ignore these files since the code is
169
+ # intended to run in multiple environments; otherwise, check them in:
170
+ # .python-version
171
+
172
+ # pipenv
173
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
174
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
175
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
176
+ # install all needed dependencies.
177
+ #Pipfile.lock
178
+
179
+ # poetry
180
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
181
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
182
+ # commonly ignored for libraries.
183
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
184
+ #poetry.lock
185
+
186
+ # pdm
187
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
188
+ #pdm.lock
189
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
190
+ # in version control.
191
+ # https://pdm.fming.dev/#use-with-ide
192
+ .pdm.toml
193
+
194
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
195
+ __pypackages__/
196
+
197
+ # Celery stuff
198
+ celerybeat-schedule
199
+ celerybeat.pid
200
+
201
+ # SageMath parsed files
202
+ *.sage.py
203
+
204
+ # Environments
205
+ .env
206
+ .venv
207
+ env/
208
+ venv/
209
+ ENV/
210
+ env.bak/
211
+ venv.bak/
212
+
213
+ # Spyder project settings
214
+ .spyderproject
215
+ .spyproject
216
+
217
+ # Rope project settings
218
+ .ropeproject
219
+
220
+ # mkdocs documentation
221
+ /site
222
+
223
+ # mypy
224
+ .mypy_cache/
225
+ .dmypy.json
226
+ dmypy.json
227
+
228
+ # Pyre type checker
229
+ .pyre/
230
+
231
+ # pytype static type analyzer
232
+ .pytype/
233
+
234
+ # Cython debug symbols
235
+ cython_debug/
236
+
237
+ # PyCharm
238
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
239
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
240
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
241
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
242
+ #.idea/
243
+
244
+ # Hatch-VCS
245
+ _version.py
246
+
247
+ # MyST build outputs
248
+ _build
249
+
250
+ # uv
251
+ .venv/
252
+ uv.lock
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ - Upcoming features and fixes
11
+
12
+ ## [0.1.0] - (1979-01-01)
13
+
14
+ - First release