Port from libxml-ruby to nokogiri#129
Conversation
160d3aa to
2178114
Compare
There was a problem hiding this comment.
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-rubyrequirements and stderr error-handler configuration from CLI/server entrypoints. - Updated
WorkflowXMLDocXML parsing + RelaxNG validation to use Nokogiri, and simplifiedWorkflowIOto raw file reads. - Updated installation/docs and Gem dependencies to replace
libxml-rubywithnokogiri.
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.
There was a problem hiding this comment.
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.attributesreturns a hash; iterating witheachyields key/value pairs (arrays), sojobstat.name/.valuewill fail. Iterate withjob.attributes.each_value(or destructure|_name, attr|) to getNokogiri::XML::Attrobjects.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.