Skip to content

Should the 'main edition' include EDR and PHI? #9

Description

@rsdc2

This is the current code for the edition_main property in epidoc.py:
` @Property
def edition_main(self) -> Edition | None:

    """
    Return the main edition (i.e. not transliteration or
    lemmatized edition).

    If the @subtype attribute is set to 'unsupplied',
    this is currently treated as though the 
    main edition is not present, and None is returned.
    """
    try:
        return self.body.edition_by_subtype(subtype=None) 
            # or \
            # self.body.edition_by_subtype(subtype='PHI') or \
            # self.body.edition_by_subtype(subtype='EDR')
    except ValueError as e:
        raise ValueError(f"Encountered the following error in {self.id}:\n"
                         f"{e.args[0]}")`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions