Script updating gh-pages from f95988f. [ci skip]

This commit is contained in:
ID Bot 2026-07-06 16:53:52 +00:00
parent efad2d5431
commit 8e674e9153
9 changed files with 4302 additions and 195 deletions

3
.github/FUNDING.yml vendored
View File

@ -1,3 +0,0 @@
# These are supported funding model platforms
github: [zkat]

View File

@ -1,60 +0,0 @@
name: "Update Editor's Copy"
on:
push:
paths-ignore:
- README.md
- CONTRIBUTING.md
- LICENSE.md
- .gitignore
pull_request:
paths-ignore:
- README.md
- CONTRIBUTING.md
- LICENSE.md
- .gitignore
jobs:
build:
name: "Update Editor's Copy"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup"
id: setup
run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT"
- name: "Caching"
uses: actions/cache@v4
with:
path: |
.refcache
.venv
.gems
node_modules
.targets.mk
key: i-d-${{ steps.setup.outputs.date }}
restore-keys: i-d-
- name: "Build Drafts"
uses: martinthomson/i-d-template@v1
with:
token: ${{ github.token }}
- name: "Update GitHub Pages"
uses: martinthomson/i-d-template@v1
if: ${{ github.event_name == 'push' }}
with:
make: gh-pages
token: ${{ github.token }}
- name: "Archive Built Drafts"
uses: actions/upload-artifact@v4
with:
path: |
draft-*.html
draft-*.txt

View File

@ -1,25 +0,0 @@
name: Lint the test files
on:
push:
paths:
- "tests/**"
pull_request:
paths:
- "tests/**"
workflow_dispatch: {}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Verify failing tests and orphaned tests
run: |
cd tests/test_cases
python ../../.github/workflows/lint-tests/lint.py

View File

@ -1,50 +0,0 @@
from __future__ import annotations
import os
import sys
import typing
def findTestFiles(path) -> typing.Generator[str, None, None]:
for root, _, filenames in os.walk(path):
for filename in filenames:
yield os.path.join(root, filename)
# strip the leading folder name, so they can be directly compared
inputFiles = set(x[len("input")+1:] for x in findTestFiles("input"))
validFiles = set(x[len("expected_kdl")+1:] for x in findTestFiles("expected_kdl"))
invalidFiles = inputFiles - validFiles
orphanedFiles = validFiles - inputFiles
SUCCESS = True
# Check for any expected_kdl files without a corresponding input file.
if orphanedFiles:
SUCCESS = False
print("ERROR: There are outputs in /expected_kdl without corresponding tests in /input:\n" + "\n".join([" "+x for x in orphanedFiles]))
# Check for any input files lacking an expected_kdl file
# (aka inputs expected to generate a parse error)
# that don't have a _fail suffix.
misnamedFiles: list[str] = []
for filepath in invalidFiles:
basepath, ext = os.path.splitext(filepath)
if not basepath.endswith("_fail"):
misnamedFiles.append(filepath)
if misnamedFiles:
SUCCESS = False
print("ERROR: There are tests in /input without corresponding outputs in /expected_kdl, but they don't have a _fail suffix:\n" + "\n".join([" "+x for x in misnamedFiles]))
# Check for any expected_kdl files that don't end in a newline.
noNewlineFiles: list[str] = []
for filepath in validFiles:
with open("expected_kdl/" + filepath, "r", encoding="utf-8") as fh:
text = fh.read()
if not text.endswith("\n"):
noNewlineFiles.append(filepath)
if noNewlineFiles:
SUCCESS = False
print("ERROR: There are outputs in /expected_kdl that don't end with a newline:\n" + "\n".join([" "+x for x in noNewlineFiles]))
if not SUCCESS:
sys.exit(1)

View File

@ -1,57 +0,0 @@
name: "Publish New Draft Version"
on:
push:
tags:
- "draft-*"
workflow_dispatch:
inputs:
email:
description: "Submitter email"
default: ""
type: string
jobs:
build:
name: "Publish New Draft Version"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
# See https://github.com/actions/checkout/issues/290
- name: "Get Tag Annotations"
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }}
- name: "Setup"
id: setup
run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT"
- name: "Caching"
uses: actions/cache@v4
with:
path: |
.refcache
.venv
.gems
node_modules
.targets.mk
key: i-d-${{ steps.setup.outputs.date }}
restore-keys: i-d-
- name: "Build Drafts"
uses: martinthomson/i-d-template@v1
with:
token: ${{ github.token }}
- name: "Upload to Datatracker"
uses: martinthomson/i-d-template@v1
with:
make: upload
env:
UPLOAD_EMAIL: ${{ inputs.email }}
- name: "Archive Submitted Drafts"
uses: actions/upload-artifact@v4
with:
path: "versioned/draft-*-[0-9][0-9].*"

View File

@ -24,6 +24,15 @@
<td></td>
</tr>
</table>
<h2>Preview for branch <a href="zkat">zkat</a></h2>
<h2>Preview for branch <a href="zkat/schema-v2">zkat/schema-v2</a></h2>
<table id="branch-zkat/schema-v2">
<tr>
<td><a href="zkat/schema-v2/draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
<td><a href="zkat/schema-v2/draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
<td><a href="https://author-tools.ietf.org/api/iddiff?url_1=https://kdl-org.github.io/kdl/draft-marchan-kdl2.txt&amp;url_2=https://kdl-org.github.io/kdl/zkat/schema-v2/draft-marchan-kdl2.txt" class="diff draft-marchan-kdl2">diff with main</a></td>
</tr>
</table>
<script>
window.onload = function() {
var referrer_branch = 'main';

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

45
zkat/schema-v2/index.html Normal file
View File

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<title>kdl-org/kdl zkat/schema-v2 preview</title>
<meta name="viewport" content="initial-scale=1.0">
<style type="text/css">/*<![CDATA[*/
body { font-family: "Helvetica Neue","Open Sans", Helvetica, Calibri,sans-serif; }
h1, h2, td { font-family: "Helvetica Neue", "Roboto Condensed", "Open Sans", Helvetica, Calibri, sans-serif; }
h1 { font-size: 20px; } h2 { font-size: 16px; }
table { margin: 5px 10px; border-collapse: collapse; }
th, td { font-weight: normal; text-align: left; padding: 2px 5px; }
a:link { color: #000; } a:visited { color: #00a; }
/*]]>*/</style>
</head>
<body>
<h1>Editor's drafts for zkat/schema-v2 branch of <a href="https://github.com/kdl-org/kdl/tree/zkat/schema-v2">kdl-org/kdl</a></h1>
<table id="branch-zkat/schema-v2">
<tr>
<td><a href="./draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
<td><a href="./draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
<td>same as main</td>
</tr>
</table>
<script>
window.onload = function() {
var referrer_branch = 'main';
// e.g., "https://github.com/user/repo/tree/main"
var chunks = document.referrer.split("/");
if (chunks[2] === 'github.com' && chunks[5] === 'tree') {
referrer_branch = chunks[6];
}
let branch = document.querySelector('#branch-' + referrer_branch);
let h = document.location.hash.substring(1);
if (h === 'show') {
document.location.hash = '#' + branch.id;
} else if (branch && h.startsWith('go')) {
let e = branch.querySelector(h.substring(2));
if (e && e.href) {
document.location = e.href;
}
}
};
</script>
</body>
</html>