Use registered media types for HDF5 and NetCDF, and stop claiming media_type must be IANA-registered
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 87/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- backend, documentation
Research direction
Start by reading the Distribution.media_type docstring in app/models/distribution.py and the Distribution table in docs/data-model/dataset.md. Update the specified NetCDF examples in docs/data-model/reference-datasets.md, scripts/seed-example-catalogue.py, and tests/api/v1/test_dataset_router.py as well. Done when the wording and listed media types match the issue, with Zarr unchanged.
Written by the indexing model from the issue text.
Description
Follow-up to #238. There we kept application/x-zarr because Zarr has no registered media type yet (zarr-developers/zarr-specs#123), and said we'd fix the places where our docs claim too much.
Wording
The Distribution.media_type docstring in app/models/distribution.py says the value "must be a registered IANA media type string". FDS doesn't check this, and its most common value, application/x-zarr, isn't registered. Reword it to ask for the IANA media type where the format has one, and otherwise the name the format's own community uses, with format (dct:format) giving the format's readable name either way.
The media_type row of the Distribution table in docs/data-model/dataset.md calls application/x-zarr an IANA media type. Reword it to match.
HDF5
HDF5 is registered as application/vnd.hdfgroup.hdf5. Replace application/x-hdf5 in:
app/models/distribution.py(docstring example)docs/data-model/dataset.md(media_typerow of the Distribution table)
NetCDF
application/netcdf is on IANA's provisional list, registered by Unidata in 2021. Replace application/x-netcdf in:
docs/data-model/dataset.md(1 example)docs/data-model/reference-datasets.md(8 examples)scripts/seed-example-catalogue.py(6 places; 3 others already useapplication/netcdf)tests/api/v1/test_dataset_router.py(2 payloads)
Not affected
No code depends on the exact strings. The UI and derive_storage_options_type match substrings (netcdf, hdf, icechunk), and the new names still contain them. fds.apps.l only holds FAIR-MAST Zarr records and has no device-level datasets, so nothing stored there should need changing.
Zarr stays application/x-zarr until the Zarr project registers a media type.
- Dominant language
- Python
- Stars
- 0
- Forks
- 3
- Avg merge
- 23h
- Merged PRs (30d)
- 70
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ukaea/fds
-
Media typeOpen
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
auth
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
fair-compliance metadata
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
fair-compliance metadata
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
binding:python bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
The Browser tab fails with a Wayland error when Open Terminal runs from a Wayland desktop sessionOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
open-webui/open-terminal#210 ·
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agentscope-ai/agentscope#3807 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#150542 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
triton-inference-server/server#9069 ·
Maintainers usually reply within 1 day