Skip to content

Ignore tests when running toggles/settings reports #37745

@sarina

Description

@sarina

the problem

When running toggles/settings reports (make requirements, cd docs/, make xml), we get some garbage like

+MYTOGGLE
\ \ \ \ #\ ..\ toggle_default:\ something:
`.venv/lib/python3.11/site-packages/test/plugins/test_annotations_check.py (line 203)
<https://github.com/openedx/edx-platform/blob/cf48323639bf24eed5ef120dfbd9e98cf0fd64af/
    .venv/lib/python3.11/site-packages/test/plugins/test_annotations_check.py#L203>

which means the annotations report is finding this line: https://github.com/openedx/edx-lint/blob/dcb92c5fbe81da24ec7a4a1029b0809b4fbbfccf/test/plugins/test_annotations_check.py#L148

And it's seeing that line because it's within the .venv within the edx-platform checkout.

T he issue is the confluence of three things:

  • edx-lint is installed during the docs build
  • edx-lint's test files are included in the docs build
  • edx-lint contains strings that look like annotations, but they're actually just for testing the annotation system themselves

The fix

Get this source file out of the build somehow.

  • this could mean uninstalling edx-lint (perhaps by pip-installing requirements from base.txt instead of dev.txt?).
  • this could also mean skipping directories named tests and files named test_*.py when buildings docs <- this is where I'd start

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