Skip to content

exclude 'output' cells with plots from checking TODOs #60

@AgnieszkaZaba

Description

@AgnieszkaZaba

https://github.com/open-atmos/PySDM/actions/runs/19978973182/job/57301525326?pr=1750#step:4:1289

git_tracked_file = 'examples/PySDM_examples/Yang_et_al_2018/fig_2.ipynb'
gh_issues = {1: 'closed', 2: 'closed', 3: 'closed', 4: 'closed', ...}

    def test_todos_annotated(git_tracked_file, gh_issues):
        """raises assertion errors if a (TODO|FIXME) is not annotated or if the annotation
        does not point to an open issue"""
        if is_binary(git_tracked_file):
            pytest.skip("binary file")
        for line in _grep(git_tracked_file, r".*(TODO|FIXME).*"):
            if "(TODO|FIXME)" in line:
                continue
            match = re.search(r"(TODO|FIXME) #(\d+)", line)
            if match is None:
>               raise AssertionError(f"(TODO|FIXME) not annotated with issue id ({line})")
E               AssertionError: (TODO|FIXME) not annotated with issue id (      "image/png": 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions