PATCH cannot set creator on a device, dataset or collection
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Locate DeviceUpdate, DatasetUpdate and CollectionUpdate, then read DescriptiveMixin and the related PATCH tests. Add a regression test for each model showing that PATCH updates creator; the issue describes deriving the descriptive fields from the mixin while keeping other optional fields explicit. Done when all three PATCH requests persist the new creator.
Written by the indexing model from the issue text.
Description
What happened
creator can be set when a device, dataset or collection is registered, but never changed afterwards. DeviceUpdate, DatasetUpdate and CollectionUpdate each list title, description and publisher by hand and leave out creator, which DescriptiveMixin defines alongside them. A PATCH that sends creator is accepted and the value is dropped.
A citation built from these records (#38) would show whatever creator was set at registration, with no way to correct it.
Steps to reproduce
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"creator": "A. Physicist"}' "$API/v1/devices/mast"
# 200, and the response's creator is unchanged
The same holds for PATCH /v1/datasets/{id} and PATCH /v1/collections/{id}.
Version
de9f670 (main)
Fix
Derive the update models' descriptive fields from DescriptiveMixin, so all four are optional on PATCH and a field added to the mixin later reaches them too. Keep the other fields as explicit optional declarations, since the base models make several of them required. Add a regression test per model that a PATCH sets creator.
Split out of #48.
- Dominant language
- Python
- Stars
- 0
- Forks
- 3
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 57
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
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Use registered media types for HDF5 and NetCDF, and stop claiming media_type must be IANA-registeredOpendocumentation metadata
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day
-
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
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Treat corrupt-shape state files as missing in `load_state`Possibly taken @Qrytics claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
OvertureMaps/overturemaps-py#175 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
awslabs/visual-asset-management-system#1278 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
aws-samples/sample-per-model-bedrock#835 ·
Maintainers usually reply within 1 day