-
Notifications
You must be signed in to change notification settings - Fork 91
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
Add ability to select path segments using Python re regexprs; follow on to PR#146 & #177 #186
base: master
Are you sure you want to change the base?
Conversation
Restructured as requested, strictly required mods - flake8 compliant - nose2 tested - tox tested for Python3.11 and Pypy3.9 - improved some tests (require verification of result...) - documentation README.rst synchronized Still TBD: - check of .github/workflows Test environment: - Running on ARM-64 Linux version 5.15.49-linuxkit (root@buildkitsandbox) (gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, GNU ld (GNU Binutils) 2.35.2) dpath-maintainers#1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 - Python 3.11.2 - pypy3 --version : Python 3.9.16 (7.3.11+dfsg-2, Feb 06 2023, 17:14:22) [PyPy 7.3.11 with GCC 12.2.0]
- new file: .github/workflows/python3Test.yml - remove this for PR
- f-strings support = for self-documenting expression introduced with Python 3.8
- includes only required changes for feature, as suggested in @moomoohk comment on April 5th - test improvements - tested on python3.8,...,3.11 and pypy3.7 & 3.9
Thanks Alain I will begin looking over your changes. My first pass will mainly aimed at style discrepancies and then I'll dive deeper into functionality. |
Hi @moomoohk, Just answered your questions, I plan to push to Github later today or tomorrow Have a good day, |
- types: addition of GlobExtend where both a glob and a regex are allowed - code : __init__.py: improved _split_path - added InvalidRegex exception - test improvements (assert expected result) and additions - change default behaviour DPATH_ACCEPT_RE_REGEXP_IN_STRING=False, kept documentation current Flake8 compliant, tested Python11/Pypy9 on debian/ARM64 Also added a workflow for testing in arbitrary branch, expected to be suppressed in PR, but more testing is in order at this time!!
- made option DPATH_ACCEPT_RE_REGEXP_IN_STRING configurable from sys. environ - separated in test_various_exts tests which require this to be True, other tests may always be run - added tox-set-rex.ini which sets (whereas the default is unset) - python3Test.yml runs both tox configurations, reduced number of Python & Pypy configs
Hi Alain, What do you think we can do about this? P.S. I've also noticed you've added a new GitHub workflow just for testing this feature. Is it truly necessary? Again, I would like this PR to be minimal and focused. This change entails the extra envar logic you've added to Regards |
Hi @moomoohk,
I hope this answers your questions, I have not yet looked at your 'polishing' modification Please let me know if this suits you, I could try to make this available by next week end |
Hi @moomoohk , Your changes Sun Apr 16 01:50:18 - 02:05:29 2023 +0300 are all fine and integrated in my development tree. Regards |
Hi @moomoohk, |
Thanks @AlainLich, sounds great. I had meant to reply to your previous comment with some notes but my computer crashed... After giving it some thought I've come to the conclusion that you're correct assuming that the tests should be run twice, with the option toggled. I've also thought about the best way to implement a testable feature flag and agree that an envar is the way to go. I've reduced the code in As for setting the feature flag for the tests, I believe adding an extra step to the existing workflow will suffice. This will ensure that non-test code has to be written around the tests themselves. I will push this update shortly for your reference. Regarding what you wrote about the branch name, the existing workflow is configured to run on pushes to pull requests as well. Now that this PR is opened I would say that your workflow can be removed. Additionally, I believe Thanks again |
OK, give me 5 hours of stability, I will integrate my stuff and push |
**NOTE** this is for my testing; if all goes well I will suppress extra workflow and push again
Hi @moomoohk , while testing, got hit (again) by
and (same code location)
My understanding is that Hypothesis generated a test case where the string was essentially started by a zero character.... in Considering that this is a different issue (no re.Pattern in sight), I will proceed to removing the unneeded workflow, and let you review the code. Full story in attachment |
Hi @moomoohk ,
Following your comments, this PR substitutes to #177 and includes only required changes to implement and test the feature. I hope that this fits your expectations.
Also, the PR is based on your latest commit abb76a1 (origin/master, origin/HEAD, master, Sat Mar 25 21:07:41 2023 +0300).
Tests through workflows at https://github.com/AlainLich/dpath-python/actions/runs/4651582912
Regards
Alain