Skip to content

Commit 4146283

Browse files
committed
Prepare C++ Talent Tree for open-source use
0 parents  commit 4146283

48 files changed

Lines changed: 6194 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.editorconfig‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.{json,yml,yaml,toml}]
12+
indent_size = 2

‎.gitattributes‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto eol=lf
2+
*.png binary
3+
*.pyz binary
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Bug report
2+
description: Report a reproducible problem with the tracker.
3+
title: "[Bug]: "
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: "Remove personal notes and paths before posting. For vulnerabilities, use the private route in SECURITY.md."
8+
- type: textarea
9+
id: problem
10+
attributes:
11+
label: What happened?
12+
description: Include what you expected instead.
13+
validations:
14+
required: true
15+
- type: textarea
16+
id: reproduce
17+
attributes:
18+
label: Steps to reproduce
19+
description: A short example in --demo mode is especially useful.
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: environment
24+
attributes:
25+
label: Environment
26+
description: App version, Python version, OS, terminal, and terminal size if relevant.
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: evidence
31+
attributes:
32+
label: Logs or screenshot
33+
description: Optional. Do not attach real progress files containing private notes.

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Feature request
2+
description: Suggest a focused improvement.
3+
title: "[Idea]: "
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: What problem would this solve?
9+
description: Explain your use case and any workaround you use now.
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: proposal
14+
attributes:
15+
label: Suggested behavior
16+
description: Keep the tracker lightweight and offline. See CONTRIBUTING.md for scope.
17+
validations:
18+
required: true

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Why
2+
3+
What problem does this change solve?
4+
5+
## What changed
6+
7+
Describe the resulting behavior and any compatibility impact.
8+
9+
## Verification
10+
11+
Describe the relevant checks, manual steps, or screenshots.
12+
13+
- [ ] The change stays within the project's scope.
14+
- [ ] Existing progress and notes remain compatible, or a migration is explained.
15+
- [ ] Relevant tests pass; documentation matches the behavior.
16+
- [ ] No private notes, credentials, or copied tutorial content are included.

‎.github/workflows/ci.yml‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
permissions:
7+
contents: read
8+
concurrency:
9+
group: ci-${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.12'
19+
- run: python -m pip install -r requirements-dev.txt
20+
- run: ruff check .
21+
- run: ruff format --check .
22+
- run: sh -n install.sh
23+
test:
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
os: [ubuntu-latest, macos-latest]
29+
python: ['3.10', '3.12', '3.14']
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: actions/setup-python@v5
33+
with:
34+
python-version: ${{ matrix.python }}
35+
- run: python -m unittest discover -s tests -v
36+
- run: python scripts/build.py
37+
- run: python dist/cpp-tree.pyz --demo --summary
38+
- name: Install and check wheel outside the source checkout
39+
shell: bash
40+
run: |
41+
python -m pip wheel --no-deps . -w dist
42+
python -m venv "$RUNNER_TEMP/cpp-tree-wheel"
43+
"$RUNNER_TEMP/cpp-tree-wheel/bin/python" -m pip install dist/*.whl
44+
cd "$RUNNER_TEMP"
45+
"$RUNNER_TEMP/cpp-tree-wheel/bin/cpp-tree" --demo --summary

‎.github/workflows/release.yml‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build release artifacts
2+
on:
3+
workflow_dispatch:
4+
permissions:
5+
contents: read
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-python@v5
12+
with:
13+
python-version: '3.12'
14+
- run: python -m unittest discover -s tests -v
15+
- run: python scripts/build.py
16+
- name: Record checksum
17+
working-directory: dist
18+
run: sha256sum cpp-tree.pyz > SHA256SUMS
19+
- uses: actions/upload-artifact@v4
20+
with:
21+
name: cpp-tree-${{ github.ref_name }}
22+
path: |
23+
dist/cpp-tree.pyz
24+
dist/SHA256SUMS
25+
if-no-files-found: error

‎.gitignore‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
__pycache__/
2+
*.py[cod]
3+
.venv/
4+
venv/
5+
.ruff_cache/
6+
.pytest_cache/
7+
*.egg-info/
8+
build/
9+
dist/
10+
.DS_Store
11+
progress.json*
12+
stream.txt
13+
*.lock
14+
.env

‎CHANGELOG.md‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Changelog
2+
3+
## 1.2.0 — Repository preparation
4+
5+
This version is prepared for publication; the tag/release is not created by these files.
6+
7+
### Added
8+
9+
- A modular Python package, separate curriculum JSON, and an executable zipapp build.
10+
- A one-command bootstrap installer, local installer, and `cpp-tree --uninstall`.
11+
- `--state-path` to locate the active profile without creating files.
12+
- README preview, install/update/uninstall instructions, contributor and maintainer
13+
guides, an MIT license, attribution, conduct and security policies.
14+
- Regression tests, a Linux/macOS CI matrix, issue forms, and a pull request template.
15+
16+
### Changed
17+
18+
- `--summary` is read-only and can run while the interactive app has the profile open.
19+
- Invalid optional view preferences are normalized; malformed progress still fails
20+
visibly without overwriting it.
21+
- The installer refuses to overwrite unrelated files or symlinks and preserves
22+
progress on update and uninstall.
23+
24+
### Compatibility
25+
26+
The original 1.1.6 script's lesson entries, version-1 saves, notes, pins, default
27+
state location, key bindings, colors, and OBS `stream.txt` behavior are retained.
28+
29+
## 1.1.6 — Original script
30+
31+
Baseline version supplied as `cpp-tree-dev.py`. Earlier release history is not
32+
reconstructed here.

0 commit comments

Comments
 (0)