Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kwant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Show more breadcrumbs
Joseph Weston
kwant
Commits
dffe0b78
Commit
dffe0b78
authored
7 years ago
by
Christoph Groth
Browse files
Options
Downloads
Patches
Plain Diff
document tutorial script machinery
parent
4c4442e5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/Makefile
+3
-0
3 additions, 0 deletions
doc/Makefile
doc/source/code/README
+42
-0
42 additions, 0 deletions
doc/source/code/README
with
45 additions
and
0 deletions
doc/Makefile
+
3
−
0
View file @
dffe0b78
...
...
@@ -129,6 +129,9 @@ doctest:
%.pdf
:
%.svg
inkscape
--export-pdf
=
$@
$<
#### Tutorial and figure script generation machinery ####
# See source/code/README for an explanation.
# Make tutorial scripts by extracting the (complete!) context of the "patches".
# We make sure not to use 'wiggle' here.
.SECONDARY
:
...
...
This diff is collapsed.
Click to expand it.
doc/source/code/README
0 → 100644
+
42
−
0
View file @
dffe0b78
This directory contains the code examples from the documentation.
Most scripts are present in three related but different versions that
correspond to three different usages.
* Subdirectory 'figure': scripts used for figure generation. Figures
are not displayed but saved to disk.
* Subdirectory 'include': scripts that display figures on screen.
They contain commented marks for including snippets in the
documentation.
* Subdirectory 'download': complete scripts to be offered for download
by readers. Like 'include' but with the include marks removed.
Most scripts are extracted from corresponding '*.py.diff' files inside
'figure/'. These are patches from the 'include' version to the
'figure' version. The patches include complete context and as such
can be used to recreate both files. It's these patches that are kept
under version control.
running 'make html' or 'make latex' inside '/doc' will automatically
update all these scripts according to the following scheme:
---->------------->------
/ \
/ download/x.py \
figure/x.py.diff ^ \
^ \ | \
| -> include/x.py ---(patch)---> figure/x.py
| | |
| | |
\ v /
----<----------(diff)--------------<--------
Thus, it is possible to update figure/x.py.diff, include/x.py or
figure/x.py and any changes will be propagated automatically when
'make' is run. (Only download/x.py is a dead end.) The user will be
informed about any conflicts. The makefile will only update files
that are older than their sources and is careful to propagate time
stamps in order to avoid infinite loops.
Editing only figure/x.py.diff is a sure way to avoid any conflicts.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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