Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Port from libxml-ruby to nokogiri#129

Merged
christopherwharrop merged 15 commits into
developfrom
feature/nokogiri
Apr 25, 2026
Merged

Port from libxml-ruby to nokogiri#129
christopherwharrop merged 15 commits into
developfrom
feature/nokogiri

Conversation

@christopherwharrop-noaa

@christopherwharrop-noaa christopherwharrop-noaa commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

This change replaces the libxml-ruby XML parsing with Nokogiri parsing. This is advantageous because Nokogiri installs much easier by packaging libxml2 so that it doesn't need system dependencies.

@christopherwharrop-noaa christopherwharrop-noaa changed the title Add nokogiri migration guide and linting Port from libxml-ruby to nokogiri Apr 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 migrates Rocoto’s XML dependency from libxml-ruby to nokogiri to simplify installation by removing the need for system libxml2 development headers.

Changes:

  • Removed libxml-ruby requirements and stderr error-handler configuration from CLI/server entrypoints.
  • Updated WorkflowXMLDoc XML parsing + RelaxNG validation to use Nokogiri, and simplified WorkflowIO to raw file reads.
  • Updated installation/docs and Gem dependencies to replace libxml-ruby with nokogiri.

Reviewed changes

Copilot reviewed 19 out of 22 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
sbin/rocotovacuum.rb Removes libxml require and LibXML error handler setup.
sbin/rocotostat.rb Removes libxml require and LibXML error handler setup.
sbin/rocotoserver Removes libxml require and LibXML error handler setup.
sbin/rocotorun.rb Removes libxml require and custom LibXML error handler setup.
sbin/rocotorewind.rb Removes libxml require and custom LibXML error handler setup.
sbin/rocotocomplete.rb Removes libxml require and LibXML error handler setup.
sbin/rocotocheck.rb Removes libxml require and LibXML error handler setup.
sbin/rocotoboot.rb Removes libxml require and LibXML error handler setup.
lib/workflowmgr/workflowio.rb Removes LibXML parsing helper; introduces read that returns raw file contents.
lib/workflowmgr/workflowdoc.rb Replaces LibXML parsing/traversal/validation with Nokogiri equivalents.
lib/workflowmgr/torquebatchsystem.rb Swaps LibXML parsing for Nokogiri when parsing scheduler XML output.
lib/workflowmgr/slurmbatchsystem.rb Removes unused libxml dependency.
lib/workflowmgr/pbsprobatchsystem.rb Removes unused libxml dependency.
lib/workflowmgr/moabtorquebatchsystem.rb Swaps LibXML parsing for Nokogiri when parsing scheduler XML output.
lib/workflowmgr/moabbatchsystem.rb Swaps LibXML parsing for Nokogiri when parsing scheduler XML output.
lib/workflowmgr/cobaltbatchsystem.rb Removes unused libxml dependency.
README.md Updates requirements/installation guidance to remove libxml2-related instructions.
INSTALL Removes libxml2 configuration flags and bundler build configuration for libxml-ruby.
Gemfile.lock Replaces libxml-ruby resolution with nokogiri.
Gemfile Replaces libxml-ruby dependency with nokogiri.

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

Comment thread lib/workflowmgr/workflowdoc.rb
Comment thread lib/workflowmgr/torquebatchsystem.rb Outdated
Comment thread lib/workflowmgr/torquebatchsystem.rb Outdated
Comment thread lib/workflowmgr/moabbatchsystem.rb Outdated
Comment thread lib/workflowmgr/moabbatchsystem.rb Outdated
Comment thread lib/workflowmgr/workflowdoc.rb Outdated
Comment thread lib/workflowmgr/torquebatchsystem.rb
Comment thread lib/workflowmgr/moabbatchsystem.rb
Comment thread lib/workflowmgr/moabtorquebatchsystem.rb
Comment thread lib/workflowmgr/moabtorquebatchsystem.rb Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 22 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

lib/workflowmgr/moabtorquebatchsystem.rb:186

  • With Nokogiri, job.attributes returns a hash; iterating with each yields key/value pairs (arrays), so jobstat.name/.value will fail. Iterate with job.attributes.each_value (or destructure |_name, attr|) to get Nokogiri::XML::Attr objects.
      queued_jobs = queued_jobs_doc.xpath('//job')
      #  queued_jobs.find
      queued_jobs.each do |job|
        # Initialize an empty job record
        record = {}

        # Look at all the attributes for this job and build the record
        # job.children
        job.attributes.each do |jobstat|
          case jobstat.name

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

Comment thread lib/workflowmgr/moabbatchsystem.rb Outdated
Comment thread lib/workflowmgr/torquebatchsystem.rb
Comment thread lib/workflowmgr/moabtorquebatchsystem.rb Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 22 changed files in this pull request and generated 3 comments.


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

Comment thread lib/workflowmgr/workflowdoc.rb
Comment thread lib/workflowmgr/workflowdoc.rb Outdated
Comment thread lib/workflowmgr/workflowdoc.rb Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 22 changed files in this pull request and generated 5 comments.


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

Comment thread lib/workflowmgr/torquebatchsystem.rb Outdated
Comment thread lib/workflowmgr/moabbatchsystem.rb Outdated
Comment thread lib/workflowmgr/moabbatchsystem.rb Outdated
Comment thread lib/workflowmgr/moabtorquebatchsystem.rb Outdated
Comment thread lib/workflowmgr/moabtorquebatchsystem.rb

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 22 changed files in this pull request and generated 2 comments.


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

Comment thread lib/workflowmgr/moabbatchsystem.rb
Comment thread lib/workflowmgr/workflowdoc.rb Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 22 changed files in this pull request and generated 1 comment.


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

Comment thread lib/workflowmgr/workflowdoc.rb

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 22 changed files in this pull request and generated 1 comment.


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

Comment thread lib/workflowmgr/torquebatchsystem.rb

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 22 changed files in this pull request and generated 7 comments.


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

Comment thread lib/workflowmgr/moabbatchsystem.rb Outdated
Comment thread lib/workflowmgr/moabbatchsystem.rb Outdated
Comment thread lib/workflowmgr/moabtorquebatchsystem.rb Outdated
Comment thread README.md Outdated
Comment thread lib/workflowmgr/workflowdoc.rb
Comment thread Gemfile Outdated
Comment thread lib/workflowmgr/torquebatchsystem.rb Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 22 changed files in this pull request and generated 3 comments.


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

Comment thread lib/workflowmgr/torquebatchsystem.rb Outdated
Comment thread lib/workflowmgr/moabtorquebatchsystem.rb Outdated
Comment thread lib/workflowmgr/moabbatchsystem.rb Outdated
@christopherwharrop christopherwharrop merged commit 80f8ccc into develop Apr 25, 2026
6 checks passed
@christopherwharrop christopherwharrop deleted the feature/nokogiri branch April 25, 2026 17: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

Development

Successfully merging this pull request may close these issues.

3 participants