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
164 changes: 111 additions & 53 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,80 @@
# 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:
- '*'
- main
paths-ignore:
- '.github/**'
- '.github/**'

pull_request:
branches: [ main ]
branches:
- main
paths-ignore:
- '.github/**'
workflow_dispatch:
- '.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: Run dictionary validity checks
uses: COMCIFS/dictionary_check_action@main
id: ddlm_check

layout:
name: Layout
runs-on: ubuntu-latest
needs: syntax

Expand All @@ -42,57 +83,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.10'

- 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
repository: COMCIFS/DDLm
path: DDLm

- name: Checkout enumeration templates
uses: actions/checkout@v4
with:
repository: COMCIFS/Enumeration_Templates
path: enum

- name: Checkout attribute templates
uses: actions/checkout@v4
with:
repository: COMCIFS/Attribute_Templates
path: templ

- name: Checkout the coreCIF dictionary
uses: actions/checkout@v4
with:
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: |
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
ls -a
pwd
which julia

- name: check_ddlm
uses: COMCIFS/dictionary_check_action@main
id: ddlm_check
- 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_ed.dic
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ data_CIF_ED
_dictionary.title CIF_ED
_dictionary.class Instance
_dictionary.version 1.0.1-dev
_dictionary.date 2025-03-24
_dictionary.date 2026-01-19
_dictionary.uri
https://raw.githubusercontent.com/COMCIFS/cif_ed/main/cif_ed.dic
_dictionary.ddl_conformance 4.2.0
Expand Down Expand Up @@ -813,7 +813,7 @@ save_
of the definitions in this dictionary may be copies of core
definitions with extended attributes.
;
1.0.1-dev 2025-03-24
1.0.1-dev 2026-01-19
;
# Please update the date above and describe the change below until
# ready for the next release
Expand Down
Loading