From 91d7f8729d0f040029415652329f071603fd1406 Mon Sep 17 00:00:00 2001 From: vaitkus Date: Mon, 19 Jan 2026 13:26:12 +0200 Subject: [PATCH 1/6] Update semantic validation step to use external repositories --- .github/workflows/main.yml | 78 ++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d822903..62ca0b1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,6 +32,56 @@ jobs: - name: check_syntax uses: COMCIFS/cif_syntax_check_action@master id: cif_syntax_check + + semantics: + name: Semantics + runs-on: ubuntu-latest + needs: syntax + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Checkout the DDLm reference dictionary + uses: actions/checkout@v4 + with: + repository: COMCIFS/DDLm + path: cif-dictionaries/DDLm + + - name: Checkout enumeration templates + uses: actions/checkout@v4 + with: + repository: COMCIFS/Enumeration_Templates + path: cif-dictionaries/Enumeration_Templates + + - name: Checkout attribute templates + uses: actions/checkout@v4 + with: + repository: COMCIFS/Attribute_Templates + path: cif-dictionaries/Attribute_Templates + + - name: Checkout the coreCIF dictionary + uses: actions/checkout@v4 + with: + repository: COMCIFS/cif_core + path: cif-dictionaries/cif_core + + - name: Checkout the multiblock coreCIF dictionary + uses: actions/checkout@v4 + with: + repository: COMCIFS/MultiBlock_Dictionary + path: cif-dictionaries/MultiBlock_Dictionary + + - name: Checkout the DDLm imgCIF dictionary + uses: actions/checkout@v4 + with: + repository: COMCIFS/imgCIF + path: cif-dictionaries/imgCIF + + - name: Run dictionary validity checks + uses: COMCIFS/dictionary_check_action@main + id: ddlm_check + layout: runs-on: ubuntu-latest needs: syntax @@ -85,31 +135,3 @@ jobs: exit 1 ; fi done - ddlm: - runs-on: ubuntu-latest - needs: syntax - steps: - - name: checkout - uses: actions/checkout@v4 - - - name: Checkout the coreCIF dictionary - uses: actions/checkout@v4 - with: - repository: COMCIFS/cif_core - path: cif-dictionaries/cif_core - - - name: Checkout the multiblock coreCIF dictionary - uses: actions/checkout@v4 - with: - repository: COMCIFS/MultiBlock_Dictionary - path: cif-dictionaries/MultiBlock_Dictionary - - - name: Checkout DDLm imgCIF dictionary - uses: actions/checkout@v4 - with: - repository: COMCIFS/imgCIF - path: cif-dictionaries/imgCIF - - - name: check_ddlm - uses: COMCIFS/dictionary_check_action@main - id: ddlm_check From 55ac50af50f0d7e35048a76ddbb5041250d2ab41 Mon Sep 17 00:00:00 2001 From: vaitkus Date: Mon, 19 Jan 2026 13:34:03 +0200 Subject: [PATCH 2/6] Update layout validation step to use external repositories --- .github/workflows/main.yml | 82 +++++++++++++++++++++++++------------- 1 file changed, 55 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 62ca0b1..b32fc67 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,6 +83,7 @@ jobs: id: ddlm_check layout: + name: Layout runs-on: ubuntu-latest needs: syntax @@ -91,47 +92,74 @@ jobs: uses: actions/cache@v4 id: cache with: - path: ~/.julia - key: ${{ runner.os }}-julia-v2 + path: ~/.julia + key: ${{ runner.os }}-julia-v2 - name: Install Julia uses: julia-actions/setup-julia@v1 with: - version: '1.6' + version: '1.9' - name: Install Julia packages if: steps.cache.outputs.cache-hit != 'true' run: | - julia -e 'import Pkg;Pkg.add("CrystalInfoFramework");Pkg.add("Lerche");Pkg.add("FilePaths");Pkg.add("ArgParse")' - - name: checkout + julia -e 'import Pkg;Pkg.add("CrystalInfoFramework");Pkg.add("Lerche");Pkg.add("ArgParse")' + + - name: Checkout + uses: actions/checkout@v4 + with: + path: main + + - name: Checkout julia tools + uses: actions/checkout@v4 + with: + repository: jamesrhester/julia_cif_tools + path: julia_cif_tools + + - name: Checkout the DDLm reference dictionary + uses: actions/checkout@v4 + with: + repository: COMCIFS/DDLm + path: DDLm + + - name: Checkout enumeration templates uses: actions/checkout@v4 with: - path: main - - name: checkout julia tools + repository: COMCIFS/Enumeration_Templates + path: enum + + - name: Checkout attribute templates uses: actions/checkout@v4 with: - repository: jamesrhester/julia_cif_tools - path: julia_cif_tools + repository: COMCIFS/Attribute_Templates + path: templ - - name: Checkout CIF master files + - name: Checkout the coreCIF dictionary uses: actions/checkout@v4 with: - repository: COMCIFS/cif_core - path: cif_core - - name: Diagnostics + repository: COMCIFS/cif_core + path: cif_core + + - name: Move template files to the expected location run: | - ls -a - pwd - which julia - - name: one_dict_layout + 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 cif_core/ddl.dic - if [ $? != 0 ] - then - exit 1 ; - fi - done + 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 cif_core/ddl.dic + if [ $? != 0 ] + then + exit 1 ; + fi + done From a91ae234166761015602b90ff886a825729b2fee Mon Sep 17 00:00:00 2001 From: vaitkus Date: Mon, 19 Jan 2026 13:36:45 +0200 Subject: [PATCH 3/6] Clean up the action file --- .github/workflows/main.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b32fc67..9fba946 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,37 +1,40 @@ -# Check that syntax is correct +# Check the syntax, semantics and layout of DDLm dictionaries -name: CIFSyntaxandStyleCheck +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 master branch +# Controls when the action will run. Triggers the workflow on push or pull +# request events but only for the main branch on: push: - branches: [ master ] + branches: + - main paths-ignore: - - '.github/**' + - '.github/**' pull_request: - branches: [ master ] + branches: + - main paths-ignore: - - '.github/**' + - '.github/**' + workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: syntax: - # The type of runner that the job will run on + 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: checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 # Check syntax of all CIF files - - name: check_syntax - uses: COMCIFS/cif_syntax_check_action@master - id: cif_syntax_check + - name: Check CIF syntax + uses: COMCIFS/cif_syntax_check_action@master + id: cif_syntax_check semantics: name: Semantics From 388008bd7778bd5d24c388dc74fccb520b20a051 Mon Sep 17 00:00:00 2001 From: vaitkus Date: Mon, 19 Jan 2026 13:39:30 +0200 Subject: [PATCH 4/6] Fix branch name in actions --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9fba946..b27fb70 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,13 +7,13 @@ name: CIF Syntax and Style Check on: push: branches: - - main + - master paths-ignore: - '.github/**' pull_request: branches: - - main + - master paths-ignore: - '.github/**' From ef26479ddc49a22b6a3f3be39f0c021ea94ba7ec Mon Sep 17 00:00:00 2001 From: vaitkus Date: Mon, 19 Jan 2026 14:09:34 +0200 Subject: [PATCH 5/6] Correct path to the DDLm reference dictionary --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b27fb70..7a92800 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -160,7 +160,7 @@ jobs: for file in main/*.dic do echo "Checking $file" - julia -O0 ./julia_cif_tools/linter.jl -i $PWD/cif_core $file cif_core/ddl.dic + julia -O0 ./julia_cif_tools/linter.jl -i $PWD/cif_core $file $PWD/DDLm/ddl.dic if [ $? != 0 ] then exit 1 ; From 551595bab0209c0100a2d1c98877b487c6e32fa3 Mon Sep 17 00:00:00 2001 From: vaitkus Date: Mon, 19 Jan 2026 14:17:29 +0200 Subject: [PATCH 6/6] Change update date to reflect changes in imported dictionaries This change also allows automated checks to pass. --- cif_pow.dic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cif_pow.dic b/cif_pow.dic index ea25016..1e32c80 100644 --- a/cif_pow.dic +++ b/cif_pow.dic @@ -15,7 +15,7 @@ data_CIF_POW _dictionary.title CIF_POW _dictionary.class Instance _dictionary.version 2.5.0 - _dictionary.date 2025-12-01 + _dictionary.date 2025-12-10 _dictionary.uri https://raw.githubusercontent.com/COMCIFS/Powder_Dictionary/master/cif_pow.dic _dictionary.ddl_conformance 4.2.0 @@ -14442,7 +14442,7 @@ save_ Deprecated _pd_refln.wavelength_id after consultation with PDDMG. ; - 2.5.0 2025-12-01 + 2.5.0 2025-12-10 ; ## Retain above version number and increment date until final ## release