Add style-mining tooling, rule-based skip logic, and improved minification/debugging#21
Open
JJponce0913 wants to merge 27 commits intonathand8:masterfrom
Open
Add style-mining tooling, rule-based skip logic, and improved minification/debugging#21JJponce0913 wants to merge 27 commits intonathand8:masterfrom
JJponce0913 wants to merge 27 commits intonathand8:masterfrom
Conversation
Introduces a Manipulation class for clearer minimization steps and improves the minification process with step-by-step HTML output for debugging. Updates bug report saving to include pickle addresses, adds more detailed logging and error handling in layout testing, and refines the minification and test runner logic for better traceability and reproducibility. Also updates .gitignore to exclude new debug and test output files.
Added transfer folder. Fixed the minification. Updated .gitignore to exclude /temp. Removed obsolete files and made minor updates to test and model scripts.
Introduces rule management via rules.json and src/lqc_selenium/rules.py, enabling rule addition and loading. Updates bug report logic to support custom timestamped folders when skipping, and refactors minification to check for specific patterns and style assignments. Minor code cleanups and disables verbose debug output in several modules.
Deleted multiple old bug report files and style count aggregates from the Transfer directory. Migrated select bug report cases to shouldSkip-bug-report paths and added new test HTML files. Updated src/lqc_selenium/rules.py and runner.py to reflect these changes.
Updated rules.json to redefine and expand display rules. Refactored runner.py to load and apply rules dynamically from JSON, improving rule matching logic. Cleaned up and removed unused files. Minor config and bug report helper adjustments.
pavpanchekha
requested changes
Nov 21, 2025
Collaborator
pavpanchekha
left a comment
There was a problem hiding this comment.
I didn't finish reviewing but giving comments back now before I have to switch to another task. Maybe do a pass over the PR and remove the stuff that doesn't need to be committed.
Introduces src/tooling/treeComparison.py for comparing HTML trees using BeautifulSoup, including node merging and tree walking utilities.
Implemented __str__ methods for ElementTree and StyleMap for improved readability. Updated treeComparison.py with enhanced debugging, sibling alignment, and more robust merging logic. Added checkPickle.py utility for inspecting pickled run_subject objects. Fixed default config path in runner.py.
This reverts commit 8bf7a9f.
This reverts commit f4ead20.
Cleaned up .gitignore, deleted geckodriver.exe binaries, and various debugs.
Removed some more debug
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.
New style-mining scripts
extractStyle.pyto:bug_reports/and readminified_bug.htmlin each bug folder..style[...],.style.prop,setProperty(...)).style_counts.json.extractStyleAggregate.pyto:(property, value)pairs.style_counts_aggregate_firefox.json.Config system: add rules support
Config(src/lqc/config/config.py) to:rulesfrom the JSON config files.getRules().FileConfig.getCustomTimestampBugReport(custom_folder)to:postSkip-bug-report-<timestamp>).save_bug_reportnow:shouldSkipisTrue.postSkip-bug-report-<timestamp>viagetCustomTimestampBugReport.Rule-based bug skipping and saving
rulessection to config (e.g.config-initial.json) with:DispNoneandDispTable.src/lqc_selenium/runner.py:check_pattern(...)matches sequences in<body>.check_style(...)analyzes themakeStyleChanges()JS function forstyleassignments.should_skip(file):pattern_and_style,pattern_only,style_only,none.Trueif a rule’s pattern AND style match.minify(...):test_pre.html.shouldSkiptosave_bug_report.Minification bug fix and pipeline improvements
Manipulationclass to wrap mutation functions + descriptions.RunSubject.removeElementById:MinifyStepFactory:Manipulationobjects.Minify debugging tool
minify_debug(...):testminify/.(run_subject, run_result, pickle_addr).src/tooling/minifyTest.py:debugging_tools.js:checkForBug()now performs a single style application and reload sequence.printDifferences(...)for better logging.layout_tester.py:run_test_using_js_diff_detectcleanly returnsRunResultLayoutBugorRunResultCrash.RunResultCrash.isBug()now always returnsTrue.Selenium driver and chrome variant fix
detectDriverPath(...)usingshutil.which:ChromeVariant:webdriver.Chrome+Servicewith quiet logging.--headless=new,--no-sandbox,--disable-dev-shm-usage.geckodriver.exe.Tooling / metadata updates
.gitignoreto ignore cache, logs, build output, and bug report folders.urllib3version to== 2.3.0.Metadata-Version, dependencies, and entry points.How to use
python extractStyle.py bug_reportspython extractStyleAggregate.py bug_reportspython src/tooling/minifyTest.py some_pickle.pkl -c ./config/config-initial.jsonNotes / follow-ups