Skip to content

Complete IsoSts namespace closure - #53

Open
HassanAkbar wants to merge 4 commits into
mainfrom
feat/isosts-namespace-closure
Open

Complete IsoSts namespace closure#53
HassanAkbar wants to merge 4 commits into
mainfrom
feat/isosts-namespace-closure

Conversation

@HassanAkbar

Copy link
Copy Markdown
Member

Summary

Completes the IsoSts namespace decoupling started in #31.

  • Removes the final Sts::NisoSts::* references from lib/sts/iso_sts/.
  • Adds the full recursive closure of IsoSts models.
  • Models attributes, children, and cardinalities from ISOSTS.xsd.
  • Preserves the mandatory project-level id surface without using required: true.
  • Adds exhaustive attribute, child, nested-content, and round-trip coverage.
  • Keeps the autoload registry aligned one-to-one with the model directory: 220/220.
  • Updates the refactoring documentation to reflect completion.

Validation

  • bundle exec rspec: 5,875 examples, 0 failures
  • bundle exec rubocop: 616 files inspected, no offenses
  • IsoSts → NisoSts references: 0

Metanorma PR checklist

fixes #40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the IsoSts → NisoSts decoupling by introducing a full recursive closure of IsoSts models derived from ISOSTS.xsd, updating model references to point exclusively within the IsoSts/TBX/MathML namespaces, and refreshing refactor documentation/spec guidance to reflect the completed work.

Changes:

  • Replace remaining Sts::NisoSts::* type references in lib/sts/iso_sts/ with IsoSts-native model types (e.g., TermDisplay, ElementCitation, PersonGroup, Source).
  • Add/expand a large set of IsoSts element models to close recursive content roots and match ISOSTS attribute/child surfaces.
  • Update refactor TODO docs and streamline spec assertions (with a note: spec comments currently reference a non-existent spec file).

Reviewed changes

Copilot reviewed 98 out of 98 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
TODO.sts-refactor/03-namespace-coupling.md Updates refactor narrative/status to reflect completion of IsoSts namespace decoupling.
TODO.sts-refactor/00-overview.md Marks namespace coupling work item as DONE and updates roadmap text accordingly.
spec/iso_sts/iso_sts_element_spec.rb Removes/condenses attribute-surface assertions and updates commentary about where coverage lives (currently references a missing spec file).
lib/sts/iso_sts.rb Extends IsoSts autoload registry to include the newly added recursive-closure model set.
lib/sts/iso_sts/term_sec.rb Switches term_display to Sts::IsoSts::TermDisplay, removing a remaining NisoSts dependency.
lib/sts/iso_sts/ref.rb Switches element_citation to Sts::IsoSts::ElementCitation, removing a remaining NisoSts dependency.
lib/sts/iso_sts/mixed_citation.rb Switches person_group, collab, source, article_title to IsoSts models, removing remaining NisoSts dependencies.
lib/sts/iso_sts/term_head.rb Expands TermHead inline/mixed content surface to close the recursive dependency set.
lib/sts/iso_sts/term_display.rb Adds IsoSts TermDisplay model for term section display content closure.
lib/sts/iso_sts/disp_quote.rb Expands DispQuote content model to include full bounded/recursive children per ISOSTS.
lib/sts/iso_sts/boxed_text.rb Expands BoxedText content model (including nested boxed-text/glossary/etc.) for closure.
lib/sts/iso_sts/attrib.rb Expands Attrib mixed inline content children to the complete ISOSTS inline set.
lib/sts/iso_sts/custom_meta_group.rb Adds project id surface + mapping and keeps custom-meta closure consistent.
lib/sts/iso_sts/meta_name.rb Adds project id surface + mapping for meta-name scalar element wrapper.
lib/sts/iso_sts/meta_value.rb Expands MetaValue mixed inline children to match ISOSTS meta-value surface.
lib/sts/iso_sts/license.rb Adds project id surface + mapping for License element.
lib/sts/iso_sts/license_p.rb Expands LicenseP mixed inline/block content model per ISOSTS closure.
lib/sts/iso_sts/addr_line.rb Adds AddrLine model for recursive closure of address-related structures.
lib/sts/iso_sts/address.rb Adds Address model for recursive closure of address-related structures.
lib/sts/iso_sts/aff.rb Adds Aff model and its rich mixed content surface per ISOSTS.
lib/sts/iso_sts/aff_alternatives.rb Adds AffAlternatives wrapper model for alternative affiliation structures.
lib/sts/iso_sts/alternatives.rb Adds Alternatives model to represent alternative renderings/resources.
lib/sts/iso_sts/anonymous.rb Adds Anonymous element model for contributor/citation structures.
lib/sts/iso_sts/article_title.rb Adds ArticleTitle mixed content model for citation/content closure.
lib/sts/iso_sts/author_comment.rb Adds AuthorComment block model for contributor metadata closure.
lib/sts/iso_sts/bio.rb Adds Bio block model, including recursive child-bearing structures.
lib/sts/iso_sts/collab.rb Adds Collab mixed content model for citations/contributor closure.
lib/sts/iso_sts/comment.rb Adds Comment mixed content model for citation/content closure.
lib/sts/iso_sts/conf_date.rb Adds ConfDate scalar/mixed model used by citations/related-object.
lib/sts/iso_sts/conf_loc.rb Adds ConfLoc scalar/mixed model used by citations/related-object.
lib/sts/iso_sts/conf_name.rb Adds ConfName scalar/mixed model used by citations/related-object.
lib/sts/iso_sts/conf_sponsor.rb Adds ConfSponsor scalar/mixed model used by citations/related-object.
lib/sts/iso_sts/contrib.rb Adds Contrib model for contributor closure in mixed/ordered contexts.
lib/sts/iso_sts/contrib_group.rb Adds ContribGroup model for grouped contributor structures.
lib/sts/iso_sts/date.rb Adds Date ordered model (day/month/season/year) for citation closure.
lib/sts/iso_sts/date_in_citation.rb Adds DateInCitation mixed model for citation-specific date fragments.
lib/sts/iso_sts/degrees.rb Adds Degrees scalar/mixed model used in name/speaker structures.
lib/sts/iso_sts/disp_formula_group.rb Adds DispFormulaGroup model for grouped display formulas.
lib/sts/iso_sts/elocation_id.rb Adds ElocationId scalar/mixed model for citation closure.
lib/sts/iso_sts/fig_group.rb Adds FigGroup ordered model for grouped figures/media closure.
lib/sts/iso_sts/funding_source.rb Adds FundingSource mixed model used by LicenseP closure.
lib/sts/iso_sts/given_names.rb Adds GivenNames scalar/mixed model for name structures.
lib/sts/iso_sts/glossary.rb Adds Glossary block model for boxed-text/term-display closure.
lib/sts/iso_sts/glyph_data.rb Adds GlyphData mixed model for private-char closure.
lib/sts/iso_sts/glyph_ref.rb Adds GlyphRef scalar model for private-char closure.
lib/sts/iso_sts/gov.rb Adds Gov mixed model for citation closure.
lib/sts/iso_sts/inline_supplementary_material.rb Adds InlineSupplementaryMaterial mixed model for inline resource closure.
lib/sts/iso_sts/isbn.rb Adds Isbn scalar/mixed model for citation closure.
lib/sts/iso_sts/issn.rb Adds Issn scalar/mixed model for citation closure.
lib/sts/iso_sts/issue_id.rb Adds IssueId scalar/mixed model for citation closure.
lib/sts/iso_sts/issue_part.rb Adds IssuePart scalar/mixed model for citation closure.
lib/sts/iso_sts/issue_title.rb Adds IssueTitle scalar/mixed model for citation closure.
lib/sts/iso_sts/journal_id.rb Adds JournalId scalar/mixed model for citation closure.
lib/sts/iso_sts/media.rb Adds Media ordered model for media objects used throughout closure.
lib/sts/iso_sts/name.rb Adds Name ordered model for name structures in citations/contrib.
lib/sts/iso_sts/name_alternatives.rb Adds NameAlternatives container for alternate name renderings.
lib/sts/iso_sts/on_behalf_of.rb Adds OnBehalfOf mixed model for contributor metadata closure.
lib/sts/iso_sts/open_access.rb Adds OpenAccess ordered model used in LicenseP closure.
lib/sts/iso_sts/overline.rb Adds Overline mixed model for inline styling closure.
lib/sts/iso_sts/part_title.rb Adds PartTitle mixed model for citation closure.
lib/sts/iso_sts/patent.rb Adds Patent mixed model for citation closure.
lib/sts/iso_sts/person_group.rb Adds PersonGroup mixed model for citation author/editor groups closure.
lib/sts/iso_sts/prefix.rb Adds Prefix mixed model for name structures.
lib/sts/iso_sts/price.rb Adds Price mixed model used in LicenseP closure.
lib/sts/iso_sts/private_char.rb Adds PrivateChar ordered model for private character/glyph constructs.
lib/sts/iso_sts/related_object.rb Adds RelatedObject mixed model for linked object/citation closure.
lib/sts/iso_sts/role.rb Adds Role mixed model for contributor/citation role closure.
lib/sts/iso_sts/roman.rb Adds Roman mixed model for inline styling closure.
lib/sts/iso_sts/sans_serif.rb Adds SansSerif mixed model for inline styling closure.
lib/sts/iso_sts/series.rb Adds Series mixed model for citation closure.
lib/sts/iso_sts/size.rb Adds Size mixed model for citation closure.
lib/sts/iso_sts/source.rb Adds Source mixed model for citation closure.
lib/sts/iso_sts/speaker.rb Adds Speaker mixed model for Speech/term-display closure.
lib/sts/iso_sts/speech.rb Adds Speech ordered model for term-display/boxed-text closure.
lib/sts/iso_sts/statement.rb Adds Statement ordered model for term-display/boxed-text closure.
lib/sts/iso_sts/string_name.rb Adds StringName mixed model for citation/contributor closure.
lib/sts/iso_sts/subtitle.rb Adds Subtitle mixed model for citation/content closure.
lib/sts/iso_sts/suffix.rb Adds Suffix mixed model for name structures.
lib/sts/iso_sts/supplement.rb Adds Supplement mixed model for citation closure.
lib/sts/iso_sts/supplementary_material.rb Adds SupplementaryMaterial ordered model for supplementary resources closure.
lib/sts/iso_sts/surname.rb Adds Surname mixed model for name structures.
lib/sts/iso_sts/table_wrap_group.rb Adds TableWrapGroup ordered model for grouped table-wrapping closure.
lib/sts/iso_sts/target.rb Adds Target mixed model used across multiple mixed content elements.
lib/sts/iso_sts/textual_form.rb Adds TextualForm mixed model used by chem-struct-wrap closure.
lib/sts/iso_sts/trans_source.rb Adds TransSource mixed model for citation closure.
lib/sts/iso_sts/trans_title.rb Adds TransTitle mixed model for citation closure.
lib/sts/iso_sts/verse_group.rb Adds VerseGroup ordered model for verse-group structures.
lib/sts/iso_sts/verse_line.rb Adds VerseLine mixed model for verse-line inline content.
lib/sts/iso_sts/volume_id.rb Adds VolumeId mixed model for citation closure.
lib/sts/iso_sts/volume_series.rb Adds VolumeSeries mixed model for citation closure.
Comments suppressed due to low confidence (2)

spec/iso_sts/iso_sts_element_spec.rb:1029

  • This comment claims coverage in iso_sts_recursive_content_closure_spec.rb, but that file does not exist in spec/iso_sts/, so readers can’t follow the reference.
    spec/iso_sts/iso_sts_element_spec.rb:1070
  • The referenced iso_sts_recursive_content_closure_spec.rb file does not exist (spec/iso_sts only contains iso_sts_element_spec.rb and iso_sts_spec.rb), so this comment should not point to it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread spec/iso_sts/iso_sts_element_spec.rb Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 104 out of 104 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 104 out of 104 changed files in this pull request and generated no new comments.

@HassanAkbar
HassanAkbar requested a review from ronaldtse July 28, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decouple IsoSts from NisoSts: model IsoSts from the ISOSTS schema

2 participants