Skip to content

Commit 6dd1d43

Browse files
committed
More details to document what's in the repo
1 parent 562a5ba commit 6dd1d43

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,58 @@ History
3232
* [LanguageCheetSheet.odt](https://github.com/calaldees/TeachProgramming/commits/4d152d58d2c321c5867f267d7a4e62d56b950711/teachprogramming/static/docs/LanguageCheetSheet.odt?browsing_rename_history=true&new_path=teachprogramming/static/docs/LanguageCheetSheet%20[deprecated].odt&original_branch=master) an early versions of an OpenOffice document
3333
* 2021: Created [dynamic html language renderer](https://github.com/ComputingTeachers/language_reference/commits/main/static/langauge_reference.html)
3434
* 2026: Moved language_reference to it's own repository
35+
36+
37+
Tools (in this repo)
38+
=====
39+
40+
* `make_ver`
41+
* A tool to break a single source file into multiple versions.
42+
* Versions are marked by the comment at the end of a line with `VER: name`
43+
* `static`
44+
* Dynamic html/js renderers for the data derived from `make_ver`
45+
* `verify_snippets` (for projects)
46+
* Automated test suite for incremental versions.
47+
* Run tests to assert that each project version outputted compiles (and maybe runs).
48+
49+
50+
Example Versions
51+
----------------
52+
53+
### `language_reference`
54+
55+
* Uses version by having a single source file for a language and marking each line with version name
56+
* Examples
57+
* [python.py](./language_reference/languages/python/python.py)
58+
* [Java.java](./language_reference/languages/java/Java.java)
59+
60+
61+
```python
62+
a = 1 # VER: arithmetic
63+
print('hello') # VER: output
64+
```
65+
66+
### `projects`
67+
68+
* Uses versions by having a sequence of versions to build-up a complete solution incrementally
69+
* Example
70+
* [copter.ver.json](https://github.com/calaldees/TeachProgramming/blob/master/teachprogramming/static/projects/game/copter.ver.json)
71+
* [copter.html](https://github.com/calaldees/TeachProgramming/blob/master/teachprogramming/static/projects/game/copter.html)
72+
* [copter.py](https://github.com/calaldees/TeachProgramming/blob/master/teachprogramming/static/projects/game/copter.py)
73+
74+
75+
Projects
76+
========
77+
78+
Because projects are bigger and could contain further assets, projects are typically stored in another repo.
79+
`make_ver` and 'html/js project renderer' are stored in this repo because the functionality is built on the foundations that are used in generating `language_reference` versions and renderer.
80+
81+
* A folder is recursively crawled for all `.ver` files.
82+
* For each `NAME.ver` file, all the languages that are loaded e.g. `NAME.py`+`NAME.java`+`NAME.cs`
83+
* A set of diff's are made for each version name incrementally
84+
* A html/js viewer renders the diffs for each language
85+
86+
87+
`verify_snippets` (for projects)
88+
-----------------
89+

0 commit comments

Comments
 (0)