Skip to main content
`Ctrl`+`K`

# DataStoreDirectory

class DataStoreDirectory(*args, **kwargs)
  Attributes:
    completed
    describe
    limit
    logs
    members
    `mode`

      string that references datastore mode, override in subclass constructor

    not_completed
    `source`

      string that references the data store, override in subclass constructor

    `summary_citations`

      Return a Table summarising stored citations.

    `summary_logs`

      returns a table summarising log files

    `summary_not_completed`

      returns a table summarising not completed results

  Methods

  `md5`(unique_id) |
  `read`(unique_id) | reads data corresponding to identifier
  `write`(*, unique_id, data) | writes a completed record ending with .suffix
  `write_bib`(dest_path) | Write stored citations as a BibTeX .bib file.
  `write_citations`(*, data) | Write citations to the data store.
  `write_not_completed`(*, unique_id, data) | writes a not completed record as json

  drop_not_completed |
  validate |
  write_log |

  property completed: list[DataMember]
  property describe: TabularType
  drop_not_completed(*, unique_id: str = '') → None
  property limit
  property logs: list[DataMember]
  md5(unique_id: str) → str | None
    Parameters:
      unique_id

        name of data store member

    Returns:
      md5 checksum for the member, if available, None otherwise
  property members: list[DataMemberABC]
  property mode: Mode

    string that references datastore mode, override in subclass constructor

  property not_completed: list[DataMember]
  read(unique_id: str) → str

    reads data corresponding to identifier

  property source: str | Path

    string that references the data store, override in subclass constructor

  property summary_citations: TabularType

    Return a Table summarising stored citations.

  property summary_logs: TabularType

    returns a table summarising log files

  property summary_not_completed: TabularType

    returns a table summarising not completed results

  validate() → TabularType
  write(*, unique_id: str, data: str) → DataMember

    writes a completed record ending with .suffix

    Parameters:
      unique_id

        unique identifier

      data

        text data to be written

    Returns:
      a member for this record

    Notes

    Drops any not-completed member corresponding to this identifier

  write_bib(dest_path: str | Path) → None

    Write stored citations as a BibTeX .bib file.

  write_citations(*, data: tuple[CitationBase, ...]) → None

    Write citations to the data store. Subclasses should override.

  write_log(*, unique_id: str, data: str) → None
  write_not_completed(*, unique_id: str, data: str) → DataMember

    writes a not completed record as json

    Parameters:
      unique_id

        unique identifier

      data

        text data to be written

    Returns:
      a member for this record