Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 115 additions & 62 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,92 @@
# 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:
- master
paths-ignore:
- '.github/**'
- '.github/**'

pull_request:
branches: [ master ]
branches:
- master
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
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:
name: Layout
runs-on: ubuntu-latest
needs: syntax

Expand All @@ -41,75 +95,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
path: main

- name: Checkout julia tools
uses: actions/checkout@v4
with:
repository: jamesrhester/julia_cif_tools
path: julia_cif_tools
repository: jamesrhester/julia_cif_tools
path: julia_cif_tools

- name: Checkout CIF master files
- name: Checkout the DDLm reference dictionary
uses: actions/checkout@v4
with:
repository: COMCIFS/cif_core
path: cif_core
- name: Diagnostics
run: |
ls -a
pwd
which julia
- name: one_dict_layout
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
ddlm:
runs-on: ubuntu-latest
needs: syntax
steps:
- name: checkout
uses: actions/checkout@v4
repository: COMCIFS/DDLm
path: DDLm

- name: Checkout the coreCIF dictionary
- name: Checkout enumeration templates
uses: actions/checkout@v4
with:
repository: COMCIFS/cif_core
path: cif-dictionaries/cif_core
repository: COMCIFS/Enumeration_Templates
path: enum

- name: Checkout the multiblock coreCIF dictionary
- name: Checkout attribute templates
uses: actions/checkout@v4
with:
repository: COMCIFS/MultiBlock_Dictionary
path: cif-dictionaries/MultiBlock_Dictionary
repository: COMCIFS/Attribute_Templates
path: templ

- name: Checkout DDLm imgCIF dictionary
- name: Checkout the coreCIF 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
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
4 changes: 2 additions & 2 deletions cif_pow.dic
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down