Advanced Octave A66 — Project versions and provenance

by Giux GX-TXT, octave-en, scripts-en 2 min read

Advanced GNU Octave with GX-TXT · Module 11

To reproduce a result it is not enough to store a figure: the version of the program, the configuration and the identity of the data used. We collect some of this information through public APIs.

Objectives and prerequisites

We use the octave_advanced_sensor dataset created in A07 and the A55 inspection API. The test uses GX-TXT dev112-P011-bis and GNU Octave 9.4.0. Import registra_contesto.m, register it and run it in the Runner.

Collect the available data

The script declares an example parameter scale, reads its actual value from gxtxt_context() and consults the summary of the Session. Record script name, framework version, Octave version and Session name; then search for the Dataset ID and show registered canon hash and row number.

In the test, the 0.9.8.10-dev-112, Octave 9.4.0, the parameter is 2, and the Dataset has 11 lines. The displayed hash is recorded for the Dataset; this reading of metadata does not recalculate the content digest. The parameter is demonstrative and here it is not applied to a calculation.

Verifying provenance

The program explicitly states that the source commit has not been verified: a version string does not automatically identify a Git commit or all patches applied. For a complete analysis, it also retains sources and revision of the script or project, actual parameters, ID and version of data, methods, units and results. Check a commit separately only when there is a reliable reference to the copy actually executed.

Exercise

  1. Where is the actual value of scale read?
  2. Is the hash shown recalculated during this call?
  3. Why doesn’t the script print a commit?

Worked solution

  1. From the context returned by gxtxt_context().
  2. No: it is the registered hash in the metadata consulted.
  3. Because it does not have a verified identification of the commit of the copy running.

Download the Module 11 scripts (ZIP)

#GNU Octave #GX-TXT #GX-TXT public APIs

Other steps of this project

Leave a Reply

Your email address will not be published. Required fields are marked *