Advanced Octave A56 — Workspaces and interactive resources
Advanced GNU Octave with GX-TXT · Module 10
Workspaces retain the status of an activity managed by a provider; interactive documents display persistent identity and resources. Let’s start from their list and distinguish the presence of metadata from the possibility to open the content.
Objectives and prerequisites
We use the Session of the course, in which the A36 lesson created a Workspace of Curve Fitter. The test uses GX-TXT dev112-P011-bis and GNU Octave 9.4.0. Import consulta_workspace.m, register it and run it in the Runner.
Listing resources
SESSION_WORKSPACE_API_v1/list returns Workspace metadata; INTERACTIVE_DOCUMENT_API_v1/list lists interactive documents. The test shows an element in each list: both report the same ID as the Workspace Curve Fit, so it is not automatically counted as two separate jobs.
Among the fields observed are ID, provider, name and revision. Identity and revision are used to recognize the status actually consulted; the scientific content and associated resources are managed by the provider. The list can be empty in a new session and it is not, in itself, a mistake.
Open a Workspace
The script attempts SESSION_WORKSPACE_API_v1/get on the first Workspace. The expected behavior is the reading of its status through the provider and the return of the record. In the version used for this guide the call fails with unsupported provider result type Tcl_Obj : the metadata list remains available, but we cannot show the successful opening through this call. The script intercepts the error and explicitly reports it, without swapping it for an empty list. We have not verified a version in which this problem is correct.
An ID and a review displayed in the screenshot belong to the Test Session; in your Session may be different. To work on the content, use the provider’s commands in its interface and verify that the desired Workspace is actually readable.
Exercise
- What is the difference between an empty list and a read error?
- Do the two test lists necessarily identify two different resources?
- What does the revision mean?
Worked solution
- An empty list is a valid result without elements; an error indicates that the operation has not been completed correctly.
- No, the records have the same ID here.
- The version of the registered status of the Workspace, useful to distinguish updates over time.
Other steps of this project
- Advanced Octave A75 — Dynamical systems in phase space
- Advanced Octave A81 — Geography of the waves and a 3D surface
- Advanced Octave A82 — Age, sex and demographic inequalities
- Advanced Octave A83 — All-cause mortality, certified COVID deaths and surveillance
- Advanced Octave A84 — A reproducible public account
- Advanced Octave A73 — Optimization landscapes and 3D trajectories