Skip to main content

Module home

Module home 

Source
Expand description

The home screen: datui’s answer to “I want to look at my data”, before you have had to answer “where is it, exactly”.

§Roots

Code lives in your working directory; the interesting datasets usually do not. They are on a mount, a NAS, a scratch volume. So the home screen is built around roots — places to look — and catalogs, named datasets and directories:

  1. The working directory — free, and right for local exports and fixtures.
  2. Catalogs — catalog.toml (Ctrl+D adds to it), the files catalogs lists, and the bundled public catalog. A directory in one is a row to step into.

What bridges “code here, data there” with no configuration at all is RECENT: every dataset you have opened, grouped under the directory or prefix it lives in. Opening /mnt/data/sales/ once puts /mnt/data/ on the screen as a place row, and Enter on that row browses it. It is derived state, so it costs nothing to be wrong and nothing to throw away.

Structs§

CloudSource
One cloud source as the home screen shows it: a row under CLOUD, and the list of buckets inside it.
HomeState
Home screen state.
Listing
What a listing pass produced.
ListingRequest
Everything build_listing needs, gathered on the interface thread from state it already has, so the worker never reaches back into the app.
Mark
Where the cursor was in a listing the user went inside from.
Measured
What measuring a dataset yielded: rows, columns, and total size, each absent when it cannot be known without reading the data.
Narrowed
Build the home listing.
PathListing
What the ~ prompt lists: the directory part of what is typed, and what is in it.
PathName
One name in the directory the ~ prompt is typing.
Root
A place datui will look, and whether it can currently be read.
ScoreJob
What a worker needs to score the filter against a walk’s files.
SearchState
The result of one recursive walk below the working directory.
Section
A titled group of rows on the home screen.
ShownCatalog
A catalog as the home screen shows it: a section of named datasets, local and remote alike.
ShownDataset
One dataset of a ShownCatalog.

Enums§

CloudLook
A directory in an object store that has not said what it holds yet.
CloudStatus
Where a cloud source’s listing stands.
DoorKind
What a directory’s door opens, from the kind and the tally already in hand.
RootOrigin
Where a root came from. Shown subtly in the UI so the list is explicable.
Row
One line of the home screen. Headers are selectable so a section can be collapsed and expanded from the keyboard.
RowKey
What a row is, apart from where it sits: enough to find it again after the rows have been rebuilt or the cap has moved.
SortMode
How rows are ordered within each section.

Constants§

BUNDLED_ORIGIN
The chip on the bundled catalog’s section.
CATALOG_ORIGINS
The chips a catalog’s section carries, and nothing else does.
CLOUD_PLACE
How a cloud source is addressed on the home screen: cloud://<id>. Not a URL any library reads; it names the level above a source’s buckets, which no real URL can.

Functions§

build_listing
catalog_entry_for
The catalog entry path is, or is inside, with its catalog’s label: the innermost when one is inside another, the first listed of two at one place.
catalogs
The catalogs the home screen shows, in order.
cloud_account
The source ID and account of a cloud://<id>/<account> place: an Azure storage account, which has no URL of its own.
cloud_place
The place for one cloud source.
cloud_source_id
The source ID of a cloud://<id> place.
codebook_for
The column notes of the catalog dataset path is, or is inside: the innermost when one dataset is inside another. Only datasets that carry notes are considered.
complete_path
Complete a partially typed path against the directory it names.
desktop_recent_dirs
Directories holding data files that the desktop has recorded you opening.
directory_dataset_url
The URL that opens a cloud directory as one dataset: with its trailing slash, which is what makes it a prefix to scan rather than an object to fetch.
dirs_from_xbel
Extract directories of data files from XBEL content.
display_path
Abbreviate a path with ~ for display.
door_kind
Which DoorKind a door is.
door_lands
Whether stepping into a directory puts the cursor on its door: only when the door opens the directory as the one dataset its name says, which is what Enter on the directory’s own row one level up opens too. Anywhere else the first Enter would start a combined read nobody asked for.
door_name
The door’s name: the directory, and what Enter on it opens.
door_reads
What Enter on a door that is not one table reads, and what it leaves out, for the details pane. The local open reads the commonest format’s files directly inside; a directory of Parquet with subdirectories, or with no files of its own, is scanned whole for Parquet instead. A prefix in an object store is scanned whole in its commonest format.
expand_user_path
Expand ~ and $VAR in a path the user typed.
facts_for
The record to keep for a row that has just been measured.
fuzzy_positions
Character positions in haystack that needle matched, for highlighting.
fuzzy_score
Whether and how well needle matches haystack, higher being better.
holds_nothing_to_open
Whether a directory holds nothing a (all files) row could read.
index_key
The key a record about path is filed under in the dataset index.
is_catalog_origin
Whether a section’s origin chip says it is a catalog.
is_cloud_place
Whether path is one of datui’s own cloud:// places rather than a real location.
is_network_path
Whether path sits on a network filesystem, according to the mount table.
is_object_store_url
Whether path is a place in an object store: s3://, gs://, or Azure.
is_remote_path
Whether path is somewhere reading it could block: an object-store or HTTP URL, or a directory on a network filesystem.
list_typed_dir
What a local directory typed at ~ holds, for the prompt’s list. Reads the directory, so it runs on a worker. Nothing typed lists the working directory.
login_of
How a catalog URL is read, in words: what auth and connection say.
look_into
Find out what a row is, and then what is in it.
look_into_as
As look_into, reading each file the way the open that follows will read it.
look_into_batch
Look into a batch of rows, handing each answer to each as it arrives, and remember what was learned.
match_score
How well an entry answers the filter, by name or by column.
matching_column
The first column of entry that contains filter, case-insensitively.
measured_from
Fold a measured probe into the record kept for a row.
name_by_spec
List a file a format spec’s glob names as data, under the spec’s name. Its name is all that is asked: the listing reads nothing more for it. A file a spec’s magic names was named by the scan, from the bytes it read to sniff it.
names_a_file
Whether a remote path’s name says it is a file: a data extension, or any dot in its last segment. A trailing slash is a prefix whatever the name says.
names_under
The names one level below dir among urls: how s3://, gs:// and az:// complete, from buckets, prefixes and datasets datui has already listed, opened or been given by a catalog. Nothing is asked of the store.
object_place_label
What to call the top of a place in an object store: a source, an account, a bucket or a container.
parent_location
The location one level up from path, or None at the top.
place_is_browsable
Whether a place can be listed: a directory, or a prefix in an object store.
place_of
The place a recent lives in: its directory, or its prefix in an object store.
substring_positions
Character positions of the first case-insensitive occurrence of needle.
typed_dir
The directory part of a typed path: everything up to and including its last separator. For a URL, at least its scheme (s3://), so the buckets are what is listed under it.
typed_dir_is_url
Whether a typed directory is a URL, listed from what datui already knows rather than read.