Skip to content

mecfs_bio.figures.key_scripts.push_figures

Functions:

  • push_figures

    Merge the contents of the local figure directory with figures stored on Github, then upload to Github the result of this merge.

Attributes:

logger module-attribute

logger = get_logger()

push_figures

push_figures(
    tag: str = FIGURE_GITHUB_RELEASE_TAG,
    repo_name: str = GH_REPO_NAME,
    fig_dir: Path = FIGURE_DIRECTORY,
)

Merge the contents of the local figure directory with figures stored on Github, then upload to Github the result of this merge.

Source code in mecfs_bio/figures/key_scripts/push_figures.py
def push_figures(
    tag: str = FIGURE_GITHUB_RELEASE_TAG,
    repo_name: str = GH_REPO_NAME,
    fig_dir: Path = FIGURE_DIRECTORY,
):
    """
    Merge the contents of the local figure directory with figures stored on Github, then upload to Github the result of this merge.
    """
    fig_dir.mkdir(parents=True, exist_ok=True)
    pull_figures(
        tag=tag,
        repo_name=repo_name,
        fig_dir=fig_dir,
    )
    release_from_dir(
        release_tag=tag,
        dir_path=fig_dir,
        title=FIGURES_ARCHIVE_TITLE,
        repo_name=repo_name,
        draft=False,
    )
    logger.debug("Figures successfully uploaded")