Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Lesson Template
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
prace-lessons
Lesson Template
Commits
875a7963
Commit
875a7963
authored
10 years ago
by
Greg Wilson
Browse files
Options
Downloads
Patches
Plain Diff
A few more comments
parent
9f8d3e5e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/check
+12
-12
12 additions, 12 deletions
tools/check
with
12 additions
and
12 deletions
tools/check
+
12
−
12
View file @
875a7963
...
...
@@ -2,16 +2,16 @@
#
# Software Carpentry Lesson Validator
#
# Check for errors at Software Carpentry lessons.
# Check for errors in lessons built using the Software Carpentry template
# found at http://github.com/swcarpentry/lesson-template.
#
# Usage:
#
# $ tools/check
import
sys
import
os
import
re
import
sys
import
yaml
#----------------------------------------
...
...
@@ -62,14 +62,13 @@ def check_lesson(file_path):
"""
Checks the file ``pages/[0-9]{2}-.*.md`` for:
-
"
layout: topic
"
at
YAML header
-
"
title
"
as keyword
at
YAML header
-
"
layout: topic
"
in
YAML header
-
"
title
"
as keyword
in
YAML header
- line
"
> ## Learning Objectives {.objectives}
"
after YAML header
- items
at
learning objectives begin with
"
*
"
- items
at
learning objective following four
space rule
- code samples be of type error, output, python, shell, r, matlab, sql
- items
in
learning objectives begin with
"
*
"
- items
in
learning objective following four
-
space
indentation
rule
- code samples be of type
input,
error, output, python, shell, r, matlab,
or
sql
- callout box style
- line with
"
> ## Key Points {.keypoints}
"
- challenge box style
"""
pass
...
...
@@ -91,11 +90,12 @@ def check_index(file_path):
-
"
layout: lesson
"
in YAML header
-
"
title
"
as keyword in YAML header
- introductory paragraph right after YAML header
- introductory paragraph
(s)
right after YAML header
- line with
"
> ## Prerequisites
"
- non
empty prerequisites
- line with
"
## Topics
"
- non
-
empty prerequisites
-
title
line with
"
## Topics
"
- items at topic list begin with
"
*
"
- items in topic list follow four-space indentation rule
- links at topic list are valid
- line with
"
## Other Resources
"
- items at other resources list begin with
"
*
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment