Skip to content
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

Update ANSI_ESCAPE_PATTERN for discussion #313 #316

Merged

Conversation

denisbondar
Copy link
Contributor

Description

Modify the ANSI_ESCAPE_PATTERN regular expression so that it honors the control characters described in #313.

Also added comments inside the regular expression to simplify future edits.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also
list any relevant details for your test configuration

Checklist:

  • My code follows the style guidelines of this project (no GitHub actions complaints! run make lint before
    committing!)
  • I have commented my code, pydocstyle and darglint are happy, docstrings are in google docstring format, and all
    docstrings include a summary, args, returns and raises fields (even if N/A)
  • I have added tests that prove my fix is effective or that my feature works, if adding "functional" tests please
    note if there are any considerations for the vrnetlab setup
  • New and existing unit tests pass locally with my changes

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e02100d) 90.50% compared to head (a426179) 90.50%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #316   +/-   ##
=======================================
  Coverage   90.50%   90.50%           
=======================================
  Files          60       60           
  Lines        3487     3487           
=======================================
  Hits         3156     3156           
  Misses        331      331           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@carlmontanari
Copy link
Owner

👋 just firing up the lab stuff to run against real gear to test too, but think this looks great. I found this and stole from here for some more test cases. this did show one case (the "match clear tabs sequence in a string" one) failing, adding g to the control chars section sorted that.

will try to get the tests ran against real boxes tonight. will holler if anything breaks there, otherwise lemme know if this update/addition looks ok to you and we can get it merged! thanks again for all the help and work @denisbondar !

@carlmontanari
Copy link
Owner

update: all the tests against container lab boxes worked so, if you're happy we'll get this merged :D

@denisbondar
Copy link
Contributor Author

Lets go! 🚀

@carlmontanari carlmontanari merged commit 50e9e33 into carlmontanari:main Jan 27, 2024
14 checks passed
@denisbondar denisbondar deleted the func/update_ansiesc_pattern branch January 28, 2024 10:30
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.

2 participants