-
Notifications
You must be signed in to change notification settings - Fork 15
Wrong way to contribute, but fingers crossed. #36
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
base: master
Are you sure you want to change the base?
Conversation
…tructure project - Migrate from Poetry configuration to standard pyproject.toml format - Update dependencies structure and build system to use setuptools - Change script entry point from rexi.cli to rexi.main - Remove Poetry-specific files (poetry.lock, poetry.toml, Makefile) - Add temp* and run.sh to .gitignore - Update README with source installation instructions - Complete file reorganization: cli.py renamed to parser.py, regex_help.py moved to utils/
- Update test_logic.py to use unittest instead of pytest - Update test_cli.py to use unittest and adjust for new module structure - Update test_ui.py to use unittest and adjust for new module structure - Remove pytest dependencies from test files
- Create install.sh script that sets up venv and installs dependencies - Script creates run.sh with full path and symlinks to ~/.local/bin - The rexi command becomes available system-wide after installation
- Use readlink -f to resolve symlinks and get actual script location - This ensures .venv is found relative to project directory, not symlink location
- Create run_tests.sh script to run tests using the project's virtual environment - Script activates venv and runs unittest with proper error handling - Supports running all tests or specific test modules/classes
…eading improvements
- Added pyperclip>=1.8.2 as a project dependency - Enables copy pattern to clipboard functionality
- Added 'jq' profile type to support JSON processing with JQ - Profile includes name, description, and type configuration - Sets up foundation for JQ mode functionality
- Added #output-container.full-width style that sets width to 100% - Removes the right border when in full-width mode - Enables the ability to hide the side panel and expand output area
**JQ Mode Support:** - Added JQ mode state variables (is_jq_mode, jq_executor) - Implemented _switch_to_jq_mode method to handle UI switching - Added JQ-specific help content with get_jq_help_content - Added update_jq method to execute JQ programs - Added UI updates when switching to JQ mode **UI Enhancements:** - Enhanced toggle_view action to support 4 view modes (Groups/Help/Features/Hidden) - Added full-width output functionality when side panel is hidden - Added 'Copy Pattern' button with clipboard functionality - Updated UI state management for different modes **Code Infrastructure:** - Added pyperclip import with error handling - Integrated JQ execution in the input processing flow - Enhanced profile switching to support JQ profiles
- Changed expected profile name from 'PCRE (Full)' to 'RE - PCRE (Full)' - Aligns test with updated profile name in profiles.json
- Implemented JqExecutor class to run JQ programs via subprocess - Includes availability checking using shutil.which - Added error handling for various execution scenarios - Supports timeout configuration and proper error reporting
- Created TestCopyButton class to test clipboard functionality - Added tests for successful copy, empty pattern, missing pyperclip, and error cases - Uses mocking to test clipboard operations without actual clipboard access
- Created TestJqExecutor class to test JQ execution functionality - Added tests for availability checking, identity filter, and various filters - Includes tests for error cases like invalid JSON and filters - Uses proper skip logic when JQ is not installed on the system
- Created TestHideSidePanel class to test panel hiding functionality - Added tests for view mode cycling in both regex and awk modes - Tests the full-width output container class manipulation - Verifies proper UI state management when switching between modes
- Add JQ filter support to the list of features - Document system dependencies for AWK and JQ - Update controls section with new copy pattern shortcut (Ctrl+Shift+C) - Add JQ examples to usage section - Update profile list to include JQ option
- Add Ctrl+C keyboard shortcut for copying patterns to clipboard - Update copy pattern button text to show keyboard shortcut - Update import organization for clarity - Clean up duplicate decorator in input change handler
- Update docstring to reflect new hidden view mode in toggle functionality - Update selectors to use groups-container for better test stability - Add test coverage for new hidden view mode (mode 3) - Ensure proper cycling through all view modes including hidden state
|
Hi! Thats seems like a huge change, and i will need to free some times to review it I will guess part / most of it is AI generated? Any way i think in the next few weeks i will do a deep dive into it, it seems like a very nice change, although im not sure it is the main purpose of rexi I will take a look later :) |
This is the first discussion of such a nature I've seen on Github so far. I'm interested in the discussion aspect and the roadmaps (I'm tracking code closely) for this main branch of rexi and the pull request #36 branch. A further bit, I think I'm on the cusp of deciding how much influence to allow AI to have on my programming contributions yet have utilized it for some small LOC programs and some up to say 100 lines of code for TUI's, especially related to ncurses but realized lately the superior user friendliness of textual and other higher level abstractions (I recommend micro editor written in go). And I'm quite interested in helping a/several mainstream regex-oriented TUI program(s) evolve. I of course yield any opinions on these projects to you guys but I may up and run with my own fork with your permission to integrate yet more (or more aptly read different) features - I feel like there are two tracks the project could go in for a regex TUI: honing in on what rexi does with regex mainly (by which I even think maybe #36 exceeds rexi in the field for visualizing groups) or branching out and letting all the suggestions for improvement that AI runs with to unfurl. Fwiw, my vision straddles the current code for these two projects in the middle: I'd just like the additional ability beyond regex matching to accommodate replace and list.. And I'll come back to edit my comment later to illustrate what I mean by "list" Thank you both for these great terminal -based regex TUIs, |
|
@andriy-git @cargilcm Got you guys I will take a deeper look later this weekend, can you please fix the CI meanwhile? |
|
While I presume
is intended for andriy-git, I'm afraid I'm very green when it comes to these CI changes. I tried to look into the failed tests to jump the gun but only when I ran andriy-git's ./run_tests.sh with/without venv did I figure out how the tests work at all. Commenting out the line for venv activate, all the unit tests seemed to run and succeed for me but that doesn't accommodate a make install. I did find the yaml @andriy-git , do you want to make a pass at getting the CI to pass? I'd like to say if it ain't broke don't fix it, but @royreznik seems to want to rely on the unit tests which he no doubt painstakingly crafted by hand and his own build commands if I understand. Personally, I would favor a final version that accommodates running the tests as simply as the andriy-git's branch script and doesn't require poetry but I can go silent till I hear y'all deciding how to address the ci and dependencies issues. My rationale for looking a simpler build without poetry is I wasn't free to implement changes that I could then commit back, otherwise. My development environment is merely a 2024 Motorola Android phone. In the meantime thanks again to you both |

I know this is a full revamp. It might not even be going in the direction that you wanted, but I rather you have it than me just keeping it.
It is now more than just Regular Expressions. It is also json and awk training ground.