Skip to content

Commit 14a472f

Browse files
authored
Convert to generated README infrastructure
1 parent 6ac031e commit 14a472f

13 files changed

Lines changed: 287 additions & 2 deletions

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
blank_issues_enabled: false
2+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Report an Issue
2+
description: Report a broken link, incorrect information, or other issue
3+
labels: ["bug"]
4+
body:
5+
- type: dropdown
6+
id: type
7+
attributes:
8+
label: Issue Type
9+
options:
10+
- Broken link
11+
- Incorrect information
12+
- Missing information
13+
- Other
14+
validations:
15+
required: true
16+
17+
- type: input
18+
id: entry
19+
attributes:
20+
label: Affected Entry
21+
description: Which resource or section is affected?
22+
23+
- type: textarea
24+
id: description
25+
attributes:
26+
label: Description
27+
description: Describe the issue.
28+
validations:
29+
required: true
30+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Suggest a Resource
2+
description: Suggest a resource to add to this awesome list
3+
title: "[Suggestion] "
4+
labels: ["suggestion"]
5+
body:
6+
- type: input
7+
id: name
8+
attributes:
9+
label: Resource Name
10+
validations:
11+
required: true
12+
13+
- type: input
14+
id: url
15+
attributes:
16+
label: URL
17+
description: Primary project, paper, article, or landing-page URL.
18+
validations:
19+
required: true
20+
21+
- type: input
22+
id: github
23+
attributes:
24+
label: GitHub Repository
25+
description: "GitHub `owner/repo` slug if available. Leave blank for non-GitHub resources."
26+
placeholder: owner/repo
27+
28+
- type: input
29+
id: category
30+
attributes:
31+
label: Category
32+
description: Existing section or subsection where this resource belongs.
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
id: description
38+
attributes:
39+
label: Description
40+
description: Short factual description.
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: why
46+
attributes:
47+
label: Why should it be included?
48+
description: Explain why this is a strong fit for the list.
49+
50+
- type: checkboxes
51+
id: checklist
52+
attributes:
53+
label: Checklist
54+
options:
55+
- label: Publicly accessible
56+
- label: Not a duplicate of an existing entry
57+
- label: Has a meaningful description
58+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!--
2+
README.md is generated from YAML data.
3+
PRs that only modify README.md will fail CI.
4+
5+
To suggest a new resource, use the issue template instead:
6+
https://github.com/jslee02/awesome-cpp-python-binding-generator/issues/new?template=suggest-resource.yml
7+
-->
8+
9+
## What does this PR do?
10+
11+
## Checklist
12+
13+
- [ ] I edited YAML/source files, not `README.md` directly
14+
- [ ] Entry added in the correct section or subsection
15+
- [ ] `python3 scripts/validate_entries.py` passes
16+
- [ ] `python3 scripts/generate_readme.py` run and `README.md` committed
17+
- [ ] Commits are signed off (`git commit --signoff`)
18+

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Protect README
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "README.md"
7+
8+
jobs:
9+
check-readme:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Block direct README edits
13+
if: github.event.pull_request.user.type != 'Bot'
14+
uses: actions/github-script@v9
15+
with:
16+
script: |
17+
const files = await github.paginate(github.rest.pulls.listFiles, {
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
pull_number: context.payload.pull_request.number,
21+
per_page: 100,
22+
});
23+
24+
const hasSourceChanges = files.some(f =>
25+
f.filename === 'awesome-list.yaml' ||
26+
f.filename.startsWith('data/') ||
27+
f.filename.startsWith('scripts/') ||
28+
f.filename.startsWith('schema/')
29+
);
30+
31+
if (!hasSourceChanges) {
32+
core.setFailed(
33+
'README.md must not be edited directly.\n\n' +
34+
'This repository uses a data-first workflow and auto-generates README.md from YAML files.\n\n' +
35+
'To suggest a new resource, open an issue instead:\n' +
36+
`https://github.com/${context.repo.owner}/${context.repo.repo}/issues/new/choose`
37+
);
38+
}
39+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Validate Data
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "awesome-list.yaml"
7+
- "data/**"
8+
- "scripts/**"
9+
10+
jobs:
11+
validate:
12+
uses: jslee02/awesome-list-infra/.github/workflows/validate-data.yml@main
13+
with:
14+
dependencies: "pyyaml git+https://github.com/jslee02/awesome-list-infra.git"
15+

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contribution Guidelines
2+
3+
## Suggesting a New Resource
4+
5+
Please use the GitHub issue form for new suggestions:
6+
7+
- Open `Suggest a Resource`
8+
- Fill in the category, description, and repository fields as completely as you can
9+
- Search existing issues and entries first to avoid duplicates
10+
11+
## Fixing an Existing Entry
12+
13+
This repository uses a data-first workflow:
14+
15+
- YAML files are the source of truth
16+
- `README.md` is generated from YAML data
17+
18+
If you are opening a direct PR:
19+
20+
1. Edit the relevant YAML/source file, not `README.md`
21+
2. Keep entries in the correct section and order
22+
3. Run `python3 scripts/validate_entries.py`
23+
4. Run `python3 scripts/generate_readme.py`
24+
5. Commit the regenerated `README.md`
25+
6. Sign off commits with `git commit --signoff`
26+
27+
## General Rules
28+
29+
- Keep descriptions short, factual, and easy to scan
30+
- Use the appropriate category and subsection
31+
- Check spelling and grammar
32+
- Remove trailing whitespace
33+
34+
Thank you for the contribution.
35+

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Awesome Python Binding Generators for C++
22

3-
## C/C++ to Python
3+
[![Awesome](https://awesome.re/badge.svg)](https://awesome.re)
4+
5+
A curated list of resources for Python Binding Generators for C++.
6+
7+
## Contents
8+
9+
- [C/C++ to Python](#cc-to-python)
10+
- [Boost.Python](#boostpython)
11+
- [pybind11](#pybind11)
12+
- [ETC](#etc)
13+
- [C/C++ to other languages](#cc-to-other-languages)
14+
- [Crystal](#crystal)
15+
16+
## [C/C++ to Python](#contents)
417

518
### Boost.Python
619

@@ -19,8 +32,16 @@
1932
* Cpp2Py - Reflection tools based on clang [[github](https://github.com/TRIQS/cpp2py) ![TRIQS/cpp2py](https://img.shields.io/github/stars/TRIQS/cpp2py.svg?style=social&label=Star&maxAge=2592000)]
2033
* [cppyy](https://cppyy.readthedocs.io) - Python-C++ bindings interface based on Cling/LLVM [[bitbucket](https://bitbucket.org/wlav/cppyy)]
2134

22-
## C/C++ to other languages
35+
## [C/C++ to other languages](#contents)
2336

2437
### Crystal
2538

2639
* Bindgen - Binding and wrapper generator for C/C++ libraries [[github](https://github.com/Papierkorb/bindgen) ![Papierkorb/bindgen](https://img.shields.io/github/stars/Papierkorb/bindgen.svg?style=social&label=Star&maxAge=2592000)]
40+
41+
## [Contributing](#contents)
42+
43+
Contributions are very welcome. Please read the [contribution guidelines](CONTRIBUTING.md) first. Also, please feel free to report any error.
44+
45+
## [License](#contents)
46+
47+
[![CC0](https://licensebuttons.net/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/)

awesome-list.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
title: Awesome Python Binding Generators for C++
2+
description: A curated list of resources for Python Binding Generators for C++.
3+
repository: jslee02/awesome-cpp-python-binding-generator

0 commit comments

Comments
 (0)