Repository navigation
Ignore unformatted text blocks that are not scripts or files - #552
Merged
pareenaverma merged 1 commit intoOct 31, 2023
Merged
Conversation
While testing a learning path I had one page that used the
tripple backtick blocks just to show some plain text diagrams,
but nothing else.
The test runner thought these were tests, but then didn't set
any commands for them, as there's nothing it can do with them.
```
Traceback (most recent call last):
File "./tools/maintenance.py", line 171, in <module>
main()
File "./tools/maintenance.py", line 148, in main
check_lp(args.instructions, args.link, args.debug)
File "./tools/maintenance.py", line 60, in check_lp
res.append(check.check(lp_path + "/" + i[0], start=launch, stop=terminate))
File "/home/davspi01/work/open_source/arm-learning-paths/tools/check.py", line 196, in check
for j in range(0, t["ncmd"]):
KeyError: 'ncmd'
```
What we should do is not treat these blocks as tests at all,
so that "ntests" is 0 by the time we get to check.py.
check.py is already handling "ntests" being not present
or set to 0 so it all works out.
If you had a mix of triple backtick blocks, we'd skip the
non-executable ones and the executable ones will still become
tests and commands.
Author
|
I haven't run this against all the existing learning paths but I can if you can tell me how to do that. |
Contributor
|
@DavidSpickett This change causes the maintenance script to fail.
You will need an Arm machine with Docker, Python3, and the Python packages listed in tools/requirements.txt |
Author
|
Working on a revert/alternative fix now. |
1 of 5 tasks
Author
|
#563, apologies for the disruption. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While testing a learning path I had one page that used the triple backtick blocks just to show some plain text diagrams, but nothing else.
The test runner thought these were tests, but then didn't set any commands for them, as there's nothing it can do with them.
What we should do is not treat these blocks as tests at all, so that "ntests" is 0 by the time we get to check.py.
check.py is already handling "ntests" being not present or set to 0 so it all works out.
If you had a mix of triple backtick blocks, we'd skip the non-executable ones and the executable ones will still become tests and commands.
Before submitting a pull request for a new Learning Path, please review Create a Learning Path
Please do not include any confidential information in your contribution. This includes confidential microarchitecture details and unannounced product information.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the Creative Commons Attribution 4.0 International License.