Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 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
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
3 changes: 1 addition & 2 deletions .github/workflows/rake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ on:
branches: [ master, main ]
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
33 changes: 33 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 ISO website pages for metadata (used by DataFetcher for bulk operations, not the normal lookup path).
6. **DataFetcher** (`lib/relaton/iso/data_fetcher.rb`) — bulk fetches from ISO.org ICS pages using 3 threads with a persistent queue for resumability.

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 served by WebMock stub (configured in `spec/support/webmock.rb`). Run `rake spec:update_index` to refresh when upstream data changes.
- **VCR:** cassettes in `spec/vcr_cassettes/`, record mode `:once`, re-record interval 7 days. Index download requests are ignored by VCR (handled by WebMock stub instead).
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ gem "rspec", "~> 3.0"
gem "rubocop"
gem "rubocop-performance"
gem "rubocop-rails"
gem "ruby-jing"
gem "simplecov"
gem "vcr"
gem "webmock"
Loading
Loading