chemicalml 0.3.0 → 0.4.0
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/release.yml +21 -14
- data/CHANGELOG.md +32 -0
- data/chemicalml.gemspec +1 -1
- data/lib/chemicalml/cml/base/cml_module.rb +6 -0
- data/lib/chemicalml/cml/base/definition.rb +2 -0
- data/lib/chemicalml/cml/base/description.rb +2 -0
- data/lib/chemicalml/cml/base/dictionary.rb +3 -3
- data/lib/chemicalml/cml/base/dictionary_entry.rb +2 -2
- data/lib/chemicalml/cml/base/document.rb +6 -0
- data/lib/chemicalml/cml/base/molecule.rb +2 -0
- data/lib/chemicalml/cml/base/peak.rb +3 -1
- data/lib/chemicalml/cml/base/unit_type.rb +3 -0
- data/lib/chemicalml/cml/base/xaxis.rb +2 -0
- data/lib/chemicalml/cml/xhtml/p.rb +21 -0
- data/lib/chemicalml/cml/xhtml.rb +20 -0
- data/lib/chemicalml/cml.rb +1 -0
- data/lib/chemicalml/convention/dictionary/constraints/entry_must_contain_definition.rb +15 -2
- data/lib/chemicalml/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6d2ca704dfe6cadaad8792ffcb198b64ad410dc5445e487181271e9f76d30c0d
|
|
4
|
+
data.tar.gz: 86dcd34b748cf321c5cabd049d34f0359a4251c11c56fbdf01757ef53001fd5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3dfc7a086ff3df8156ab1bb10a692b75b6dea04789cc19d2bb8919fad40cbcf2f1d40cc92f871a501512ea8a0647c39218d6e7f133b5b95fc88289231386de9a
|
|
7
|
+
data.tar.gz: 20098a7fe4dee32546f270bfe6d2fa294ef5617b3ede17d0a3125cc1230c430053bb9e6502f4ae81c81ea068fbb984d94fb4d184ccc0b4e120fd212a137d4749
|
|
@@ -2,33 +2,40 @@
|
|
|
2
2
|
# See https://github.com/metanorma/cimas
|
|
3
3
|
name: release
|
|
4
4
|
|
|
5
|
-
permissions:
|
|
6
|
-
contents: write
|
|
7
|
-
packages: write
|
|
8
|
-
id-token: write
|
|
9
|
-
|
|
10
5
|
on:
|
|
11
6
|
workflow_dispatch:
|
|
12
7
|
inputs:
|
|
13
8
|
next_version:
|
|
14
9
|
description: |
|
|
15
|
-
Next release version. Possible values: x.y.z, major, minor, patch
|
|
16
|
-
Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
|
|
10
|
+
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
|
17
11
|
required: true
|
|
18
12
|
default: 'skip'
|
|
19
|
-
acknowledge_breaking_in_patch:
|
|
20
|
-
description: 'Override the patch-release breaking-change guard when the trip is a known false-positive'
|
|
21
|
-
required: false
|
|
22
|
-
type: boolean
|
|
23
|
-
default: false
|
|
24
13
|
repository_dispatch:
|
|
25
14
|
types: [ do-release ]
|
|
26
15
|
|
|
16
|
+
# Least-privilege ceiling for the called rubygems-release.yml: its release job
|
|
17
|
+
# needs contents:write (git tag push) and id-token:write (OIDC Trusted Publishing).
|
|
18
|
+
# packages:write is not required for RubyGems Trusted Publishing.
|
|
19
|
+
permissions:
|
|
20
|
+
contents: write
|
|
21
|
+
id-token: write
|
|
22
|
+
|
|
23
|
+
# One release at a time: concurrent bumps race the version commit
|
|
24
|
+
# and half-published gems are worse than a queued release.
|
|
25
|
+
concurrency:
|
|
26
|
+
group: release
|
|
27
|
+
cancel-in-progress: false
|
|
28
|
+
|
|
27
29
|
jobs:
|
|
28
30
|
release:
|
|
29
31
|
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
|
|
30
32
|
with:
|
|
31
33
|
next_version: ${{ github.event.inputs.next_version }}
|
|
32
|
-
acknowledge_breaking_in_patch: ${{ inputs.acknowledge_breaking_in_patch }}
|
|
33
34
|
secrets:
|
|
34
|
-
rubygems-api-key:
|
|
35
|
+
# OMIT rubygems-api-key: metanorma/ci switches to OIDC Trusted Publishing
|
|
36
|
+
# when the secret is empty (USE_OIDC = rubygems-api-key == ''). Trusted
|
|
37
|
+
# Publishing is already configured for lutaml gems on rubygems.org —
|
|
38
|
+
# do not re-introduce LUTAML_CI_RUBYGEMS_API_KEY here.
|
|
39
|
+
# pat_token is optional (private-gem checkout + GH Packages). Keep if
|
|
40
|
+
# the org still uses private deps; drop once pure public.
|
|
41
|
+
pat_token: ${{ secrets.LUTAML_CI_PAT_TOKEN }}
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to Chemicalml are documented here.
|
|
4
4
|
This project follows [Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- Rich-text dictionary content: `<definition>` and `<description>`
|
|
10
|
+
now carry their `<xhtml:p>` paragraphs instead of flattening them
|
|
11
|
+
into strings. `Xhtml::P` is a wire class owning the XHTML
|
|
12
|
+
namespace (lutaml-model assigns one namespace per model class);
|
|
13
|
+
`DictionaryEntry`/`Dictionary` type definition/description to the
|
|
14
|
+
structured classes, the entry-must-contain-definition constraint
|
|
15
|
+
reads both shapes (plain string or structured), and the two
|
|
16
|
+
dictionary fixtures graduate from PENDING_SEMANTIC to full
|
|
17
|
+
semantic round-trip comparison (closes #19).
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- Container child declarations that round-tripping silently dropped:
|
|
21
|
+
`<cml>`/`<module>` now carry `reactionScheme` and `spectrum`
|
|
22
|
+
children, `<dictionary>` carries dictionary-level `<definition>`,
|
|
23
|
+
`<unitType>` carries `<dimension>`, `<molecule>` carries the
|
|
24
|
+
`concise` formula attribute, `<peak>` carries the `<atomRefs>`
|
|
25
|
+
child-element form (the attribute form was already mapped), and
|
|
26
|
+
`<xaxis>`/`<yaxis>` carry CML's `multipler` attribute. Every
|
|
27
|
+
schema3 fixture now round-trips semantically except the two
|
|
28
|
+
dictionary fixtures whose xhtml-namespaced mixed content needs a
|
|
29
|
+
rich-content model (lutaml/chemicalml#19, marked PENDING_SEMANTIC
|
|
30
|
+
with the structural re-parse check still running).
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- `lutaml-model` pin aligned to the pessimistic house convention
|
|
34
|
+
(`~> 0.8`). The full suite passes against the current stack
|
|
35
|
+
(lutaml-model 0.8.114, moxml 0.5.146, leptris 1.9.372, canon
|
|
36
|
+
with processing-instruction tree-diff support - lutaml/canon#271).
|
|
37
|
+
|
|
6
38
|
## [0.2.0] - 2026-07-14
|
|
7
39
|
|
|
8
40
|
### Added
|
data/chemicalml.gemspec
CHANGED
|
@@ -22,6 +22,8 @@ module Chemicalml
|
|
|
22
22
|
attribute :property_lists, :propertyList, collection: true
|
|
23
23
|
attribute :metadata_lists, :metadataList, collection: true
|
|
24
24
|
attribute :lists, :list, collection: true
|
|
25
|
+
attribute :reaction_schemes, :reactionScheme, collection: true
|
|
26
|
+
attribute :spectra, :spectrum, collection: true
|
|
25
27
|
|
|
26
28
|
xml do
|
|
27
29
|
namespace Chemicalml::Cml::Namespace
|
|
@@ -40,6 +42,8 @@ module Chemicalml
|
|
|
40
42
|
map_element 'propertyList', to: :property_lists
|
|
41
43
|
map_element 'metadataList', to: :metadata_lists
|
|
42
44
|
map_element 'list', to: :lists
|
|
45
|
+
map_element 'reactionScheme', to: :reaction_schemes
|
|
46
|
+
map_element 'spectrum', to: :spectra
|
|
43
47
|
end
|
|
44
48
|
key_value do
|
|
45
49
|
map 'molecule', to: :molecules
|
|
@@ -48,6 +52,8 @@ module Chemicalml
|
|
|
48
52
|
map 'propertyList', to: :property_lists
|
|
49
53
|
map 'metadataList', to: :metadata_lists
|
|
50
54
|
map 'list', to: :lists
|
|
55
|
+
map 'reactionScheme', to: :reaction_schemes
|
|
56
|
+
map 'spectrum', to: :spectra
|
|
51
57
|
map 'id', to: :id
|
|
52
58
|
map 'title', to: :title
|
|
53
59
|
map 'dictRef', to: :dict_ref
|
|
@@ -13,6 +13,7 @@ module Chemicalml
|
|
|
13
13
|
attribute :dict_ref, :string
|
|
14
14
|
attribute :convention, :string
|
|
15
15
|
attribute :content, :string
|
|
16
|
+
attribute :paragraphs, Chemicalml::Cml::Xhtml::P, collection: true
|
|
16
17
|
|
|
17
18
|
xml do
|
|
18
19
|
namespace Chemicalml::Cml::Namespace
|
|
@@ -22,6 +23,7 @@ module Chemicalml
|
|
|
22
23
|
map_attribute 'dictRef', to: :dict_ref
|
|
23
24
|
map_attribute 'convention', to: :convention
|
|
24
25
|
map_content to: :content
|
|
26
|
+
map_element 'p', to: :paragraphs
|
|
25
27
|
end
|
|
26
28
|
key_value do
|
|
27
29
|
map 'id', to: :id
|
|
@@ -13,6 +13,7 @@ module Chemicalml
|
|
|
13
13
|
attribute :dict_ref, :string
|
|
14
14
|
attribute :convention, :string
|
|
15
15
|
attribute :content, :string
|
|
16
|
+
attribute :paragraphs, Chemicalml::Cml::Xhtml::P, collection: true
|
|
16
17
|
|
|
17
18
|
attribute :object_class, :string
|
|
18
19
|
xml do
|
|
@@ -23,6 +24,7 @@ module Chemicalml
|
|
|
23
24
|
map_attribute 'dictRef', to: :dict_ref
|
|
24
25
|
map_attribute 'convention', to: :convention
|
|
25
26
|
map_content to: :content
|
|
27
|
+
map_element 'p', to: :paragraphs
|
|
26
28
|
map_attribute 'objectClass', to: :object_class
|
|
27
29
|
end
|
|
28
30
|
key_value do
|
|
@@ -13,8 +13,8 @@ module Chemicalml
|
|
|
13
13
|
attribute :namespace, :string
|
|
14
14
|
attribute :dictionary_prefix, :string
|
|
15
15
|
attribute :convention, :string
|
|
16
|
-
attribute :description, :string
|
|
17
16
|
attribute :entries, :entry, collection: true
|
|
17
|
+
attribute :definitions, :definition, collection: true
|
|
18
18
|
|
|
19
19
|
attribute :id, :string
|
|
20
20
|
attribute :dict_ref, :string
|
|
@@ -26,7 +26,7 @@ module Chemicalml
|
|
|
26
26
|
map_attribute 'namespace', to: :namespace
|
|
27
27
|
map_attribute 'dictionaryPrefix', to: :dictionary_prefix
|
|
28
28
|
map_attribute 'convention', to: :convention
|
|
29
|
-
map_element '
|
|
29
|
+
map_element 'definition', to: :definitions
|
|
30
30
|
map_element 'entry', to: :entries
|
|
31
31
|
map_attribute 'id', to: :id
|
|
32
32
|
map_attribute 'dictRef', to: :dict_ref
|
|
@@ -37,7 +37,7 @@ module Chemicalml
|
|
|
37
37
|
map 'label', to: :labels
|
|
38
38
|
map 'name', to: :names
|
|
39
39
|
map 'description', to: :descriptions
|
|
40
|
-
map '
|
|
40
|
+
map 'definition', to: :definitions
|
|
41
41
|
map 'entry', to: :entries
|
|
42
42
|
map 'title', to: :title
|
|
43
43
|
map 'namespace', to: :namespace
|
|
@@ -13,8 +13,8 @@ module Chemicalml
|
|
|
13
13
|
attribute :data_type, :string
|
|
14
14
|
attribute :unit_type, :string
|
|
15
15
|
attribute :units, :string
|
|
16
|
-
attribute :definition, :
|
|
17
|
-
attribute :description, :
|
|
16
|
+
attribute :definition, :definition
|
|
17
|
+
attribute :description, :description
|
|
18
18
|
attribute :title, :string
|
|
19
19
|
attribute :convention, :string
|
|
20
20
|
|
|
@@ -15,6 +15,8 @@ module Chemicalml
|
|
|
15
15
|
attribute :molecules, :molecule, collection: true
|
|
16
16
|
attribute :reaction_lists, :reactionList, collection: true
|
|
17
17
|
attribute :reactions, :reaction, collection: true
|
|
18
|
+
attribute :reaction_schemes, :reactionScheme, collection: true
|
|
19
|
+
attribute :spectra, :spectrum, collection: true
|
|
18
20
|
|
|
19
21
|
xml do
|
|
20
22
|
namespace Chemicalml::Cml::Namespace
|
|
@@ -26,11 +28,15 @@ module Chemicalml
|
|
|
26
28
|
map_element 'molecule', to: :molecules
|
|
27
29
|
map_element 'reactionList', to: :reaction_lists
|
|
28
30
|
map_element 'reaction', to: :reactions
|
|
31
|
+
map_element 'reactionScheme', to: :reaction_schemes
|
|
32
|
+
map_element 'spectrum', to: :spectra
|
|
29
33
|
end
|
|
30
34
|
key_value do
|
|
31
35
|
map 'molecule', to: :molecules
|
|
32
36
|
map 'reactionList', to: :reaction_lists
|
|
33
37
|
map 'reaction', to: :reactions
|
|
38
|
+
map 'reactionScheme', to: :reaction_schemes
|
|
39
|
+
map 'spectrum', to: :spectra
|
|
34
40
|
map 'id', to: :id
|
|
35
41
|
map 'title', to: :title
|
|
36
42
|
map 'dictRef', to: :dict_ref
|
|
@@ -10,6 +10,7 @@ module Chemicalml
|
|
|
10
10
|
include Chemicalml::Cml::Base::CommonChildren
|
|
11
11
|
|
|
12
12
|
attribute :id, :string
|
|
13
|
+
attribute :concise, :string
|
|
13
14
|
attribute :title, :string
|
|
14
15
|
attribute :count, :string
|
|
15
16
|
attribute :formal_charge, :string
|
|
@@ -48,6 +49,7 @@ module Chemicalml
|
|
|
48
49
|
namespace Chemicalml::Cml::Namespace
|
|
49
50
|
root 'molecule'
|
|
50
51
|
map_attribute 'id', to: :id
|
|
52
|
+
map_attribute 'concise', to: :concise
|
|
51
53
|
map_attribute 'title', to: :title
|
|
52
54
|
map_attribute 'count', to: :count
|
|
53
55
|
map_attribute 'formalCharge', to: :formal_charge
|
|
@@ -37,6 +37,7 @@ module Chemicalml
|
|
|
37
37
|
attribute :y_max, :string
|
|
38
38
|
attribute :y_width, :string
|
|
39
39
|
attribute :atom_refs, :string
|
|
40
|
+
attribute :atom_refs_values, :string, collection: true
|
|
40
41
|
attribute :bond_refs, :string
|
|
41
42
|
attribute :molecule_refs, :string
|
|
42
43
|
xml do
|
|
@@ -69,6 +70,7 @@ module Chemicalml
|
|
|
69
70
|
map_attribute 'yMax', to: :y_max
|
|
70
71
|
map_attribute 'yWidth', to: :y_width
|
|
71
72
|
map_attribute 'atomRefs', to: :atom_refs
|
|
73
|
+
map_element 'atomRefs', to: :atom_refs_values
|
|
72
74
|
map_attribute 'bondRefs', to: :bond_refs
|
|
73
75
|
map_attribute 'moleculeRefs', to: :molecule_refs
|
|
74
76
|
end
|
|
@@ -103,7 +105,7 @@ module Chemicalml
|
|
|
103
105
|
map 'yMin', to: :y_min
|
|
104
106
|
map 'yMax', to: :y_max
|
|
105
107
|
map 'yWidth', to: :y_width
|
|
106
|
-
map 'atomRefs', to: :
|
|
108
|
+
map 'atomRefs', to: :atom_refs_values
|
|
107
109
|
map 'bondRefs', to: :bond_refs
|
|
108
110
|
map 'moleculeRefs', to: :molecule_refs
|
|
109
111
|
end
|
|
@@ -19,6 +19,7 @@ module Chemicalml
|
|
|
19
19
|
attribute :abbreviation, :string
|
|
20
20
|
attribute :preserve, :string
|
|
21
21
|
attribute :symbol, :string
|
|
22
|
+
attribute :dimensions, :dimension, collection: true
|
|
22
23
|
xml do
|
|
23
24
|
namespace Chemicalml::Cml::Namespace
|
|
24
25
|
root 'unitType'
|
|
@@ -26,6 +27,7 @@ module Chemicalml
|
|
|
26
27
|
map_attribute 'name', to: :name
|
|
27
28
|
map_element 'definition', to: :definition
|
|
28
29
|
map_element 'description', to: :description
|
|
30
|
+
map_element 'dimension', to: :dimensions
|
|
29
31
|
map_attribute 'title', to: :title
|
|
30
32
|
map_attribute 'parentSI', to: :parent_s_i
|
|
31
33
|
map_attribute 'abbreviation', to: :abbreviation
|
|
@@ -37,6 +39,7 @@ module Chemicalml
|
|
|
37
39
|
map 'label', to: :labels
|
|
38
40
|
map 'name', to: :names
|
|
39
41
|
map 'description', to: :descriptions
|
|
42
|
+
map 'dimension', to: :dimensions
|
|
40
43
|
map 'definition', to: :definition
|
|
41
44
|
map 'description', to: :description
|
|
42
45
|
map 'id', to: :id
|
|
@@ -14,6 +14,7 @@ module Chemicalml
|
|
|
14
14
|
attribute :dict_ref, :string
|
|
15
15
|
attribute :convention, :string
|
|
16
16
|
attribute :units, :string
|
|
17
|
+
attribute :multipler, :string
|
|
17
18
|
attribute :multiplier, :string
|
|
18
19
|
|
|
19
20
|
attribute :ref, :string
|
|
@@ -28,6 +29,7 @@ module Chemicalml
|
|
|
28
29
|
map_attribute 'dictRef', to: :dict_ref
|
|
29
30
|
map_attribute 'convention', to: :convention
|
|
30
31
|
map_attribute 'units', to: :units
|
|
32
|
+
map_attribute 'multipler', to: :multipler
|
|
31
33
|
map_attribute 'multiplier', to: :multiplier
|
|
32
34
|
map_attribute 'ref', to: :ref
|
|
33
35
|
map_attribute 'multiplierToData', to: :multiplier_to_data
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Chemicalml
|
|
4
|
+
module Cml
|
|
5
|
+
module Xhtml
|
|
6
|
+
# An <xhtml:p> paragraph inside CML dictionary rich text.
|
|
7
|
+
class P < Lutaml::Model::Serializable
|
|
8
|
+
attribute :content, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
namespace Chemicalml::Cml::Xhtml::Namespace
|
|
12
|
+
root 'p'
|
|
13
|
+
map_content to: :content
|
|
14
|
+
end
|
|
15
|
+
key_value do
|
|
16
|
+
map 'content', to: :content
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Chemicalml
|
|
4
|
+
module Cml
|
|
5
|
+
# The XHTML rich-text vocabulary CML dictionaries embed inside
|
|
6
|
+
# <definition>/<description>. Each element is its own wire class
|
|
7
|
+
# so the namespace travels with it (lutaml-model assigns one
|
|
8
|
+
# namespace per model class).
|
|
9
|
+
module Xhtml
|
|
10
|
+
# The XHTML namespace CML dictionaries use for rich text content
|
|
11
|
+
# (<xhtml:p> inside <definition>/<description>).
|
|
12
|
+
class Namespace < Lutaml::Xml::W3c::XmlNamespace
|
|
13
|
+
uri 'http://www.w3.org/1999/xhtml'
|
|
14
|
+
prefix_default 'xhtml'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
autoload :P, 'chemicalml/cml/xhtml/p'
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
data/lib/chemicalml/cml.rb
CHANGED
|
@@ -15,6 +15,7 @@ module Chemicalml
|
|
|
15
15
|
autoload :Namespace, 'chemicalml/cml/namespace'
|
|
16
16
|
autoload :Patterns, 'chemicalml/cml/patterns'
|
|
17
17
|
autoload :ReferenceResolver, 'chemicalml/cml/reference_resolver'
|
|
18
|
+
autoload :Xhtml, 'chemicalml/cml/xhtml'
|
|
18
19
|
autoload :Role, 'chemicalml/cml/role'
|
|
19
20
|
autoload :Schema3, 'chemicalml/cml/schema3'
|
|
20
21
|
autoload :Schema24, 'chemicalml/cml/schema24'
|
|
@@ -8,10 +8,11 @@ module Chemicalml
|
|
|
8
8
|
# element. The schema allows it as a string; this constraint
|
|
9
9
|
# enforces presence.
|
|
10
10
|
class EntryMustContainDefinition < Chemicalml::Convention::Constraint::NodeConstraint
|
|
11
|
-
self.description = 'An `<entry>` MUST contain a single `definition` child element.
|
|
11
|
+
self.description = 'An `<entry>` MUST contain a single `definition` child element. '
|
|
12
12
|
applies_to Chemicalml::Cml::Role::DictionaryEntry
|
|
13
13
|
def check_node(node, path)
|
|
14
|
-
|
|
14
|
+
definition = node.definition
|
|
15
|
+
return [] if definition_contained?(definition)
|
|
15
16
|
|
|
16
17
|
[violation(path: path.join('/'),
|
|
17
18
|
message: "entry #{node.id.inspect} must contain a single definition child")]
|
|
@@ -19,6 +20,18 @@ module Chemicalml
|
|
|
19
20
|
|
|
20
21
|
private
|
|
21
22
|
|
|
23
|
+
# CML allows the definition content as plain text or as
|
|
24
|
+
# rich text (<xhtml:p> paragraphs); the wire class types it
|
|
25
|
+
# structured, but a plain string remains valid at
|
|
26
|
+
# construction.
|
|
27
|
+
def definition_contained?(definition)
|
|
28
|
+
return false if definition.nil?
|
|
29
|
+
return !definition.to_s.strip.empty? if definition.is_a?(String)
|
|
30
|
+
|
|
31
|
+
!(definition.content.to_s.strip.empty? &&
|
|
32
|
+
Array(definition.paragraphs).empty?)
|
|
33
|
+
end
|
|
34
|
+
|
|
22
35
|
def entry?(node)
|
|
23
36
|
node.is_a?(Chemicalml::Cml::Role::DictionaryEntry)
|
|
24
37
|
end
|
data/lib/chemicalml/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chemicalml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.8
|
|
19
|
+
version: '0.8'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.8
|
|
26
|
+
version: '0.8'
|
|
27
27
|
description: ChemML provides a lutaml-model-based Ruby object model for the Chemical
|
|
28
28
|
Markup Language (CML). Parse, manipulate, and serialize CML XML with full round-trip
|
|
29
29
|
fidelity. Designed as a sibling model to other chemistry model layers (e.g. AsciiChem).
|
|
@@ -766,6 +766,8 @@ files:
|
|
|
766
766
|
- lib/chemicalml/cml/schema3/z_matrix.rb
|
|
767
767
|
- lib/chemicalml/cml/visitable.rb
|
|
768
768
|
- lib/chemicalml/cml/wire_class_registry.rb
|
|
769
|
+
- lib/chemicalml/cml/xhtml.rb
|
|
770
|
+
- lib/chemicalml/cml/xhtml/p.rb
|
|
769
771
|
- lib/chemicalml/context_configuration.rb
|
|
770
772
|
- lib/chemicalml/convention.rb
|
|
771
773
|
- lib/chemicalml/convention/base.rb
|