ecmwf-datastores-client 0.4.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 (54) hide show
  1. ecmwf_datastores_client-0.4.1/.cruft.json +20 -0
  2. ecmwf_datastores_client-0.4.1/.github/workflows/on-pr-closed.yml +18 -0
  3. ecmwf_datastores_client-0.4.1/.github/workflows/on-push.yml +261 -0
  4. ecmwf_datastores_client-0.4.1/.gitignore +475 -0
  5. ecmwf_datastores_client-0.4.1/.pre-commit-config-cruft.yaml +7 -0
  6. ecmwf_datastores_client-0.4.1/.pre-commit-config.yaml +44 -0
  7. ecmwf_datastores_client-0.4.1/Dockerfile +12 -0
  8. ecmwf_datastores_client-0.4.1/LICENSE +201 -0
  9. ecmwf_datastores_client-0.4.1/Makefile +46 -0
  10. ecmwf_datastores_client-0.4.1/PKG-INFO +519 -0
  11. ecmwf_datastores_client-0.4.1/README.md +286 -0
  12. ecmwf_datastores_client-0.4.1/ci/environment-ci.yml +23 -0
  13. ecmwf_datastores_client-0.4.1/ci/environment-integration.yml +9 -0
  14. ecmwf_datastores_client-0.4.1/docs/Makefile +20 -0
  15. ecmwf_datastores_client-0.4.1/docs/_static/.gitkeep +0 -0
  16. ecmwf_datastores_client-0.4.1/docs/_templates/.gitkeep +0 -0
  17. ecmwf_datastores_client-0.4.1/docs/conf.py +80 -0
  18. ecmwf_datastores_client-0.4.1/docs/index.md +22 -0
  19. ecmwf_datastores_client-0.4.1/docs/make.bat +35 -0
  20. ecmwf_datastores_client-0.4.1/docs/notebooks/index.md +7 -0
  21. ecmwf_datastores_client-0.4.1/docs/notebooks/quick_start.ipynb +45 -0
  22. ecmwf_datastores_client-0.4.1/ecmwf/datastores/__init__.py +39 -0
  23. ecmwf_datastores_client-0.4.1/ecmwf/datastores/catalogue.py +195 -0
  24. ecmwf_datastores_client-0.4.1/ecmwf/datastores/client.py +417 -0
  25. ecmwf_datastores_client-0.4.1/ecmwf/datastores/config.py +45 -0
  26. ecmwf_datastores_client-0.4.1/ecmwf/datastores/legacy_client.py +275 -0
  27. ecmwf_datastores_client-0.4.1/ecmwf/datastores/processing.py +735 -0
  28. ecmwf_datastores_client-0.4.1/ecmwf/datastores/profile.py +87 -0
  29. ecmwf_datastores_client-0.4.1/ecmwf/datastores/py.typed +0 -0
  30. ecmwf_datastores_client-0.4.1/ecmwf/datastores/utils.py +9 -0
  31. ecmwf_datastores_client-0.4.1/ecmwf/datastores/version.py +2 -0
  32. ecmwf_datastores_client-0.4.1/ecmwf_datastores_client.egg-info/PKG-INFO +519 -0
  33. ecmwf_datastores_client-0.4.1/ecmwf_datastores_client.egg-info/SOURCES.txt +52 -0
  34. ecmwf_datastores_client-0.4.1/ecmwf_datastores_client.egg-info/dependency_links.txt +1 -0
  35. ecmwf_datastores_client-0.4.1/ecmwf_datastores_client.egg-info/requires.txt +7 -0
  36. ecmwf_datastores_client-0.4.1/ecmwf_datastores_client.egg-info/top_level.txt +1 -0
  37. ecmwf_datastores_client-0.4.1/environment.yml +14 -0
  38. ecmwf_datastores_client-0.4.1/pyproject.toml +101 -0
  39. ecmwf_datastores_client-0.4.1/setup.cfg +4 -0
  40. ecmwf_datastores_client-0.4.1/tests/conftest.py +31 -0
  41. ecmwf_datastores_client-0.4.1/tests/integration_test_10_catalogue.py +131 -0
  42. ecmwf_datastores_client-0.4.1/tests/integration_test_20_processing.py +84 -0
  43. ecmwf_datastores_client-0.4.1/tests/integration_test_30_remote.py +108 -0
  44. ecmwf_datastores_client-0.4.1/tests/integration_test_40_results.py +54 -0
  45. ecmwf_datastores_client-0.4.1/tests/integration_test_50_profile.py +61 -0
  46. ecmwf_datastores_client-0.4.1/tests/integration_test_60_client.py +82 -0
  47. ecmwf_datastores_client-0.4.1/tests/integration_test_70_legacy_client.py +311 -0
  48. ecmwf_datastores_client-0.4.1/tests/integration_test_80_adaptors.py +124 -0
  49. ecmwf_datastores_client-0.4.1/tests/integration_test_90_features.py +80 -0
  50. ecmwf_datastores_client-0.4.1/tests/test_00_version.py +5 -0
  51. ecmwf_datastores_client-0.4.1/tests/test_01_config.py +66 -0
  52. ecmwf_datastores_client-0.4.1/tests/test_10_catalogue.py +87 -0
  53. ecmwf_datastores_client-0.4.1/tests/test_20_processing.py +509 -0
  54. ecmwf_datastores_client-0.4.1/tests/test_40_results.py +143 -0
@@ -0,0 +1,20 @@
1
+ {
2
+ "template": "https://github.com/ecmwf-projects/cookiecutter-conda-package",
3
+ "commit": "ff19a1dc1b3e9f4ba2544423b3a6bb510f81f352",
4
+ "checkout": null,
5
+ "context": {
6
+ "cookiecutter": {
7
+ "project_name": "ecmwf-datastores-client",
8
+ "project_slug": "ecmwf.datastores",
9
+ "project_short_description": "ECMWF Data Stores Service (DSS) API Python client",
10
+ "copyright_holder": "European Union",
11
+ "copyright_year": "2022",
12
+ "mypy_strict": "True",
13
+ "integration_tests": "True",
14
+ "pypi": true,
15
+ "_template": "https://github.com/ecmwf-projects/cookiecutter-conda-package",
16
+ "_commit": "ff19a1dc1b3e9f4ba2544423b3a6bb510f81f352"
17
+ }
18
+ },
19
+ "directory": null
20
+ }
@@ -0,0 +1,18 @@
1
+ name: on-pr-closed
2
+ on:
3
+ pull_request:
4
+ types:
5
+ - closed
6
+
7
+ jobs:
8
+ remove-preview:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: write
12
+ pull-requests: write
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: rossjrw/pr-preview-action@v1
17
+ with:
18
+ action: "remove"
@@ -0,0 +1,261 @@
1
+ name: on-push
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - '*'
9
+ pull_request:
10
+ branches:
11
+ - main
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ defaults:
18
+ run:
19
+ shell: bash -l {0}
20
+
21
+ jobs:
22
+ pre-commit:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v5
26
+ - uses: actions/setup-python@v6
27
+ with:
28
+ python-version: 3.x
29
+ - uses: pre-commit/action@v3.0.1
30
+
31
+ combine-environments:
32
+ runs-on: ubuntu-latest
33
+
34
+ steps:
35
+ - uses: actions/checkout@v5
36
+ - uses: actions/setup-python@v6
37
+ with:
38
+ python-version: 3.x
39
+ - name: Install conda-merge
40
+ run: |
41
+ python -m pip install conda-merge
42
+ - name: Combine environments
43
+ run: |
44
+ for SUFFIX in ci integration; do
45
+ conda-merge ci/environment-$SUFFIX.yml environment.yml > ci/combined-environment-$SUFFIX.yml || exit
46
+ done
47
+ - uses: actions/upload-artifact@v4
48
+ with:
49
+ name: combined-environments
50
+ path: ci/combined-environment-*.yml
51
+
52
+ unit-tests:
53
+ name: unit-tests
54
+ needs: combine-environments
55
+ runs-on: ${{ matrix.os }}
56
+ strategy:
57
+ matrix:
58
+ python-version: ['3.11', '3.12']
59
+ os: [ubuntu-latest, windows-latest, macos-latest]
60
+
61
+ steps:
62
+ - uses: actions/checkout@v5
63
+ - uses: actions/download-artifact@v5
64
+ with:
65
+ name: combined-environments
66
+ path: ci
67
+ - name: Get current date
68
+ id: date
69
+ run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
70
+ - uses: mamba-org/setup-micromamba@v2
71
+ with:
72
+ environment-file: ci/combined-environment-ci.yml
73
+ environment-name: DEVELOP
74
+ cache-environment: true
75
+ cache-environment-key: environment-${{ steps.date.outputs.date }}
76
+ cache-downloads-key: downloads-${{ steps.date.outputs.date }}
77
+ create-args: >-
78
+ python=${{ matrix.python-version }}
79
+ - name: Install package
80
+ run: |
81
+ python -m pip install --no-deps -e .
82
+ - name: Run tests
83
+ run: |
84
+ make unit-tests COV_REPORT=xml
85
+
86
+ type-check:
87
+ needs: [combine-environments, unit-tests]
88
+ runs-on: ubuntu-latest
89
+
90
+ steps:
91
+ - uses: actions/checkout@v5
92
+ - uses: actions/download-artifact@v5
93
+ with:
94
+ name: combined-environments
95
+ path: ci
96
+ - name: Get current date
97
+ id: date
98
+ run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
99
+ - uses: mamba-org/setup-micromamba@v2
100
+ with:
101
+ environment-file: ci/combined-environment-ci.yml
102
+ environment-name: DEVELOP
103
+ cache-environment: true
104
+ cache-environment-key: environment-${{ steps.date.outputs.date }}
105
+ cache-downloads-key: downloads-${{ steps.date.outputs.date }}
106
+ create-args: >-
107
+ python=3.12
108
+ - name: Install package
109
+ run: |
110
+ python -m pip install --no-deps -e .
111
+ - name: Run code quality checks
112
+ run: |
113
+ make type-check
114
+
115
+ docs-build:
116
+ needs: [combine-environments, unit-tests]
117
+ runs-on: ubuntu-latest
118
+ permissions:
119
+ contents: write
120
+ pull-requests: write
121
+
122
+ steps:
123
+ - uses: actions/checkout@v5
124
+ - uses: actions/download-artifact@v5
125
+ with:
126
+ name: combined-environments
127
+ path: ci
128
+ - name: Get current date
129
+ id: date
130
+ run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
131
+ - uses: mamba-org/setup-micromamba@v2
132
+ with:
133
+ environment-file: ci/combined-environment-ci.yml
134
+ environment-name: DEVELOP
135
+ cache-environment: true
136
+ cache-environment-key: environment-${{ steps.date.outputs.date }}
137
+ cache-downloads-key: downloads-${{ steps.date.outputs.date }}
138
+ create-args: >-
139
+ python=3.12
140
+ - name: Install package
141
+ run: |
142
+ python -m pip install --no-deps -e .
143
+ - name: Build documentation
144
+ timeout-minutes: 10
145
+ env:
146
+ ECMWF_DATASTORES_URL: ${{ secrets.ECMWF_DATASTORES_URL }}
147
+ ECMWF_DATASTORES_KEY: ${{ secrets.ECMWF_DATASTORES_KEY }}
148
+ ANONYMOUS_PAT: ${{ secrets.ECMWF_DATASTORES_ANON_KEY }}
149
+ run: |
150
+ make docs-build
151
+ - uses: rossjrw/pr-preview-action@v1
152
+ with:
153
+ source-dir: "docs/_build/html"
154
+ - name: Deploy documentation
155
+ uses: JamesIves/github-pages-deploy-action@v4
156
+ if: |
157
+ github.event_name == 'push' &&
158
+ startsWith(github.ref, 'refs/tags')
159
+ with:
160
+ folder: ./docs/_build/html/
161
+ # See: https://github.com/marketplace/actions/deploy-pr-preview#ensure-your-main-deployment-is-compatible
162
+ clean-exclude: pr-preview/
163
+ force: false
164
+
165
+ integration-tests:
166
+ needs: [combine-environments, unit-tests]
167
+ if: |
168
+ success() && true
169
+ runs-on: ubuntu-latest
170
+
171
+ strategy:
172
+ matrix:
173
+ python-version: ['3.9', '3.14']
174
+ extra: ['-ci']
175
+
176
+ steps:
177
+ - uses: actions/checkout@v5
178
+ - uses: actions/download-artifact@v5
179
+ with:
180
+ name: combined-environments
181
+ path: ci
182
+ - name: Get current date
183
+ id: date
184
+ run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
185
+ - uses: mamba-org/setup-micromamba@v2
186
+ with:
187
+ environment-file: ci/combined-environment${{ matrix.extra }}.yml
188
+ environment-name: DEVELOP${{ matrix.extra }}
189
+ cache-environment: true
190
+ cache-environment-key: environment-${{ steps.date.outputs.date }}
191
+ cache-downloads-key: downloads-${{ steps.date.outputs.date }}
192
+ create-args: >-
193
+ python=${{ matrix.python-version }}
194
+ - name: Install package
195
+ run: |
196
+ python -m pip install --no-deps -e .
197
+ - name: Run tests
198
+ timeout-minutes: 10
199
+ env:
200
+ ECMWF_DATASTORES_URL: ${{ secrets.ECMWF_DATASTORES_URL }}
201
+ ECMWF_DATASTORES_KEY: ${{ secrets.ECMWF_DATASTORES_KEY }}
202
+ ANONYMOUS_PAT: ${{ secrets.ECMWF_DATASTORES_ANON_KEY }}
203
+ run: |
204
+ make ci-integration-tests COV_REPORT=xml
205
+
206
+ distribution:
207
+ runs-on: ubuntu-latest
208
+ needs: [unit-tests, type-check, docs-build, integration-tests]
209
+ if: |
210
+ always() &&
211
+ needs.unit-tests.result == 'success' &&
212
+ needs.type-check.result == 'success' &&
213
+ needs.docs-build.result == 'success' &&
214
+ (needs.integration-tests.result == 'success' || needs.integration-tests.result == 'skipped')
215
+
216
+ steps:
217
+ - uses: actions/checkout@v5
218
+ - uses: actions/setup-python@v6
219
+ with:
220
+ python-version: '3.12'
221
+ - name: Install package
222
+ run: |
223
+ python -m pip install --upgrade pip
224
+ python -m pip install build twine
225
+ - name: Build distribution
226
+ run: |
227
+ python -m build
228
+ - name: Check wheels
229
+ run: |
230
+ cd dist || exit
231
+ python -m pip install ecmwf_datastores_client*.whl || exit
232
+ python -m twine check --strict * || exit
233
+ python -c "import ecmwf.datastores" || exit
234
+ cd ..
235
+ - uses: actions/upload-artifact@v4
236
+ with:
237
+ name: distribution
238
+ path: dist
239
+
240
+ upload-to-pypi:
241
+ runs-on: ubuntu-latest
242
+ needs: distribution
243
+ if: |
244
+ always() && true &&
245
+ needs.distribution.result == 'success' &&
246
+ github.event_name == 'push' &&
247
+ startsWith(github.ref, 'refs/tags')
248
+ environment:
249
+ name: pypi
250
+ url: https://pypi.org/p/ecmwf-datastores-client
251
+ permissions:
252
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publish
253
+
254
+ steps:
255
+ - uses: actions/download-artifact@v5
256
+ with:
257
+ name: distribution
258
+ path: dist
259
+ - uses: pypa/gh-action-pypi-publish@v1.13.0
260
+ with:
261
+ verbose: true