CLI report CSVs: named 'SId [id].csv', and one empty report stops the rest

Open
#2,195 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
66/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
cli

Research direction

Start in vcell-cli/src/main/java/org/vcell/cli/run/RunUtils.java, in generateReportsAsCSV around lines 203-220. Replace the getId() call used for the file name with getIdAsString(), and change the early return reportsHash; on an empty report to continue. The time-id heuristic at line 203 is a design question, so you can leave it alone. Done when the CSVs are named without the SId wrapper and a document with an empty report still writes the reports after it.

Written by the indexing model from the issue text.

Description

Summary

Two bugs in how the CLI writes per-report CSVs (RunUtils.generateReportsAsCSV), plus one heuristic worth revisiting.

1. Files are named SId [<report id>].csv. RunUtils.java:220 builds the name as sedmlReport.getId() + ".csv". getId() now returns a jlibsedml SId, whose toString() is "SId [" + id + "]". So BioModel1's report lands in BioModel1.sedml/SId [report_Simulation0].csv instead of report_Simulation0.csv. Those names also end up inside reports.zip. Fix: sedmlReport.getIdAsString().

2. One empty report stops CSVs for every report after it. When a report produces no rows, the method hits return reportsHash; (line 218) instead of continue. That skips all the remaining reports in the document.

3. Heuristic: time is recognised by a time_ substring in the data set id (line 203). Only such data sets are written once rather than once per job. A data set that is time under any other id gets repeated per job, and a non-time data set whose id happens to contain time_ loses all but its first job.

The new data system on the UnifiedDataModel branch writes the correct file name; its golden comparison maps the legacy name. It doesn't have bug 2. It keeps the time_ heuristic for now, so contents can be compared byte for byte.

Dominant language
Java
Stars
140
Forks
35
Avg merge
17h 39m
Merged PRs (30d)
19

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from virtualcell/vcell

All issues in virtualcell/vcell

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.