openedx / openedx/openedx-platform
Ignore `tests` when running toggles/settings reports
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reports with make requirements, cd docs/, and make xml, then inspect the annotation source at .venv/lib/python3.11/site-packages/test/plugins/test_annotations_check.py. Determine how the docs build discovers files, starting with the proposed handling for tests directories and test_*.py files. Done means the reports no longer include edx-lint test files or their test annotation strings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100