From 65a4e526b952e425024ec18e69d56c98466b8fbd Mon Sep 17 00:00:00 2001 From: vaitkus Date: Mon, 8 Jun 2026 10:37:47 +0300 Subject: [PATCH 1/4] Add the dictionary check GitHub action --- .github/workflows/main.yml | 148 +++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6d99e82 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,148 @@ +# Check the syntax, semantics and layout of DDLm dictionaries + +name: CIF Syntax and Style Check + +# Controls when the action will run. Triggers the workflow on push or pull +# request events but only for the main branch +on: + push: + branches: + - main + paths-ignore: + - '.github/**' + + pull_request: + branches: + - main + paths-ignore: + - '.github/**' + + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + syntax: + name: Syntax + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Check out the target repository + uses: actions/checkout@v6 + + # Check syntax of all CIF files + - name: Check CIF syntax + uses: COMCIFS/cif_syntax_check_action@main + id: cif_syntax_check + + semantics: + name: Semantics + runs-on: ubuntu-latest + needs: syntax + + steps: + - name: Check out the target repository + uses: actions/checkout@v6 + + - name: Check out the DDLm reference dictionary + uses: actions/checkout@v6 + with: + repository: COMCIFS/DDLm + path: cif-dictionaries/DDLm + + - name: Check out enumeration templates + uses: actions/checkout@v6 + with: + repository: COMCIFS/Enumeration_Templates + path: cif-dictionaries/Enumeration_Templates + + - name: Run dictionary validity checks + uses: COMCIFS/dictionary_check_action@main + id: ddlm_check + + layout: + name: Layout + runs-on: ubuntu-latest + needs: syntax + + env: + JULIA_VERSION: '1.10' + JULIA_DEP_FILE: 'julia_cif_tools/Project.toml' + + steps: + - name: Install Julia + uses: julia-actions/setup-julia@v3 + with: + version: ${{ env.JULIA_VERSION }} + + - name: Check out Julia tools + uses: actions/checkout@v6 + with: + repository: jamesrhester/julia_cif_tools + path: julia_cif_tools + + - name: Get the cache + uses: actions/cache@v5 + id: cache + with: + path: ~/.julia + key: ${{ runner.os }}-julia-${{ env.JULIA_VERSION }}-${{ hashFiles(env.JULIA_DEP_FILE) }} + + - name: Install Julia packages + if: steps.cache.outputs.cache-hit != 'true' + run: | + julia -e 'using Pkg, TOML; map(Pkg.add, collect(keys(TOML.parsefile("${{ env.JULIA_DEP_FILE }}")["deps"]))); Pkg.instantiate()' + + - name: Check out the target repository + uses: actions/checkout@v6 + with: + path: main + + - name: Check out the DDLm reference dictionary + uses: actions/checkout@v6 + with: + repository: COMCIFS/DDLm + path: DDLm + + - name: Check out enumeration templates + uses: actions/checkout@v6 + with: + repository: COMCIFS/Enumeration_Templates + path: enum + + - name: Check out attribute templates + uses: actions/checkout@v6 + with: + repository: COMCIFS/Attribute_Templates + path: templ + + - name: Check out the coreCIF dictionary + uses: actions/checkout@v6 + with: + repository: COMCIFS/cif_core + path: cif_core + + - name: Move template files to the expected location + run: | + mv enum/templ_enum.cif cif_core/templ_enum.cif + mv templ/templ_attr.cif cif_core/templ_attr.cif + + - name: Run diagnostics + run: | + ls -a + pwd + which julia + + - name: Run dictionary layout checks + run: | + julia -e 'using Pkg; Pkg.status()' + for file in main/*.dic + do + echo "Checking $file" + julia -O0 ./julia_cif_tools/linter.jl -i $PWD/cif_core $file $PWD/DDLm/ddl.dic + if [ $? != 0 ] + then + exit 1 ; + fi + done From 784e77d9743ac57bee38e6a76bcbd4b7e13c43ac Mon Sep 17 00:00:00 2001 From: vaitkus Date: Mon, 8 Jun 2026 10:58:54 +0300 Subject: [PATCH 2/4] Disable layout check --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6d99e82..a10a2df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,6 +63,8 @@ jobs: layout: name: Layout + # Disable the layout check for now + if: false runs-on: ubuntu-latest needs: syntax From 423c9e4a3762a83aa3d06c23366388d3646cade6 Mon Sep 17 00:00:00 2001 From: vaitkus Date: Mon, 29 Jun 2026 13:49:55 +0200 Subject: [PATCH 3/4] Enable GitHub actions on release candidate (rc) branches --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a10a2df..9c356b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,12 +8,14 @@ on: push: branches: - main + - 'rc-*' paths-ignore: - '.github/**' pull_request: branches: - main + - 'rc-*' paths-ignore: - '.github/**' From 4b2f47cd9ec821c667081447339efab6d15f5742 Mon Sep 17 00:00:00 2001 From: vaitkus Date: Mon, 29 Jun 2026 14:07:59 +0200 Subject: [PATCH 4/4] Switch to the non-official enumeration templates The non-official enumeration templates contain all of the units of measurement used by the strucutre prediction dictionaries. --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9c356b7..0dfe4c8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,7 +56,8 @@ jobs: - name: Check out enumeration templates uses: actions/checkout@v6 with: - repository: COMCIFS/Enumeration_Templates + repository: vaitkus/Enumeration_Templates + ref: add-units-from-structure-prediction-dictionaries path: cif-dictionaries/Enumeration_Templates - name: Run dictionary validity checks