hertzforge.service.projects¶
projects
¶
A connection's project: the .hforge (or new project) its requests
work on, and the summary the shell draws its tree from
(schema/PROTOCOL.md, Projects).
Each function here runs on a worker thread and raises a ProtocolError with the core's own words when the core refuses a file.
Classes:
| Name | Description |
|---|---|
OpenProject |
The project a connection has open, and whether it has changes its |
Functions:
| Name | Description |
|---|---|
kind_of |
An object's kind: its class name in lower case with underscores |
verbs_of |
The core's processing verbs that apply to the object |
summary |
The project as the shell lists it: title, file, whether it has |
compatibility_issues |
What does not fit, by object: the red rows |
new |
|
open_file |
|
import_file |
|
import_question |
What |
save |
|
drag_out |
|
retitle |
|
rename |
|
delete_parts |
|
remove |
|
duplicate |
|
refresh |
|
journal |
|
units |
|
children |
|
entity_rows |
|
mesh_size |
|
averaging |
|
show |
|
actions |
|
define_units |
|
activate |
|
setups |
|
save_setup |
|
open_setup |
|
channel_table |
|
put_channel_table |
|
seeds |
|
seed |
|
Classes¶
OpenProject
dataclass
¶
The project a connection has open, and whether it has changes its file does not.
Functions:¶
kind_of
¶
An object's kind: its class name in lower case with underscores
(Frf 'frf', TimeHistory 'time_history', ShapeSet 'shape_set').
verbs_of
¶
The core's processing verbs that apply to the object name, by the
table the core offers them by (Project.verbs), in its order: what a
verb: param lists the object under. A time history that a linked
channel table describes also lists overload_check, which reads it
against that table's ranges: the Overload reading is offered there
and nowhere else. A shock specification does not list
generate_signal: the one signal it makes is a synthesis, and that
has an operation of its own, project.srs_synthesis.
summary
¶
summary(state: OpenProject) -> dict[str, Any]
The project as the shell lists it: title, file, whether it has unsaved changes, and each object with its kind, record count, source, whether its units are declared, the groups it is in, the core verbs that apply to it, the analysis settings it carries, and why it is stale when its source's settings changed after it was computed.
compatibility_issues
¶
What does not fit, by object: the red rows
(compatibility.check_compatibility). An object is judged against the
geometry of its group, else the active one; a modal object against the
shape sets of its group. sub_items are the records, modes or channels
at fault, to mark in the grid. Incompatibility warns, it never blocks.
open_file
¶
open_file(params: Mapping[str, Any], received: bool = False) -> OpenProject
project.open: the project a .hforge, .vdyn, .mat or ESCDF
file holds, or a new project holding the object when the file holds
one (Save As writes those formats for one object), or the project a
control run's folder converts to (Project.open). Any other file is
refused with a pointer to import it. A received file, one a browser
sent by its contents (uploads), is a copy: the project has no file
of its own until it is saved.
import_file
¶
import_file(state: OpenProject | None, params: Mapping[str, Any], progress: Callable[[int, int], None] | None = None, received: bool = False) -> tuple[OpenProject, list[str]]
project.import: the file's objects added to the open project, or
to a new one when none is open; the project and the names added.
units declares what the file does not state, as import_file's
options (length_unit, ordinate_unit and the rest). A received
file is a copy a browser sent by its contents (uploads), indexed
with no location (Project.import_file).
import_question
¶
What project.import asks before it reads the file, or None when it
asks nothing: the question, the param its answer goes back in, and the
value that keeps the file as it is.
A UNV file's labeled time-trace pairs name the node their reference was
measured at, and some exporters write a channel number there instead.
The person is shown the reference the file names and asked for the
node; the direction stays the file's. A file with no labeled pairs, or
one whose pairs name references at more than one node, asks nothing,
and neither does an import that already gives reference_node.
save
¶
save(state: OpenProject | None, params: Mapping[str, Any]) -> str
project.save: the project written to path, or to the file it
came from; the path written.
drag_out
¶
drag_out(state: OpenProject | None, params: Mapping[str, Any]) -> list[str]
project.drag_out: the project, or some of its objects, written to files for the shell
to drag out of the window (Brandon, 2026-11-11: dragging the project out saves it, as the
earlier toolset did). The project is one .hforge file named for its title; each object a
.hforge object named for itself. They go to a folder of their own, so a name is never
taken. A copy: the project stays bound to its own file and keeps its unsaved changes.
retitle
¶
retitle(state: OpenProject | None, params: Mapping[str, Any]) -> None
project.retitle: the project called title. Its file, if it has one, keeps its
name until it is saved somewhere else.
rename
¶
rename(state: OpenProject | None, params: Mapping[str, Any]) -> None
project.rename: the object name called to, and every group,
provenance record and report block that names it following
(Project.rename); with index, one photo of a Photos object
renamed instead, the report blocks that show it following; with
group, solid or mate, one element group, solid or set of mated
surfaces of a geometry, by its id; with mode, the description of
one mode of a shape set, numbered from 1.
delete_parts
¶
delete_parts(state: OpenProject | None, params: Mapping[str, Any]) -> None
project.delete_parts: the sub-items picked in the tree deleted
from their objects, parts mapping each object's name to the indices
picked: a data object's records, a shape set's modes, a channel table's
channels, a Photos object's photos. Every item of an object picked deletes the object
itself, as project.remove does, since none of these can be empty (Brandon,
2026-11-13: it was refused). Nothing is deleted when any part is refused, and each
deletion is journaled as the call a script would make.
remove
¶
remove(state: OpenProject | None, params: Mapping[str, Any]) -> None
project.remove: the objects named taken out of the project and its
groups (Project.remove). A name the project does not have is
refused before anything is removed.
duplicate
¶
duplicate(state: OpenProject | None, params: Mapping[str, Any]) -> None
project.duplicate: a copy of each object named added beside it,
'Project.duplicate), as Copy and Paste do in the tree. A copy's
arrays are its own; it is in no group.
refresh
¶
refresh(state: OpenProject | None, params: Mapping[str, Any]) -> None
project.refresh: each derived object named computed again from its
source in place, under its own name (Project.refresh); with no names,
every stale object, sources first (Project.refresh_stale).
journal
¶
journal(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.journal: the session as Python, every verb and settings
change since the project was made or opened as the line that replays
it (Project.journal), for the console: read-only, to be
copied into a script.
units
¶
units(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.units: the tables an object's units are declared in
(service.units.tables).
children
¶
children(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.children: what an object holds, for the tree to open it
into (service.tree.children).
entity_rows
¶
entity_rows(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.entity_rows: rows start to start + count of an entity table that sent
only its first ones (its more), as {'columns', 'rows'} in the geometry's stored
unit; the server puts them in the display units as it does the table.
mesh_size
¶
mesh_size(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.mesh_size: the element size the solids solids ("1, 3") of geometry are
likely to hold at as elements, in meters: Mesh's Detect button.
averaging
¶
averaging(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.averaging: the regions that draw an averaging on a time history's
plot, without the plot (show.averaging_drawn): averaging holds what the
Averaging form holds, as project.show's prefs.averaging does. The shell
asks this as the form is typed into, so only the frames are drawn again.
show
¶
show(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.show: what a selection in the tree shows (service.show).
actions
¶
actions(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.actions: what a selection can take (service.actions).
define_units
¶
define_units(state: OpenProject | None, params: Mapping[str, Any]) -> list[int]
project.define_units: units declared on an object by table and
row (service.units.define); the records converted.
activate
¶
activate(state: OpenProject | None, params: Mapping[str, Any]) -> None
project.activate: the geometry data is drawn on when nothing else
names one.
setups
¶
setups(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.setups: what a test's screen can open, the project's
saved setups and its runs' records, each with the module it is for.
With no project open both lists are empty: there is nothing to open.
save_setup
¶
save_setup(state: OpenProject | None, params: Mapping[str, Any]) -> str
project.save_setup: a test's setup saved into the project under
name. A name the project already holds is refused unless replace
is true and that object is itself a setup. Answers the name used.
open_setup
¶
open_setup(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.open_setup: a saved setup, or the setup a run's record
holds, as the shell fills a test's draft with it. Nothing is
configured: the shell's draft goes through the same configure call
and checks as one typed in.
channel_table
¶
channel_table(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.channel_table: one of the project's channel tables as the
control service's rows, through the one mapping
(io.run_convert.rows_from_channel_table), with its control loops.
With no name, the project's only channel table; a project with
several names them and asks for one. A table without the controller's
columns is given them at their defaults, and the answer says so.
put_channel_table
¶
put_channel_table(state: OpenProject | None, params: Mapping[str, Any]) -> str
project.put_channel_table: the control service's rows saved as the
project's channel table name, through the one mapping
(io.tables.channel_table_of_rows), each value checked as a write
checks a column. A name the project already holds is refused unless
replace is true and that object is itself a channel table; the
table's control loops are kept when environments is not given.
Answers the name used.
seeds
¶
seeds(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.seeds: the objects in the open project that could fill
part of module's setup (io.seeds.offers); an empty list while no
project is open.
seed
¶
seed(state: OpenProject | None, params: Mapping[str, Any]) -> dict[str, Any]
project.seed: the part of module's configuration the object
name fills, its protective numbers apart, and its origin
(io.seeds.seed). Nothing is configured: the shell puts the part
into a test's draft once the operator has seen what it changes, and
the draft goes through the same configure call and checks as one
typed in. An object the module cannot control to is refused with
the reason.