phystool.physql.metadata

Module Contents

Functions

stats

consolidate

Wrapper function around `create_sql_database()” that prints a minimalistic progress bar in the terminal

create_sql_database

Create the SQL database by analysing all “.tex” and related “.json” files

filter_pdb_files

Returns a list of PDBFile that match search criteria

update_pdb_file

remove_pdb_files

Remove all files related to the PDBFiles. If the database is managed by git, the files can be recovered. The PDBRecords are also deleted.

Data

logger

API

phystool.physql.metadata.logger

“getLogger(…)”

phystool.physql.metadata.stats() dict[str, str | int | Sequence[str] | dict[str, list[str]]]
phystool.physql.metadata.consolidate() None

Wrapper function around `create_sql_database()” that prints a minimalistic progress bar in the terminal

phystool.physql.metadata.create_sql_database() Iterator[tuple[int, int, str]]

Create the SQL database by analysing all “.tex” and related “.json” files

phystool.physql.metadata.filter_pdb_files(query: str, uuid_bit: str, pdb_types: list[str], selected_tags: phystool.tags.Tags, excluded_tags: phystool.tags.Tags) list[phystool.pdbfile.PDBFile]

Returns a list of PDBFile that match search criteria

Paramètres:
  • query – string that should appear in the “.tex” file

  • uuid_bit – string that should match part of a uuid

  • pdb_type_set – restrain search only to those file types

  • selected_tags – restrain search to the PDBFiles tagged with any of the selected_tags

  • excluded_tags – exclude PDBFiles tagged with any of the excluded_tags

phystool.physql.metadata.update_pdb_file(uuid: uuid.UUID) None
phystool.physql.metadata.remove_pdb_files(uuids: list[uuid.UUID]) None

Remove all files related to the PDBFiles. If the database is managed by git, the files can be recovered. The PDBRecords are also deleted.