lutaml 0.11.9 → 0.11.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/docs.yml +87 -0
- data/.github/workflows/links.yml +113 -0
- data/.github/workflows/rake.yml +52 -0
- data/.github/workflows/release.yml +83 -0
- data/.gitignore +29 -0
- data/CLAUDE.md +27 -0
- data/Gemfile +2 -2
- data/docs/.github/workflows/docs.yml +66 -0
- data/docs/.github/workflows/links.yml +78 -0
- data/docs/CONTINUATION_PLAN.md +168 -0
- data/docs/Gemfile +13 -0
- data/docs/MIGRATION_GUIDE.md +202 -0
- data/docs/README.md +252 -0
- data/docs/REFACTOR_PLAN.md +214 -0
- data/docs/_config.yml +144 -0
- data/docs/_guides/cli-usage.adoc +43 -0
- data/docs/_guides/diagram-generation.adoc +316 -0
- data/docs/_guides/index.adoc +136 -0
- data/docs/_guides/parsing/express-parsing.adoc +42 -0
- data/docs/_guides/parsing/index.adoc +78 -0
- data/docs/_guides/parsing/qea-parsing.adoc +47 -0
- data/docs/_guides/parsing/xmi-parsing.adoc +40 -0
- data/docs/_guides/repository-management.adoc +44 -0
- data/docs/_guides/sysml-modeling.adoc +37 -0
- data/docs/_guides/uml-modeling.adoc +115 -0
- data/docs/_pages/concepts/diagram-generation.adoc +337 -0
- data/docs/_pages/concepts/lur-format.adoc +711 -0
- data/docs/_pages/concepts/qea-parsing.adoc +418 -0
- data/docs/_pages/concepts/uml-models.adoc +43 -0
- data/docs/_pages/core/architecture.adoc +329 -0
- data/docs/_pages/core/installation.adoc +321 -0
- data/docs/_pages/core/overview.adoc +197 -0
- data/docs/_pages/index.adoc +49 -0
- data/docs/_pages/uml-syntax.adoc +1011 -0
- data/docs/_references/api/parsers.adoc +61 -0
- data/docs/_references/api/presenters.adoc +43 -0
- data/docs/_references/api/repository.adoc +67 -0
- data/docs/_references/cli/commands.adoc +72 -0
- data/docs/_references/configuration/diagram-styles.adoc +716 -0
- data/docs/_references/configuration/index.adoc +53 -0
- data/docs/_references/configuration/package-metadata.adoc +416 -0
- data/docs/_references/formats/index.adoc +43 -0
- data/docs/_references/formats/lur-format.adoc +39 -0
- data/docs/_references/formats/lutaml-syntax.adoc +379 -0
- data/docs/_references/formats/qea-structure.adoc +1364 -0
- data/docs/_references/index.adoc +198 -0
- data/docs/_tutorials/documentation-site.adoc +47 -0
- data/docs/_tutorials/first-lur-package.adoc +45 -0
- data/docs/_tutorials/generating-diagrams.adoc +42 -0
- data/docs/_tutorials/getting-started.adoc +45 -0
- data/docs/_tutorials/index.adoc +100 -0
- data/docs/_tutorials/querying-models.adoc +44 -0
- data/docs/examples/build_package.rb +12 -0
- data/docs/examples/build_site.rb +12 -0
- data/docs/examples/city_model.rb +21 -0
- data/docs/examples/present_class.rb +10 -0
- data/docs/examples/query_model.rb +12 -0
- data/docs/examples/render_diagram.rb +11 -0
- data/docs/index.adoc +64 -0
- data/docs/lml-models-and-instances-syntax.adoc +931 -0
- data/docs/lml.adoc +210 -0
- data/docs/lychee.toml +50 -0
- data/lib/lutaml/version.rb +1 -1
- data/lib/lutaml.rb +6 -1
- data/lutaml.gemspec +8 -6
- metadata +75 -131
- data/exe/lutaml-lml +0 -6
- data/exe/lutaml-lml-lsp +0 -11
- data/lib/lutaml/lml/association_label_resolver.rb +0 -52
- data/lib/lutaml/lml/cli.rb +0 -506
- data/lib/lutaml/lml/data_processor/attribute_processing.rb +0 -133
- data/lib/lutaml/lml/data_processor/collection_processing.rb +0 -37
- data/lib/lutaml/lml/data_processor/instance_processing.rb +0 -77
- data/lib/lutaml/lml/data_processor/value_declaration_processing.rb +0 -70
- data/lib/lutaml/lml/data_processor/value_processing.rb +0 -103
- data/lib/lutaml/lml/data_processor/view_processing.rb +0 -26
- data/lib/lutaml/lml/data_processor.rb +0 -59
- data/lib/lutaml/lml/diagnostic.rb +0 -149
- data/lib/lutaml/lml/document_builder.rb +0 -481
- data/lib/lutaml/lml/entity_types.rb +0 -30
- data/lib/lutaml/lml/executor/adapter_helpers.rb +0 -45
- data/lib/lutaml/lml/executor/condition_evaluator.rb +0 -169
- data/lib/lutaml/lml/executor/csv_adapter.rb +0 -88
- data/lib/lutaml/lml/executor/format_adapter.rb +0 -54
- data/lib/lutaml/lml/executor/xml_adapter.rb +0 -102
- data/lib/lutaml/lml/executor.rb +0 -96
- data/lib/lutaml/lml/format/adapter/document.rb +0 -11
- data/lib/lutaml/lml/format/adapter/mapping.rb +0 -31
- data/lib/lutaml/lml/format/adapter/standard_adapter.rb +0 -162
- data/lib/lutaml/lml/format/adapter/transform.rb +0 -11
- data/lib/lutaml/lml/format.rb +0 -29
- data/lib/lutaml/lml/formatter/base.rb +0 -79
- data/lib/lutaml/lml/formatter/canonical.rb +0 -736
- data/lib/lutaml/lml/formatter/elk.rb +0 -45
- data/lib/lutaml/lml/formatter/svg_pdf/path_parser.rb +0 -134
- data/lib/lutaml/lml/formatter/svg_pdf.rb +0 -285
- data/lib/lutaml/lml/formatter.rb +0 -11
- data/lib/lutaml/lml/grammar/lml.artifact.json +0 -14993
- data/lib/lutaml/lml/grammar/lml.parg +0 -389
- data/lib/lutaml/lml/grammar.rb +0 -60
- data/lib/lutaml/lml/has_attributes.rb +0 -14
- data/lib/lutaml/lml/import_resolver.rb +0 -96
- data/lib/lutaml/lml/layout/elk_engine.rb +0 -15
- data/lib/lutaml/lml/layout/elk_graph_builder.rb +0 -129
- data/lib/lutaml/lml/layout/elk_svg_markers.rb +0 -45
- data/lib/lutaml/lml/layout/elk_svg_renderer.rb +0 -119
- data/lib/lutaml/lml/layout/engine.rb +0 -17
- data/lib/lutaml/lml/layout.rb +0 -12
- data/lib/lutaml/lml/literal_value.rb +0 -32
- data/lib/lutaml/lml/lsp/conversions.rb +0 -78
- data/lib/lutaml/lml/lsp/keywords.rb +0 -43
- data/lib/lutaml/lml/lsp/server.rb +0 -378
- data/lib/lutaml/lml/lsp/store.rb +0 -68
- data/lib/lutaml/lml/lsp/transport.rb +0 -53
- data/lib/lutaml/lml/lsp.rb +0 -16
- data/lib/lutaml/lml/model_compiler/enums.rb +0 -172
- data/lib/lutaml/lml/model_compiler/hydration.rb +0 -123
- data/lib/lutaml/lml/model_compiler/serialization_mappings.rb +0 -188
- data/lib/lutaml/lml/model_compiler/string_formats.rb +0 -42
- data/lib/lutaml/lml/model_compiler/validation.rb +0 -65
- data/lib/lutaml/lml/model_compiler.rb +0 -323
- data/lib/lutaml/lml/models/action.rb +0 -10
- data/lib/lutaml/lml/models/association.rb +0 -29
- data/lib/lutaml/lml/models/cardinality.rb +0 -10
- data/lib/lutaml/lml/models/collection.rb +0 -11
- data/lib/lutaml/lml/models/constraint.rb +0 -23
- data/lib/lutaml/lml/models/data_type.rb +0 -41
- data/lib/lutaml/lml/models/derived_field.rb +0 -14
- data/lib/lutaml/lml/models/diagram.rb +0 -20
- data/lib/lutaml/lml/models/document.rb +0 -84
- data/lib/lutaml/lml/models/enum.rb +0 -38
- data/lib/lutaml/lml/models/fidelity.rb +0 -10
- data/lib/lutaml/lml/models/group.rb +0 -11
- data/lib/lutaml/lml/models/instance.rb +0 -26
- data/lib/lutaml/lml/models/instance_collection.rb +0 -16
- data/lib/lutaml/lml/models/instances_export.rb +0 -10
- data/lib/lutaml/lml/models/instances_import.rb +0 -11
- data/lib/lutaml/lml/models/mapping.rb +0 -15
- data/lib/lutaml/lml/models/mapping_rule.rb +0 -16
- data/lib/lutaml/lml/models/member_field.rb +0 -14
- data/lib/lutaml/lml/models/namespace.rb +0 -16
- data/lib/lutaml/lml/models/operation.rb +0 -26
- data/lib/lutaml/lml/models/operation_parameter.rb +0 -12
- data/lib/lutaml/lml/models/package.rb +0 -26
- data/lib/lutaml/lml/models/primitive_type.rb +0 -33
- data/lib/lutaml/lml/models/reference.rb +0 -23
- data/lib/lutaml/lml/models/serialization_mapping.rb +0 -19
- data/lib/lutaml/lml/models/string_format.rb +0 -16
- data/lib/lutaml/lml/models/top_element_attribute.rb +0 -116
- data/lib/lutaml/lml/models/uml_class.rb +0 -85
- data/lib/lutaml/lml/models/value.rb +0 -15
- data/lib/lutaml/lml/models/view_filter.rb +0 -11
- data/lib/lutaml/lml/models/view_import.rb +0 -11
- data/lib/lutaml/lml/parser.rb +0 -19
- data/lib/lutaml/lml/pipeline.rb +0 -73
- data/lib/lutaml/lml/positioned.rb +0 -13
- data/lib/lutaml/lml/preprocessor.rb +0 -130
- data/lib/lutaml/lml/quoting.rb +0 -60
- data/lib/lutaml/lml/source.rb +0 -49
- data/lib/lutaml/lml/source_position.rb +0 -20
- data/lib/lutaml/lml/symbol_index.rb +0 -200
- data/lib/lutaml/lml/transform.rb +0 -119
- data/lib/lutaml/lml/types/text_type.rb +0 -28
- data/lib/lutaml/lml/types.rb +0 -10
- data/lib/lutaml/lml/validator.rb +0 -458
- data/lib/lutaml/lml/version.rb +0 -10
- data/lib/lutaml/lml/view_resolution.rb +0 -32
- data/lib/lutaml/lml/view_resolver.rb +0 -48
- data/lib/lutaml/lml/yaml_parser.rb +0 -17
- data/lib/lutaml/lml.rb +0 -130
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd4605c7a1dcd13a495f1f4f04b855117bec0b76effbb1bdc68343983d0f1ce0
|
|
4
|
+
data.tar.gz: a21ee799b49a0e7166ddedeb9c19d1da4fee283b5e6bfa1864392ebc8e5e0710
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b6277f9cece7994af1a97bd658792236866374cc7c51e8697dff67727875430d974a7a7f822d2d8479b284558fa987fe8d5b9950638af454b043d2e5e7d901c
|
|
7
|
+
data.tar.gz: 90d86e8f4e411e2276615ef6ab0a92e378772c501b1ba651f508c97a16b8c00087190131ac7b243f678c182a577c0fba2afd95da1b5b38c73e216cba42a2c1b1
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'docs/**'
|
|
8
|
+
- '.github/workflows/docs.yml'
|
|
9
|
+
pull_request:
|
|
10
|
+
paths:
|
|
11
|
+
- 'docs/**'
|
|
12
|
+
- '.github/workflows/docs.yml'
|
|
13
|
+
repository_dispatch:
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
pages: write
|
|
19
|
+
id-token: write
|
|
20
|
+
|
|
21
|
+
concurrency:
|
|
22
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
23
|
+
cancel-in-progress: false
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
examples:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v6
|
|
30
|
+
|
|
31
|
+
- uses: ruby/setup-ruby@v1
|
|
32
|
+
with:
|
|
33
|
+
ruby-version: '3.3'
|
|
34
|
+
bundler-cache: true
|
|
35
|
+
working-directory: .
|
|
36
|
+
|
|
37
|
+
- name: Run the documented Ruby examples
|
|
38
|
+
run: |
|
|
39
|
+
task_examples_dir="$PWD/docs/examples"
|
|
40
|
+
export BUNDLE_GEMFILE="$PWD/Gemfile"
|
|
41
|
+
task_output_dir="$(mktemp -d "${RUNNER_TEMP}/lutaml-docs.XXXXXX")"
|
|
42
|
+
cd "$task_output_dir"
|
|
43
|
+
for example in city_model build_package query_model build_site present_class; do
|
|
44
|
+
bundle exec ruby "$task_examples_dir/$example.rb"
|
|
45
|
+
done
|
|
46
|
+
bundle exec ruby -rlutaml -e 'abort "LML parse failed" unless Lutaml::Lml.parse_document("diagram City { class Building {} }").classes.first.name == "Building"'
|
|
47
|
+
|
|
48
|
+
build:
|
|
49
|
+
needs: examples
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
steps:
|
|
52
|
+
- name: Checkout
|
|
53
|
+
uses: actions/checkout@v6
|
|
54
|
+
|
|
55
|
+
- name: Setup Ruby
|
|
56
|
+
uses: ruby/setup-ruby@v1
|
|
57
|
+
with:
|
|
58
|
+
ruby-version: '3.3'
|
|
59
|
+
bundler-cache: true
|
|
60
|
+
cache-version: 0
|
|
61
|
+
working-directory: docs
|
|
62
|
+
|
|
63
|
+
- name: Build with Jekyll
|
|
64
|
+
run: bundle exec jekyll build --verbose --trace
|
|
65
|
+
working-directory: docs
|
|
66
|
+
env:
|
|
67
|
+
JEKYLL_ENV: production
|
|
68
|
+
|
|
69
|
+
- name: Upload artifact
|
|
70
|
+
uses: actions/upload-pages-artifact@v4
|
|
71
|
+
with:
|
|
72
|
+
path: docs/_site
|
|
73
|
+
|
|
74
|
+
deploy:
|
|
75
|
+
environment:
|
|
76
|
+
name: github-pages
|
|
77
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
78
|
+
if: ${{ github.ref == 'refs/heads/main' }}
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
needs: build
|
|
81
|
+
steps:
|
|
82
|
+
- name: Setup Pages
|
|
83
|
+
uses: actions/configure-pages@v5
|
|
84
|
+
|
|
85
|
+
- name: Deploy to GitHub Pages
|
|
86
|
+
id: deployment
|
|
87
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
name: links
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'docs/**'
|
|
9
|
+
- '.github/workflows/links.yml'
|
|
10
|
+
- 'scripts/check-site-urls.rb'
|
|
11
|
+
- 'scripts/check-vendor-link.py'
|
|
12
|
+
pull_request:
|
|
13
|
+
paths:
|
|
14
|
+
- 'docs/**'
|
|
15
|
+
- '.github/workflows/links.yml'
|
|
16
|
+
- 'scripts/check-site-urls.rb'
|
|
17
|
+
- 'scripts/check-vendor-link.py'
|
|
18
|
+
|
|
19
|
+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
pull-requests: write
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
link_checker:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v6
|
|
29
|
+
|
|
30
|
+
- uses: ruby/setup-ruby@v1
|
|
31
|
+
with:
|
|
32
|
+
ruby-version: '3.4'
|
|
33
|
+
bundler-cache: true
|
|
34
|
+
working-directory: docs
|
|
35
|
+
|
|
36
|
+
- name: Build site
|
|
37
|
+
env:
|
|
38
|
+
JEKYLL_ENV: production
|
|
39
|
+
run: bundle exec jekyll build --trace
|
|
40
|
+
working-directory: docs
|
|
41
|
+
|
|
42
|
+
- name: Check local and canonical URLs against built pages
|
|
43
|
+
run: ruby scripts/check-site-urls.rb docs/_config.yml docs/_site
|
|
44
|
+
|
|
45
|
+
- name: Check vendor homepage with guarded anti-bot handling
|
|
46
|
+
run: |
|
|
47
|
+
python3 scripts/check-vendor-link.py --self-test
|
|
48
|
+
python3 scripts/check-vendor-link.py
|
|
49
|
+
|
|
50
|
+
- name: Restore lychee cache
|
|
51
|
+
uses: actions/cache@v4
|
|
52
|
+
with:
|
|
53
|
+
path: .lycheecache
|
|
54
|
+
key: cache-lychee-${{ github.sha }}
|
|
55
|
+
restore-keys: cache-lychee-
|
|
56
|
+
|
|
57
|
+
- name: Check if site was built
|
|
58
|
+
run: |
|
|
59
|
+
if [ ! -d "_site" ]; then
|
|
60
|
+
echo "Error: _site directory not created"
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
echo "Site built successfully"
|
|
64
|
+
ls -la _site/
|
|
65
|
+
working-directory: docs
|
|
66
|
+
|
|
67
|
+
- name: Link Checker (Built Site)
|
|
68
|
+
uses: lycheeverse/lychee-action@v2
|
|
69
|
+
with:
|
|
70
|
+
# Check the built HTML site for rendered links
|
|
71
|
+
# Only check https and http schemes, exclude file:// due to path resolution issues
|
|
72
|
+
args: >-
|
|
73
|
+
--verbose
|
|
74
|
+
--no-progress
|
|
75
|
+
--config lychee.toml
|
|
76
|
+
--root-dir "$(pwd)/_site"
|
|
77
|
+
--scheme https,http
|
|
78
|
+
'_site/**/*.html'
|
|
79
|
+
fail: true
|
|
80
|
+
output: link-check-results.md
|
|
81
|
+
format: markdown
|
|
82
|
+
workingDirectory: docs
|
|
83
|
+
|
|
84
|
+
- name: Upload link check results
|
|
85
|
+
if: always()
|
|
86
|
+
uses: actions/upload-artifact@v4
|
|
87
|
+
with:
|
|
88
|
+
name: link-check-results
|
|
89
|
+
path: |
|
|
90
|
+
docs/link-check-results.md
|
|
91
|
+
retention-days: 30
|
|
92
|
+
|
|
93
|
+
- name: Comment PR with results
|
|
94
|
+
if: failure() && github.event_name == 'pull_request'
|
|
95
|
+
uses: actions/github-script@v7
|
|
96
|
+
with:
|
|
97
|
+
script: |
|
|
98
|
+
const fs = require('fs');
|
|
99
|
+
let comment = '## 🔗 Link Check Failed\n\n';
|
|
100
|
+
|
|
101
|
+
if (fs.existsSync('docs/link-check-results.md')) {
|
|
102
|
+
const results = fs.readFileSync('docs/link-check-results.md', 'utf8');
|
|
103
|
+
comment += '### Built Site Results\n\n' + results + '\n\n';
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
comment += '\n---\n\n*Please fix the broken links and push a new commit.*';
|
|
107
|
+
|
|
108
|
+
github.rest.issues.createComment({
|
|
109
|
+
issue_number: context.issue.number,
|
|
110
|
+
owner: context.repo.owner,
|
|
111
|
+
repo: context.repo.repo,
|
|
112
|
+
body: comment
|
|
113
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: rake
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
tags: [ v* ]
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
test:
|
|
18
|
+
runs-on: ${{ matrix.os }}
|
|
19
|
+
continue-on-error: ${{ matrix.experimental }}
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
24
|
+
ruby: ["3.3", "3.4", "4.0"]
|
|
25
|
+
experimental: [false]
|
|
26
|
+
# ruby head runs on ubuntu/macos only: windows-head cannot build
|
|
27
|
+
# the released ruby-ll C extension (and the vendored forks exist
|
|
28
|
+
# for Opal), so that cell was permanently red with zero signal
|
|
29
|
+
# (#832 follow-up).
|
|
30
|
+
exclude:
|
|
31
|
+
- os: windows-latest
|
|
32
|
+
ruby: head
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v6
|
|
35
|
+
with:
|
|
36
|
+
submodules: "recursive"
|
|
37
|
+
|
|
38
|
+
- name: Set up Ruby
|
|
39
|
+
uses: ruby/setup-ruby@v1
|
|
40
|
+
with:
|
|
41
|
+
ruby-version: ${{ matrix.ruby }}
|
|
42
|
+
# bundler-cache disabled: adapter pins resolve per run.
|
|
43
|
+
bundler-cache: false
|
|
44
|
+
|
|
45
|
+
- name: Install dependencies
|
|
46
|
+
run: bundle install
|
|
47
|
+
|
|
48
|
+
- name: Run tests
|
|
49
|
+
run: bundle exec rake spec
|
|
50
|
+
|
|
51
|
+
- name: Run rubocop
|
|
52
|
+
run: bundle exec rake rubocop
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
|
2
|
+
# See https://github.com/metanorma/cimas
|
|
3
|
+
name: release
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
next_version:
|
|
9
|
+
description: |
|
|
10
|
+
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
|
11
|
+
required: true
|
|
12
|
+
default: 'skip'
|
|
13
|
+
repository_dispatch:
|
|
14
|
+
types: [ do-release ]
|
|
15
|
+
# The publish leg: when the release PR (head branch release/v*) merges,
|
|
16
|
+
# metanorma/ci tags the merge commit and publishes (metanorma/ci#515).
|
|
17
|
+
# Ordinary PR closes are skipped inside the reusable workflow.
|
|
18
|
+
pull_request:
|
|
19
|
+
types:
|
|
20
|
+
- closed
|
|
21
|
+
|
|
22
|
+
# Least-privilege ceiling for the called rubygems-release.yml: its release job
|
|
23
|
+
# needs contents:write (git tag push) and id-token:write (OIDC Trusted Publishing).
|
|
24
|
+
# packages:write is not required for RubyGems Trusted Publishing.
|
|
25
|
+
permissions:
|
|
26
|
+
contents: write
|
|
27
|
+
id-token: write
|
|
28
|
+
pull-requests: write
|
|
29
|
+
|
|
30
|
+
# One release at a time: concurrent bumps race the version commit
|
|
31
|
+
# and half-published gems are worse than a queued release.
|
|
32
|
+
concurrency:
|
|
33
|
+
group: release
|
|
34
|
+
cancel-in-progress: false
|
|
35
|
+
|
|
36
|
+
jobs:
|
|
37
|
+
release:
|
|
38
|
+
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
|
|
39
|
+
with:
|
|
40
|
+
next_version: ${{ github.event.inputs.next_version }}
|
|
41
|
+
secrets:
|
|
42
|
+
# OMIT rubygems-api-key: metanorma/ci switches to OIDC Trusted Publishing
|
|
43
|
+
# when the secret is empty (USE_OIDC = rubygems-api-key == ''). Trusted
|
|
44
|
+
# Publishing is already configured for lutaml gems on rubygems.org —
|
|
45
|
+
# do not re-introduce LUTAML_CI_RUBYGEMS_API_KEY here.
|
|
46
|
+
# pat_token is optional (private-gem checkout + GH Packages). Keep if
|
|
47
|
+
# the org still uses private deps; drop once pure public.
|
|
48
|
+
pat_token: ${{ secrets.LUTAML_CI_PAT_TOKEN }}
|
|
49
|
+
|
|
50
|
+
# lutaml-model#833: the reusable release pushes the gem without ever
|
|
51
|
+
# installing it — packaging regressions (gemspec globs, autoload
|
|
52
|
+
# drift, fresh-bundler resolution) pass in-repo and break consumers.
|
|
53
|
+
# Install the just-published version from rubygems.org and exercise
|
|
54
|
+
# the boot surface from the gem's own load paths.
|
|
55
|
+
smoke:
|
|
56
|
+
needs: release
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v6
|
|
60
|
+
# The release job commits the version bump to main while this job
|
|
61
|
+
# runs; a checkout of the dispatch-time HEAD reads the previous
|
|
62
|
+
# version and smoke-tests the wrong gem (0.8.60 was smoke-checked
|
|
63
|
+
# for the 0.8.61 release). Pull post-bump main before resolving.
|
|
64
|
+
with:
|
|
65
|
+
fetch-depth: 5
|
|
66
|
+
- uses: ruby/setup-ruby@v1
|
|
67
|
+
with:
|
|
68
|
+
ruby-version: "3.4"
|
|
69
|
+
- name: Resolve the released version
|
|
70
|
+
id: version
|
|
71
|
+
# From the version file, not git describe: the default checkout
|
|
72
|
+
# is shallow with no tags, so git describe failed and the empty
|
|
73
|
+
# version produced `gem install "lutaml-model:"`.
|
|
74
|
+
run: |
|
|
75
|
+
git pull --ff-only origin main
|
|
76
|
+
echo "version=$(ruby -e 'print File.read(%q{lib/lutaml/model/version.rb})[/VERSION\s*=\s*"([^"]+)"/, 1]')" >> "$GITHUB_OUTPUT"
|
|
77
|
+
- name: Install and smoke the released gem
|
|
78
|
+
run: |
|
|
79
|
+
gem install "lutaml-model:${{ steps.version.outputs.version }}" --no-document
|
|
80
|
+
# The round-trip script exercises all five formats; the TOML
|
|
81
|
+
# legs require an adapter gem to be present.
|
|
82
|
+
gem install tomlib toml-rb --no-document
|
|
83
|
+
ruby .github/scripts/test_installed_gem.rb
|
data/.gitignore
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
/.bundle/
|
|
3
|
+
/coverage/
|
|
4
|
+
/doc/
|
|
5
|
+
Gemfile.lock
|
|
6
|
+
/ISO_DIS_10303-59
|
|
7
|
+
/pkg/
|
|
8
|
+
# rspec failure tracking
|
|
9
|
+
.rspec_status
|
|
10
|
+
/spec/reports/
|
|
11
|
+
/spec/tmp/
|
|
12
|
+
/tmp/
|
|
13
|
+
/.yardoc
|
|
14
|
+
/_yardoc/
|
|
15
|
+
|
|
16
|
+
_site/
|
|
17
|
+
old-docs
|
|
18
|
+
|
|
19
|
+
# Editor / OS
|
|
20
|
+
.DS_Store
|
|
21
|
+
|
|
22
|
+
# Transient planning files
|
|
23
|
+
TODO.*/
|
|
24
|
+
TODO.*.md
|
|
25
|
+
.rubocop_todo.yml.tmp
|
|
26
|
+
|
|
27
|
+
# Frontend build artifacts
|
|
28
|
+
frontend/node_modules/
|
|
29
|
+
TODO.migrate/
|
data/CLAUDE.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# CLAUDE.md — Lutaml
|
|
2
|
+
|
|
3
|
+
Lutaml is a single Ruby gem: the LutaML Model Language (LML) front-end —
|
|
4
|
+
grammar, domain models, model compiler, executor, format machinery and the
|
|
5
|
+
LSP server — on top of the canonical `lutaml-model` serialization gem.
|
|
6
|
+
|
|
7
|
+
## Layout
|
|
8
|
+
- `lib/lutaml/lml/` — the LML language: grammar (parsanol), models,
|
|
9
|
+
model compiler, executor, formats, validator, LSP
|
|
10
|
+
- `lib/lutaml.rb` — entry: loads the LML tree; soft-loads lutaml-uml when present
|
|
11
|
+
- `spec/` — the LML spec suite (`bundle exec rspec`)
|
|
12
|
+
- `exe/` — executables (`lutaml-lml-lsp`)
|
|
13
|
+
|
|
14
|
+
## Dependencies
|
|
15
|
+
- `lutaml-model ~> 0.8.159` — the serialization runtime (canonical repo:
|
|
16
|
+
lutaml/lutaml-model). NEVER vendor it here; NEVER add other gems'
|
|
17
|
+
code to this repo — every gem lives in its own repository.
|
|
18
|
+
- `moxml`, `lutaml-uml`, `parsanol` per the gemspec.
|
|
19
|
+
|
|
20
|
+
## Testing
|
|
21
|
+
- `bundle exec rspec` runs the suite. Suites are fast; run targeted
|
|
22
|
+
files for iteration.
|
|
23
|
+
|
|
24
|
+
## CI
|
|
25
|
+
- cimas-generated workflows (rake, release, docs, links). Releases ride
|
|
26
|
+
`metanorma/ci/.../rubygems-release.yml`: the version bump lands as a
|
|
27
|
+
release PR; publishing triggers when it merges.
|
data/Gemfile
CHANGED
|
@@ -11,7 +11,7 @@ gem "rspec"
|
|
|
11
11
|
# Override gemspec deps with sibling paths or GitHub during local
|
|
12
12
|
# development. In CI these don't resolve and bundler uses the gemspec's
|
|
13
13
|
# own add_dependency declarations against rubygems.
|
|
14
|
-
sibling_overrides = %w[canon
|
|
14
|
+
sibling_overrides = %w[canon]
|
|
15
15
|
sibling_overrides.each do |sibling_gem|
|
|
16
16
|
sibling_path = File.expand_path("../#{sibling_gem}", __dir__)
|
|
17
17
|
gem sibling_gem, path: sibling_path if File.directory?(sibling_path)
|
|
@@ -23,7 +23,7 @@ gem "lutaml-uml", "~> 1.0"
|
|
|
23
23
|
# The serialization runtime is the canonical lutaml-model gem, developed in
|
|
24
24
|
# its own repository. During local development, resolve it from a sibling
|
|
25
25
|
# checkout when present; CI uses the gemspec's rubygems declaration.
|
|
26
|
-
canonical_model = File.expand_path("
|
|
26
|
+
canonical_model = File.expand_path("../lutaml-model", __dir__)
|
|
27
27
|
gem "lutaml-model", path: canonical_model if File.directory?(canonical_model)
|
|
28
28
|
|
|
29
29
|
# LML front development and conformance gates (absorbed from lutaml-lml).
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Build and Deploy Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'docs/**'
|
|
9
|
+
- '.github/workflows/docs.yml'
|
|
10
|
+
pull_request:
|
|
11
|
+
paths:
|
|
12
|
+
- 'docs/**'
|
|
13
|
+
- '.github/workflows/docs.yml'
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
pages: write
|
|
19
|
+
id-token: write
|
|
20
|
+
|
|
21
|
+
concurrency:
|
|
22
|
+
group: "pages"
|
|
23
|
+
cancel-in-progress: false
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
build:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
defaults:
|
|
29
|
+
run:
|
|
30
|
+
working-directory: docs
|
|
31
|
+
steps:
|
|
32
|
+
- name: Checkout
|
|
33
|
+
uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- name: Setup Ruby
|
|
36
|
+
uses: ruby/setup-ruby@v1
|
|
37
|
+
with:
|
|
38
|
+
ruby-version: '3.2'
|
|
39
|
+
bundler-cache: true
|
|
40
|
+
working-directory: docs
|
|
41
|
+
|
|
42
|
+
- name: Setup Pages
|
|
43
|
+
id: pages
|
|
44
|
+
uses: actions/configure-pages@v4
|
|
45
|
+
|
|
46
|
+
- name: Build with Jekyll
|
|
47
|
+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
|
|
48
|
+
env:
|
|
49
|
+
JEKYLL_ENV: production
|
|
50
|
+
|
|
51
|
+
- name: Upload artifact
|
|
52
|
+
uses: actions/upload-pages-artifact@v3
|
|
53
|
+
with:
|
|
54
|
+
path: docs/_site
|
|
55
|
+
|
|
56
|
+
deploy:
|
|
57
|
+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
|
|
58
|
+
environment:
|
|
59
|
+
name: github-pages
|
|
60
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
needs: build
|
|
63
|
+
steps:
|
|
64
|
+
- name: Deploy to GitHub Pages
|
|
65
|
+
id: deployment
|
|
66
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: Check Documentation Links
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'docs/**'
|
|
9
|
+
pull_request:
|
|
10
|
+
paths:
|
|
11
|
+
- 'docs/**'
|
|
12
|
+
schedule:
|
|
13
|
+
# Run weekly on Monday at 9:00 UTC
|
|
14
|
+
- cron: '0 9 * * 1'
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
linkChecker:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
defaults:
|
|
21
|
+
run:
|
|
22
|
+
working-directory: docs
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Setup Ruby
|
|
28
|
+
uses: ruby/setup-ruby@v1
|
|
29
|
+
with:
|
|
30
|
+
ruby-version: '3.2'
|
|
31
|
+
bundler-cache: true
|
|
32
|
+
working-directory: docs
|
|
33
|
+
|
|
34
|
+
- name: Build Jekyll site
|
|
35
|
+
run: bundle exec jekyll build
|
|
36
|
+
env:
|
|
37
|
+
JEKYLL_ENV: production
|
|
38
|
+
|
|
39
|
+
- name: Restore lychee cache
|
|
40
|
+
uses: actions/cache@v3
|
|
41
|
+
with:
|
|
42
|
+
path: .lycheecache
|
|
43
|
+
key: cache-lychee-${{ github.sha }}
|
|
44
|
+
restore-keys: cache-lychee-
|
|
45
|
+
|
|
46
|
+
- name: Link Checker
|
|
47
|
+
uses: lycheeverse/lychee-action@v1
|
|
48
|
+
with:
|
|
49
|
+
args: |
|
|
50
|
+
--config docs/lychee.toml \
|
|
51
|
+
--verbose \
|
|
52
|
+
--no-progress \
|
|
53
|
+
'docs/_site/**/*.html'
|
|
54
|
+
fail: true
|
|
55
|
+
|
|
56
|
+
- name: Create Issue on Failure
|
|
57
|
+
if: failure() && github.event_name == 'schedule'
|
|
58
|
+
uses: peter-evans/create-issue-from-file@v5
|
|
59
|
+
with:
|
|
60
|
+
title: Broken links detected in documentation
|
|
61
|
+
content-filepath: ./lychee/out.md
|
|
62
|
+
labels: |
|
|
63
|
+
documentation
|
|
64
|
+
broken-links
|
|
65
|
+
|
|
66
|
+
- name: Comment on PR
|
|
67
|
+
if: failure() && github.event_name == 'pull_request'
|
|
68
|
+
uses: actions/github-script@v7
|
|
69
|
+
with:
|
|
70
|
+
script: |
|
|
71
|
+
const fs = require('fs');
|
|
72
|
+
const output = fs.readFileSync('./lychee/out.md', 'utf8');
|
|
73
|
+
github.rest.issues.createComment({
|
|
74
|
+
issue_number: context.issue.number,
|
|
75
|
+
owner: context.repo.owner,
|
|
76
|
+
repo: context.repo.repo,
|
|
77
|
+
body: '## ⚠️ Broken Links Detected\n\n' + output
|
|
78
|
+
});
|