Skip to content

Commit 08939dd

Browse files
committed
regenerate registry table from gh queries
1 parent 0a9023b commit 08939dd

File tree

98 files changed

+260
-4017
lines changed

Some content is hidden

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

98 files changed

+260
-4017
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Regenerate LinkML Registry Artifacts
2+
3+
# Controls when the action will run. Triggers the workflow on push
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
types: trigger-build-artifacts
11+
12+
jobs:
13+
rebuild-artifacts:
14+
name: Build and commit registry artifacts
15+
runs-on: ubuntu-latest
16+
environment: release
17+
permissions:
18+
# this permission is mandatory for trusted publishing
19+
id-token: write
20+
# needed to push changes back to repo
21+
contents: write
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v5
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: "3.11"
33+
34+
- name: Install project dependencies
35+
run: uv sync
36+
37+
- name: Generate LinkML Registry Artifacts
38+
env:
39+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
run: |
41+
make discover
42+
make gendoc
43+
if [ $? -eq 0 ]; then
44+
git config --local user.email "action@github.com"
45+
git config --local user.name "GitHub Action"
46+
git add linkml_registry.yaml
47+
git commit -m "Regenerate LinkML registry artifacts"
48+
git push
49+
else
50+
echo "'make discover' failed to finish successfully"
51+
fi

Makefile

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ help: status
5050
@echo "make testdoc -- builds docs and runs local test server"
5151
@echo "make deploy -- deploys site"
5252
@echo "make update -- updates linkml version"
53+
@echo "make discover -- discover LinkML repositories"
5354
@echo "make help -- show this help"
5455
@echo ""
5556

@@ -121,29 +122,6 @@ lint:
121122
check-config:
122123
@(grep my-datamodel about.yaml > /dev/null && printf "\n**Project not configured**:\n\n - Remember to edit 'about.yaml'\n\n" || exit 0)
123124

124-
convert-examples-to-%:
125-
$(patsubst %, $(RUN) linkml-convert % -s $(SOURCE_SCHEMA_PATH) -C Person, $(shell ${SHELL} find src/data/examples -name "*.yaml"))
126-
127-
examples/%.yaml: src/data/examples/%.yaml
128-
$(RUN) linkml-convert -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@
129-
examples/%.json: src/data/examples/%.yaml
130-
$(RUN) linkml-convert -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@
131-
examples/%.ttl: src/data/examples/%.yaml
132-
$(RUN) linkml-convert -P EXAMPLE=http://example.org/ -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@
133-
134-
test-examples: examples/output
135-
136-
examples/output: src/linkml_common/schema/linkml_common.yaml
137-
mkdir -p $@
138-
$(RUN) linkml-run-examples \
139-
--output-formats json \
140-
--output-formats yaml \
141-
--counter-example-input-directory src/data/examples/invalid \
142-
--input-directory src/data/examples/valid \
143-
--output-directory $@ \
144-
--schema $< > $@/README.md
145-
.PHONY: examples/output
146-
147125
# Test documentation locally
148126
serve: mkd-serve
149127

@@ -155,9 +133,17 @@ $(PYMODEL):
155133
$(DOCDIR):
156134
mkdir -p $@
157135

158-
gendoc: $(DOCDIR)
136+
gendoc: $(DOCDIR) discover
159137
cp $(SRC)/docs/*md $(DOCDIR) ; \
160-
$(RUN) gen-doc ${GEN_DARGS} -d $(DOCDIR) $(SOURCE_SCHEMA_PATH)
138+
$(RUN) gen-doc ${GEN_DARGS} -d $(DOCDIR) $(SOURCE_SCHEMA_PATH) ; \
139+
$(RUN) python src/scripts/generate_registry_docs.py \
140+
--registry-file linkml_registry.yaml \
141+
--output-dir $(DOCDIR) \
142+
--templates-dir src/doc_templates \
143+
--overview-template overview.jinja2 \
144+
--detail-template registry.jinja2 \
145+
--src-docs-dir src/docs
146+
161147

162148
testdoc: gendoc serve
163149

@@ -182,6 +168,9 @@ git-status:
182168
echo "creating a stub for .cruft.json. IMPORTANT: setup via cruft not cookiecutter recommended!" ; \
183169
touch $@
184170

171+
discover:
172+
$(RUN) python src/scripts/discover_linkml_repos.py --analyze --min-stars 0 --output linkml_registry.yaml
173+
185174
clean:
186175
rm -rf $(DEST)
187176
rm -rf tmp

docs/details/4TU.ResearchData.md

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

docs/details/ABCD-J.md

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

docs/details/AKC.md

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

docs/details/Alliander.md

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

docs/details/AltosLabs.md

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

docs/details/AnVIL.md

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

docs/details/BDC.md

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

0 commit comments

Comments
 (0)