Custom metadata changes the database schema (?!?)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 459
- Forks
- 359
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 73
Description
### Steps to reproduce
1.
Rerun the following code 6 times, each iteration with a different word (of the list ['these', 'tags', 'break', 'the', 'database']) substituted for ####
```
meas = Measurement()
meas.registerParameter(dac.ch1) # register the first independent parameter
meas.registerParameter(dmm.v1, setpoints=(dac.ch1,)) # now register the dependent oone
with meas.run() as datasaver:
datasaver._dataset.add_metadata('####', '####')
for set_v in np.linspace(0, 25, 100):
dac.ch1.set(set_v)
get_v = dmm.v1.get()
datasaver.addResult((dac.ch1, set_v),
(dmm.v1, get_v))
dataid = datasaver.id # convenient to have for plotting
```
### Expected behaviour
Either a field (e.g. called 'metadata') of the table _runs_ gets filled with a json serialization of the custom metadata, or there is an extra table (metadata: tagid | run_id | name | value) which get populated with the custom metadata tags.
### Actual behaviour

### System
**operating system**
**qcodes branch**
feature/dataset
**qcodes commit**
Contributor 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.
Research direction
Reproduce the six-run example and start at the _dataset.add_metadata call, then inspect how the run schema and custom metadata are persisted. Done means adding metadata no longer changes the database schema unexpectedly and the metadata remains available in the database in a consistent form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100