Skip to content

Commit 7039aeb

Browse files
committed
initial
1 parent 4004344 commit 7039aeb

18 files changed

Lines changed: 1103 additions & 29 deletions

.editorconfig

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .editorconfig.
2+
# WHY: Establish a cross-editor baseline (VS Code, PyCharm, Vim, etc.) so diffs stay clean and formatting is consistent.
3+
# ALT: Repository may omit .editorconfig ONLY if formatting is enforced equivalently by CI + formatter tooling for all contributors or solo projects.
4+
# CUSTOM: Adjust indent_size defaults only if organizational standards change; keep stable across projects.
5+
6+
root = true
7+
8+
[*]
9+
# WHY: Normalize line endings and encoding across Windows, macOS, and Linux.
10+
end_of_line = lf
11+
charset = utf-8
12+
13+
# WHY: Newline at EOF avoids noisy diffs and tool warnings.
14+
insert_final_newline = true
15+
16+
# WHY: Remove accidental whitespace noise in diffs.
17+
trim_trailing_whitespace = true
18+
19+
# WHY: Default to 2 spaces for configs and many markup files; language-specific overrides follow.
20+
indent_style = space
21+
indent_size = 2
22+
23+
# === Markup ===
24+
25+
[*.md]
26+
# WHY: Keep Markdown clean; use explicit <br> for hard line breaks.
27+
indent_size = 2
28+
trim_trailing_whitespace = true
29+
30+
[*.{tex,cls,sty}]
31+
# WHY: LaTeX convention is 2 spaces.
32+
indent_size = 2
33+
indent_style = space
34+
35+
[*.xml]
36+
# WHY: XML convention is 2 spaces.
37+
indent_size = 2
38+
indent_style = space
39+
40+
[*.{yml,yaml}]
41+
# WHY: YAML convention is 2 spaces.
42+
indent_size = 2
43+
indent_style = space
44+
45+
# === Data and config ===
46+
47+
[*.{json,jsonc,jsonl,ndjson}]
48+
# WHY: JSON tooling typically expects 2 spaces.
49+
indent_size = 2
50+
indent_style = space
51+
52+
[*.toml]
53+
# WHY: TOML often follows 4-space indentation in many projects.
54+
indent_size = 4
55+
indent_style = space
56+
57+
# === Code ===
58+
59+
[*.{js,ts}]
60+
# WHY: JS/TS ecosystem commonly uses 2 spaces.
61+
indent_size = 2
62+
indent_style = space
63+
64+
[*.{py,pyi}]
65+
# WHY: Python convention is 4 spaces.
66+
indent_size = 4
67+
indent_style = space
68+
69+
[*.ps1]
70+
# WHY: PowerShell convention is 4 spaces.
71+
indent_size = 4
72+
indent_style = space
73+
74+
[*.{c,cpp,h,java,cs,go,rs}]
75+
# WHY: Many C-family and systems languages commonly use 4 spaces (project-dependent).
76+
indent_size = 4
77+
indent_style = space
78+
79+
[*.{sh,bash}]
80+
# WHY: Shell script convention is 2 spaces.
81+
indent_size = 2
82+
indent_style = space
83+
84+
# === Proof Assistants ===
85+
86+
[*.lean]
87+
# WHY: Lean 4 convention is 2 spaces; matches Mathlib and standard library style.
88+
indent_size = 2
89+
indent_style = space
90+
91+
[*.{v,vo}]
92+
# WHY: Coq convention is 2 spaces.
93+
indent_size = 2
94+
indent_style = space
95+
96+
# === Build System ===
97+
98+
[Makefile]
99+
# WHY: Makefiles require tabs.
100+
indent_style = tab
101+
102+
[*.mk]
103+
# WHY: Makefile includes require tabs.
104+
indent_style = tab

.gitattributes

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .gitattributes.
2+
# WHY: Ensure consistent line endings, diff behavior, and repository metadata
3+
# across Windows, macOS, and Linux.
4+
# ALT: Repository may omit .gitattributes ONLY if equivalent normalization is
5+
# enforced by tooling and CI (rare and fragile).
6+
# CUSTOM: Update file-type rules only when introducing new languages or artifact types.
7+
8+
# WHY: Auto-detect text files and normalize line endings to avoid cross-platform drift.
9+
* text=auto
10+
11+
12+
# === Source Code ===
13+
14+
# WHY: Python and shell scripts must use LF for CI/CD, Linux environments, and containers.
15+
*.py text eol=lf
16+
*.sh text eol=lf
17+
18+
# WHY: PowerShell convention on Windows uses CRLF.
19+
*.ps1 text eol=crlf
20+
21+
22+
# === Markup and Documentation ===
23+
24+
# WHY: Documentation and markup files use LF; standard for cross-platform tooling.
25+
*.bib text eol=lf
26+
*.cls text eol=lf
27+
*.md text eol=lf
28+
*.sty text eol=lf
29+
*.tex text eol=lf
30+
31+
32+
# === Configuration and Data (Text) ===
33+
34+
# WHY: Configuration and structured text formats use LF for stable diffs.
35+
*.json text eol=lf
36+
*.jsonc text eol=lf
37+
*.jsonl text eol=lf
38+
*.ndjson text eol=lf
39+
*.toml text eol=lf
40+
*.yaml text eol=lf
41+
*.yml text eol=lf
42+
43+
44+
# === GitHub Metadata ===
45+
46+
# WHY: Exclude documentation and tests from GitHub language statistics.
47+
docs/** linguist-documentation
48+
tests/** linguist-documentation
49+
50+
51+
# === Notebooks ===
52+
53+
# WHY: Jupyter notebooks require specialized diff and merge handling.
54+
*.ipynb diff=jupyternotebook
55+
*.ipynb merge=jupyternotebook
56+
57+
58+
# === Databases (Binary) ===
59+
60+
# WHY: Database files are binary; prevent text normalization and meaningless diffs.
61+
*.db binary
62+
*.duckdb binary
63+
*.sqlite binary
64+
*.sqlite3 binary
65+
66+
# === Columnar / Analytical Data (Binary) ===
67+
68+
# WHY: Columnar and analytical data formats are binary; diffs are not meaningful.
69+
*.arrow binary
70+
*.avro binary
71+
*.feather binary
72+
*.orc binary
73+
*.parquet binary
74+
75+
76+
# === Office, BI, PDFs, and Compressed Artifacts (Binary) ===
77+
78+
# WHY: Office documents, BI files, PDFs, and compressed artifacts are binary.
79+
*.7z binary
80+
*.bz2 binary
81+
*.docx binary
82+
*.gz binary
83+
*.pbix binary
84+
*.pbit binary
85+
*.pdf binary
86+
*.pptx binary
87+
*.rar binary
88+
*.tar binary
89+
*.tgz binary
90+
*.xls binary
91+
*.xlsm binary
92+
*.xlsx binary
93+
*.xz binary
94+
*.zip binary
95+
96+
97+
# === Proof Assistants ===
98+
99+
# WHY: Lean files must use LF for cross-platform consistency and CI.
100+
*.lean text eol=lf
101+
102+
# WHY: Lean build artifacts are binary; prevent normalization and meaningless diffs.
103+
*.olean binary
104+
*.ilean binary
105+
*.trace binary
106+
107+
# WHY: Coq source uses LF; compiled objects are binary.
108+
*.v text eol=lf
109+
*.vo binary
110+
*.vok binary
111+
*.vos binary
112+
*.glob binary
113+
114+
# === Lean Build System ===
115+
116+
# WHY: Lake build directory should be excluded but if tracked, treat as binary.
117+
.lake/** binary

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# WHY: Automatically updates GitHub Actions to latest versions
2+
# OBS: Runs monthly to keep actions secure and up-to-date
3+
# REQ: Keep this file to maintain security patches in workflows
4+
5+
version: 2
6+
7+
updates:
8+
- package-ecosystem: "github-actions" # WHY: Updates action versions in workflows
9+
directory: "/" # WHY: Scan all .github/workflows/*.yml files
10+
schedule:
11+
interval: "monthly" # WHY: Monthly updates balance freshness vs notification noise
12+
commit-message:
13+
prefix: "ci(deps)" # WHY: Conventional commit format for changelog tools

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# REQ: Verify Lean proofs compile on every push and PR.
2+
# WHY: Proofs are the deliverable; broken proofs must not merge.
3+
name: Lean Action CI
4+
5+
on:
6+
push:
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v6 # OBS: v6 current as of Dec 2025
16+
- uses: leanprover/lean-action@v1

.github/workflows/lean_action_ci.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/links.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# WHY: Automated link checking - behavior controlled by repo variable
2+
# OBS: Set IS_ACTIVE_REPO=true in GitHub Repository Settings > Secrets and variables > Actions > Variables
3+
# ALT: Default (no variable set) runs manual only - perfect for student repos
4+
5+
name: Check Links
6+
7+
on:
8+
workflow_dispatch: # WHY: Manual trigger - always available
9+
10+
schedule:
11+
- cron: "0 6 1 * *" # WHY: Runs monthly (1st of month) if IS_ACTIVE_REPO=true
12+
13+
pull_request: # WHY: Validates PR links if IS_ACTIVE_REPO=true
14+
15+
# WHY: Prevent multiple simultaneous link checks on same ref
16+
concurrency:
17+
group: link-check-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
lychee:
22+
# WHY: Skip scheduled/PR runs unless IS_ACTIVE_REPO=true or manual trigger
23+
# OBS: vars.IS_ACTIVE_REPO linted as error in VS Code but works on GitHub
24+
if: github.event_name == 'workflow_dispatch' || vars.IS_ACTIVE_REPO == 'true'
25+
26+
runs-on: ubuntu-latest
27+
28+
# WHY: Permissions needed for PR comments and issue creation
29+
permissions:
30+
contents: read
31+
issues: write
32+
pull-requests: write
33+
34+
steps:
35+
- uses: actions/checkout@v6 # OBS: v6 current as of Dec 2025
36+
37+
# WHY: Check all documentation and config files for broken links
38+
- name: Check links with Lychee
39+
uses: lycheeverse/lychee-action@v2 # OBS: v2 current as of Dec 2025
40+
with:
41+
args: >
42+
--verbose
43+
--no-progress
44+
--user-agent "${{ github.repository }}/lychee"
45+
'./**/*.bib'
46+
'./**/*.md'
47+
'./**/*.html'
48+
'./**/*.tex'
49+
'./**/*.yml'
50+
'./**/*.yaml'
51+
lycheeVersion: latest # OBS: Always use latest lychee release
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
55+
# WHY: Provide helpful feedback on PRs with broken links
56+
- name: Comment on PR if links broken
57+
if: failure() && github.event_name == 'pull_request'
58+
uses: actions/github-script@v8 # OBS: v8 current as of Dec 2025
59+
with:
60+
script: |
61+
const comment = `## Link Check Results
62+
63+
Some links appear broken. Check the [workflow logs](${context.payload.repository.html_url}/actions/runs/${context.runId}) for details.`;
64+
65+
github.rest.issues.createComment({
66+
issue_number: context.issue.number,
67+
owner: context.repo.owner,
68+
repo: context.repo.repo,
69+
body: comment
70+
});
71+
72+
# WHY: Track broken links found during scheduled checks
73+
# OBS: Only creates issue if none already open with 'broken-links' label
74+
- name: Create issue for scheduled failures
75+
if: failure() && github.event_name == 'schedule'
76+
uses: actions/github-script@v8 # OBS: v8 current as of Dec 2025
77+
with:
78+
script: |
79+
const title = `Link Check Failed - ${new Date().toISOString().split('T')[0]}`;
80+
const body = `Weekly link check found broken links. [Check logs](${context.payload.repository.html_url}/actions/runs/${context.runId})`;
81+
82+
// WHY: Avoid duplicate issues
83+
const existing = await github.rest.issues.listForRepo({
84+
owner: context.repo.owner,
85+
repo: context.repo.repo,
86+
labels: 'broken-links',
87+
state: 'open'
88+
});
89+
90+
if (existing.data.length === 0) {
91+
await github.rest.issues.create({
92+
owner: context.repo.owner,
93+
repo: context.repo.repo,
94+
title: title,
95+
body: body,
96+
labels: ['maintenance', 'broken-links']
97+
});
98+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Denise M. Case
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)