Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e8b792c
update project-number in tests & cleanup bin dir
andrew2net Jan 30, 2025
0875923
WIP create flavor model
andrew2net Jan 31, 2025
e4d2e30
WIP implement flavor specific elements
andrew2net Feb 11, 2025
3de4c9e
WIP add XML validation
andrew2net Feb 12, 2025
a60f031
WIP adjust v1 Hash parser to v2 model
andrew2net Mar 11, 2025
58c3777
WIP
andrew2net Mar 19, 2025
92fdac5
WIP adopt functionality to the new model
andrew2net Apr 15, 2025
77f6faf
WIP
andrew2net Apr 22, 2025
db79c34
fix test failed with Ruby 3.4
andrew2net Apr 23, 2025
01c57ab
set fetched date after fetching doc fron GH
andrew2net Apr 24, 2025
13fe472
WIP fix openssl version to ~> 3.3.2
andrew2net Nov 25, 2025
2678495
Update VCR cassettes and remove deep_clone method
andrew2net Feb 6, 2026
d524d17
Get rid of ext/editorialgroup relaton-bib#103
andrew2net Feb 17, 2026
f3e42e2
move INDEXFILE into Iso anmespace
andrew2net Mar 14, 2026
47f9f86
Refactor HashParserV1 by removing unused Core::ArrayWrapper inclusion…
andrew2net Mar 14, 2026
15e9862
Update Ruby version requirements and dependencies; bump version to 2.…
andrew2net Mar 14, 2026
f7b6031
Remove scheduled cron job from GitHub Actions workflow; update pubid-…
andrew2net Mar 20, 2026
c1e88a4
Update VCRs
andrew2net Mar 20, 2026
7b40c87
Update HitCollection to include additional id_keys and pubid_class; a…
andrew2net Mar 20, 2026
160c157
fix: Handle Pubid::Core::Identifier in HitCollection#find and create_…
andrew2net Mar 20, 2026
51225ac
feat: Enable manual triggering of the rake workflow with workflow_dis…
andrew2net Mar 20, 2026
c73c33b
feat: add cut-off dates relaton/relaton-cli#109 (#176)
andrew2net Mar 20, 2026
cb7cc0a
chore: update version to 2.0.0-alpha.3
andrew2net Mar 20, 2026
1f14b6e
feat: add date filtering for relations in bibliography search relaton…
andrew2net Mar 23, 2026
76d73a8
feat: update date filtering logic in bibliography
andrew2net Mar 23, 2026
a77f52e
fix: enhance iso-reference handling and update tests for language sup…
andrew2net Mar 25, 2026
0a971b2
fix: correct method name from repot_errors to report_errors and updat…
andrew2net Mar 30, 2026
20fdddd
Update VCRs and index.zip
andrew2net Mar 30, 2026
095ab15
Update grammars
andrew2net Apr 2, 2026
aabb3d6
fix: update iso-tc handling to prevent ISO prefix and ensure content …
andrew2net Apr 3, 2026
7126659
fix: update version to 2.0.0-alpha.7 and adjust relaton-bib dependency
andrew2net Apr 3, 2026
01d33d7
fix: enhance iso-tc handling to bypass Pubid casting and preserve raw…
andrew2net Apr 7, 2026
56321ae
fix: update place formatting to use city attribute for consistency
andrew2net Apr 7, 2026
c8701a6
update version to 2.0.0
andrew2net Apr 8, 2026
ab31b53
fix: update relaton-bib dependency version to 2.0.0
andrew2net Apr 8, 2026
e5e4dcd
refactor: streamline webmock configuration and remove unused index stub
andrew2net Apr 9, 2026
d00e047
Upd lutaml model to 0.8.0 (#180)
andrew2net May 2, 2026
546cbc4
Propagate version-element rename and refresh fixtures/cassettes for r…
andrew2net May 4, 2026
9098d54
Bump intra-relaton constraints to ~> 2.1.0 and clean Gemfile GH refs …
andrew2net May 4, 2026
f2d0cec
Rename gemspec to hyphenated form for gem-release compatibility
andrew2net May 4, 2026
fe81548
Bump relaton-iso to 2.1.0
invalid-email-address May 4, 2026
23a6921
Trigger rake CI on lutaml-integration pushes
andrew2net May 4, 2026
6360bce
Update URLs in Rakefile and HitCollection module for correct v2 data …
andrew2net May 12, 2026
d23433e
Bump relaton-iso to 2.1.1
invalid-email-address May 12, 2026
d40b369
Update fetch method to accept an optional source parameter
andrew2net May 13, 2026
4b5c185
Switch bulk ingest to ISO Open Data JSONL feeds
andrew2net May 18, 2026
586a820
Attach published date to related bibitems in Open Data ingest
andrew2net May 19, 2026
064cc97
Refresh fixtures and specs for Open Data ingest
andrew2net May 19, 2026
e5e01d3
Skip Withdrawn deleted-project records on Open Data ingest
andrew2net May 20, 2026
93b213a
Refresh fixtures and VCR cassettes for Open Data ingest
andrew2net May 20, 2026
e821420
Retry Open Data downloads with exponential backoff
andrew2net May 20, 2026
5b1908f
Move grammar files to spec/schemas and update spec paths
andrew2net May 21, 2026
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
5 changes: 2 additions & 3 deletions .github/workflows/rake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ name: rake

on:
push:
branches: [ master, main ]
branches: [ master, main, lutaml-integration ]
tags: [ v* ]
pull_request:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
rake:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
.vscode/
.rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml
Gemfile.lock
.claude/
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ require: rubocop-rails
inherit_from:
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.2
Rails:
Enabled: false
36 changes: 36 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Development

- `bin/setup` — install dependencies
- `rake spec` — run tests
- `rspec spec/relaton/iso/bibliography_spec.rb` — run a single test file
- `rspec spec/relaton/iso/bibliography_spec.rb -e "some description"` — run a specific example
- `rake spec:update_index` — download latest ISO index fixture (`spec/fixtures/index-v1.zip`) from relaton-data-iso
- `bin/console` — interactive prompt with the gem loaded
- `rubocop` — lint (Ribose OSS style guide, Ruby 3.2 target)

## Architecture

relaton-iso retrieves ISO standard bibliographic data. The core retrieval flow:

1. **Bibliography** (`lib/relaton/iso/bibliography.rb`) — entry point via `search(pubid)` and `get(ref, year, opts)`. Handles year filtering, part matching, and type/stage validation.
2. **HitCollection** (`lib/relaton/iso/hit_collection.rb`) — searches a pre-built YAML index (`index-v1.zip` from relaton-data-iso) using `Relaton::Index`. Matches on `id_keys`: publisher, number, copublisher, part, year, edition, type, stage, iteration. Returns sorted Hit array.
3. **Hit** (`lib/relaton/iso/hit.rb`) — wraps an index result. The `item` attribute lazy-loads the full document from GitHub raw content (relaton-data-iso repo). `sort_weight` prioritizes published over withdrawn/deleted.
4. **ItemData** / **Model::Item** — ISO-specific bibliographic item extending `Relaton::Bib::ItemData`.
5. **Scraper** (`lib/relaton/iso/scraper.rb`) — parses individual ISO website pages. Used only by `Bibliography.get` as a fallback when an item is missing from the curated index; no longer drives bulk ingest.
6. **DataFetcher** (`lib/relaton/iso/data_fetcher.rb`) — streams the ISO Open Data programme JSONL feeds (`iso_deliverables_metadata.jsonl` for documents, `iso_technical_committees.jsonl` for committee titles) and writes one YAML per primary docid into `@output`. Short-circuits on upstream `Last-Modified`; falls back to a full pass when `data/` or `index-v1.yaml` is missing. Two source modes:
- `iso-open-data` (default) — incremental, skip when upstream is unchanged.
- `iso-open-data-all` — wipe `@output` and re-emit every record.
7. **DataParser** (`lib/relaton/iso/data_parser.rb`) — converts one Open Data record (`Hash`) into a `Relaton::Iso::ItemData`. Takes a `ref_index` (id → reference) for resolving `replaces`/`replacedBy` and a `tc_index` (reference → `{ "en"/"fr" => title }`) for resolving committee labels.

Key dependency: `pubid-iso` gem handles ISO publication identifier parsing and comparison.

## Testing

- **Framework:** RSpec with VCR cassettes and WebMock
- **Network access:** fully blocked via `WebMock.disable_net_connect!`
- **Index fixture:** `spec/fixtures/index-v1.zip` is pre-loaded into `Relaton::Index` pool in `before(:suite)` (configured in `spec/support/webmock.rb`). Run `rake spec:update_index` to refresh from relaton-data-iso.
- **VCR:** cassettes in `spec/vcr_cassettes/`, record mode `:once`, re-record interval 7 days. Index download requests are ignored by VCR (handled by fixture instead).
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
# Specify your gem's dependencies in relaton_iso.gemspec
gemspec


gem "byebug"
gem "equivalent-xml"
gem "pry-byebug"
Expand All @@ -13,6 +14,7 @@ gem "rspec", "~> 3.0"
gem "rubocop"
gem "rubocop-performance"
gem "rubocop-rails"
gem "ruby-jing"
gem "simplecov"
gem "vcr"
gem "webmock"
Loading
Loading