File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ name: Community Entry Check
22
33# Lightweight, non-executing gate for community showcase entries.
44# It does NOT run contributor code. It validates entry structure, scans for
5- # committed secrets, confirms hosted entries use Opik, and verifies the
6- # generated showcase index is up to date. Secrets-free, so it runs on forks.
5+ # committed secrets, and confirms hosted entries use Opik. Secrets-free, so it
6+ # runs on forks. The showcase index (community/README.md) is regenerated
7+ # separately on merge by community-index.yml — contributors run nothing.
78#
89# Community entries are intentionally exempt from the verified-bucket workflows
910# (compliance / pr-test / test-notebooks / scheduled), which are path-scoped to
@@ -32,26 +33,21 @@ jobs:
3233
3334 - name : Install tooling
3435 run : |
35- cd community/scripts
36+ cd community/_ci
3637 uv sync
3738
3839 - name : Unit-test the check tooling
3940 run : |
40- cd community/scripts
41+ cd community/_ci
4142 uv run pytest -q
4243
4344 - name : Lint the check tooling
4445 run : |
45- cd community/scripts
46+ cd community/_ci
4647 uv run ruff check .
4748 uv run ruff format --check .
4849
4950 - name : Validate all community entries
5051 run : |
51- cd community/scripts
52+ cd community/_ci
5253 uv run python check_entry.py
53-
54- - name : Verify showcase index is up to date
55- run : |
56- cd community/scripts
57- uv run python build_index.py --check
Original file line number Diff line number Diff line change 1+ name : Community Index
2+
3+ # Regenerates the community showcase index (community/README.md) from every
4+ # entry's meta.yaml after changes land on main. This keeps the index current
5+ # with zero manual action — contributors never run the generator, and no one
6+ # hand-edits community/README.md.
7+ #
8+ # It runs build_index.py (which only parses YAML — it never executes contributor
9+ # code) and commits the result back to main only if it changed. The path filter
10+ # excludes community/README.md so this workflow's own index commit does not
11+ # re-trigger it.
12+
13+ on :
14+ push :
15+ branches : [main]
16+ paths :
17+ - " community/**"
18+ - " !community/README.md"
19+
20+ permissions :
21+ contents : write
22+
23+ concurrency :
24+ group : community-index
25+ cancel-in-progress : false
26+
27+ jobs :
28+ regenerate :
29+ runs-on : ubuntu-latest
30+ timeout-minutes : 10
31+ steps :
32+ - uses : actions/checkout@v7
33+
34+ - uses : astral-sh/setup-uv@v7
35+ with :
36+ version : " latest"
37+ enable-cache : true
38+ python-version : " 3.12"
39+
40+ - name : Regenerate showcase index
41+ run : |
42+ cd community/_ci
43+ uv sync
44+ uv run python build_index.py
45+
46+ - name : Commit index if it changed
47+ run : |
48+ if [[ -n "$(git status --porcelain community/README.md)" ]]; then
49+ git config user.name "github-actions[bot]"
50+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
51+ git add community/README.md
52+ git commit -m "chore: regenerate community showcase index"
53+ git push
54+ else
55+ echo "Showcase index already up to date."
56+ fi
Original file line number Diff line number Diff line change @@ -28,13 +28,15 @@ either Comet cloud or the self-hosted open-source platform.
2828 dashboard.
29294 . If you want it considered for hosting, include your code in the folder — it
3030 must genuinely use Opik (` import opik ` , ` @opik.track ` , ...).
31- 5 . Regenerate the index: ` cd community/scripts && uv run python build_index.py `
32- (commit the updated ` community/README.md ` ).
33- 6 . Open a PR. A maintainer reviews it.
31+ 5 . Open a PR. A maintainer reviews it.
32+
33+ That's it — you don't need to run anything. The showcase index
34+ (` community/README.md ` ) is regenerated automatically when your entry merges, so
35+ your project appears there without any manual step on your part.
3436
3537## What the automated check enforces
3638
37- ` community/scripts /check_entry.py ` runs on your PR (a hard gate). It does ** not**
39+ ` community/_ci /check_entry.py ` runs on your PR (a hard gate). It does ** not**
3840run your code. It checks:
3941
4042- ` meta.yaml ` has all required fields, at least one link, and a valid
Original file line number Diff line number Diff line change 11# Community
22
3- <!-- This file is generated by community/scripts /build_index.py. Do not edit by hand. -->
3+ <!-- This file is generated by community/_ci /build_index.py. Do not edit by hand. -->
44
55Work built with Opik by the open-source community. These entries are
66** community-contributed and not maintainer-verified** — they are showcased here
Original file line number Diff line number Diff line change 99_HEADER = """\
1010 # Community
1111
12- <!-- This file is generated by community/scripts /build_index.py. Do not edit by hand. -->
12+ <!-- This file is generated by community/_ci /build_index.py. Do not edit by hand. -->
1313
1414Work built with Opik by the open-source community. These entries are
1515**community-contributed and not maintainer-verified** — they are showcased here
Original file line number Diff line number Diff line change 1313)
1414
1515COMMUNITY_DIR = Path (__file__ ).resolve ().parent .parent
16- RESERVED_DIRS = {"scripts " , "templates" }
16+ RESERVED_DIRS = {"_ci " , "templates" }
1717
1818
1919def discover_entries (community_dir : Path ) -> list [Path ]:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments