Spaces:
Sleeping
Sleeping
Commit History
-
Load a failed job back into the form from its Return button, and rename the button to Return
Each job saves its job description as job.json in its directory. The file references in it name the staged inputs of the job, under the new /jobs/<job_id>/ route. That route serves only job.json and the staged inputs. The Return button of a failed job links to the form with ?edit=<job_id>. The form then loads that job through the same function that loads a bundled example, so the user can change it and run it again. The route name, the query parameter and the name of the job description file come from the server through the templates. The Return buttons read "Return" in place of "Return to the form".bfcb575 -
Show the cmuts error of a failed step, and keep tracebacks out of the job log
Each pipeline step passes the runner a description of itself. When a step fails, the runner raises StepFailed with that description and the lines of the error output that start with the name of the cmuts subcommand. If cmuts wrote no such line, the message gives the exit code. A step that runs past the time limit reports that it did not finish. Any other exception writes its traceback to the server log only. The job log and the results page then show a short message about a server error. One function records a failure for both cases and for a server restart. The results page keeps the line breaks of an error message.71ec4ec -
Show no none box for set options, and refuse an empty set where cmuts needs a choice
The form reads the none_choice field of --dump-options. A set option that accepts none shows only its real choices, and a run with no box checked passes the none choice to cmuts. A set option that needs at least one choice keeps its last box checked. The form sends the checked boxes of every set option, including an empty list. The server refuses an empty list for an option that needs at least one choice, in a settings file and in a job description. A list that holds only the none choice gives the empty set, so a saved settings file with "none" still loads.2e1bb86 -
Load a bundled example into the form instead of running it
The example buttons posted a job description straight to /run, so a user saw a report without seeing what produced it. One "Load example" button now fills the form with the example: the reference, one row per condition with its reads, and the options it runs with. The run is left for the user to start, so any of it can be changed first. The run button is disabled until the form holds a reference, at least one condition, a name for every condition, treated reads in every condition, and a value for every required option. The tooltip of the button names what is missing. A condition is no longer dropped in the page for want of treated reads, so an incomplete one reaches the server and is reported. The multi-reference example is three references of the Ribonanza PDB library, each with a 2A3 and a DMS condition and the matched no-modification background. It replaces one condition of 6000 sparse references that named neither its chemistry nor a background. The page titles name the page, th…6d5917c -
Group each condition's downloads under one button
The results header showed two buttons per condition, one for the HDF5 file and one for the CSV. It now shows one button per condition, named after the condition, which opens a panel holding the two files. The button is a details element, so the browser handles opening, closing and the keyboard. A click outside an open panel closes it, which also keeps two panels from standing open at once.ec934a6 -
Add option dependencies to the run form
An option that cmuts marks with applies_when now appears only while the option it depends on is set to a choice it needs. The wrapper is a fieldset, so a field outside its dependency is disabled as well as hidden, and neither the browser nor the run carries a value cmuts would refuse. A dump whose dependency names an option with no choices stops the app at startup. A settings file that sets an option outside its dependency is refused as it is read. A value equal to the default reaches no command line, so it passes whatever the dependency holds, which is what lets a settings file list every option the form holds. The page drops the heading that repeated the title bar. The docstrings of options.py and pipeline.py are rewritten where they read as noun phrases rather than as descriptions of what the function does. The prose of CONTRIBUTING.md is rewritten where one sentence held several ideas.ef94e94
-
Submit the form and the examples as one JSON job description to /run
The /run endpoint takes a multipart request whose "job" field holds a JSON job description. The description names the reference, the name and read files of each condition by role, and the options in the settings file format. A file reference is either "uploads/<part>", which names a file part of the request, or "examples/<path>", which names a bundled example file. job_description.py checks the description, and app.py stages both kinds of reference through the same code. The form builds the job description in the browser and posts it with the chosen files. Each bundled example is a job.json file that the page and scripts/smoke.sh post unchanged. The /run-example endpoint, the server-side form parsing, and the separate example settings files are removed. The settings check now rejects a fractional value for an integer option, because it is the only validation of options. The single-reference example now holds the rool120 plasmidsaurus pilot data as four conditions: hepes-2A3, hepes-DM…83f9087 -
Redirect the root to the job named by the query string
This app runs in a frame on its Hugging Face Space page, so the address bar shows the URL of that page and a reload asks for it again. The job id lived only in the frame, which a reload discarded along with the results. The results page now carries its job id in a marker element. A script posts that id to the Space page, which writes it into its own query string. The Space page hands the query string back to the frame on load, and the root route redirects to the job the query string names. Pages with no job clear the query string, so returning to the form leaves no stale id behind.4d0568c -
Save each run's settings and load a settings file into the form
The option layer now builds one mapping that holds every exposed option's value for a run. A form submission and a settings file are two sources for it, and the command line and the saved file are two renderings of it, so the record and the run cannot disagree. A required option with no submitted value and no default now raises there, and the run is refused. This replaces the fallback to the first choice, which decided the alignment preset of every example run by the order cmuts prints its choices. Each bundled example carries a settings.json naming the preset it wants. Every job directory holds a settings.json with all the options the run used and the cmuts that ran it. The results page offers the file, and the zip download holds it. The Options card takes a settings file. The page sends it to /settings, which checks every name and value against the option dumps, and writes the fields it answers with into the controls. A refused file changes nothing, and a loaded value opens the se…4756cc5 -
Tidy the form controls and move the example runs into the intro
The Log heading sat high because the rule that strips the top padding from the first accordion also matched the Log card. The selector now skips cards, and the content that starts a card drops its top margin, so the card padding alone sets the gap under a heading. A select with no default greys its placeholder text, and hides the placeholder from the open list, which leaves only the real choices. The select also draws its own arrow, because the arrow the platform draws takes the text color and would grey with it. The example runs move from the Conditions card to a button row under the intro. Each button submits its hidden form through the form attribute, which replaces the click handler. Hints take the body text size, and the options hint drops the sentence about the installed cmuts.831c966 -
Add a results page button that saves the report as one HTML file
The report page that cmuts plot serves inlines its styles, plotly.js, and the figure data the browser has fetched, so its markup is a whole report. The button serializes the report iframe and saves it. Serialized markup holds attributes, while a checkbox or a dropdown keeps its state in a property. The button therefore writes each control's state into a clone of the report before it serializes, so the saved file opens with the channels and references the page shows. The iframe gets an id so the script can reach it, and the label-restore code that the copy button held moves into a shared helper.defe27f
-
Rebuild the space on the cmuts 2 command line
The option form derives from each subcommand's --dump-options, the pipeline runs as subprocess calls to cmuts align, hmm, sub, div, norm, and csv, and each results page proxies a live cmuts plot server. The Sync HF Space workflow deploys main to Hugging Face, and the pin workflow in DasLab/cmuts keeps the Dockerfile's CMUTS_SHA current. The previous space lives on the v1 branch.3b54ff3