-
Notifications
You must be signed in to change notification settings - Fork 5
Validate the full standard examples corpus in CI #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| name: Weekly update | ||
|
|
||
| # Bumps the pinned pals-project/pals commit (tests/pals_standard_ref.txt) that | ||
| # the standard_examples workflow validates against, as a PR. A change to the | ||
| # standard that breaks the examples validation therefore shows up in that PR, | ||
| # not in unrelated ones. | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 9 * * 1" # every Monday at 1:00am PST (9:00am UTC) | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| autoupdate: | ||
| name: Autoupdate | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7 | ||
| - name: Configure Git | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| - name: Checkout branch | ||
| run: | | ||
| git checkout weekly_update || git checkout -b weekly_update | ||
| - name: Update the pinned PALS standard commit | ||
| id: bump | ||
| run: | | ||
| old=$(grep -vE '^[[:space:]]*(#|$)' tests/pals_standard_ref.txt | head -n1) | ||
| new=$(git ls-remote https://github.com/pals-project/pals.git refs/heads/main | cut -f1) | ||
| sed -i "s/^${old}\$/${new}/" tests/pals_standard_ref.txt | ||
| echo "old=${old}" >> "$GITHUB_OUTPUT" | ||
| echo "new=${new}" >> "$GITHUB_OUTPUT" | ||
| - name: Commit changes | ||
| id: commit | ||
| run: | | ||
| if git diff --quiet; then | ||
| echo "The pin already matches pals main; nothing to update." | ||
| echo "changed=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| git add -u | ||
| git commit -m "Update the pinned PALS standard commit" | ||
| echo "changed=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| - name: Push changes | ||
| if: steps.commit.outputs.changed == 'true' | ||
| run: | | ||
| git push -f origin weekly_update | ||
| - name: Open pull request | ||
| if: steps.commit.outputs.changed == 'true' | ||
| run: | | ||
| if [ -n "$(gh pr list --head weekly_update --state open --json number --jq '.[].number')" ]; then | ||
| echo "An open weekly_update PR already exists; the push updated it." | ||
| exit 0 | ||
| fi | ||
| gh pr create \ | ||
| --base main \ | ||
| --title "PALS standard: weekly update of the pinned commit" \ | ||
| --body "Bump the pinned pals-project/pals commit from \ | ||
| pals-project/pals@${{ steps.bump.outputs.old }} to \ | ||
| pals-project/pals@${{ steps.bump.outputs.new }} \ | ||
| (https://github.com/pals-project/pals/compare/${{ steps.bump.outputs.old }}...${{ steps.bump.outputs.new }}). | ||
|
|
||
| Automated via .github/workflows/weekly_update.yml." |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # The commit of pals-project/pals that the standard_examples workflow checks | ||
| # out and validates the examples corpus from. Pinning a fixed commit keeps | ||
| # changes to the standard from breaking unrelated pals-python PRs; the | ||
| # weekly_update workflow bumps this pin to the current main in a PR of its | ||
| # own, so a breaking change in the standard surfaces there, reviewed and | ||
| # controlled. | ||
| # | ||
| # The first non-comment line is the pin: a full commit SHA of | ||
| # https://github.com/pals-project/pals | ||
| 5c39fde043ddad7a961ede01a5ad73d90b098aec |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this file maybe, now or in the future, a TOML format could be useful in case we want to add metadata to the failures, e.g., ["machine/machine.pals.yaml"]
reason = "Facility-level includes are not resolved"
issue = 123
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah. But also our goal is that this file is empty when we are done :D I hope we will not have to permanently exclude files |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Standard example files pals-python cannot read yet, one path per line | ||
| # relative to the standard's examples directory. validate_standard_examples.py | ||
| # treats a failure of a listed file as expected and a listed file that starts | ||
| # to load as an error, so this list shrinks as support lands. Blank lines and | ||
| # `#` comments are ignored. | ||
|
|
||
| # PALSroot models only `version` and `facility`, and `facility` is required: | ||
| # the minimal load-family documents (notes, extension labels, or a version | ||
| # only) are rejected. | ||
|
ax3l marked this conversation as resolved.
Outdated
|
||
| unit_tests/loading/basic/joiner.pals.yaml | ||
| unit_tests/loading/diamond/joiner.pals.yaml | ||
| unit_tests/loading/diamond/left.pals.yaml | ||
| unit_tests/loading/diamond/right.pals.yaml | ||
| unit_tests/loading/diamond/shared.pals.yaml | ||
| unit_tests/loading/extension_labels/a.pals.yaml | ||
| unit_tests/loading/extension_labels/joiner.pals.yaml | ||
| unit_tests/loading/implicit_self/a.pals.yaml | ||
| unit_tests/loading/implicit_self/joiner.pals.yaml | ||
| unit_tests/loading/nested/a.pals.yaml | ||
| unit_tests/loading/nested/inner.pals.yaml | ||
| unit_tests/loading/nested/joiner.pals.yaml | ||
| unit_tests/loading/relative_paths/joiner.pals.yaml | ||
| unit_tests/loading/relative_paths/sub/inner.pals.yaml | ||
| unit_tests/loading/relative_paths/top.pals.yaml | ||
| unit_tests/loading/self_position/a.pals.yaml | ||
| unit_tests/loading/self_position/b.pals.yaml | ||
| unit_tests/loading/self_position/joiner.pals.yaml | ||
| unit_tests/loading/version_match/a.pals.yaml | ||
| unit_tests/loading/version_match/joiner.pals.yaml | ||
|
|
||
| # An integer `version` (root_keys writes `version: 1`) is rejected; the model | ||
| # wants a string or null. | ||
| unit_tests/document/root_keys.pals.yaml | ||
|
|
||
| # `include` entries inside a facility are not resolved. | ||
| machine/machine.pals.yaml | ||
| unit_tests/loading/include/sub/layout.pals.yaml | ||
|
|
||
| # The sequence form of `variables` and the compact `sets` form are not | ||
| # modeled. | ||
| unit_tests/expressions/inline_expressions.pals.yaml | ||
| unit_tests/sets/sets_compact.pals.yaml | ||
Uh oh!
There was an error while loading. Please reload this page.