Let's start with creating the Branch.
from qubicstorage import calibration
import json
commit_data = {
'author_name': 'John Doe',
'author_email': 'john@example.com',
'author_message': 'Initial commit'
}
branch_name = 'test_branch'
response = calibration.createbranch(commit_data, branch_name)
response_json_content = response.json()
response_json_string = json.dumps(response_json_content, indent=4)
print(response_json_string)
Add a chip to the selected Branch.
from qubicstorage import calibration
import json
chip_data = {
'name': 'X4Y2',
}
branch_name = 'test'
response = calibration.insertchip(chip_data, branch_name)
response_json_content = response.json()
response_json_string = json.dumps(response_json_content, indent=4)
print(response_json_string)
```
Jupyter NoteBook: Commit Calibration Data
from qubicstorage import calibration
import json
response = calibration.getbranches()
response_json_content = response.json()
response_json_string = json.dumps(response_json_content, indent=4)
print(response_json_string)
# Get chip Id
from qubicstorage import calibration
import json
branch_name = 'test_de'
response = calibration.getchips(branch_name)
response_json_content = response.json()
response_json_string = json.dumps(response_json_content, indent=4)
print(response_json_string)
from qubicstorage import calibration
file_path = 'qubitcfg.json'
commit_data = {
'author_name': 'John Doe',
'author_email': 'john@example.com',
'message': 'Initial commit'
}
branch_name = 'test_de'
chip_id ='4' // Get Chip_id from previous step
response = calibration.insertbyfile(file_path, commit_data, branch_name,chip_id)
print(response)
from qubicstorage import calibration
json_data = {....}
commit_data = {
'author_name': 'Dev Doe',
'author_email': 'john@example.com',
'message': 'Initial commit'
}
branch_name = 'main'
chip_id ='1'
response = calibration.insertbyobject(json_data, commit_data, branch_name,chip_id)
# Get Branch Details
from qubicstorage import calibration
import json
branch_name = 'main'
response = calibration.getbranchdetails(branch_name)
response_json_content = response.json()
response_json_string = json.dumps(response_json_content, indent=4)
print(response_json_string)
# Get Specific Commit Details
from qubicstorage import calibration
import json
hash = 'g4690gfr130m6rqbgl0927s07gfkntg6'
response = calibration.getcommitdetails(hash)
response_json_content = response.json()
response_json_string = json.dumps(response_json_content, indent=4)
print(response_json_string)