Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glossarist v2 enhancements and fixes #85

Merged
merged 6 commits into from
Nov 21, 2023

Conversation

HassanAkbar
Copy link
Member

  • added methods to add single note and designation
  • updated save_to_files to save in Glossarist V2 Format

closes #82
closes #84

@ronaldtse
Copy link
Member

@HassanAkbar thanks for this! Could you please try:

  1. Using the newly created functionality to migrate the iso-iec-2382 collection
  2. Try loading the dataset in Glossarist
    ?

This is related to this task:

Copy link
Member

@ronaldtse ronaldtse left a comment

Choose a reason for hiding this comment

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

Failed to run.

@ronaldtse
Copy link
Member

ronaldtse commented Nov 20, 2023

At the iso-iec-2382 repository:
(https://github.com/metanorma/iso-iec-2382/pull/23)

$ bundle exec termium convert -i reference-docs/xml/ISO-IEC_2382.xml -o sources/concepts
Reading TERMIUM export file: reference-docs/xml/ISO-IEC_2382.xml
Size of TERMIUM dataset: 3263
Converting to Glossarist...
Using existing directory: sources/concepts
Writing Glossarist dataset to: sources/concepts
bundler: failed to load command: termium (/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bin/termium)
/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/glossarist-ruby-915cf0005a43/lib/glossarist/concept_manager.rb:64:in `save_concept_to_file': undefined method `each' for nil:NilClass (NoMethodError)

      concept.localized_concepts.each do |lang, uuid|
                                ^^^^^
	from /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/glossarist-ruby-915cf0005a43/lib/glossarist/concept_manager.rb:32:in `each_value'
	from /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/glossarist-ruby-915cf0005a43/lib/glossarist/concept_manager.rb:32:in `save_to_files'
	from /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/glossarist-ruby-915cf0005a43/lib/glossarist/managed_concept_collection.rb:76:in `save_to_files'
	from /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/termium-0.1.2/lib/termium/cli.rb:58:in `convert'
	from /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'

@ronaldtse
Copy link
Member

Thanks @HassanAkbar I can see the concept dataset format is now correct.

In this case, can you please help update the metanorma-plugin-glossarist plugin to work with the new dataset as well?

There are 2 documents that use metanorma-plugin-glossarist we need to update:

@HassanAkbar
Copy link
Member Author

@ronaldtse created a new issue for this change here -> metanorma/metanorma-plugin-glossarist#20

@HassanAkbar HassanAkbar merged commit 465ba64 into main Nov 21, 2023
14 checks passed
@HassanAkbar HassanAkbar deleted the glossarist_v2_enhancements_and_fixes branch November 21, 2023 19:42
@HassanAkbar HassanAkbar restored the glossarist_v2_enhancements_and_fixes branch November 27, 2023 07:03
@HassanAkbar HassanAkbar deleted the glossarist_v2_enhancements_and_fixes branch November 27, 2023 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants