forked from microsoft/planetary-computer-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: create items for uk met office #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gadomski
wants to merge
18
commits into
mo-jeff:met-office-datasets
Choose a base branch
from
gadomski:gadomski/met-office
base: met-office-datasets
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1bcd211
--wip-- [skip ci]
gadomski 53253f8
Merge branch 'met-office-datasets' into gadomski/met-office
gadomski c1600b1
Merge branch 'met-office-datasets' into gadomski/met-office
gadomski 3c094fc
fix: dataset for new layouts
gadomski 073c7bb
feat: add dumb but maybe correct stac item creation
gadomski d432675
fix: chunk location
gadomski 4b9f342
fix: collections
gadomski c71cc1d
fix: ingestion
gadomski 880fdc9
fix: collection bounding boxes
gadomski 35f67bb
feat: add simple notebook
gadomski 3b191a5
fix: notebooks
gadomski b6af5ec
Merge branch 'met-office-datasets' into gadomski/met-office
gadomski 216cb8b
fix: update collections
gadomski 0efdd5a
feat: add scripts
gadomski 754a881
docs: add readme
gadomski bea3366
fix: remove claude
gadomski 88ba438
fix: re-add container and storage account
gadomski b179bee
fix: use .updated files
gadomski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| id: met-office | ||
| image: ${{ args.registry }}/pctasks-task-base:2025.4.8.2 | ||
|
|
||
| args: | ||
| - registry | ||
|
|
||
| code: | ||
| src: ${{ local.path(./met_office.py) }} | ||
|
|
||
| environment: | ||
| APPLICATIONINSIGHTS_CONNECTION_STRING: ${{ secrets.task-application-insights-connection-string }} | ||
|
|
||
| collections: | ||
| - id: met-office-global-deterministic-height-level | ||
| template: ${{ local.path(./collection/met-office-global-deterministic-near-surface-level) }} | ||
| class: met_office:MetOfficeCollection | ||
| asset_storage: | ||
| - uri: blob://ukmoforecasts/staging/global/near-surface | ||
| chunks: | ||
| options: | ||
| min_depth: 1 | ||
| max_depth: 1 | ||
| chunk_length: 20000 | ||
| chunk_storage: | ||
| uri: blob://ukmoforecasts/staging-info/pctasks-chunks/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| from typing import Union | ||
|
|
||
| from pctasks.core.models.task import WaitTaskResult | ||
| from pctasks.core.storage import StorageFactory | ||
| from pctasks.dataset.collection import Collection | ||
| from pystac import Item | ||
| from stactools.met_office_deterministic import stac | ||
|
|
||
|
|
||
| class MetOfficeCollection(Collection): | ||
| @classmethod | ||
| def create_item( | ||
| cls, asset_uri: str, storage_factory: StorageFactory | ||
| ) -> Union[list[Item], WaitTaskResult]: | ||
| storage = storage_factory.get_storage(asset_uri) | ||
| hrefs = list(storage.get_url(path) for path in storage.list_files()) | ||
| items = stac.create_items(hrefs) | ||
| return items |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| stactools-met-office-deterministic==0.2.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.