feat: scaffold ARM automation framework for Relativity workspace restoration#2
Draft
davis-chad wants to merge 1 commit into
Draft
feat: scaffold ARM automation framework for Relativity workspace restoration#2davis-chad wants to merge 1 commit into
davis-chad wants to merge 1 commit into
Conversation
- arm_automation/config.py: environment-based configuration with Zscaler CA bundle support - arm_automation/archive_parser.py: XML parser for ArchiveInformation.xml with CSV export and dict output - arm_automation/smartsheet_client.py: schema-agnostic Smartsheet REST API client using requests - arm_automation/step_runner.py: decorator-based step registry and execution framework with error handling - arm_automation/steps/parse_archive_info.py: first checklist step — parse archive XML, optionally export CSV - tests/: 28 passing tests covering config, parser, step runner, and the parse_archive_info step - Updated requirements.txt with requests and pytest - Updated README.md with project documentation Co-authored-by: davis-chad <davis-chad@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scaffolds the Python-based ARM (Archive & Restore Manager) automation system for automating Relativity workspace restoration steps tracked in Smartsheet.
What's included
Core modules (
arm_automation/)config.pySMARTSHEET_API_KEY,REQUESTS_CA_BUNDLE(Zscaler support), andREQUEST_TIMEOUT. Produces an immutableConfigdataclass with a.verifyproperty ready forrequests.archive_parser.pyArchiveInformation.xmlfiles usingxml.etree.ElementTree. Returns a flatdict[str, str]keyed by element path (e.g.ArchiveInformation/DatabaseInfo/ServerName). Also supports CSV export viato_csv(). Handles UNC paths viapathlib.Path.smartsheet_client.pyrequests. Supportsget_sheet,list_columns,get_row,update_row, andadd_rows. Does not hard-code column names/IDs — callers pass them explicitly. Respects theConfig.verifyproperty for TLS.step_runner.py@register_step) and execution framework. Steps receive aStepContextdataclass and return aStepResult. Exceptions are caught and surfaced as failed results with messages.First step implementation (
arm_automation/steps/)parse_archive_info.pyparse_archive_infoArchiveInformation.xmlfrom a path incontext.params["archive_xml_path"], optionally exports to CSV, and makes the parsed dict available inStepResult.outputs["archive_data"].Tests (
tests/)28 tests covering:
Config.from_env()— valid configs, missing/empty API key, frozen dataclassarchive_parser.parse()— top-level fields, nested fields, UNC paths, XML attributes, error casesarchive_parser.to_csv()— file creation, headers, content fidelity, parent directory creationparse_archive_infostep — end-to-end with real XML fixtureOther changes
requirements.txtwithrequestsandpytestREADME.mdwith full project documentation, usage examples, and design decisionsDesign decisions
xml.etree.ElementTree— nolxmlneeded.Config.verifyalways returnsTrueor a CA bundle path.How to test